summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml20
-rw-r--r--Makefile42
-rw-r--r--README.md2
-rw-r--r--charmap.txt2
-rw-r--r--config.mk13
-rw-r--r--data-de/event_scripts.s656
-rw-r--r--data-de/field_move_scripts.inc60
-rw-r--r--data/battle_scripts_1.s10
-rw-r--r--data/battle_scripts_2.s8
-rw-r--r--data/btl_attrs.s64
-rw-r--r--data/debug_mystery_event_scripts.s103
-rw-r--r--data/event_scripts.s656
-rw-r--r--data/field_move_scripts.inc60
-rw-r--r--data/maps/AbandonedShip_CaptainsOffice/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Corridors_B1F/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc8
-rw-r--r--data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc18
-rw-r--r--data/maps/AbandonedShip_Rooms2_1F/scripts.inc8
-rw-r--r--data/maps/AncientTomb/scripts.inc2
-rw-r--r--data/maps/AquaHideout_B1F/scripts.inc2
-rw-r--r--data/maps/AquaHideout_B2F/scripts.inc32
-rw-r--r--data/maps/BattleTower_BattleRoom/scripts.inc40
-rw-r--r--data/maps/BattleTower_Corridor/scripts.inc4
-rw-r--r--data/maps/BattleTower_Lobby/scripts.inc106
-rw-r--r--data/maps/BattleTower_Outside/scripts.inc12
-rw-r--r--data/maps/CaveOfOrigin_B4F/scripts.inc8
-rw-r--r--data/maps/DesertRuins/scripts.inc2
-rw-r--r--data/maps/DewfordTown/scripts.inc28
-rw-r--r--data/maps/DewfordTown_Gym/scripts.inc30
-rw-r--r--data/maps/DewfordTown_Hall/scripts.inc32
-rw-r--r--data/maps/DewfordTown_House2/scripts.inc2
-rw-r--r--data/maps/DewfordTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_ChampionsRoom/scripts.inc12
-rw-r--r--data/maps/EverGrandeCity_DrakesRoom/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_HallOfFame/scripts.inc4
-rw-r--r--data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/EverGrandeCity_PokemonLeague/scripts.inc6
-rw-r--r--data/maps/FallarborTown_ContestLobby/scripts.inc4
-rw-r--r--data/maps/FallarborTown_House1/scripts.inc8
-rw-r--r--data/maps/FallarborTown_House2/scripts.inc12
-rw-r--r--data/maps/FallarborTown_PokemonCenter_1F/scripts.inc4
-rw-r--r--data/maps/FortreeCity/scripts.inc10
-rw-r--r--data/maps/FortreeCity_Gym/scripts.inc4
-rw-r--r--data/maps/FortreeCity_House1/scripts.inc30
-rw-r--r--data/maps/FortreeCity_House2/scripts.inc8
-rw-r--r--data/maps/FortreeCity_House4/scripts.inc8
-rw-r--r--data/maps/FortreeCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/GraniteCave_StevensRoom/scripts.inc12
-rw-r--r--data/maps/InsideOfTruck/scripts.inc4
-rw-r--r--data/maps/IslandCave/scripts.inc2
-rw-r--r--data/maps/JaggedPass/scripts.inc8
-rw-r--r--data/maps/LavaridgeTown/scripts.inc56
-rw-r--r--data/maps/LavaridgeTown_Gym_1F/scripts.inc4
-rw-r--r--data/maps/LavaridgeTown_HerbShop/scripts.inc2
-rw-r--r--data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity/scripts.inc40
-rw-r--r--data/maps/LilycoveCity_ContestLobby/scripts.inc86
-rw-r--r--data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc4
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc6
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc20
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc28
-rw-r--r--data/maps/LilycoveCity_Harbor/scripts.inc30
-rw-r--r--data/maps/LilycoveCity_House2/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_House3/scripts.inc10
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc10
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc6
-rw-r--r--data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc12
-rw-r--r--data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc160
-rw-r--r--data/maps/LinkContestRoom1/scripts.inc20
-rw-r--r--data/maps/LittlerootTown/scripts.inc152
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc16
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc14
-rw-r--r--data/maps/LittlerootTown_MaysHouse_1F/scripts.inc20
-rw-r--r--data/maps/LittlerootTown_MaysHouse_2F/scripts.inc56
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc30
-rw-r--r--data/maps/MagmaHideout_B1F/scripts.inc2
-rw-r--r--data/maps/MauvilleCity/scripts.inc8
-rw-r--r--data/maps/MauvilleCity_BikeShop/scripts.inc22
-rw-r--r--data/maps/MauvilleCity_GameCorner/scripts.inc146
-rw-r--r--data/maps/MauvilleCity_Gym/scripts.inc16
-rw-r--r--data/maps/MauvilleCity_House2/scripts.inc10
-rw-r--r--data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/MeteorFalls_1F_2R/scripts.inc12
-rw-r--r--data/maps/MossdeepCity/scripts.inc6
-rw-r--r--data/maps/MossdeepCity_GameCorner_1F/scripts.inc24
-rw-r--r--data/maps/MossdeepCity_GameCorner_B1F/scripts.inc10
-rw-r--r--data/maps/MossdeepCity_Gym/scripts.inc52
-rw-r--r--data/maps/MossdeepCity_House1/scripts.inc4
-rw-r--r--data/maps/MossdeepCity_House2/scripts.inc4
-rw-r--r--data/maps/MossdeepCity_House3/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_House4/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc14
-rw-r--r--data/maps/MossdeepCity_StevensHouse/scripts.inc8
-rw-r--r--data/maps/MtChimney/scripts.inc14
-rw-r--r--data/maps/MtChimney_CableCarStation/scripts.inc6
-rw-r--r--data/maps/MtPyre_1F/scripts.inc2
-rw-r--r--data/maps/MtPyre_6F/scripts.inc4
-rw-r--r--data/maps/MtPyre_Summit/scripts.inc54
-rw-r--r--data/maps/NewMauville_Entrance/scripts.inc4
-rw-r--r--data/maps/NewMauville_Inside/scripts.inc2
-rw-r--r--data/maps/OldaleTown/scripts.inc8
-rw-r--r--data/maps/OldaleTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PacifidlogTown_House2/scripts.inc20
-rw-r--r--data/maps/PacifidlogTown_House3/scripts.inc30
-rw-r--r--data/maps/PacifidlogTown_House4/scripts.inc4
-rw-r--r--data/maps/PacifidlogTown_House5/scripts.inc4
-rw-r--r--data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/PetalburgCity/scripts.inc24
-rw-r--r--data/maps/PetalburgCity_Gym/scripts.inc256
-rw-r--r--data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc6
-rw-r--r--data/maps/PetalburgWoods/scripts.inc8
-rw-r--r--data/maps/Route102/scripts.inc4
-rw-r--r--data/maps/Route103/scripts.inc18
-rw-r--r--data/maps/Route104/scripts.inc20
-rw-r--r--data/maps/Route104_MrBrineysHouse/scripts.inc8
-rw-r--r--data/maps/Route104_PrettyPetalFlowerShop/scripts.inc14
-rw-r--r--data/maps/Route106/scripts.inc4
-rw-r--r--data/maps/Route107/scripts.inc4
-rw-r--r--data/maps/Route109/scripts.inc24
-rw-r--r--data/maps/Route109_SeashoreHouse/scripts.inc8
-rw-r--r--data/maps/Route110/scripts.inc66
-rw-r--r--data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc6
-rw-r--r--data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc4
-rw-r--r--data/maps/Route110_TrickHouseEnd/scripts.inc24
-rw-r--r--data/maps/Route110_TrickHouseEntrance/scripts.inc52
-rw-r--r--data/maps/Route110_TrickHousePuzzle5/scripts.inc40
-rw-r--r--data/maps/Route111/scripts.inc38
-rw-r--r--data/maps/Route111_OldLadysRestStop/scripts.inc8
-rw-r--r--data/maps/Route111_WinstrateFamilysHouse/scripts.inc12
-rw-r--r--data/maps/Route112/scripts.inc4
-rw-r--r--data/maps/Route112_CableCarStation/scripts.inc6
-rw-r--r--data/maps/Route113/scripts.inc8
-rw-r--r--data/maps/Route113_GlassWorkshop/scripts.inc126
-rw-r--r--data/maps/Route114/scripts.inc18
-rw-r--r--data/maps/Route114_FossilManiacsHouse/scripts.inc2
-rw-r--r--data/maps/Route114_FossilManiacsTunnel/scripts.inc4
-rw-r--r--data/maps/Route114_LanettesHouse/scripts.inc6
-rw-r--r--data/maps/Route115/scripts.inc12
-rw-r--r--data/maps/Route116/scripts.inc48
-rw-r--r--data/maps/Route117/scripts.inc24
-rw-r--r--data/maps/Route118/scripts.inc24
-rw-r--r--data/maps/Route119/scripts.inc24
-rw-r--r--data/maps/Route119_WeatherInstitute_2F/scripts.inc2
-rw-r--r--data/maps/Route120/scripts.inc52
-rw-r--r--data/maps/Route121/scripts.inc8
-rw-r--r--data/maps/Route121_SafariZoneEntrance/scripts.inc14
-rw-r--r--data/maps/Route123/scripts.inc12
-rw-r--r--data/maps/Route123_BerryMastersHouse/scripts.inc50
-rw-r--r--data/maps/Route124/scripts.inc12
-rw-r--r--data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc74
-rw-r--r--data/maps/Route125/scripts.inc4
-rw-r--r--data/maps/Route128/scripts.inc8
-rw-r--r--data/maps/Route130/scripts.inc4
-rw-r--r--data/maps/RustboroCity/scripts.inc20
-rw-r--r--data/maps/RustboroCity_DevonCorp_2F/scripts.inc20
-rw-r--r--data/maps/RustboroCity_DevonCorp_3F/scripts.inc8
-rw-r--r--data/maps/RustboroCity_Flat2_2F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_Gym/scripts.inc4
-rw-r--r--data/maps/RustboroCity_House1/scripts.inc28
-rw-r--r--data/maps/RustboroCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/RustboroCity_PokemonSchool/scripts.inc16
-rw-r--r--data/maps/RusturfTunnel/scripts.inc6
-rw-r--r--data/maps/SSTidalRooms/scripts.inc2
-rw-r--r--data/maps/SafariZone_Southeast/scripts.inc4
-rw-r--r--data/maps/SeafloorCavern_Room9/scripts.inc68
-rw-r--r--data/maps/SealedChamber_InnerRoom/scripts.inc4
-rw-r--r--data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc22
-rw-r--r--data/maps/ShoalCave_LowTideInnerRoom/scripts.inc12
-rw-r--r--data/maps/ShoalCave_LowTideLowerRoom/scripts.inc4
-rw-r--r--data/maps/ShoalCave_LowTideStairsRoom/scripts.inc2
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc2
-rw-r--r--data/maps/SlateportCity/scripts.inc12
-rw-r--r--data/maps/SlateportCity_ContestHall/scripts.inc2
-rw-r--r--data/maps/SlateportCity_ContestLobby/scripts.inc4
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc48
-rw-r--r--data/maps/SlateportCity_House1/scripts.inc26
-rw-r--r--data/maps/SlateportCity_House2/scripts.inc2
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc10
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc14
-rw-r--r--data/maps/SlateportCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SlateportCity_PokemonFanClub/scripts.inc40
-rw-r--r--data/maps/SootopolisCity/scripts.inc22
-rw-r--r--data/maps/SootopolisCity_Gym_1F/scripts.inc4
-rw-r--r--data/maps/SootopolisCity_House2/scripts.inc4
-rw-r--r--data/maps/SootopolisCity_House3/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_House6/scripts.inc4
-rw-r--r--data/maps/SootopolisCity_House8/scripts.inc24
-rw-r--r--data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/SouthernIsland_Exterior/scripts.inc6
-rw-r--r--data/maps/SouthernIsland_Interior/scripts.inc6
-rw-r--r--data/maps/Underwater_SealedChamber/scripts.inc6
-rw-r--r--data/maps/VerdanturfTown_ContestLobby/scripts.inc6
-rw-r--r--data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc4
-rw-r--r--data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc2
-rw-r--r--data/maps/VictoryRoad_1F/scripts.inc4
-rw-r--r--data/pokemon_storage_system.s5
-rw-r--r--data/scripts/berry_tree.inc32
-rw-r--r--data/scripts/cable_club.inc166
-rw-r--r--data/scripts/contest_hall.inc238
-rw-r--r--data/scripts/day_care.inc108
-rw-r--r--data/scripts/debug.inc28
-rw-r--r--data/scripts/gabby_and_ty.inc40
-rw-r--r--data/scripts/magma_chimney.inc8
-rw-r--r--data/scripts/mauville_man.inc102
-rw-r--r--data/scripts/mystery_event_club.inc22
-rw-r--r--data/scripts/players_house.inc106
-rw-r--r--data/scripts/pokeblocks.inc98
-rw-r--r--data/scripts/safari_zone.inc8
-rw-r--r--data/scripts/secret_power_tm.inc16
-rw-r--r--data/scripts/tv.inc30
-rw-r--r--graphics/debug/debug_battle_charmap_en.bin (renamed from graphics-de/unused/old_charmap.bin)bin4096 -> 4096 bytes
-rw-r--r--graphics/debug/debug_battle_charmap_en.png (renamed from graphics-de/unused/old_charmap.png)bin1873 -> 1873 bytes
-rw-r--r--graphics/debug/debug_battle_charmap_jp.bin (renamed from graphics/unused/old_charmap.bin)bin4096 -> 4096 bytes
-rw-r--r--graphics/debug/debug_battle_charmap_jp.png (renamed from graphics/unused/old_charmap.png)bin1934 -> 1934 bytes
-rw-r--r--include/battle.h37
-rw-r--r--include/battle_controllers.h196
-rw-r--r--include/battle_script_commands.h2
-rw-r--r--include/battle_util.h7
-rw-r--r--include/config.h10
-rw-r--r--include/constants/abilities.h2
-rw-r--r--include/constants/battle.h112
-rw-r--r--include/constants/metatile_labels.h12
-rw-r--r--include/constants/pokemon.h144
-rw-r--r--include/constants/vars.h37
-rw-r--r--include/global.h14
-rw-r--r--include/macros/event.inc10
-rw-r--r--include/overworld.h2
-rw-r--r--include/pokemon.h140
-rw-r--r--include/rom3.h73
-rw-r--r--ld_script.txt4
-rw-r--r--src/battle/anim/fight.c4
-rw-r--r--src/battle/anim/flying.c4
-rw-r--r--src/battle/anim/ice.c18
-rw-r--r--src/battle/anim/sonic.c4
-rw-r--r--src/battle_ai_script_commands.c16
-rw-r--r--src/battle_ai_switch_items.c14
-rw-r--r--src/battle_controller_link_opponent.c2
-rw-r--r--src/battle_controller_link_partner.c2
-rw-r--r--src/battle_controller_opponent.c2
-rw-r--r--src/battle_controller_player.c8
-rw-r--r--src/battle_controller_safari.c2
-rw-r--r--src/battle_controller_wally.c3
-rw-r--r--src/battle_controllers.c (renamed from src/rom3.c)333
-rw-r--r--src/battle_gfx_sfx_util.c18
-rw-r--r--src/battle_interface.c4
-rw-r--r--src/battle_main.c132
-rw-r--r--src/battle_message.c14
-rw-r--r--src/battle_records.c12
-rw-r--r--src/battle_script_commands.c967
-rw-r--r--src/battle_setup.c31
-rw-r--r--src/battle_tower.c6
-rw-r--r--src/battle_util.c478
-rw-r--r--src/berry.c4
-rw-r--r--src/berry_blender.c21
-rw-r--r--src/bike.c19
-rw-r--r--src/cable_club.c2
-rw-r--r--src/calculate_base_damage.c8
-rw-r--r--src/clock.c68
-rw-r--r--src/contest.c10
-rw-r--r--src/contest_link_80C2020.c2
-rw-r--r--src/data/graphics.c16
-rw-r--r--src/data/wild_encounters.json7
-rw-r--r--src/data/wild_encounters.json.txt14
-rw-r--r--src/debug/ereader_debug_menu.c16
-rw-r--r--src/debug/matsuda_debug_menu.c40
-rw-r--r--src/debug/mori_debug_menu.c6
-rw-r--r--src/debug/nakamura_debug_menu.c39
-rw-r--r--src/debug/nohara_debug_menu.c99
-rw-r--r--src/debug/sound_check_menu.c16
-rw-r--r--src/debug/start_menu_debug.c495
-rw-r--r--src/debug/taya_debug_window.c24
-rw-r--r--src/debug/tomomichi_debug_menu.c156
-rw-r--r--src/debug/watanabe_debug_menu.c124
-rw-r--r--src/event_data.c4
-rw-r--r--src/field_specials.c2
-rw-r--r--src/field_weather.c30
-rw-r--r--src/item_use.c159
-rw-r--r--src/mail.c66
-rw-r--r--src/main.c10
-rw-r--r--src/overworld.c2
-rw-r--r--src/pokemon_item_effect.c4
-rw-r--r--src/pokemon_summary_screen.c10
-rw-r--r--src/reset_rtc_screen.c8
-rw-r--r--src/rom_8077ABC.c10
-rw-r--r--src/safari_zone.c2
-rw-r--r--src/scrcmd.c2
-rw-r--r--src/script_pokemon_util_80C4BF0.c6
-rw-r--r--src/slot_machine.c70
-rw-r--r--src/trainer_card.c2
-rw-r--r--src/tv.c4
-rw-r--r--src/wild_encounter.c21
-rw-r--r--sym_ewram.txt12
-rwxr-xr-xtools/jsonproc/inja.hpp275
-rwxr-xr-xtools/jsonproc/jsonproc.cpp20
-rw-r--r--tools/scaninc/Makefile2
298 files changed, 5605 insertions, 5330 deletions
diff --git a/.gitignore b/.gitignore
index 760b36628..64c9e3230 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,4 @@ build/
.vs/
.projects/ARM/
*.diff
+porymap.project.cfg
diff --git a/.travis.yml b/.travis.yml
index 968547949..a476f9a61 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,12 +31,12 @@ matrix:
env: _="Build"
script:
- make tools CXX=g++-7
- - make -j2 ruby
- - make -j2 ruby_rev1
- - make -j2 ruby_rev2
- - make -j2 sapphire
- - make -j2 sapphire_rev1
- - make -j2 sapphire_rev2
+ - make -j2 compare_ruby
+ - make -j2 compare_ruby_rev1
+ - make -j2 compare_ruby_rev2
+ - make -j2 compare_sapphire
+ - make -j2 compare_sapphire_rev1
+ - make -j2 compare_sapphire_rev2
- make -j2 modern
- os: linux
addons:
@@ -48,7 +48,7 @@ matrix:
env: _="Build Nonmatching"
script:
- make tools CXX=g++-7
- - make -j2 ruby NONMATCHING=1 COMPARE=0
+ - make -j2 ruby NONMATCHING=1
- os: linux
addons:
apt:
@@ -63,8 +63,8 @@ matrix:
- rsync -avhI graphics-de/ graphics/
script:
- make tools CXX=g++-7
- - make -j2 ruby_de
- - make -j2 sapphire_de
- - make -j2 ruby_de_debug
+ - make -j2 compare_ruby_de
+ - make -j2 compare_sapphire_de
+ - make -j2 compare_ruby_de_debug
after_success:
- .travis/calcrom/webhook.sh pokeruby
diff --git a/Makefile b/Makefile
index 479b62266..fd753b982 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ else
EXE :=
endif
-
#### Tools ####
SHELL := /bin/bash -o pipefail
@@ -38,8 +37,8 @@ GBAFIX := tools/gbafix/gbafix$(EXE)
MAPJSON := tools/mapjson/mapjson$(EXE)
JSONPROC := tools/jsonproc/jsonproc$(EXE)
-ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG) --defsym MODERN=$(MODERN)
-CPPFLAGS := -iquote include -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -D DEBUG=$(DEBUG) -D MODERN=$(MODERN)
+ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym DEBUG_TRANSLATE=$(DEBUG_TRANSLATE) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG) --defsym MODERN=$(MODERN)
+CPPFLAGS := -iquote include -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -DDEBUG_TRANSLATE=$(DEBUG_TRANSLATE) -D DEBUG=$(DEBUG) -D MODERN=$(MODERN)
ifeq ($(MODERN),0)
CPPFLAGS += -I tools/agbcc/include -nostdinc -undef
CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm
@@ -101,6 +100,7 @@ endif
#### Main Rules ####
ALL_BUILDS := ruby ruby_rev1 ruby_rev2 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug
+ALL_BUILDS := ruby ruby_rev1 ruby_rev2 sapphire sapphire_rev1 sapphire_rev2 ruby_de sapphire_de ruby_de_debug ruby_en_debug
MODERN_BUILDS := $(ALL_BUILDS:%=%_modern)
# Available targets
@@ -144,6 +144,8 @@ ifeq ($(COMPARE),1)
@$(SHA1SUM) $(BUILD_NAME).sha1
endif
+compare: ; @$(MAKE) COMPARE=1
+
mostlyclean: tidy
find sound/direct_sound_samples \( -iname '*.bin' \) -exec rm {} +
$(RM) $(ALL_OBJECTS)
@@ -219,17 +221,29 @@ ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN
sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN
ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1
-modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1 COMPARE=0
-ruby_modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1 COMPARE=0
-ruby_rev1_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 MODERN=1 COMPARE=0
-ruby_rev2_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 MODERN=1 COMPARE=0
-sapphire_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE MODERN=1 COMPARE=0
-sapphire_rev1_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 MODERN=1 COMPARE=0
-sapphire_rev2_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 MODERN=1 COMPARE=0
-ruby_de_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN MODERN=1 COMPARE=0
-sapphire_de_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN MODERN=1 COMPARE=0
-ruby_de_debug_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 MODERN=1 COMPARE=0
-
+modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
+ruby_modern: ; @$(MAKE) GAME_VERSION=RUBY MODERN=1
+ruby_rev1_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 MODERN=1
+ruby_rev2_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 MODERN=1
+sapphire_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE MODERN=1
+sapphire_rev1_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 MODERN=1
+sapphire_rev2_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 MODERN=1
+ruby_de_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN MODERN=1
+sapphire_de_modern: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN MODERN=1
+ruby_de_debug_modern: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 MODERN=1
+
+ruby_en_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 DEBUG_TRANSLATE=1
+
+compare_ruby: ; @$(MAKE) GAME_VERSION=RUBY COMPARE=1
+compare_ruby_rev1: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=1 COMPARE=1
+compare_ruby_rev2: ; @$(MAKE) GAME_VERSION=RUBY GAME_REVISION=2 COMPARE=1
+compare_sapphire: ; @$(MAKE) GAME_VERSION=SAPPHIRE COMPARE=1
+compare_sapphire_rev1: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=1 COMPARE=1
+compare_sapphire_rev2: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_REVISION=2 COMPARE=1
+compare_ruby_de: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN COMPARE=1
+compare_sapphire_de: ; @$(MAKE) GAME_VERSION=SAPPHIRE GAME_LANGUAGE=GERMAN COMPARE=1
+compare_ruby_de_debug: ; @$(MAKE) GAME_VERSION=RUBY GAME_LANGUAGE=GERMAN DEBUG=1 COMPARE=1
+compare_ruby_en_debug: ; @$(MAKE) GAME_VERSION=RUBY DEBUG=1 DEBUG_TRANSLATE=1 COMPARE=1
#### Graphics Rules ####
diff --git a/README.md b/README.md
index 03efcf59a..5eb1caebf 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ To set up the repository, see [INSTALL.md](INSTALL.md).
[poketcg]: https://github.com/pret/poketcg
[pokefirered]: https://github.com/pret/pokefirered
[pokeemerald]: https://github.com/pret/pokeemerald
-[Discord]: https://discord.gg/6EuWgX9
+[Discord]: https://discord.gg/d5dubZ3
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret
[travis]: https://travis-ci.org/pret/pokeruby
[travis-badge]: https://travis-ci.org/pret/pokeruby.svg?branch=master
diff --git a/charmap.txt b/charmap.txt
index c78a70d7d..d7138d82a 100644
--- a/charmap.txt
+++ b/charmap.txt
@@ -48,7 +48,9 @@ LV = 34
'¿' = 51
'¡' = 52
PK = 53
+MN = 54
PKMN = 53 54
+POKE = 55 56
POKEBLOCK = 55 56 57 58 59
'Í' = 5A
'%' = 5B
diff --git a/config.mk b/config.mk
index 46748a068..303af6233 100644
--- a/config.mk
+++ b/config.mk
@@ -6,7 +6,8 @@ GAME_REVISION ?= 0
GAME_LANGUAGE ?= ENGLISH
DEBUG ?= 0
MODERN ?= 0
-COMPARE ?= 1
+DEBUG_TRANSLATE ?= 0
+COMPARE ?= 0
# For gbafix
MAKER_CODE := 01
@@ -54,9 +55,19 @@ else
endif
endif
+# Debug translations (always nonmatching)
+ifeq ($(DEBUG_TRANSLATE),1)
+ COMPARE := 0
+ DEBUG = 1
+endif
+
# Debug
ifeq ($(DEBUG), 1)
BUILD_NAME := $(BUILD_NAME)_debug
+ifeq ($(GAME_LANGUAGE), ENGLISH)
+ COMPARE := 0
+ DEBUG_TRANSLATE := 1
+endif
endif
# Modern GCC
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s
index cbec54125..7d5e284f1 100644
--- a/data-de/event_scripts.s
+++ b/data-de/event_scripts.s
@@ -424,7 +424,7 @@ gUnknown_0815F399:: @ 815F399
EventScript_15F3A0:
multichoice 0, 0, 6, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F432
case 1, EventScript_15F419
case 2, EventScript_15F436
@@ -434,7 +434,7 @@ EventScript_15F3A0:
EventScript_15F3E2:
multichoice 0, 0, 5, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F432
case 1, EventScript_15F419
case 2, EventScript_15F51D
@@ -443,7 +443,7 @@ EventScript_15F3E2:
EventScript_15F419:
msgbox UnknownString_81A38FB, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F384
closemessage
special SecretBasePC_PackUp
@@ -474,7 +474,7 @@ EventScript_15F452:
message UnknownString_81A3A87
waitmessage
multichoice 0, 0, 7, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F4A1
case 1, EventScript_15F436
case 2, EventScript_15F511
@@ -489,13 +489,13 @@ gUnknown_0815F49A:: @ 815F49A
EventScript_15F4A1:
special sub_80BC56C
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_15F4E0
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_15F503
special BufferSecretBaseOwnerName
msgbox UnknownString_81A3958, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F452
msgbox UnknownString_81A3A22, 3
special sub_80BC5BC
@@ -505,7 +505,7 @@ EventScript_15F4A1:
EventScript_15F4E0:
msgbox UnknownString_81A3982, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F452
msgbox UnknownString_81A3A3A, 3
special sub_80BC5BC
@@ -539,13 +539,13 @@ gUnknown_0815F523:: @ 815F523
gUnknown_0815F528:: @ 815F528
special GetShieldToyTVDecorationInfo
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_15F558
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_15F561
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_15F56A
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq EventScript_15F573
end
@@ -952,10 +952,10 @@ gUnknown_0819F80B:: @ 819F80B
gUnknown_0819F818:: @ 819F818
lock
faceplayer
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
- specialvar RESULT, ScrSpecial_HasTrainerBeenFought
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F83F
special PlayTrainerEncounterMusic
special sub_8082524
@@ -968,11 +968,11 @@ gUnknown_0819F840:: @ 819F840
lock
faceplayer
call EventScript_19F8E5
- specialvar RESULT, ScrSpecial_HasTrainerBeenFought
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F877
special CheckForAlivePartyMons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F870
special PlayTrainerEncounterMusic
special sub_8082524
@@ -989,7 +989,7 @@ EventScript_19F877:
gotopostbattlescript
gUnknown_0819F878:: @ 819F878
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
special PlayTrainerEncounterMusic
trainerbattlebegin
@@ -997,8 +997,8 @@ gUnknown_0819F878:: @ 819F878
gUnknown_0819F887:: @ 819F887
call EventScript_19F8E5
- specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F8AD
special PlayTrainerEncounterMusic
special sub_8082524
@@ -1014,11 +1014,11 @@ EventScript_19F8AD:
gotopostbattlescript
gUnknown_0819F8AE:: @ 819F8AE
- specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F8DD
special CheckForAlivePartyMons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F8DE
special PlayTrainerEncounterMusic
special sub_8082524
@@ -1041,7 +1041,7 @@ EventScript_19F8DE:
end
EventScript_19F8E5:
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
return
@@ -1054,16 +1054,16 @@ EventScript_19F8F2:
waitmessage
waitbuttonpress
trainerbattlebegin
- specialvar RESULT, ScrSpecial_GetTrainerBattleMode
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerBattleMode
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F934
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_19F936
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_19F936
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_19F936
- compare RESULT, 8
+ compare VAR_RESULT, 8
goto_if_eq EventScript_19F936
EventScript_19F934:
@@ -1441,9 +1441,9 @@ VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B
lock
faceplayer
msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FD7C
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDC7
end
@@ -1451,11 +1451,11 @@ OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C
incrementgamestat GAME_STAT_USED_POKECENTER
message gText_NurseJoy_OkayIllTakeYourPokemon
waitmessage
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A083F
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A083F
waitmovement 0
dofieldeffect FLDEFF_POKECENTER_HEAL
waitfieldeffect FLDEFF_POKECENTER_HEAL
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A0845
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A0845
waitmovement 0
special ScrSpecial_HealPlayerParty
goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
@@ -1465,7 +1465,7 @@ OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C
OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0
message gText_NurseJoy_ThankYouForWaiting
waitmessage
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_19FDF4
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_19FDF4
waitmovement 0
message gText_NurseJoy_WeHopeToSeeYouAgain
waitmessage
@@ -1477,10 +1477,10 @@ OldaleTown_PokemonCenter_1F_EventScript_19FDC7:: @ 819FDC7
return
OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE
- specialvar RESULT, IsPokerusInParty
- compare RESULT, 1
+ specialvar VAR_RESULT, IsPokerusInParty
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0
end
@@ -1496,23 +1496,23 @@ OldaleTown_PokemonCenter_1F_Movement_19FDF4:: @ 819FDF4
end_movement
Std_ObtainItem: @ 819FDF7
- giveitem VAR_SPECIAL_0, VAR_SPECIAL_1
- copyvar VAR_SPECIAL_7, RESULT
+ giveitem VAR_0x8000, VAR_0x8001
+ copyvar VAR_0x8007, VAR_RESULT
call Std_ObtainItem_
return
Std_ObtainItem_: @ 819FE07
- bufferitemname 1, VAR_SPECIAL_0
- checkitemtype VAR_SPECIAL_0
+ bufferitemname 1, VAR_0x8000
+ checkitemtype VAR_0x8000
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 0x1
+ compare VAR_0x8007, 0x1
call_if_eq Std_ObtainItem_Success
- compare VAR_SPECIAL_7, 0x0
+ compare VAR_0x8007, 0x0
call_if_eq Std_ObtainItem_Fail
return
GetItem_HandlePocket:
- switch RESULT
+ switch VAR_RESULT
case POCKET_ITEMS, GetItem_HandlePocket_Items
case POCKET_KEY_ITEMS, GetItem_HandlePocket_KeyItems
case POCKET_POKE_BALLS, GetItem_HandlePocket_PokeBalls
@@ -1522,31 +1522,31 @@ GetItem_HandlePocket:
GetItem_HandlePocket_Items:
bufferstdstring 2, 0xE
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_KeyItems:
bufferstdstring 2, 0xF
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_PokeBalls:
bufferstdstring 2, 0x10
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_TMsHMs:
bufferstdstring 2, 0x11
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetTMHMFanfare
return
GetItem_HandlePocket_Berries:
bufferstdstring 2, 0x12
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
@@ -1555,11 +1555,11 @@ Std_ObtainItem_Success: @ 819FEB7
waitfanfare
waitmessage
msgbox Message_PutAwayItem
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
Std_ObtainItem_Fail: @ 819FECC
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
PlayGetItemFanfare:
@@ -1571,16 +1571,16 @@ PlayGetTMHMFanfare:
return
Std_ObtainDecoration: @ 819FEDA
- givedecoration VAR_SPECIAL_0
- copyvar VAR_SPECIAL_7, RESULT
+ givedecoration VAR_0x8000
+ copyvar VAR_0x8007, VAR_RESULT
call Std_ObtainDecoration_
return
Std_ObtainDecoration_: @ 819FEE8
- bufferdecorationname 1, VAR_SPECIAL_0
- compare VAR_SPECIAL_7, 1
+ bufferdecorationname 1, VAR_0x8000
+ compare VAR_0x8007, 1
call_if_eq Std_ObtainDecoration_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
call_if_eq Std_ObtainDecoration_Fail
return
@@ -1590,31 +1590,31 @@ Std_ObtainDecoration_Success: @ 819FF03
waitfanfare
waitmessage
msgbox Message_TransferredToPC
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
Std_ObtainDecoration_Fail: @ 819FF1B
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
Std_FindItem: @ 819FF21
lock
faceplayer
waitse
- giveitem VAR_SPECIAL_0, VAR_SPECIAL_1
- copyvar VAR_SPECIAL_7, RESULT
- bufferitemname 1, VAR_SPECIAL_0
- checkitemtype VAR_SPECIAL_0
+ giveitem VAR_0x8000, VAR_0x8001
+ copyvar VAR_0x8007, VAR_RESULT
+ bufferitemname 1, VAR_0x8000
+ checkitemtype VAR_0x8000
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq Std_FindItem_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
call_if_eq Std_FindItem_Fail
release
return
Std_FindItem_Success: @ 819FF52
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
message Message_FoundOneItem
waitfanfare
waitmessage
@@ -1624,20 +1624,20 @@ Std_FindItem_Success: @ 819FF52
Std_FindItem_Fail: @ 819FF65
msgbox Message_ObtainedItem
msgbox Message_BagFull
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
HiddenItemScript:: @ 819FF7B
lockall
waitse
- giveitem VAR_SPECIAL_5, 1
- copyvar VAR_SPECIAL_7, RESULT
- bufferitemname 0x1, VAR_SPECIAL_5
- checkitemtype VAR_SPECIAL_5
+ giveitem VAR_0x8005, 1
+ copyvar VAR_0x8007, VAR_RESULT
+ bufferitemname 0x1, VAR_0x8005
+ checkitemtype VAR_0x8005
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq HiddenItemScript_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
goto_if_eq HiddenItemScript_Fail
end
@@ -1653,7 +1653,7 @@ HiddenItemScript_Success:
HiddenItemScript_Fail:
msgbox Message_FoundOneItem
msgbox Message_BagFull
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
releaseall
end
@@ -1661,9 +1661,9 @@ UnusedMixRecordsScript: @ 819FFD5
lock
faceplayer
msgbox UnusedMixRecordsPromptText, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq UnusedMixRecordsScript_Yes
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UnusedMixRecordsScript_Done
goto UnusedMixRecordsScript_Done
UnusedMixRecordsScript_Yes: @ 819FFFA
@@ -1680,7 +1680,7 @@ UnusedMixRecordsScript_Done: @ 81A0000
gUnknown_081A0009:: @ 81A0009
lockall
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox UnknownString_81A09EC, 4
@@ -1696,7 +1696,7 @@ EventScript_1A0023:
end
EventScript_1A0033:
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_1A0085
case 1, EventScript_1A0070
case 2, EventScript_1A00CB
@@ -1731,7 +1731,7 @@ EventScript_1A00B5:
return
EventScript_1A00BE:
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
playse SE_PC_OFF
special DoPCTurnOffEffect
releaseall
@@ -1802,26 +1802,26 @@ RustboroCity_Gym_EventScript_1A00FB:: @ 81A00FB
DewfordTown_EventScript_1A0102:: @ 81A0102
DewfordTown_Hall_EventScript_1A0102:: @ 81A0102
dodailyevents
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special BufferTrendyPhraseString
return
DewfordTown_EventScript_1A010C:: @ 81A010C
Route104_MrBrineysHouse_EventScript_1A010C:: @ 81A010C
Route109_EventScript_1A010C:: @ 81A010C
- copyvar VAR_SPECIAL_8, VAR_BRINEY_LOCATION
+ copyvar VAR_0x8008, VAR_BRINEY_LOCATION
setvar VAR_BRINEY_LOCATION, 0
return
UseSurfScript:: @ 81A0117
checkpartymove MOVE_SURF
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq UseSurfScript_NoMon
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
lockall
msgbox UseSurfPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UseSurfScript_No
msgbox UsedSurfText, 4
dofieldeffect FLDEFF_USE_SURF
@@ -1840,9 +1840,9 @@ Route110_EventScript_1A014E:: @ 81A014E
Route119_EventScript_1A014E:: @ 81A014E
RustboroCity_EventScript_1A014E:: @ 81A014E
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_EventScript_1A0166
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_EventScript_1A016C
end
@@ -1858,9 +1858,9 @@ LavaridgeTown_EventScript_1A0172:: @ 81A0172
Route110_EventScript_1A0172:: @ 81A0172
Route119_EventScript_1A0172:: @ 81A0172
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_EventScript_1A018A
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LavaridgeTown_EventScript_1A0190
end
@@ -1931,7 +1931,7 @@ MossdeepCity_Gym_EventScript_1A01C0:: @ 81A01C0
PetalburgCity_Gym_EventScript_1A01C0:: @ 81A01C0
RustboroCity_Gym_EventScript_1A01C0:: @ 81A01C0
SootopolisCity_Gym_1F_EventScript_1A01C0:: @ 81A01C0
- switch VAR_SPECIAL_8
+ switch VAR_0x8008
case 1, DewfordTown_Gym_EventScript_1A021E
case 2, DewfordTown_Gym_EventScript_1A0225
case 3, DewfordTown_Gym_EventScript_1A022F
@@ -2187,7 +2187,7 @@ Route103_EventScript_1A037F:: @ 81A037F
lock
faceplayer
msgbox Route101_Text_1C4449, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route101_EventScript_1A039B
call Route101_EventScript_1A03B0
release
@@ -2199,7 +2199,7 @@ Route101_EventScript_1A039B:: @ 81A039B
end
Route101_EventScript_1A03A5:: @ 81A03A5
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_9
+ copyvar VAR_0x8004, VAR_0x8009
special ShowPokedexRatingMessage
waitmessage
waitbuttonpress
@@ -2207,23 +2207,23 @@ Route101_EventScript_1A03A5:: @ 81A03A5
EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0
Route101_EventScript_1A03B0:: @ 81A03B0
- setvar VAR_SPECIAL_4, 0
- specialvar RESULT, ScriptGetPokedexInfo
- copyvar VAR_SPECIAL_8, VAR_SPECIAL_5
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- copyvar VAR_SPECIAL_A, RESULT
- buffernumberstring 0, VAR_SPECIAL_8
- buffernumberstring 1, VAR_SPECIAL_9
+ setvar VAR_0x8004, 0
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ copyvar VAR_0x800A, VAR_RESULT
+ buffernumberstring 0, VAR_0x8008
+ buffernumberstring 1, VAR_0x8009
msgbox Route101_Text_1C44DC, 4
call Route101_EventScript_1A03A5
- compare VAR_SPECIAL_A, 0
+ compare VAR_0x800A, 0
goto_if_eq Route101_EventScript_1A14DC
- setvar VAR_SPECIAL_4, 1
- specialvar RESULT, ScriptGetPokedexInfo
- copyvar VAR_SPECIAL_8, VAR_SPECIAL_5
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- buffernumberstring 0, VAR_SPECIAL_8
- buffernumberstring 1, VAR_SPECIAL_9
+ setvar VAR_0x8004, 1
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ buffernumberstring 0, VAR_0x8008
+ buffernumberstring 1, VAR_0x8009
msgbox Route101_Text_1C4B05, 4
return
@@ -2231,7 +2231,7 @@ BattleTower_Outside_EventScript_1A040E:: @ 81A040E
LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E
SlateportCity_Harbor_EventScript_1A040E:: @ 81A040E
delay 60
- applymovement VAR_SPECIAL_4, SlateportCity_Harbor_Movement_1A041C
+ applymovement VAR_0x8004, SlateportCity_Harbor_Movement_1A041C
waitmovement 0
return
@@ -2283,9 +2283,9 @@ Movement_1A047A:
BattleTower_Outside_EventScript_1A047C:: @ 81A047C
SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq BattleTower_Outside_EventScript_160B2F
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq BattleTower_Outside_EventScript_160B3A
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
@@ -2325,8 +2325,8 @@ CaveOfOrigin_B3F_EventScript_1A04BB:: @ 81A04BB
CaveOfOrigin_1F_EventScript_1A04D3:: @ 81A04D3
CaveOfOrigin_B2F_EventScript_1A04D3:: @ 81A04D3
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
special sub_810F758
waitstate
releaseall
@@ -2379,56 +2379,56 @@ MagmaHideout_B1F_EventScript_1A051B:: @ 81A051B
Route120_EventScript_1A0539:: @ 81A0539
lock
faceplayer
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0546:: @ 81A0546
lock
faceplayer
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0553:: @ 81A0553
lock
faceplayer
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0560:: @ 81A0560
lock
faceplayer
- setvar VAR_SPECIAL_4, 4
+ setvar VAR_0x8004, 4
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A056D:: @ 81A056D
lock
faceplayer
- setvar VAR_SPECIAL_4, 5
+ setvar VAR_0x8004, 5
goto Route120_EventScript_1A0594
end
Route119_EventScript_1A057A:: @ 81A057A
lock
faceplayer
- setvar VAR_SPECIAL_4, 6
+ setvar VAR_0x8004, 6
goto Route119_EventScript_1A0594
end
Route119_EventScript_1A0587:: @ 81A0587
lock
faceplayer
- setvar VAR_SPECIAL_4, 7
+ setvar VAR_0x8004, 7
goto Route119_EventScript_1A0594
end
Route119_EventScript_1A0594:: @ 81A0594
Route120_EventScript_1A0594:: @ 81A0594
checkitem ITEM_DEVON_SCOPE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route119_EventScript_1A05AE
msgbox Route119_Text_171B93, 4
release
@@ -2436,7 +2436,7 @@ Route120_EventScript_1A0594:: @ 81A0594
Route119_EventScript_1A05AE:: @ 81A05AE
msgbox Route119_Text_171BB6, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route119_EventScript_1A05C3
release
end
@@ -2444,28 +2444,28 @@ Route119_EventScript_1A05AE:: @ 81A05AE
Route119_EventScript_1A05C3:: @ 81A05C3
msgbox Route119_Text_171BF6, 4
closemessage
- applymovement LAST_TALKED, Route119_Movement_1A0839
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A0839
waitmovement 0
- applymovement LAST_TALKED, Route119_Movement_1A0662
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A0662
waitmovement 0
waitse
playmoncry SPECIES_KECLEON, 2
delay 40
waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq Route119_EventScript_1A0646
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
call_if_eq Route119_EventScript_1A064A
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
call_if_eq Route119_EventScript_1A064E
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
call_if_eq Route119_EventScript_1A0652
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
call_if_eq Route119_EventScript_1A0656
- compare VAR_SPECIAL_4, 6
+ compare VAR_0x8004, 6
call_if_eq Route119_EventScript_1A065A
- compare VAR_SPECIAL_4, 7
+ compare VAR_0x8004, 7
call_if_eq Route119_EventScript_1A065E
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
@@ -2540,12 +2540,12 @@ FallarborTown_House1_EventScript_1A067F:: @ 81A067F
GraniteCave_StevensRoom_EventScript_1A067F:: @ 81A067F
MtPyre_Summit_EventScript_1A067F:: @ 81A067F
SlateportCity_OceanicMuseum_2F_EventScript_1A067F:: @ 81A067F
- bufferitemname 0, VAR_SPECIAL_4
+ bufferitemname 0, VAR_0x8004
playfanfare MUS_ME_WAZA
message FallarborTown_House1_Text_1A1498
waitmessage
waitfanfare
- takeitem VAR_SPECIAL_4, 1
+ takeitem VAR_0x8004, 1
return
EverGrandeCity_DrakesRoom_EventScript_1A0693:: @ 81A0693
@@ -3261,7 +3261,7 @@ gUnknown_081A14B8:: @ 81A14B8
lockall
special ExecuteWhiteOut
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A14CA
releaseall
end
@@ -3617,32 +3617,32 @@ SecretBase_RedCave1_Text_1A2BA4:: @ 81A2BA4
gUnknown_081A2C51:: @ 81A2C51
special sub_80BB70C
special CheckPlayerHasSecretBase
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq AskToMoveSecretBase
checkpartymove MOVE_SECRET_POWER
- setfieldeffectargument 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
buffermovename 1, MOVE_SECRET_POWER
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq EventScript_1A2D08
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq EventScript_1A2D60
end
EventScript_1A2CB0:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2CF1
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_8198F34, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3669,11 +3669,11 @@ EventScript_1A2CFA:
EventScript_1A2D08:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2D49
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_81A197B, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3700,11 +3700,11 @@ EventScript_1A2D52:
EventScript_1A2D60:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2DA1
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_81A1A4B, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3736,8 +3736,8 @@ EventScript_1A2DB8:
setflag FLAG_DECORATION_1
special sub_80BB8CC
special sub_80BBAF0
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 0
special sub_80BBDD0
setvar VAR_0x4089, 1
waitstate
@@ -3748,7 +3748,7 @@ SecretBase_RedCave1_EventScript_1A2DDE:: @ 81A2DDE
waitmovement 0
setvar VAR_0x4097, 1
msgbox SecretBase_RedCave1_Text_198F89, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SecretBase_RedCave1_EventScript_1A2E08
closemessage
playse SE_KAIDAN
@@ -3772,7 +3772,7 @@ gUnknown_081A2E14:: @ 81A2E14
setvar VAR_0x4097, 1
playse SE_KAIDAN
special sub_80BC114
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_1A2E38
clearflag FLAG_DECORATION_1
special sub_80BBAF0
@@ -3789,57 +3789,57 @@ EventScript_1A2E38:
AskToMoveSecretBase:
checkpartymove MOVE_SECRET_POWER
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2EF7
- setfieldeffectargument 0, RESULT
- setorcopyvar VAR_SPECIAL_4, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ setorcopyvar VAR_0x8004, VAR_RESULT
lockall
special GetSecretBaseNearbyMapName
msgbox UnknownString_81A3C71, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UnknownString_81A38FB, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
fadescreen 1
special MoveSecretBase
closemessage
fadescreen 0
msgbox UnknownString_81A3CC9, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
- bufferpartymonnick 0, VAR_SPECIAL_4
+ bufferpartymonnick 0, VAR_0x8004
buffermovename 1, MOVE_SECRET_POWER
msgbox UsedCutRockSmashText, 4
closemessage
closemessage
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq DoSecretBaseTreeFieldEffectScript
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq DoSecretBaseShrubFieldEffectScript
releaseall
end
EventScript_1A2EF7::
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq EventScript_1A2D49
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq EventScript_1A2DA1
end
@@ -3870,14 +3870,14 @@ SecretBase_RedCave1_EventScript_1A2F3D:: @ 81A2F3D
LittlerootTown_BrendansHouse_2F_EventScript_1A2F68:: @ 81A2F68
LittlerootTown_MaysHouse_2F_EventScript_1A2F68:: @ 81A2F68
SecretBase_RedCave1_EventScript_1A2F68:: @ 81A2F68
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 0
special sub_80BBDD0
setvar VAR_0x4089, 1
end
gUnknown_081A2F7B:: @ 81A2F7B
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
goto EventScript_1A2F86
end
@@ -3886,19 +3886,19 @@ EventScript_1A2F86:
end
gUnknown_081A2F8A:: @ 81A2F8A
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto EventScript_1A2F95
end
EventScript_1A2F95:
special sub_8100A7C
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A2FBF
- addvar VAR_SPECIAL_4, 1
- compare VAR_SPECIAL_5, 0
+ addvar VAR_0x8004, 1
+ compare VAR_0x8005, 0
goto_if_eq EventScript_1A2F95
- removeobject VAR_SPECIAL_6
- setflag VAR_SPECIAL_5
+ removeobject VAR_0x8006
+ setflag VAR_0x8005
goto EventScript_1A2F95
end
@@ -3930,41 +3930,41 @@ SecretBase_YellowCave2_EventScript_1A2FC0:: @ 81A2FC0
SecretBase_YellowCave3_EventScript_1A2FC0:: @ 81A2FC0
SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0
special sub_80BCE90
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3032
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30AE
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
goto_if_eq SecretBase_RedCave1_EventScript_1A312A
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
goto_if_eq SecretBase_RedCave1_EventScript_1A31A6
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
goto_if_eq SecretBase_RedCave1_EventScript_1A3222
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
goto_if_eq SecretBase_RedCave1_EventScript_1A329E
- compare VAR_SPECIAL_4, 6
+ compare VAR_0x8004, 6
goto_if_eq SecretBase_RedCave1_EventScript_1A331A
- compare VAR_SPECIAL_4, 7
+ compare VAR_0x8004, 7
goto_if_eq SecretBase_RedCave1_EventScript_1A3396
- compare VAR_SPECIAL_4, 8
+ compare VAR_0x8004, 8
goto_if_eq SecretBase_RedCave1_EventScript_1A3412
- compare VAR_SPECIAL_4, 9
+ compare VAR_0x8004, 9
goto_if_eq SecretBase_RedCave1_EventScript_1A348E
end
SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3086
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30A5
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1AEA, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A308F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A308F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1B83, 4
@@ -3976,7 +3976,7 @@ SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086
end
SecretBase_RedCave1_EventScript_1A308F:: @ 81A308F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1B97, 2
@@ -3988,17 +3988,17 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5
SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3102
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3121
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1E67, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A310B
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A310B
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1F04, 4
@@ -4010,7 +4010,7 @@ SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102
end
SecretBase_RedCave1_EventScript_1A310B:: @ 81A310B
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1F2E, 2
@@ -4022,17 +4022,17 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121
SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A317E
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A319D
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A218F, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3187
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3187
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2220, 4
@@ -4044,7 +4044,7 @@ SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E
end
SecretBase_RedCave1_EventScript_1A3187:: @ 81A3187
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2230, 2
@@ -4056,17 +4056,17 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D
SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A31FA
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3219
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A24E1, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3203
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3203
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A256F, 4
@@ -4078,7 +4078,7 @@ SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA
end
SecretBase_RedCave1_EventScript_1A3203:: @ 81A3203
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A258A, 2
@@ -4090,17 +4090,17 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219
SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3276
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3295
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2830, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A327F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A327F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A28D7, 4
@@ -4112,7 +4112,7 @@ SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276
end
SecretBase_RedCave1_EventScript_1A327F:: @ 81A327F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A28F4, 2
@@ -4124,17 +4124,17 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295
SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A32F2
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3311
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1CB2, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A32FB
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A32FB
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1D48, 4
@@ -4146,7 +4146,7 @@ SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2
end
SecretBase_RedCave1_EventScript_1A32FB:: @ 81A32FB
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1D59, 2
@@ -4158,17 +4158,17 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311
SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A336E
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A338D
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2026, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3377
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3377
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2095, 4
@@ -4180,7 +4180,7 @@ SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E
end
SecretBase_RedCave1_EventScript_1A3377:: @ 81A3377
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A20AE, 2
@@ -4192,17 +4192,17 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D
SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A33EA
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3409
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A236A, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A33F3
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A33F3
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2405, 4
@@ -4214,7 +4214,7 @@ SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA
end
SecretBase_RedCave1_EventScript_1A33F3:: @ 81A33F3
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2420, 2
@@ -4226,17 +4226,17 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409
SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3466
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3485
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2663, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A346F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A346F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2710, 4
@@ -4248,7 +4248,7 @@ SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466
end
SecretBase_RedCave1_EventScript_1A346F:: @ 81A346F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2736, 2
@@ -4260,17 +4260,17 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485
SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A34E2
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3501
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2A13, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A34EB
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A34EB
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2AE2, 4
@@ -4282,7 +4282,7 @@ SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2
end
SecretBase_RedCave1_EventScript_1A34EB:: @ 81A34EB
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2AFB, 2
@@ -4294,8 +4294,8 @@ SecretBase_RedCave1_EventScript_1A3501:: @ 81A3501
SecretBase_RedCave1_EventScript_1A350A:: @ 81A350A
special sub_80BCE1C
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 0
special StartSpecialBattle
waitstate
special ScrSpecial_HealPlayerParty
@@ -4400,29 +4400,29 @@ SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46
end
SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox SlateportCity_PokemonFanClub_Text_1A8704, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE84
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9
end
SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84
msgbox SlateportCity_PokemonFanClub_Text_1A87CA, 4
- setvar VAR_SPECIAL_4, 5
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8004, 5
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 1
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEC3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9
end
@@ -4433,7 +4433,7 @@ SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9
SlateportCity_PokemonFanClub_EventScript_1ADEC3:: @ 81ADEC3
msgbox SlateportCity_PokemonFanClub_Text_1A8818, 4
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
goto SlateportCity_PokemonFanClub_EventScript_1ADE46
end
@@ -4445,39 +4445,39 @@ SlateportCity_PokemonFanClub_EventScript_1ADED6:: @ 81ADED6
SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0
lock
faceplayer
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
goto_if_set FLAG_OCEANIC_MUSEUM_MET_REPORTER, SlateportCity_OceanicMuseum_1F_EventScript_1ADF25
setflag FLAG_OCEANIC_MUSEUM_MET_REPORTER
msgbox SlateportCity_OceanicMuseum_1F_Text_1A927F, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
SlateportCity_OceanicMuseum_1F_EventScript_1ADF25:: @ 81ADF25
msgbox SlateportCity_OceanicMuseum_1F_Text_1A934C, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44
msgbox SlateportCity_OceanicMuseum_1F_Text_1A93D1, 4
- setvar VAR_SPECIAL_4, 5
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 5
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call SlateportCity_OceanicMuseum_1F_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
@@ -4488,7 +4488,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79
SlateportCity_OceanicMuseum_1F_EventScript_1ADF83:: @ 81ADF83
msgbox SlateportCity_OceanicMuseum_1F_Text_1A949A, 4
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
goto SlateportCity_OceanicMuseum_1F_EventScript_1ADE46
end
@@ -4500,26 +4500,26 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96
SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0
lock
faceplayer
- specialvar RESULT, LeadMonNicknamed
- compare RESULT, 0
+ specialvar VAR_RESULT, LeadMonNicknamed
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8005, 3
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox SlateportCity_PokemonFanClub_Text_1A82F1, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADFE9
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
end
SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9
msgbox SlateportCity_PokemonFanClub_Text_1A83D0, 4
random 3
- copyvar VAR_SPECIAL_A, RESULT
- switch RESULT
+ copyvar VAR_0x800A, VAR_RESULT
+ switch VAR_RESULT
case 0, SlateportCity_PokemonFanClub_EventScript_1AE020
case 1, SlateportCity_PokemonFanClub_EventScript_1AE02E
case 2, SlateportCity_PokemonFanClub_EventScript_1AE03C
@@ -4541,24 +4541,24 @@ SlateportCity_PokemonFanClub_EventScript_1AE03C:: @ 81AE03C
end
SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A
- setvar VAR_SPECIAL_4, 7
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 7
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
msgbox SlateportCity_PokemonFanClub_Text_1A852D, 4
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8006, 1
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
msgbox SlateportCity_PokemonFanClub_Text_1A85A6, 4
- copyvar VAR_SPECIAL_7, VAR_SPECIAL_A
- setvar VAR_SPECIAL_5, 3
+ copyvar VAR_0x8007, VAR_0x800A
+ setvar VAR_0x8005, 3
goto SlateportCity_PokemonFanClub_EventScript_1ADE46
end
@@ -4579,29 +4579,29 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
lock
faceplayer
goto_if_set FLAG_TEMP_2, FallarborTown_ContestLobby_EventScript_1AE17E
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox FallarborTown_ContestLobby_Text_1A6F7C, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE0F8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
end
FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8
msgbox FallarborTown_ContestLobby_Text_1A704E, 4
- setvar VAR_SPECIAL_4, 11
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 11
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call FallarborTown_ContestLobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE137
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
end
@@ -4611,20 +4611,20 @@ FallarborTown_ContestLobby_EventScript_1AE12D:: @ 81AE12D
end
FallarborTown_ContestLobby_EventScript_1AE137:: @ 81AE137
- setvar VAR_SPECIAL_4, 24
+ setvar VAR_0x8004, 24
special SetContestCategoryStringVarForInterview
msgbox FallarborTown_ContestLobby_Text_1A70A5, 4
- setvar VAR_SPECIAL_4, 11
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8004, 11
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 1
call FallarborTown_ContestLobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
msgbox FallarborTown_ContestLobby_Text_1A7153, 4
setflag FLAG_TEMP_2
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
goto FallarborTown_ContestLobby_EventScript_1ADE46
end
@@ -4639,9 +4639,9 @@ SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188
VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188
compare VAR_LINK_CONTEST_ROOM_STATE, 2
goto_if_ne FallarborTown_ContestLobby_EventScript_1AE1FE
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE
switch VAR_CONTEST_LOCATION
case 0, FallarborTown_ContestLobby_EventScript_1AE1FE
@@ -4675,15 +4675,15 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF
lock
faceplayer
goto_if_set FLAG_TEMP_2, BattleTower_Lobby_EventScript_1AE2E3
- setvar VAR_SPECIAL_5, 7
+ setvar VAR_0x8005, 7
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE2E3
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox BattleTower_Lobby_Text_1A776D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq BattleTower_Lobby_EventScript_1AE241
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BattleTower_Lobby_EventScript_1AE297
end
@@ -4691,20 +4691,20 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241
message BattleTower_Lobby_Text_1A7823
waitmessage
multichoice 19, 8, 45, 1
- copyvar VAR_SPECIAL_8, RESULT
- compare RESULT, 0
+ copyvar VAR_0x8008, VAR_RESULT
+ compare VAR_RESULT, 0
call_if_eq BattleTower_Lobby_EventScript_1AE2A1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq BattleTower_Lobby_EventScript_1AE2AA
msgbox BattleTower_Lobby_Text_1A79EB, 4
- setvar VAR_SPECIAL_4, 12
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
+ setvar VAR_0x8004, 12
+ copyvar VAR_0x8005, VAR_0x8009
call BattleTower_Lobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE2B3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE2D9
end
@@ -4722,12 +4722,12 @@ BattleTower_Lobby_EventScript_1AE2AA:: @ 81AE2AA
return
BattleTower_Lobby_EventScript_1AE2B3:: @ 81AE2B3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE2D9
msgbox BattleTower_Lobby_Text_1A7A6E, 4
setflag FLAG_TEMP_2
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- setvar VAR_SPECIAL_5, 7
+ copyvar VAR_0x8004, VAR_0x8008
+ setvar VAR_0x8005, 7
goto BattleTower_Lobby_EventScript_1ADE46
end
@@ -4744,9 +4744,9 @@ BattleTower_Lobby_EventScript_1AE2E3:: @ 81AE2E3
BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED
compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE30F
- setvar VAR_SPECIAL_5, 7
+ setvar VAR_0x8005, 7
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE30F
clearflag FLAG_HIDE_REPORTER_BATTLE_TOWER
return
@@ -4808,25 +4808,25 @@ Text_RepelWoreOff: @ 81C33EF
MauvilleCity_GameCorner_EventScript_1C407E:: @ 81C407E
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
getpricereduction 2
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA
- addvar VAR_SPECIAL_4, 128
+ addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_1C40DA
end
MauvilleCity_GameCorner_EventScript_1C40AC:: @ 81C40AC
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
getpricereduction 2
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA
- addvar VAR_SPECIAL_4, 128
+ addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_1C40DA
end
diff --git a/data-de/field_move_scripts.inc b/data-de/field_move_scripts.inc
index ef06df21f..24d77e6f8 100644
--- a/data-de/field_move_scripts.inc
+++ b/data-de/field_move_scripts.inc
@@ -2,13 +2,13 @@ S_CuttableTree:: @ 81B0DCC
lockall
goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseCut
- setfieldeffectargument 0, RESULT
- bufferpartymonnick 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_CUT
msgbox UseCutPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Cut_ChoseNo
msgbox UsedCutRockSmashText, 4
closemessage
@@ -25,9 +25,9 @@ DoCutFieldEffectScript:: @ 81B0E16
end
DoTreeCutMovement: @ 81B0E21
- applymovement LAST_TALKED, TreeCutMovement @ tree cut animation
+ applymovement VAR_LAST_TALKED, TreeCutMovement @ tree cut animation
waitmovement 0
- removeobject LAST_TALKED @ tree disappears
+ removeobject VAR_LAST_TALKED @ tree disappears
releaseall
end
@@ -62,13 +62,13 @@ S_BreakableRock:: @ 81B0EB7
lockall
goto_if_unset FLAG_BADGE03_GET, CannotUseRockSmash
checkpartymove MOVE_ROCK_SMASH
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseRockSmash
- setfieldeffectargument 0, RESULT
- bufferpartymonnick 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_ROCK_SMASH
msgbox UseRockSmashPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq RockSmash_ChoseNo
msgbox UsedCutRockSmashText, 4
closemessage
@@ -85,14 +85,14 @@ S_UseRockSmash:: @ 81B0F01
end
DoRockSmashMovement: @ 81B0F0C
- applymovement LAST_TALKED, RockSmashMovement
+ applymovement VAR_LAST_TALKED, RockSmashMovement
waitmovement 0
- removeobject LAST_TALKED
- specialvar RESULT, TryUpdateRusturfTunnelState
- compare RESULT, 1
+ removeobject VAR_LAST_TALKED
+ specialvar VAR_RESULT, TryUpdateRusturfTunnelState
+ compare VAR_RESULT, 1
goto_if_eq DoRockSmashMovement_Done
special ScrSpecial_RockSmashWildEncounter
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoRockSmashMovement_Done
waitstate
releaseall
@@ -129,11 +129,11 @@ S_PushableBoulder:: @ 81B0FCB
goto_if_unset FLAG_BADGE04_GET, CannotUseStrength
goto_if_set FLAG_SYS_USE_STRENGTH, AlreadyUsedStrength
checkpartymove 70
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseStrength
- setfieldeffectargument 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
msgbox UseStrengthPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Strength_ChoseNo
closemessage
dofieldeffect FLDEFF_USE_STRENGTH
@@ -190,12 +190,12 @@ AlreadyUsedStrengthText: @ 81B1127
S_UseWaterfall:: @ 81B115A
lockall
checkpartymove MOVE_WATERFALL
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq Waterfall_NoMonKnows
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
msgbox UseWaterfallPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Waterfall_Done
msgbox UsedWaterfallText, 4
dofieldeffect FLDEFF_USE_WATERFALL
@@ -223,13 +223,13 @@ UsedWaterfallText: @ 81B120D
UseDiveScript:: @ 81B1220
lockall
checkpartymove MOVE_DIVE
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseDive
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox UseDivePromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Dive_Done
msgbox UsedDiveText, 4
dofieldeffect FLDEFF_USE_DIVE
@@ -246,13 +246,13 @@ Dive_Done: @ 81B1267
S_UseDiveUnderwater:: @ 81B1269
lockall
checkpartymove MOVE_DIVE
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq UnderwaterCannotUseDive
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox UnderwaterUseDivePromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UnderwaterDive_Done
msgbox UsedDiveText, 4
dofieldeffect FLDEFF_USE_DIVE
diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s
index 1c2f89ca3..ed286c3b2 100644
--- a/data/battle_scripts_1.s
+++ b/data/battle_scripts_1.s
@@ -622,7 +622,7 @@ BattleScript_EffectBide: @ 81D7297
ppreduce
attackanimation
waitanimation
- orword gHitMarker, HITMARKER_x8000000
+ orword gHitMarker, HITMARKER_CHARGING
setbide
goto BattleScript_MoveEnd
@@ -851,7 +851,7 @@ BattleScriptFirstChargingTurn: @ 81D756C
ppreduce
attackanimation
waitanimation
- orword gHitMarker, HITMARKER_x8000000
+ orword gHitMarker, HITMARKER_CHARGING
setbyte cEFFECT_CHOOSER, 76
seteffectprimary
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
@@ -2000,7 +2000,7 @@ BattleScript_SolarbeamDecideTurn: @ 81D81E1
goto BattleScript_MoveEnd
BattleScript_SolarbeamOnFirstTurn: @ 81D8209
- orword gHitMarker, HITMARKER_x8000000
+ orword gHitMarker, HITMARKER_CHARGING
setbyte cEFFECT_CHOOSER, 76
seteffectprimary
ppreduce
@@ -3248,7 +3248,7 @@ BattleScript_DamagingWeatherContinues:: @ 81D8F7D
setbyte gBattleCommunication, 0
BattleScript_DamagingWeatherLoop: @ 81D8F95
- copyarraywithindex gBattlerAttacker, gBanksByTurnOrder, gBattleCommunication, 1
+ copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
weatherdamage
jumpifword EQUAL, gBattleMoveDamage, 0x0, BattleScript_DamagingWeatherLoopIncrement
printfromtable gSandStormHailDmgStringIds
@@ -3693,7 +3693,7 @@ BattleScript_MoveSelectionImprisoned:: @ 81D9464
printselectionstring BATTLE_TEXT_SealedNoUse
endselectionscript
-BattleScript_SelectingImprisionedMoveInPalace:: @ 81D9468
+BattleScript_GrudgeTakesPp:: @ 81D9468
printstring BATTLE_TEXT_GrudgeLosePP
waitmessage 64
return
diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s
index 478b0b7f0..cc7a58d1c 100644
--- a/data/battle_scripts_2.s
+++ b/data/battle_scripts_2.s
@@ -77,12 +77,12 @@ BattleScript_TryNicknameCaughtMon: @ 81D9EE3
BattleScript_GiveCaughtMonEnd: @ 81D9EF8
givecaughtmon
- setbyte gBattleOutcome, BATTLE_CAUGHT
+ setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_WallyBallThrow:: @ 81D9F00
printstring BATTLE_TEXT_BallCaught2
- setbyte gBattleOutcome, BATTLE_CAUGHT
+ setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
BattleScript_ShakeBallThrow:: @ 81D9F0A
@@ -92,7 +92,7 @@ BattleScript_ShakeBallThrow:: @ 81D9F0A
jumpifbyte NOT_EQUAL, gNumSafariBalls, 0, BattleScript_ShakeBallThrowEnd
printstring BATTLE_TEXT_SafariOver
waitmessage 64
- setbyte gBattleOutcome, BATTLE_OUT_OF_BALLS
+ setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
BattleScript_ShakeBallThrowEnd: @ 81D9F34
finishaction
@@ -165,7 +165,7 @@ BattleScript_OpponentUsesGuardSpecs: @ 81D9FBB
BattleScript_RunByUsingItem: @ 81D9FDA
playse SE_NIGERU
- setbyte gBattleOutcome, BATTLE_RAN
+ setbyte gBattleOutcome, B_OUTCOME_RAN
finishturn
BattleScript_ActionWatchesCarefully: @ 81D9FE4
diff --git a/data/btl_attrs.s b/data/btl_attrs.s
index dc1d5b7ff..06ab16430 100644
--- a/data/btl_attrs.s
+++ b/data/btl_attrs.s
@@ -66,7 +66,7 @@ UnkDebug0:: @ 0x821F3B8
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-
+@ Title battle menu window positions
gUnknown_Debug_821F424::
.byte 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x9b, 0x01, 0x01, 0x00, 0x12, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x64, 0x00, 0x01, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x02, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x2e, 0x00
.byte 0x1a, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x30, 0x00, 0x1c, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x01, 0x00, 0x04, 0x00, 0x9b, 0x01, 0x00, 0x00, 0x44, 0x00, 0x0a, 0x00
@@ -106,6 +106,40 @@ gUnknown_Debug_821F5AC::
Str_821F624:: @ 0x821F624
.string "ーーーーーーーーーーーー$"
+.if DEBUG_TRANSLATE
+
+str_821F631:: @ 0x821F631
+ .string "JUNICHI$"
+ .string "STEVEN LOW$"
+ .string "VALENCIA$"
+ .string "HARUKOMACHI$"
+
+Str_821F649:: @ 0x821F649
+ .string "TETSUJI$"
+
+debug_unk_0b::
+@ 0x821F64D
+ .string "  ON$"
+
+@ 0x821F652
+ .string "OFF$"
+
+@ 0x821F655
+ .string "MONO$"
+
+@ 0x821F65A
+ .string "STEREO$"
+
+@ 0x821F65F
+ .string "TEST$"
+
+@ 0x821F665
+ .string "Received$"
+
+@ 0x821F66D
+ .string "Connection error$"
+
+.else @ !DEBUG_TRANSLATE
str_821F631:: @ 0x821F631
.string "ジュンイチ$"
.string "ダイゴロウ$"
@@ -137,9 +171,11 @@ debug_unk_0b::
@ 0x821F66D
.string "せつぞくエラー$"
+.endif @ !DEBUG_TRANSLATE
+
@ 0x821f675
.byte 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00
-
+@ Debug battle menu curspr positions
gUnknown_Debug_821F680::
.byte 0xc0, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x52, 0x01, 0x00, 0x00, 0x5a, 0x01, 0x00, 0x00
.byte 0x72, 0x01, 0x00, 0x00, 0x76, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xd2, 0x01, 0x00, 0x00, 0xda, 0x01, 0x00, 0x00, 0xf2, 0x01, 0x00, 0x00, 0xf6, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00
@@ -154,6 +190,27 @@ gUnknown_Debug_821F680::
gUnknown_Debug_821F798::
.byte 0xc0, 0x03, 0x00, 0x00, 0xd6, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x56, 0x04, 0x00, 0x00, 0xc0, 0x0b, 0x00, 0x00, 0xd6, 0x0b, 0x00, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x56, 0x0c, 0x00, 0x00
+.if DEBUG_TRANSLATE
+Str_821F7B8:: @ 0x821F7B8
+ .string "HEIGHT$"
+
+Str_821F7BD:: @ 0x821F7BD
+ .string "{PALETTE 1}{COLOR_HIGHLIGHT_SHADOW BLUE YELLOW MAGENTA}YOUR HEIGHT\n"
+ .string "POKéMON FILE$"
+
+Str_821F7DA:: @ 0x821F7DA
+ .string "{PALETTE 1}{COLOR_HIGHLIGHT_SHADOW BLUE YELLOW MAGENTA}LOAD\n"
+ .string "SAVE$"
+
+Str_821F7EA:: @ 0x821F7EA
+ .string "Would you like to load?$"
+
+@ 0x821F7F3
+gUnknown_Debug_821F7F3::
+ .string "Would you like to save?$"
+
+.else @ !DEBUG_TRANSLATE
+
Str_821F7B8:: @ 0x821F7B8
.string "たかさ $"
@@ -171,8 +228,9 @@ Str_821F7EA:: @ 0x821F7EA
@ 0x821F7F3
gUnknown_Debug_821F7F3::
.string "セーブしますか?$"
+.endif @ DEBUG_TRANSLATE
-.endif
+.endif @ DEBUG
.align 2
gOamData_81F96E8:: @ 81F96E8
diff --git a/data/debug_mystery_event_scripts.s b/data/debug_mystery_event_scripts.s
index 1d29998ef..6fa509c34 100644
--- a/data/debug_mystery_event_scripts.s
+++ b/data/debug_mystery_event_scripts.s
@@ -26,17 +26,22 @@ _0845DAFF:
me_runscript _0845DD0D
me_end
+.if DEBUG_TRANSLATE
+_0845DB16:
+ .string "Run and visit your DAD in the\n"
+ .string "PETALBURG CITY GYM.$"
+.else
_0845DB16:
.string "Lauf und besuche deinen Vater in der\n"
.string "ARENA von BLÜTENBURG CITY.$"
-
+.endif
_845DB56:
setvaddress _845DB56
checkitem ITEM_EON_TICKET, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845DBB4
checkpcitem ITEM_EON_TICKET, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845DBB4
checkflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS
vgoto_if 0x1, _0845DBB4
@@ -46,10 +51,10 @@ _845DB56:
waitmessage
waitbuttonpress
checkitemspace ITEM_EON_TICKET, 0x1
- compare RESULT, 0x0
+ compare VAR_RESULT, 0x0
vgoto_if 0x1, _0845DBB5
- setorcopyvar VAR_SPECIAL_0, ITEM_EON_TICKET
- setorcopyvar VAR_SPECIAL_1, 0x1
+ setorcopyvar VAR_0x8000, ITEM_EON_TICKET
+ setorcopyvar VAR_0x8001, 0x1
callstd 0x0
setflag FLAG_SYS_HAS_EON_TICKET
vmessage _0845DC00
@@ -65,10 +70,25 @@ _0845DBB5:
release
end
+.if DEBUG_TRANSLATE
+_0845DBBE:
+ .string "DAD: {PLAYER}! Nice to see you!\n"
+ .string "Here is a Letter for you, {PLAYER}.$"
+_0845DC00:
+ .string "DAD: I'm not sure. It could be a\n"
+ .string "TICKET for a Ferry.\p"
+ .string "You should go to LILYCOVE CITY and\n"
+ .string "ask about it there.$"
+
+_0845DC94:
+ .string "DAD: {PLAYER}, the KEY ITEMS pocket\n"
+ .string "in your BAG is full.\p"
+ .string "Store some of your KEY ITEMS in\n"
+ .string "the PC and come back later.$"
+.else @ !DEBUG_TRANSLATE
_0845DBBE:
.string "VATER: {PLAYER}! Schön, dich zu sehen!\n"
.string "Hier ist ein Brief für dich, {PLAYER}.$"
-
_0845DC00:
.string "VATER: Ich bin mir nicht sicher, es\n"
.string "könnte ein TICKET für eine Fähre sein.\p"
@@ -80,21 +100,23 @@ _0845DC94:
.string "deines BEUTELS ist voll.\p"
.string "Lagere einige deiner Basis-Items in\n"
.string "deinem PC und komm dann wieder.$"
+.endif @ !DEBUG_TRANSLATE
+
_845DB56End:
.size _845DB56, _845DB56End - _845DB56
_0845DD0D:
setvaddress _0845DD0D
checkitem ITEM_EON_TICKET, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845DD53
checkpcitem ITEM_EON_TICKET, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845DD53
checkflag FLAG_ENCOUNTERED_LATIAS_OR_LATIOS
vgoto_if 0x1, _0845DD53
checkitemspace ITEM_EON_TICKET, 0x1
- compare RESULT, 0x0
+ compare VAR_RESULT, 0x0
vgoto_if 0x1, _0845DD5B
vloadptr _0845DB16
setmysteryeventstatus 0x2
@@ -110,12 +132,20 @@ _0845DD5B:
setmysteryeventstatus 0x3
end
+.if DEBUG_TRANSLATE
+_0845DD63:
+ .string "This GIFT can only be used\n"
+ .string "once.$"
+_0845DD95:
+ .string "The KEY ITEMS pocket is full.$"
+.else
_0845DD63:
.string "Dieses GESCHEHEN kann nur einmal\n"
.string "gespielt werden.$"
-
_0845DD95:
- .string "Deine BASIS-TASCHE ist voll.$"
+ .string "Deine BASIS-TASCHE ist voll.$"
+.endif
+
_0845DAFFEnd:
.size _0845DAFF, _0845DAFFEnd - _0845DAFF
gUnknown_Debug_845DAE1End::
@@ -143,7 +173,7 @@ gUnknown_Debug_845E306::
_0845E329:
setvaddress _0845E329
getpartysize
- compare RESULT, 0x6
+ compare VAR_RESULT, 0x6
vgoto_if 0x1, _0845E34C
givemon SPECIES_LUVDISC, 15, ITEM_BERRY_JUICE, 0x0, 0x0, 0x0
setmysteryeventstatus 0x2
@@ -153,6 +183,16 @@ _0845E34C:
setmysteryeventstatus 0x3
end
+.if DEBUG_TRANSLATE
+_0845E34F:
+ .string "A POKéMON was added to {PLAYER}'s\n"
+ .string "team.$"
+
+_0845E387:
+ .string "Your team is full.\n"
+ .string "No more POKéMON can be added to your\l"
+ .string "team.$"
+.else
_0845E34F:
.string "Ein POKéMON wurde in das Team des\n"
.string "Spielers aufgenommen.$"
@@ -161,6 +201,7 @@ _0845E387:
.string "Das Team des Spielers ist vollständig.\n"
.string "Es kann kein weiteres POKéMON\l"
.string "aufgenommen werden.$"
+.endif
gUnknown_Debug_845E3E0::
me_checkcompat gUnknown_Debug_845E3E0, 0x4, 0x4, 0x4, 0x80
@@ -232,35 +273,50 @@ _0845E637:
me_setstatus 0x2
me_end
+.if DEBUG_TRANSLATE
+
+_0845E64C:
+ .string "Visit your DAD in the PETALBURG\n"
+ .string "CITY GYM.$"
+.else
_0845E64C:
.string "Besuche deinen Vater in der ARENA\n"
.string "von BLÜTENBURG CITY.$"
+.endif
_0845E683:
setvaddress _0845E683
checkitem ITEM_GANLON_BERRY, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845E6BF
checkpcitem ITEM_GANLON_BERRY, 0x1
- compare RESULT, 0x1
+ compare VAR_RESULT, 0x1
vgoto_if 0x1, _0845E6BF
lock
faceplayer
vmessage _0845E6C0
waitmessage
waitbuttonpress
- setorcopyvar VAR_SPECIAL_0, ITEM_GANLON_BERRY
- setorcopyvar VAR_SPECIAL_1, 0x1
+ setorcopyvar VAR_0x8000, ITEM_GANLON_BERRY
+ setorcopyvar VAR_0x8001, 0x1
callstd 0x0
release
killscript
_0845E6BF:
gotoram
+.if DEBUG_TRANSLATE
+_0845E6C0:
+ .string "DAD: Hi, {PLAYER}!\p"
+ .string "I have just received this rare\n"
+ .string "BERRY. You can have it!$"
+.else
_0845E6C0:
.string "VATER: Hi, {PLAYER}!\p"
.string "Ich habe gerade diese seltene BEERE\n"
.string "erhalten. Ich schenke sie dir!$"
+.endif
+
_0845E637End:
.size _0845E637, _0845E637End - _0845E637
_0845E683End:
@@ -278,7 +334,7 @@ _0845E736:
setvaddress _0845E736
bufferdecorationname 0x0, DECOR_REGISTEEL_DOLL
givedecoration DECOR_REGISTEEL_DOLL
- compare RESULT, 0x0
+ compare VAR_RESULT, 0x0
vgoto_if 0x1, _0845E755
vloadptr _0845E75D
setmysteryeventstatus 0x2
@@ -289,11 +345,20 @@ _0845E755:
setmysteryeventstatus 0x3
end
+.if DEBUG_TRANSLATE
+_0845E75D:
+ .string "{STR_VAR_1} was handed over.$"
+_0845E771:
+ .string "There is no room for {STR_VAR_1}\n"
+ .string "available...$"
+.else
_0845E75D:
.string "{STR_VAR_1} wurde übergeben.$"
_0845E771:
.string "Es ist kein Platz für {STR_VAR_1}\n"
.string "vorhanden...$"
+.endif
+
_0845E730End:
.size _0845E730, _0845E730End - _0845E730
gUnknown_Debug_845E712End::
@@ -308,4 +373,4 @@ gUnknown_Debug_845E7B5End:
.size gUnknown_Debug_845E7B5, gUnknown_Debug_845E7B5End - gUnknown_Debug_845E7B5
gUnknown_Debug_845E797End::
-.endif
+.endif @ DEBUG
diff --git a/data/event_scripts.s b/data/event_scripts.s
index bbcbe9818..b2622e181 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -424,7 +424,7 @@ gUnknown_0815F399:: @ 815F399
EventScript_15F3A0:
multichoice 0, 0, 6, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F432
case 1, EventScript_15F419
case 2, EventScript_15F436
@@ -434,7 +434,7 @@ EventScript_15F3A0:
EventScript_15F3E2:
multichoice 0, 0, 5, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F432
case 1, EventScript_15F419
case 2, EventScript_15F51D
@@ -443,7 +443,7 @@ EventScript_15F3E2:
EventScript_15F419:
msgbox UnknownString_81A38FB, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F384
closemessage
special SecretBasePC_PackUp
@@ -474,7 +474,7 @@ EventScript_15F452:
message UnknownString_81A3A87
waitmessage
multichoice 0, 0, 7, 0
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_15F4A1
case 1, EventScript_15F436
case 2, EventScript_15F511
@@ -489,13 +489,13 @@ gUnknown_0815F49A:: @ 815F49A
EventScript_15F4A1:
special sub_80BC56C
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_15F4E0
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_15F503
special BufferSecretBaseOwnerName
msgbox UnknownString_81A3958, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F452
msgbox UnknownString_81A3A22, 3
special sub_80BC5BC
@@ -505,7 +505,7 @@ EventScript_15F4A1:
EventScript_15F4E0:
msgbox UnknownString_81A3982, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_15F452
msgbox UnknownString_81A3A3A, 3
special sub_80BC5BC
@@ -539,13 +539,13 @@ gUnknown_0815F523:: @ 815F523
gUnknown_0815F528:: @ 815F528
special GetShieldToyTVDecorationInfo
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_15F558
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_15F561
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_15F56A
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq EventScript_15F573
end
@@ -946,10 +946,10 @@ gUnknown_0819F80B:: @ 819F80B
gUnknown_0819F818:: @ 819F818
lock
faceplayer
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
- specialvar RESULT, ScrSpecial_HasTrainerBeenFought
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F83F
special PlayTrainerEncounterMusic
special sub_8082524
@@ -962,11 +962,11 @@ gUnknown_0819F840:: @ 819F840
lock
faceplayer
call EventScript_19F8E5
- specialvar RESULT, ScrSpecial_HasTrainerBeenFought
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F877
special CheckForAlivePartyMons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F870
special PlayTrainerEncounterMusic
special sub_8082524
@@ -983,7 +983,7 @@ EventScript_19F877:
gotopostbattlescript
gUnknown_0819F878:: @ 819F878
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
special PlayTrainerEncounterMusic
trainerbattlebegin
@@ -991,8 +991,8 @@ gUnknown_0819F878:: @ 819F878
gUnknown_0819F887:: @ 819F887
call EventScript_19F8E5
- specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F8AD
special PlayTrainerEncounterMusic
special sub_8082524
@@ -1008,11 +1008,11 @@ EventScript_19F8AD:
gotopostbattlescript
gUnknown_0819F8AE:: @ 819F8AE
- specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F8DD
special CheckForAlivePartyMons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne EventScript_19F8DE
special PlayTrainerEncounterMusic
special sub_8082524
@@ -1035,7 +1035,7 @@ EventScript_19F8DE:
end
EventScript_19F8E5:
- applymovement LAST_TALKED, Movement_19F8F0
+ applymovement VAR_LAST_TALKED, Movement_19F8F0
waitmovement 0
return
@@ -1048,16 +1048,16 @@ EventScript_19F8F2:
waitmessage
waitbuttonpress
trainerbattlebegin
- specialvar RESULT, ScrSpecial_GetTrainerBattleMode
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_GetTrainerBattleMode
+ compare VAR_RESULT, 0
goto_if_eq EventScript_19F934
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq EventScript_19F936
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_19F936
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_19F936
- compare RESULT, 8
+ compare VAR_RESULT, 8
goto_if_eq EventScript_19F936
EventScript_19F934:
@@ -1435,9 +1435,9 @@ VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B
lock
faceplayer
msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq do_heal_party
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_heal_party
end
@@ -1445,11 +1445,11 @@ do_heal_party:: @ 819FD7C
incrementgamestat GAME_STAT_USED_POKECENTER
message gText_NurseJoy_OkayIllTakeYourPokemon
waitmessage
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A083F
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A083F
waitmovement 0
dofieldeffect FLDEFF_POKECENTER_HEAL
waitfieldeffect FLDEFF_POKECENTER_HEAL
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A0845
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_1A0845
waitmovement 0
special ScrSpecial_HealPlayerParty
goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
@@ -1459,7 +1459,7 @@ do_heal_party:: @ 819FD7C
OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0
message gText_NurseJoy_ThankYouForWaiting
waitmessage
- applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_19FDF4
+ applymovement VAR_0x800B, OldaleTown_PokemonCenter_1F_Movement_19FDF4
waitmovement 0
message gText_NurseJoy_WeHopeToSeeYouAgain
waitmessage
@@ -1471,10 +1471,10 @@ dont_heal_party:: @ 819FDC7
return
OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE
- specialvar RESULT, IsPokerusInParty
- compare RESULT, 1
+ specialvar VAR_RESULT, IsPokerusInParty
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0
end
@@ -1490,23 +1490,23 @@ OldaleTown_PokemonCenter_1F_Movement_19FDF4:: @ 819FDF4
end_movement
Std_ObtainItem: @ 819FDF7
- giveitem VAR_SPECIAL_0, VAR_SPECIAL_1
- copyvar VAR_SPECIAL_7, RESULT
+ giveitem VAR_0x8000, VAR_0x8001
+ copyvar VAR_0x8007, VAR_RESULT
call Std_ObtainItem_
return
Std_ObtainItem_: @ 819FE07
- bufferitemname 1, VAR_SPECIAL_0
- checkitemtype VAR_SPECIAL_0
+ bufferitemname 1, VAR_0x8000
+ checkitemtype VAR_0x8000
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 0x1
+ compare VAR_0x8007, 0x1
call_if_eq Std_ObtainItem_Success
- compare VAR_SPECIAL_7, 0x0
+ compare VAR_0x8007, 0x0
call_if_eq Std_ObtainItem_Fail
return
GetItem_HandlePocket:
- switch RESULT
+ switch VAR_RESULT
case POCKET_ITEMS, GetItem_HandlePocket_Items
case POCKET_KEY_ITEMS, GetItem_HandlePocket_KeyItems
case POCKET_POKE_BALLS, GetItem_HandlePocket_PokeBalls
@@ -1516,31 +1516,31 @@ GetItem_HandlePocket:
GetItem_HandlePocket_Items:
bufferstdstring 2, 0xE
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_KeyItems:
bufferstdstring 2, 0xF
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_PokeBalls:
bufferstdstring 2, 0x10
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_TMsHMs:
bufferstdstring 2, 0x11
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetTMHMFanfare
return
GetItem_HandlePocket_Berries:
bufferstdstring 2, 0x12
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq PlayGetItemFanfare
return
@@ -1549,11 +1549,11 @@ Std_ObtainItem_Success: @ 819FEB7
waitfanfare
waitmessage
msgbox Message_PutAwayItem
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
Std_ObtainItem_Fail: @ 819FECC
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
PlayGetItemFanfare:
@@ -1565,16 +1565,16 @@ PlayGetTMHMFanfare:
return
Std_ObtainDecoration: @ 819FEDA
- givedecoration VAR_SPECIAL_0
- copyvar VAR_SPECIAL_7, RESULT
+ givedecoration VAR_0x8000
+ copyvar VAR_0x8007, VAR_RESULT
call Std_ObtainDecoration_
return
Std_ObtainDecoration_: @ 819FEE8
- bufferdecorationname 1, VAR_SPECIAL_0
- compare VAR_SPECIAL_7, 1
+ bufferdecorationname 1, VAR_0x8000
+ compare VAR_0x8007, 1
call_if_eq Std_ObtainDecoration_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
call_if_eq Std_ObtainDecoration_Fail
return
@@ -1584,31 +1584,31 @@ Std_ObtainDecoration_Success: @ 819FF03
waitfanfare
waitmessage
msgbox Message_TransferredToPC
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
Std_ObtainDecoration_Fail: @ 819FF1B
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
Std_FindItem: @ 819FF21
lock
faceplayer
waitse
- giveitem VAR_SPECIAL_0, VAR_SPECIAL_1
- copyvar VAR_SPECIAL_7, RESULT
- bufferitemname 1, VAR_SPECIAL_0
- checkitemtype VAR_SPECIAL_0
+ giveitem VAR_0x8000, VAR_0x8001
+ copyvar VAR_0x8007, VAR_RESULT
+ bufferitemname 1, VAR_0x8000
+ checkitemtype VAR_0x8000
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
call_if_eq Std_FindItem_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
call_if_eq Std_FindItem_Fail
release
return
Std_FindItem_Success: @ 819FF52
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
message Message_FoundOneItem
waitfanfare
waitmessage
@@ -1618,20 +1618,20 @@ Std_FindItem_Success: @ 819FF52
Std_FindItem_Fail: @ 819FF65
msgbox Message_ObtainedItem
msgbox Message_BagFull
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
HiddenItemScript:: @ 819FF7B
lockall
waitse
- giveitem VAR_SPECIAL_5, 1
- copyvar VAR_SPECIAL_7, RESULT
- bufferitemname 0x1, VAR_SPECIAL_5
- checkitemtype VAR_SPECIAL_5
+ giveitem VAR_0x8005, 1
+ copyvar VAR_0x8007, VAR_RESULT
+ bufferitemname 0x1, VAR_0x8005
+ checkitemtype VAR_0x8005
call GetItem_HandlePocket
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq HiddenItemScript_Success
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
goto_if_eq HiddenItemScript_Fail
end
@@ -1647,7 +1647,7 @@ HiddenItemScript_Success:
HiddenItemScript_Fail:
msgbox Message_FoundOneItem
msgbox Message_BagFull
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
releaseall
end
@@ -1655,9 +1655,9 @@ UnusedMixRecordsScript: @ 819FFD5
lock
faceplayer
msgbox UnusedMixRecordsPromptText, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq UnusedMixRecordsScript_Yes
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UnusedMixRecordsScript_Done
goto UnusedMixRecordsScript_Done
UnusedMixRecordsScript_Yes: @ 819FFFA
@@ -1674,7 +1674,7 @@ UnusedMixRecordsScript_Done: @ 81A0000
gUnknown_081A0009:: @ 81A0009
lockall
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox UnknownString_81A09EC, 4
@@ -1690,7 +1690,7 @@ EventScript_1A0023:
end
EventScript_1A0033:
- switch RESULT
+ switch VAR_RESULT
case 0, EventScript_1A0085
case 1, EventScript_1A0070
case 2, EventScript_1A00CB
@@ -1725,7 +1725,7 @@ EventScript_1A00B5:
return
EventScript_1A00BE:
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
playse SE_PC_OFF
special DoPCTurnOffEffect
releaseall
@@ -1796,26 +1796,26 @@ RustboroCity_Gym_EventScript_1A00FB:: @ 81A00FB
DewfordTown_EventScript_1A0102:: @ 81A0102
DewfordTown_Hall_EventScript_1A0102:: @ 81A0102
dodailyevents
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special BufferTrendyPhraseString
return
DewfordTown_EventScript_1A010C:: @ 81A010C
Route104_MrBrineysHouse_EventScript_1A010C:: @ 81A010C
Route109_EventScript_1A010C:: @ 81A010C
- copyvar VAR_SPECIAL_8, VAR_BRINEY_LOCATION
+ copyvar VAR_0x8008, VAR_BRINEY_LOCATION
setvar VAR_BRINEY_LOCATION, 0
return
UseSurfScript:: @ 81A0117
checkpartymove MOVE_SURF
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq UseSurfScript_NoMon
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
lockall
msgbox UseSurfPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UseSurfScript_No
msgbox UsedSurfText, 4
dofieldeffect FLDEFF_USE_SURF
@@ -1834,9 +1834,9 @@ Route110_EventScript_1A014E:: @ 81A014E
Route119_EventScript_1A014E:: @ 81A014E
RustboroCity_EventScript_1A014E:: @ 81A014E
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_EventScript_1A0166
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_EventScript_1A016C
end
@@ -1852,9 +1852,9 @@ LavaridgeTown_EventScript_1A0172:: @ 81A0172
Route110_EventScript_1A0172:: @ 81A0172
Route119_EventScript_1A0172:: @ 81A0172
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_EventScript_1A018A
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LavaridgeTown_EventScript_1A0190
end
@@ -1925,7 +1925,7 @@ MossdeepCity_Gym_EventScript_1A01C0:: @ 81A01C0
PetalburgCity_Gym_EventScript_1A01C0:: @ 81A01C0
RustboroCity_Gym_EventScript_1A01C0:: @ 81A01C0
SootopolisCity_Gym_1F_EventScript_1A01C0:: @ 81A01C0
- switch VAR_SPECIAL_8
+ switch VAR_0x8008
case 1, DewfordTown_Gym_EventScript_1A021E
case 2, DewfordTown_Gym_EventScript_1A0225
case 3, DewfordTown_Gym_EventScript_1A022F
@@ -2181,7 +2181,7 @@ Route103_EventScript_1A037F:: @ 81A037F
lock
faceplayer
msgbox Route101_Text_1C4449, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route101_EventScript_1A039B
call Route101_EventScript_1A03B0
release
@@ -2193,7 +2193,7 @@ Route101_EventScript_1A039B:: @ 81A039B
end
Route101_EventScript_1A03A5:: @ 81A03A5
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_9
+ copyvar VAR_0x8004, VAR_0x8009
special ShowPokedexRatingMessage
waitmessage
waitbuttonpress
@@ -2201,23 +2201,23 @@ Route101_EventScript_1A03A5:: @ 81A03A5
EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0
Route101_EventScript_1A03B0:: @ 81A03B0
- setvar VAR_SPECIAL_4, 0
- specialvar RESULT, ScriptGetPokedexInfo
- copyvar VAR_SPECIAL_8, VAR_SPECIAL_5
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- copyvar VAR_SPECIAL_A, RESULT
- buffernumberstring 0, VAR_SPECIAL_8
- buffernumberstring 1, VAR_SPECIAL_9
+ setvar VAR_0x8004, 0
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ copyvar VAR_0x800A, VAR_RESULT
+ buffernumberstring 0, VAR_0x8008
+ buffernumberstring 1, VAR_0x8009
msgbox Route101_Text_1C44DC, 4
call Route101_EventScript_1A03A5
- compare VAR_SPECIAL_A, 0
+ compare VAR_0x800A, 0
goto_if_eq Route101_EventScript_1A14DC
- setvar VAR_SPECIAL_4, 1
- specialvar RESULT, ScriptGetPokedexInfo
- copyvar VAR_SPECIAL_8, VAR_SPECIAL_5
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- buffernumberstring 0, VAR_SPECIAL_8
- buffernumberstring 1, VAR_SPECIAL_9
+ setvar VAR_0x8004, 1
+ specialvar VAR_RESULT, ScriptGetPokedexInfo
+ copyvar VAR_0x8008, VAR_0x8005
+ copyvar VAR_0x8009, VAR_0x8006
+ buffernumberstring 0, VAR_0x8008
+ buffernumberstring 1, VAR_0x8009
msgbox Route101_Text_1C4B05, 4
return
@@ -2225,7 +2225,7 @@ BattleTower_Outside_EventScript_1A040E:: @ 81A040E
LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E
SlateportCity_Harbor_EventScript_1A040E:: @ 81A040E
delay 60
- applymovement VAR_SPECIAL_4, SlateportCity_Harbor_Movement_1A041C
+ applymovement VAR_0x8004, SlateportCity_Harbor_Movement_1A041C
waitmovement 0
return
@@ -2277,9 +2277,9 @@ Movement_1A047A:
BattleTower_Outside_EventScript_1A047C:: @ 81A047C
SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq BattleTower_Outside_EventScript_160B2F
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq BattleTower_Outside_EventScript_160B3A
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
@@ -2319,8 +2319,8 @@ CaveOfOrigin_B3F_EventScript_1A04BB:: @ 81A04BB
CaveOfOrigin_1F_EventScript_1A04D3:: @ 81A04D3
CaveOfOrigin_B2F_EventScript_1A04D3:: @ 81A04D3
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
special sub_810F758
waitstate
releaseall
@@ -2373,56 +2373,56 @@ MagmaHideout_B1F_EventScript_1A051B:: @ 81A051B
Route120_EventScript_1A0539:: @ 81A0539
lock
faceplayer
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0546:: @ 81A0546
lock
faceplayer
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0553:: @ 81A0553
lock
faceplayer
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A0560:: @ 81A0560
lock
faceplayer
- setvar VAR_SPECIAL_4, 4
+ setvar VAR_0x8004, 4
goto Route120_EventScript_1A0594
end
Route120_EventScript_1A056D:: @ 81A056D
lock
faceplayer
- setvar VAR_SPECIAL_4, 5
+ setvar VAR_0x8004, 5
goto Route120_EventScript_1A0594
end
Route119_EventScript_1A057A:: @ 81A057A
lock
faceplayer
- setvar VAR_SPECIAL_4, 6
+ setvar VAR_0x8004, 6
goto Route119_EventScript_1A0594
end
Route119_EventScript_1A0587:: @ 81A0587
lock
faceplayer
- setvar VAR_SPECIAL_4, 7
+ setvar VAR_0x8004, 7
goto Route119_EventScript_1A0594
end
Route119_EventScript_1A0594:: @ 81A0594
Route120_EventScript_1A0594:: @ 81A0594
checkitem ITEM_DEVON_SCOPE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route119_EventScript_1A05AE
msgbox Route119_Text_171B93, 4
release
@@ -2430,7 +2430,7 @@ Route120_EventScript_1A0594:: @ 81A0594
Route119_EventScript_1A05AE:: @ 81A05AE
msgbox Route119_Text_171BB6, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route119_EventScript_1A05C3
release
end
@@ -2438,28 +2438,28 @@ Route119_EventScript_1A05AE:: @ 81A05AE
Route119_EventScript_1A05C3:: @ 81A05C3
msgbox Route119_Text_171BF6, 4
closemessage
- applymovement LAST_TALKED, Route119_Movement_1A0839
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A0839
waitmovement 0
- applymovement LAST_TALKED, Route119_Movement_1A0662
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A0662
waitmovement 0
waitse
playmoncry SPECIES_KECLEON, 2
delay 40
waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq Route119_EventScript_1A0646
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
call_if_eq Route119_EventScript_1A064A
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
call_if_eq Route119_EventScript_1A064E
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
call_if_eq Route119_EventScript_1A0652
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
call_if_eq Route119_EventScript_1A0656
- compare VAR_SPECIAL_4, 6
+ compare VAR_0x8004, 6
call_if_eq Route119_EventScript_1A065A
- compare VAR_SPECIAL_4, 7
+ compare VAR_0x8004, 7
call_if_eq Route119_EventScript_1A065E
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
@@ -2534,12 +2534,12 @@ FallarborTown_House1_EventScript_1A067F:: @ 81A067F
GraniteCave_StevensRoom_EventScript_1A067F:: @ 81A067F
MtPyre_Summit_EventScript_1A067F:: @ 81A067F
SlateportCity_OceanicMuseum_2F_EventScript_1A067F:: @ 81A067F
- bufferitemname 0, VAR_SPECIAL_4
+ bufferitemname 0, VAR_0x8004
playfanfare MUS_ME_WAZA
message FallarborTown_House1_Text_1A1498
waitmessage
waitfanfare
- takeitem VAR_SPECIAL_4, 1
+ takeitem VAR_0x8004, 1
return
EverGrandeCity_DrakesRoom_EventScript_1A0693:: @ 81A0693
@@ -3251,7 +3251,7 @@ gUnknown_081A14B8:: @ 81A14B8
lockall
special ExecuteWhiteOut
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A14CA
releaseall
end
@@ -3596,32 +3596,32 @@ SecretBase_RedCave1_Text_1A2BA4:: @ 81A2BA4
gUnknown_081A2C51:: @ 81A2C51
special sub_80BB70C
special CheckPlayerHasSecretBase
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq AskToMoveSecretBase
checkpartymove MOVE_SECRET_POWER
- setfieldeffectargument 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
buffermovename 1, MOVE_SECRET_POWER
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq EventScript_1A2CB0
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq EventScript_1A2D08
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq EventScript_1A2D60
end
EventScript_1A2CB0:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2CF1
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_8198F34, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3648,11 +3648,11 @@ EventScript_1A2CFA:
EventScript_1A2D08:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2D49
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_81A197B, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3679,11 +3679,11 @@ EventScript_1A2D52:
EventScript_1A2D60:
lockall
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2DA1
- bufferpartymonnick 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
msgbox UnknownString_81A1A4B, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UsedCutRockSmashText, 4
closemessage
@@ -3715,8 +3715,8 @@ EventScript_1A2DB8:
setflag FLAG_DECORATION_1
special sub_80BB8CC
special sub_80BBAF0
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 0
special sub_80BBDD0
setvar VAR_0x4089, 1
waitstate
@@ -3727,7 +3727,7 @@ SecretBase_RedCave1_EventScript_1A2DDE:: @ 81A2DDE
waitmovement 0
setvar VAR_0x4097, 1
msgbox SecretBase_RedCave1_Text_198F89, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SecretBase_RedCave1_EventScript_1A2E08
closemessage
playse SE_KAIDAN
@@ -3751,7 +3751,7 @@ gUnknown_081A2E14:: @ 81A2E14
setvar VAR_0x4097, 1
playse SE_KAIDAN
special sub_80BC114
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_1A2E38
clearflag FLAG_DECORATION_1
special sub_80BBAF0
@@ -3768,57 +3768,57 @@ EventScript_1A2E38:
AskToMoveSecretBase:
checkpartymove MOVE_SECRET_POWER
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq EventScript_1A2EF7
- setfieldeffectargument 0, RESULT
- setorcopyvar VAR_SPECIAL_4, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ setorcopyvar VAR_0x8004, VAR_RESULT
lockall
special GetSecretBaseNearbyMapName
msgbox UnknownString_81A3C71, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
msgbox UnknownString_81A38FB, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
fadescreen 1
special MoveSecretBase
closemessage
fadescreen 0
msgbox UnknownString_81A3CC9, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq EventScript_1A2F3A
- bufferpartymonnick 0, VAR_SPECIAL_4
+ bufferpartymonnick 0, VAR_0x8004
buffermovename 1, MOVE_SECRET_POWER
msgbox UsedCutRockSmashText, 4
closemessage
closemessage
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq DoSecretBaseCaveFieldEffectScript
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq DoSecretBaseTreeFieldEffectScript
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq DoSecretBaseShrubFieldEffectScript
releaseall
end
EventScript_1A2EF7::
- compare VAR_SPECIAL_7, 1
+ compare VAR_0x8007, 1
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 2
+ compare VAR_0x8007, 2
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 3
+ compare VAR_0x8007, 3
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 4
+ compare VAR_0x8007, 4
goto_if_eq EventScript_1A2CF1
- compare VAR_SPECIAL_7, 5
+ compare VAR_0x8007, 5
goto_if_eq EventScript_1A2D49
- compare VAR_SPECIAL_7, 6
+ compare VAR_0x8007, 6
goto_if_eq EventScript_1A2DA1
end
@@ -3849,14 +3849,14 @@ SecretBase_RedCave1_EventScript_1A2F3D:: @ 81A2F3D
LittlerootTown_BrendansHouse_2F_EventScript_1A2F68:: @ 81A2F68
LittlerootTown_MaysHouse_2F_EventScript_1A2F68:: @ 81A2F68
SecretBase_RedCave1_EventScript_1A2F68:: @ 81A2F68
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 0
special sub_80BBDD0
setvar VAR_0x4089, 1
end
gUnknown_081A2F7B:: @ 81A2F7B
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
goto EventScript_1A2F86
end
@@ -3865,19 +3865,19 @@ EventScript_1A2F86:
end
gUnknown_081A2F8A:: @ 81A2F8A
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto EventScript_1A2F95
end
EventScript_1A2F95:
special sub_8100A7C
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A2FBF
- addvar VAR_SPECIAL_4, 1
- compare VAR_SPECIAL_5, 0
+ addvar VAR_0x8004, 1
+ compare VAR_0x8005, 0
goto_if_eq EventScript_1A2F95
- removeobject VAR_SPECIAL_6
- setflag VAR_SPECIAL_5
+ removeobject VAR_0x8006
+ setflag VAR_0x8005
goto EventScript_1A2F95
end
@@ -3909,41 +3909,41 @@ SecretBase_YellowCave2_EventScript_1A2FC0:: @ 81A2FC0
SecretBase_YellowCave3_EventScript_1A2FC0:: @ 81A2FC0
SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0
special sub_80BCE90
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3032
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30AE
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
goto_if_eq SecretBase_RedCave1_EventScript_1A312A
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
goto_if_eq SecretBase_RedCave1_EventScript_1A31A6
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
goto_if_eq SecretBase_RedCave1_EventScript_1A3222
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
goto_if_eq SecretBase_RedCave1_EventScript_1A329E
- compare VAR_SPECIAL_4, 6
+ compare VAR_0x8004, 6
goto_if_eq SecretBase_RedCave1_EventScript_1A331A
- compare VAR_SPECIAL_4, 7
+ compare VAR_0x8004, 7
goto_if_eq SecretBase_RedCave1_EventScript_1A3396
- compare VAR_SPECIAL_4, 8
+ compare VAR_0x8004, 8
goto_if_eq SecretBase_RedCave1_EventScript_1A3412
- compare VAR_SPECIAL_4, 9
+ compare VAR_0x8004, 9
goto_if_eq SecretBase_RedCave1_EventScript_1A348E
end
SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3086
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30A5
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1AEA, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A308F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A308F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1B83, 4
@@ -3955,7 +3955,7 @@ SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086
end
SecretBase_RedCave1_EventScript_1A308F:: @ 81A308F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1B97, 2
@@ -3967,17 +3967,17 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5
SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3102
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3121
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1E67, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A310B
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A310B
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1F04, 4
@@ -3989,7 +3989,7 @@ SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102
end
SecretBase_RedCave1_EventScript_1A310B:: @ 81A310B
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1F2E, 2
@@ -4001,17 +4001,17 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121
SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A317E
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A319D
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A218F, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3187
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3187
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2220, 4
@@ -4023,7 +4023,7 @@ SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E
end
SecretBase_RedCave1_EventScript_1A3187:: @ 81A3187
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2230, 2
@@ -4035,17 +4035,17 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D
SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A31FA
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3219
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A24E1, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3203
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3203
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A256F, 4
@@ -4057,7 +4057,7 @@ SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA
end
SecretBase_RedCave1_EventScript_1A3203:: @ 81A3203
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A258A, 2
@@ -4069,17 +4069,17 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219
SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3276
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3295
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2830, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A327F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A327F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A28D7, 4
@@ -4091,7 +4091,7 @@ SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276
end
SecretBase_RedCave1_EventScript_1A327F:: @ 81A327F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A28F4, 2
@@ -4103,17 +4103,17 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295
SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A32F2
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3311
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A1CB2, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A32FB
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A32FB
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1D48, 4
@@ -4125,7 +4125,7 @@ SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2
end
SecretBase_RedCave1_EventScript_1A32FB:: @ 81A32FB
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A1D59, 2
@@ -4137,17 +4137,17 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311
SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A336E
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A338D
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2026, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A3377
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A3377
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2095, 4
@@ -4159,7 +4159,7 @@ SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E
end
SecretBase_RedCave1_EventScript_1A3377:: @ 81A3377
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A20AE, 2
@@ -4171,17 +4171,17 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D
SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A33EA
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3409
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A236A, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A33F3
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A33F3
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2405, 4
@@ -4193,7 +4193,7 @@ SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA
end
SecretBase_RedCave1_EventScript_1A33F3:: @ 81A33F3
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2420, 2
@@ -4205,17 +4205,17 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409
SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3466
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3485
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2663, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A346F
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A346F
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2710, 4
@@ -4227,7 +4227,7 @@ SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466
end
SecretBase_RedCave1_EventScript_1A346F:: @ 81A346F
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2736, 2
@@ -4239,17 +4239,17 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485
SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E
goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A34E2
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3501
lock
faceplayer
msgbox SecretBase_RedCave1_Text_1A2A13, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SecretBase_RedCave1_EventScript_1A34EB
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
special sub_80BCE4C
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SecretBase_RedCave1_EventScript_1A34EB
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2AE2, 4
@@ -4261,7 +4261,7 @@ SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2
end
SecretBase_RedCave1_EventScript_1A34EB:: @ 81A34EB
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
special sub_80BCE4C
erasebox 0, 0, 15, 10
msgbox SecretBase_RedCave1_Text_1A2AFB, 2
@@ -4273,8 +4273,8 @@ SecretBase_RedCave1_EventScript_1A3501:: @ 81A3501
SecretBase_RedCave1_EventScript_1A350A:: @ 81A350A
special sub_80BCE1C
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 0
special StartSpecialBattle
waitstate
special ScrSpecial_HealPlayerParty
@@ -4368,29 +4368,29 @@ SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46
end
SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox SlateportCity_PokemonFanClub_Text_1A8704, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE84
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9
end
SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84
msgbox SlateportCity_PokemonFanClub_Text_1A87CA, 4
- setvar VAR_SPECIAL_4, 5
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8004, 5
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 1
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEC3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9
end
@@ -4401,7 +4401,7 @@ SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9
SlateportCity_PokemonFanClub_EventScript_1ADEC3:: @ 81ADEC3
msgbox SlateportCity_PokemonFanClub_Text_1A8818, 4
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
goto SlateportCity_PokemonFanClub_EventScript_1ADE46
end
@@ -4413,39 +4413,39 @@ SlateportCity_PokemonFanClub_EventScript_1ADED6:: @ 81ADED6
SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0
lock
faceplayer
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
goto_if_set FLAG_OCEANIC_MUSEUM_MET_REPORTER, SlateportCity_OceanicMuseum_1F_EventScript_1ADF25
setflag FLAG_OCEANIC_MUSEUM_MET_REPORTER
msgbox SlateportCity_OceanicMuseum_1F_Text_1A927F, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
SlateportCity_OceanicMuseum_1F_EventScript_1ADF25:: @ 81ADF25
msgbox SlateportCity_OceanicMuseum_1F_Text_1A934C, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44
msgbox SlateportCity_OceanicMuseum_1F_Text_1A93D1, 4
- setvar VAR_SPECIAL_4, 5
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 5
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call SlateportCity_OceanicMuseum_1F_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79
end
@@ -4456,7 +4456,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79
SlateportCity_OceanicMuseum_1F_EventScript_1ADF83:: @ 81ADF83
msgbox SlateportCity_OceanicMuseum_1F_Text_1A949A, 4
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
goto SlateportCity_OceanicMuseum_1F_EventScript_1ADE46
end
@@ -4468,26 +4468,26 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96
SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0
lock
faceplayer
- specialvar RESULT, LeadMonNicknamed
- compare RESULT, 0
+ specialvar VAR_RESULT, LeadMonNicknamed
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8005, 3
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox SlateportCity_PokemonFanClub_Text_1A82F1, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADFE9
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
end
SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9
msgbox SlateportCity_PokemonFanClub_Text_1A83D0, 4
random 3
- copyvar VAR_SPECIAL_A, RESULT
- switch RESULT
+ copyvar VAR_0x800A, VAR_RESULT
+ switch VAR_RESULT
case 0, SlateportCity_PokemonFanClub_EventScript_1AE020
case 1, SlateportCity_PokemonFanClub_EventScript_1AE02E
case 2, SlateportCity_PokemonFanClub_EventScript_1AE03C
@@ -4509,24 +4509,24 @@ SlateportCity_PokemonFanClub_EventScript_1AE03C:: @ 81AE03C
end
SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A
- setvar VAR_SPECIAL_4, 7
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 7
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
msgbox SlateportCity_PokemonFanClub_Text_1A852D, 4
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8006, 1
call SlateportCity_PokemonFanClub_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2
msgbox SlateportCity_PokemonFanClub_Text_1A85A6, 4
- copyvar VAR_SPECIAL_7, VAR_SPECIAL_A
- setvar VAR_SPECIAL_5, 3
+ copyvar VAR_0x8007, VAR_0x800A
+ setvar VAR_0x8005, 3
goto SlateportCity_PokemonFanClub_EventScript_1ADE46
end
@@ -4547,29 +4547,29 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
lock
faceplayer
goto_if_set FLAG_TEMP_2, FallarborTown_ContestLobby_EventScript_1AE17E
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox FallarborTown_ContestLobby_Text_1A6F7C, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE0F8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
end
FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8
msgbox FallarborTown_ContestLobby_Text_1A704E, 4
- setvar VAR_SPECIAL_4, 11
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 11
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 0
call FallarborTown_ContestLobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE137
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
end
@@ -4579,20 +4579,20 @@ FallarborTown_ContestLobby_EventScript_1AE12D:: @ 81AE12D
end
FallarborTown_ContestLobby_EventScript_1AE137:: @ 81AE137
- setvar VAR_SPECIAL_4, 24
+ setvar VAR_0x8004, 24
special SetContestCategoryStringVarForInterview
msgbox FallarborTown_ContestLobby_Text_1A70A5, 4
- setvar VAR_SPECIAL_4, 11
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
- setvar VAR_SPECIAL_6, 1
+ setvar VAR_0x8004, 11
+ copyvar VAR_0x8005, VAR_0x8009
+ setvar VAR_0x8006, 1
call FallarborTown_ContestLobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D
msgbox FallarborTown_ContestLobby_Text_1A7153, 4
setflag FLAG_TEMP_2
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
goto FallarborTown_ContestLobby_EventScript_1ADE46
end
@@ -4607,9 +4607,9 @@ SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188
VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188
compare VAR_LINK_CONTEST_ROOM_STATE, 2
goto_if_ne FallarborTown_ContestLobby_EventScript_1AE1FE
- setvar VAR_SPECIAL_5, 6
+ setvar VAR_0x8005, 6
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE
switch VAR_CONTEST_LOCATION
case 0, FallarborTown_ContestLobby_EventScript_1AE1FE
@@ -4643,15 +4643,15 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF
lock
faceplayer
goto_if_set FLAG_TEMP_2, BattleTower_Lobby_EventScript_1AE2E3
- setvar VAR_SPECIAL_5, 7
+ setvar VAR_0x8005, 7
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE2E3
- copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
+ copyvar VAR_0x8009, VAR_0x8006
msgbox BattleTower_Lobby_Text_1A776D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq BattleTower_Lobby_EventScript_1AE241
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BattleTower_Lobby_EventScript_1AE297
end
@@ -4659,20 +4659,20 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241
message BattleTower_Lobby_Text_1A7823
waitmessage
multichoice 19, 8, 45, 1
- copyvar VAR_SPECIAL_8, RESULT
- compare RESULT, 0
+ copyvar VAR_0x8008, VAR_RESULT
+ compare VAR_RESULT, 0
call_if_eq BattleTower_Lobby_EventScript_1AE2A1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq BattleTower_Lobby_EventScript_1AE2AA
msgbox BattleTower_Lobby_Text_1A79EB, 4
- setvar VAR_SPECIAL_4, 12
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_9
+ setvar VAR_0x8004, 12
+ copyvar VAR_0x8005, VAR_0x8009
call BattleTower_Lobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE2B3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE2D9
end
@@ -4690,12 +4690,12 @@ BattleTower_Lobby_EventScript_1AE2AA:: @ 81AE2AA
return
BattleTower_Lobby_EventScript_1AE2B3:: @ 81AE2B3
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE2D9
msgbox BattleTower_Lobby_Text_1A7A6E, 4
setflag FLAG_TEMP_2
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- setvar VAR_SPECIAL_5, 7
+ copyvar VAR_0x8004, VAR_0x8008
+ setvar VAR_0x8005, 7
goto BattleTower_Lobby_EventScript_1ADE46
end
@@ -4712,9 +4712,9 @@ BattleTower_Lobby_EventScript_1AE2E3:: @ 81AE2E3
BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED
compare VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, 0
goto_if_eq BattleTower_Lobby_EventScript_1AE30F
- setvar VAR_SPECIAL_5, 7
+ setvar VAR_0x8005, 7
special InterviewBefore
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1AE30F
clearflag FLAG_HIDE_REPORTER_BATTLE_TOWER
return
@@ -4776,25 +4776,25 @@ Text_RepelWoreOff: @ 81C33EF
MauvilleCity_GameCorner_EventScript_1C407E:: @ 81C407E
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
getpricereduction 2
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA
- addvar VAR_SPECIAL_4, 128
+ addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_1C40DA
end
MauvilleCity_GameCorner_EventScript_1C40AC:: @ 81C40AC
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
getpricereduction 2
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA
- addvar VAR_SPECIAL_4, 128
+ addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_1C40DA
end
diff --git a/data/field_move_scripts.inc b/data/field_move_scripts.inc
index 79dce5afb..b4a8af413 100644
--- a/data/field_move_scripts.inc
+++ b/data/field_move_scripts.inc
@@ -2,13 +2,13 @@ S_CuttableTree:: @ 81B0DCC
lockall
goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseCut
- setfieldeffectargument 0, RESULT
- bufferpartymonnick 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_CUT
msgbox UseCutPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Cut_ChoseNo
msgbox UsedCutRockSmashText, 4
closemessage
@@ -25,9 +25,9 @@ DoCutFieldEffectScript:: @ 81B0E16
end
DoTreeCutMovement: @ 81B0E21
- applymovement LAST_TALKED, TreeCutMovement @ tree cut animation
+ applymovement VAR_LAST_TALKED, TreeCutMovement @ tree cut animation
waitmovement 0
- removeobject LAST_TALKED @ tree disappears
+ removeobject VAR_LAST_TALKED @ tree disappears
releaseall
end
@@ -59,13 +59,13 @@ S_BreakableRock:: @ 81B0EB7
lockall
goto_if_unset FLAG_BADGE03_GET, CannotUseRockSmash
checkpartymove MOVE_ROCK_SMASH
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseRockSmash
- setfieldeffectargument 0, RESULT
- bufferpartymonnick 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
+ bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_ROCK_SMASH
msgbox UseRockSmashPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq RockSmash_ChoseNo
msgbox UsedCutRockSmashText, 4
closemessage
@@ -82,14 +82,14 @@ S_UseRockSmash:: @ 81B0F01
end
DoRockSmashMovement: @ 81B0F0C
- applymovement LAST_TALKED, RockSmashMovement
+ applymovement VAR_LAST_TALKED, RockSmashMovement
waitmovement 0
- removeobject LAST_TALKED
- specialvar RESULT, TryUpdateRusturfTunnelState
- compare RESULT, 1
+ removeobject VAR_LAST_TALKED
+ specialvar VAR_RESULT, TryUpdateRusturfTunnelState
+ compare VAR_RESULT, 1
goto_if_eq DoRockSmashMovement_Done
special ScrSpecial_RockSmashWildEncounter
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoRockSmashMovement_Done
waitstate
releaseall
@@ -126,11 +126,11 @@ S_PushableBoulder:: @ 81B0FCB
goto_if_unset FLAG_BADGE04_GET, CannotUseStrength
goto_if_set FLAG_SYS_USE_STRENGTH, AlreadyUsedStrength
checkpartymove 70
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseStrength
- setfieldeffectargument 0, RESULT
+ setfieldeffectargument 0, VAR_RESULT
msgbox UseStrengthPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Strength_ChoseNo
closemessage
dofieldeffect FLDEFF_USE_STRENGTH
@@ -187,12 +187,12 @@ AlreadyUsedStrengthText: @ 81B1127
S_UseWaterfall:: @ 81B115A
lockall
checkpartymove MOVE_WATERFALL
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq Waterfall_NoMonKnows
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
msgbox UseWaterfallPromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Waterfall_Done
msgbox UsedWaterfallText, 4
dofieldeffect FLDEFF_USE_WATERFALL
@@ -220,13 +220,13 @@ UsedWaterfallText: @ 81B120D
UseDiveScript:: @ 81B1220
lockall
checkpartymove MOVE_DIVE
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq CannotUseDive
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox UseDivePromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Dive_Done
msgbox UsedDiveText, 4
dofieldeffect FLDEFF_USE_DIVE
@@ -243,13 +243,13 @@ Dive_Done: @ 81B1267
S_UseDiveUnderwater:: @ 81B1269
lockall
checkpartymove MOVE_DIVE
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq UnderwaterCannotUseDive
- bufferpartymonnick 0, RESULT
- setfieldeffectargument 0, RESULT
+ bufferpartymonnick 0, VAR_RESULT
+ setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox UnderwaterUseDivePromptText, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq UnderwaterDive_Done
msgbox UsedDiveText, 4
dofieldeffect FLDEFF_USE_DIVE
diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
index 22c76847a..c7be02801 100644
--- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
+++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
@@ -6,7 +6,7 @@ AbandonedShip_CaptainsOffice_EventScript_15EAF5:: @ 815EAF5
faceplayer
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_15EB2D
checkitem ITEM_SCANNER, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB23
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS_2, AbandonedShip_CaptainsOffice_EventScript_15EB2D
msgbox AbandonedShip_CaptainsOffice_Text_198C85, 4
diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
index 7b3923a86..cdf430e27 100644
--- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
+++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
@@ -28,7 +28,7 @@ AbandonedShip_Corridors_B1F_EventScript_15E9D3:: @ 815E9D3
lockall
goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15EA14
checkitem ITEM_STORAGE_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA0A
msgbox AbandonedShip_Corridors_B1F_Text_198692, 4
playse SE_PIN
diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
index 6a71ee049..6639e6b6e 100644
--- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
@@ -54,7 +54,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3
lockall
goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_1_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECCF
msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4
playse SE_PIN
@@ -69,7 +69,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC2A:: @ 815EC2A
lockall
goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_2_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECD9
msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4
playse SE_PIN
@@ -84,7 +84,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC61:: @ 815EC61
lockall
goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_4_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECE3
msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4
playse SE_PIN
@@ -99,7 +99,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC98:: @ 815EC98
lockall
goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_6_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECED
msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4
playse SE_PIN
diff --git a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
index 5a5ab3005..0c2e900c3 100644
--- a/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorRooms/scripts.inc
@@ -43,8 +43,8 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED9B:: @ 815ED9B
setfieldeffectargument 1, 10
setfieldeffectargument 2, 0
dofieldeffect FLDEFF_SPARKLE
- specialvar RESULT, FoundAbandonedShipRoom4Key
- compare RESULT, 0
+ specialvar VAR_RESULT, FoundAbandonedShipRoom4Key
+ compare VAR_RESULT, 0
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE8B
waitfieldeffect FLDEFF_SPARKLE
delay 10
@@ -54,11 +54,11 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDC4:: @ 815EDC4
end
AbandonedShip_HiddenFloorRooms_EventScript_15EDC5:: @ 815EDC5
- specialvar RESULT, FoundAbandonedShipRoom1Key
- compare RESULT, 1
+ specialvar VAR_RESULT, FoundAbandonedShipRoom1Key
+ compare VAR_RESULT, 1
goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EDEA
delay 20
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE6B
waitfieldeffect FLDEFF_SPARKLE
delay 10
@@ -77,8 +77,8 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDEB:: @ 815EDEB
setfieldeffectargument 1, 3
setfieldeffectargument 2, 0
dofieldeffect FLDEFF_SPARKLE
- specialvar RESULT, FoundAbandonedShipRoom6Key
- compare RESULT, 0
+ specialvar VAR_RESULT, FoundAbandonedShipRoom6Key
+ compare VAR_RESULT, 0
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE9B
waitfieldeffect FLDEFF_SPARKLE
delay 10
@@ -98,8 +98,8 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EE23:: @ 815EE23
setfieldeffectargument 1, 6
setfieldeffectargument 2, 0
dofieldeffect FLDEFF_SPARKLE
- specialvar RESULT, FoundAbandonedShipRoom2Key
- compare RESULT, 0
+ specialvar VAR_RESULT, FoundAbandonedShipRoom2Key
+ compare VAR_RESULT, 0
call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE7B
waitfieldeffect FLDEFF_SPARKLE
delay 10
diff --git a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc
index cd7c8fd9f..089893aa2 100644
--- a/data/maps/AbandonedShip_Rooms2_1F/scripts.inc
+++ b/data/maps/AbandonedShip_Rooms2_1F/scripts.inc
@@ -3,8 +3,8 @@ AbandonedShip_Rooms2_1F_MapScripts:: @ 815EA67
AbandonedShip_Rooms2_1F_EventScript_15EA68:: @ 815EA68
trainerbattle 4, TRAINER_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1987C1, AbandonedShip_Rooms2_1F_Text_1987FE, AbandonedShip_Rooms2_1F_Text_19887F
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EA93
msgbox AbandonedShip_Rooms2_1F_Text_198835, 6
end
@@ -16,8 +16,8 @@ AbandonedShip_Rooms2_1F_EventScript_15EA93:: @ 815EA93
AbandonedShip_Rooms2_1F_EventScript_15EAAE:: @ 815EAAE
trainerbattle 4, TRAINER_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1988CC, AbandonedShip_Rooms2_1F_Text_198916, AbandonedShip_Rooms2_1F_Text_19899A
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EAD9
msgbox AbandonedShip_Rooms2_1F_Text_198934, 6
end
diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc
index c8d5e13b2..01b04bf27 100644
--- a/data/maps/AncientTomb/scripts.inc
+++ b/data/maps/AncientTomb/scripts.inc
@@ -9,7 +9,7 @@ AncientTomb_MapScript1_15EFCE:: @ 815EFCE
end
AncientTomb_EventScript_15EFD8:: @ 815EFD8
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
AncientTomb_MapScript1_15EFDC:: @ 815EFDC
diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc
index 3b4c04273..a5268d031 100644
--- a/data/maps/AquaHideout_B1F/scripts.inc
+++ b/data/maps/AquaHideout_B1F/scripts.inc
@@ -8,7 +8,7 @@ AquaHideout_B1F_MapScript1_15D83C:: @ 815D83C
end
AquaHideout_B1F_EventScript_15D846:: @ 815D846
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
AquaHideout_B1F_MapScript1_15D84A:: @ 815D84A
diff --git a/data/maps/AquaHideout_B2F/scripts.inc b/data/maps/AquaHideout_B2F/scripts.inc
index 103de2313..519c799fc 100644
--- a/data/maps/AquaHideout_B2F/scripts.inc
+++ b/data/maps/AquaHideout_B2F/scripts.inc
@@ -9,14 +9,14 @@ AquaHideout_B2F_MapScript1_15D8B7:: @ 815D8B7
AquaHideout_B2F_EventScript_15D8BD:: @ 815D8BD
MagmaHideout_B2F_EventScript_15D8BD:: @ 815D8BD
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
playse SE_PIN
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0833
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0833
waitmovement 0
.ifdef SAPPHIRE
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0839
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0839
.else
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0841
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0841
.endif
waitmovement 0
setvar VAR_TEMP_1, 1
@@ -31,37 +31,37 @@ MagmaHideout_B2F_EventScript_15D8E1:: @ 815D8E1
end
AquaHideout_B2F_EventScript_15D8FD:: @ 815D8FD
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
.ifdef SAPPHIRE
- setvar VAR_SPECIAL_9, 4
+ setvar VAR_0x8009, 4
.else
- setvar VAR_SPECIAL_9, 3
+ setvar VAR_0x8009, 3
.endif
.ifdef SAPPHIRE
- applymovement VAR_SPECIAL_8, Movement_1A083F
+ applymovement VAR_0x8008, Movement_1A083F
.else
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0843
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0843
.endif
waitmovement 0
delay 20
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0839
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0839
waitmovement 0
msgbox AquaHideout_B2F_Text_197162, 4
closemessage
.ifdef SAPPHIRE
- applymovement VAR_SPECIAL_8, Movement_1A083F
+ applymovement VAR_0x8008, Movement_1A083F
.else
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0843
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0843
.endif
.ifdef SAPPHIRE
- applymovement VAR_SPECIAL_9, AquaHideout_B2F_Movement_15D958
+ applymovement VAR_0x8009, AquaHideout_B2F_Movement_15D958
.else
- applymovement VAR_SPECIAL_9, AquaHideout_B2F_Movement_15D95D
+ applymovement VAR_0x8009, AquaHideout_B2F_Movement_15D95D
.endif
waitmovement 0
- removeobject VAR_SPECIAL_9
+ removeobject VAR_0x8009
delay 20
- applymovement VAR_SPECIAL_8, AquaHideout_B2F_Movement_1A0839
+ applymovement VAR_0x8008, AquaHideout_B2F_Movement_1A0839
waitmovement 0
msgbox AquaHideout_B2F_Text_1971AE, 4
setflag FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE
diff --git a/data/maps/BattleTower_BattleRoom/scripts.inc b/data/maps/BattleTower_BattleRoom/scripts.inc
index ea80ae58b..589438fa3 100644
--- a/data/maps/BattleTower_BattleRoom/scripts.inc
+++ b/data/maps/BattleTower_BattleRoom/scripts.inc
@@ -21,27 +21,27 @@ BattleTower_BattleRoom_EventScript_1608FA:: @ 81608FA
waitmessage
closemessage
special ScrSpecial_HealPlayerParty
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 0
special StartSpecialBattle
waitstate
- switch RESULT
+ switch VAR_RESULT
case 1, BattleTower_BattleRoom_EventScript_160961
special LoadPlayerParty
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 5
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 5
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 14
+ setvar VAR_0x8004, 14
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
special sub_810FF60
warp MAP_BATTLE_TOWER_LOBBY, 255, 6, 6
waitstate
BattleTower_BattleRoom_EventScript_160961:: @ 8160961
- setvar VAR_SPECIAL_4, 6
+ setvar VAR_0x8004, 6
special SetBattleTowerProperty
- switch RESULT
+ switch VAR_RESULT
case 8, BattleTower_BattleRoom_EventScript_160A56
applymovement 1, BattleTower_BattleRoom_Movement_160AC6
waitmovement 0
@@ -60,21 +60,21 @@ BattleTower_BattleRoom_EventScript_160961:: @ 8160961
BattleTower_BattleRoom_EventScript_1609B2:: @ 81609B2
msgbox BattleTower_BattleRoom_Text_19AD09, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, BattleTower_BattleRoom_EventScript_1609E0
case YES, BattleTower_BattleRoom_EventScript_160A3C
case 127, BattleTower_BattleRoom_EventScript_1609E0
BattleTower_BattleRoom_EventScript_1609E0:: @ 81609E0
msgbox BattleTower_BattleRoom_Text_19AD3C, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, BattleTower_BattleRoom_EventScript_160A0E
case YES, BattleTower_BattleRoom_EventScript_160A94
case 127, BattleTower_BattleRoom_EventScript_160A0E
BattleTower_BattleRoom_EventScript_160A0E:: @ 8160A0E
msgbox BattleTower_BattleRoom_Text_19AD66, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, BattleTower_BattleRoom_EventScript_1609B2
case YES, BattleTower_BattleRoom_EventScript_160AB1
case 127, BattleTower_BattleRoom_EventScript_1609B2
@@ -89,23 +89,23 @@ BattleTower_BattleRoom_EventScript_160A3C:: @ 8160A3C
BattleTower_BattleRoom_EventScript_160A56:: @ 8160A56
special LoadPlayerParty
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 4
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 4
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 2
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 2
+ setvar VAR_0x8005, 1
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 7
+ setvar VAR_0x8004, 7
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 14
+ setvar VAR_0x8004, 14
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
special sub_810FF60
warp MAP_BATTLE_TOWER_LOBBY, 255, 6, 6
waitstate
BattleTower_BattleRoom_EventScript_160A94:: @ 8160A94
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
special SaveBattleTowerProgress
message BattleTower_BattleRoom_Text_1C6CE1
delay 60
diff --git a/data/maps/BattleTower_Corridor/scripts.inc b/data/maps/BattleTower_Corridor/scripts.inc
index 6511d0333..8981a2a14 100644
--- a/data/maps/BattleTower_Corridor/scripts.inc
+++ b/data/maps/BattleTower_Corridor/scripts.inc
@@ -4,7 +4,7 @@ BattleTower_Corridor_MapScripts:: @ 8160845
.byte 0
BattleTower_Corridor_MapScript1_160850:: @ 8160850
- compare VAR_SPECIAL_6, 1
+ compare VAR_0x8006, 1
goto_if_eq BattleTower_Corridor_EventScript_16086E
setmetatile 12, 0, METATILE_BattleTower_CorridorOpenDoor_Top, 0
setmetatile 12, 1, METATILE_BattleTower_CorridorOpenDoor_Bottom, 0
@@ -21,7 +21,7 @@ BattleTower_Corridor_MapScript2_160881:: @ 8160881
BattleTower_Corridor_EventScript_16088B:: @ 816088B
setvar VAR_TEMP_0, 1
- compare VAR_SPECIAL_6, 1
+ compare VAR_0x8006, 1
goto_if_eq BattleTower_Corridor_EventScript_1608B1
applymovement 1, BattleTower_Corridor_Movement_1608D5
applymovement 255, BattleTower_Corridor_Movement_1608D4
diff --git a/data/maps/BattleTower_Lobby/scripts.inc b/data/maps/BattleTower_Lobby/scripts.inc
index 28f828bc6..c510f0232 100644
--- a/data/maps/BattleTower_Lobby/scripts.inc
+++ b/data/maps/BattleTower_Lobby/scripts.inc
@@ -11,20 +11,20 @@ BattleTower_Lobby_MapScript1_160293:: @ 8160293
end
BattleTower_Lobby_EventScript_16029C:: @ 816029C
- setvar VAR_SPECIAL_4, 10
+ setvar VAR_0x8004, 10
special SetBattleTowerProperty
goto_if_set FLAG_RECEIVED_GOLD_SHIELD, BattleTower_Lobby_EventScript_1602E4
goto_if_set FLAG_RECEIVED_SILVER_SHIELD, BattleTower_Lobby_EventScript_1602CD
- specialvar VAR_SPECIAL_7, GetBestBattleTowerStreak
- compare VAR_SPECIAL_7, 50
+ specialvar VAR_0x8007, GetBestBattleTowerStreak
+ compare VAR_0x8007, 50
goto_if_lt BattleTower_Lobby_EventScript_1602E4
clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER
special TryInitBattleTowerAwardManEventObject
return
BattleTower_Lobby_EventScript_1602CD:: @ 81602CD
- specialvar VAR_SPECIAL_7, GetBestBattleTowerStreak
- compare VAR_SPECIAL_7, 100
+ specialvar VAR_0x8007, GetBestBattleTowerStreak
+ compare VAR_0x8007, 100
goto_if_lt BattleTower_Lobby_EventScript_1602E4
clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER
special TryInitBattleTowerAwardManEventObject
@@ -73,12 +73,12 @@ BattleTower_Lobby_EventScript_160342:: @ 8160342
faceplayer
message BattleTower_Lobby_Text_19A487
waitmessage
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special BattleTowerUtil
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq BattleTower_Lobby_EventScript_16037D
special AwardBattleTowerRibbons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_16037D
message BattleTower_Lobby_Text_19A6BE
waitmessage
@@ -87,36 +87,36 @@ BattleTower_Lobby_EventScript_160342:: @ 8160342
msgbox BattleTower_Lobby_Text_19A719, 4
BattleTower_Lobby_EventScript_16037D:: @ 816037D
- setvar VAR_SPECIAL_4, 8
+ setvar VAR_0x8004, 8
special BattleTowerUtil
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_1603AD
message BattleTower_Lobby_Text_19A589
waitmessage
- setvar VAR_SPECIAL_4, 13
+ setvar VAR_0x8004, 13
special SetBattleTowerProperty
special DetermineBattleTowerPrize
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
special SaveBattleTowerProgress
playse SE_SAVE
waitse
BattleTower_Lobby_EventScript_1603AD:: @ 81603AD
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 3
special SetBattleTowerProperty
message BattleTower_Lobby_Text_19A4BB
waitmessage
special GiveBattleTowerPrize
- switch RESULT
+ switch VAR_RESULT
case 0, BattleTower_Lobby_EventScript_160408
message BattleTower_Lobby_Text_19A506
waitmessage
playfanfare MUS_FANFA4
waitfanfare
- setvar VAR_SPECIAL_4, 9
+ setvar VAR_0x8004, 9
special BattleTowerUtil
- compare RESULT, 49
+ compare VAR_RESULT, 49
goto_if_ne BattleTower_Lobby_EventScript_1603F8
msgbox BattleTower_Lobby_Text_19A617, 4
@@ -142,9 +142,9 @@ BattleTower_Lobby_EventScript_160419:: @ 8160419
waitmessage
message BattleTower_Lobby_Text_19A589
waitmessage
- setvar VAR_SPECIAL_4, 13
+ setvar VAR_0x8004, 13
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special SaveBattleTowerProgress
playse SE_SAVE
waitse
@@ -162,12 +162,12 @@ BattleTower_Lobby_EventScript_16044B:: @ 816044B
waitmessage
message BattleTower_Lobby_Text_19A5CE
waitmessage
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
special SaveBattleTowerProgress
playse SE_SAVE
waitse
- setvar VAR_SPECIAL_4, 8
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 8
+ setvar VAR_0x8005, 0
special SetBattleTowerProperty
setvar VAR_TEMP_0, 5
special SavePlayerParty
@@ -182,9 +182,9 @@ BattleTower_Lobby_EventScript_16044B:: @ 816044B
BattleTower_Lobby_EventScript_16049E:: @ 816049E
lock
faceplayer
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special BattleTowerUtil
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq BattleTower_Lobby_EventScript_160342
special SavePlayerParty
msgbox BattleTower_Lobby_Text_199F2C, 4
@@ -193,7 +193,7 @@ BattleTower_Lobby_EventScript_1604BE:: @ 81604BE
message BattleTower_Lobby_Text_199F79
waitmessage
multichoice 15, 6, 23, 0
- switch RESULT
+ switch VAR_RESULT
case 0, BattleTower_Lobby_EventScript_1604FA
case 1, BattleTower_Lobby_EventScript_160600
case 2, BattleTower_Lobby_EventScript_160652
@@ -203,39 +203,39 @@ BattleTower_Lobby_EventScript_1604FA:: @ 81604FA
message BattleTower_Lobby_Text_19A024
waitmessage
multichoice 18, 6, 24, 0
- switch RESULT
+ switch VAR_RESULT
case 2, BattleTower_Lobby_EventScript_160652
case 127, BattleTower_Lobby_EventScript_160652
special CheckPartyBattleTowerBanlist
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq BattleTower_Lobby_EventScript_16060D
- setvar VAR_SPECIAL_4, 1
- copyvar VAR_SPECIAL_5, RESULT
- copyvar VAR_SPECIAL_6, RESULT
+ setvar VAR_0x8004, 1
+ copyvar VAR_0x8005, VAR_RESULT
+ copyvar VAR_0x8006, VAR_RESULT
special SetBattleTowerProperty
msgbox BattleTower_Lobby_Text_19A07B, 4
fadescreen 1
special ChooseBattleTowerPlayerParty
waitstate
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_16064F
msgbox BattleTower_Lobby_Text_199FDA, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, BattleTower_Lobby_EventScript_16064F
case YES, BattleTower_Lobby_EventScript_160587
case 127, BattleTower_Lobby_EventScript_16064F
BattleTower_Lobby_EventScript_160587:: @ 8160587
- setvar VAR_SPECIAL_4, 5
+ setvar VAR_0x8004, 5
special SetBattleTowerProperty
setvar VAR_TEMP_0, 0
- setvar VAR_SPECIAL_4, 11
+ setvar VAR_0x8004, 11
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 1
special SetBattleTowerProperty
- setvar VAR_SPECIAL_4, 8
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 8
+ setvar VAR_0x8005, 0
special SetBattleTowerProperty
special LoadPlayerParty
closemessage
@@ -243,7 +243,7 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587
call S_DoSaveDialog
setvar VAR_TEMP_0, 5
erasebox 0, 0, 15, 10
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_160642
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
special SavePlayerParty
@@ -261,7 +261,7 @@ BattleTower_Lobby_EventScript_160600:: @ 8160600
goto BattleTower_Lobby_EventScript_1604BE
BattleTower_Lobby_EventScript_16060D:: @ 816060D
- switch RESULT
+ switch VAR_RESULT
case 0, BattleTower_Lobby_EventScript_160628
case 1, BattleTower_Lobby_EventScript_160635
@@ -274,7 +274,7 @@ BattleTower_Lobby_EventScript_160635:: @ 8160635
goto BattleTower_Lobby_EventScript_160662
BattleTower_Lobby_EventScript_160642:: @ 8160642
- setvar VAR_SPECIAL_4, 12
+ setvar VAR_0x8004, 12
special SetBattleTowerProperty
goto BattleTower_Lobby_EventScript_160652
@@ -283,7 +283,7 @@ BattleTower_Lobby_EventScript_16064F:: @ 816064F
BattleTower_Lobby_EventScript_160652:: @ 8160652
msgbox BattleTower_Lobby_Text_199FA9, 4
- setvar VAR_SPECIAL_4, 11
+ setvar VAR_0x8004, 11
special SetBattleTowerProperty
BattleTower_Lobby_EventScript_160662:: @ 8160662
@@ -333,7 +333,7 @@ BattleTower_Lobby_EventScript_1606A5:: @ 81606A5
lock
faceplayer
msgbox BattleTower_Lobby_Text_19A747, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case YES, BattleTower_Lobby_EventScript_1606CC
case NO, BattleTower_Lobby_EventScript_1606F7
release
@@ -341,13 +341,13 @@ BattleTower_Lobby_EventScript_1606A5:: @ 81606A5
BattleTower_Lobby_EventScript_1606CC:: @ 81606CC
msgbox BattleTower_Lobby_Text_19A7C3, 4
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
call BattleTower_Lobby_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_160701
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq BattleTower_Lobby_EventScript_16070B
end
@@ -388,9 +388,9 @@ BattleTower_Lobby_EventScript_160733:: @ 8160733
goto_if_set FLAG_RECEIVED_GOLD_SHIELD, BattleTower_Lobby_EventScript_1607C5
goto_if_set FLAG_RECEIVED_SILVER_SHIELD, BattleTower_Lobby_EventScript_160773
msgbox BattleTower_Lobby_Text_19A9EE, 4
- setvar VAR_SPECIAL_8, DECOR_SILVER_SHIELD
+ setvar VAR_0x8008, DECOR_SILVER_SHIELD
givedecoration_std DECOR_SILVER_SHIELD
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1607AF
setflag FLAG_RECEIVED_SILVER_SHIELD
msgbox BattleTower_Lobby_Text_19ABAA, 4
@@ -398,13 +398,13 @@ BattleTower_Lobby_EventScript_160733:: @ 8160733
end
BattleTower_Lobby_EventScript_160773:: @ 8160773
- specialvar RESULT, GetBestBattleTowerStreak
- compare RESULT, 100
+ specialvar VAR_RESULT, GetBestBattleTowerStreak
+ compare VAR_RESULT, 100
goto_if_lt BattleTower_Lobby_EventScript_1607C5
msgbox BattleTower_Lobby_Text_19AAC4, 4
- setvar VAR_SPECIAL_8, DECOR_GOLD_SHIELD
+ setvar VAR_0x8008, DECOR_GOLD_SHIELD
givedecoration_std DECOR_GOLD_SHIELD
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Lobby_EventScript_1607AF
setflag FLAG_RECEIVED_GOLD_SHIELD
msgbox BattleTower_Lobby_Text_19ABAA, 4
@@ -412,7 +412,7 @@ BattleTower_Lobby_EventScript_160773:: @ 8160773
end
BattleTower_Lobby_EventScript_1607AF:: @ 81607AF
- bufferdecorationname 1, VAR_SPECIAL_8
+ bufferdecorationname 1, VAR_0x8008
msgbox BattleTower_Lobby_Text_1A0CEF, 4
msgbox BattleTower_Lobby_Text_19ABED, 4
release
diff --git a/data/maps/BattleTower_Outside/scripts.inc b/data/maps/BattleTower_Outside/scripts.inc
index 8f6cb4305..680738272 100644
--- a/data/maps/BattleTower_Outside/scripts.inc
+++ b/data/maps/BattleTower_Outside/scripts.inc
@@ -13,7 +13,7 @@ BattleTower_Outside_EventScript_160168:: @ 8160168
faceplayer
msgbox BattleTower_Outside_Text_199D06, 4
checkitem ITEM_SS_TICKET, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BattleTower_Outside_EventScript_1601C6
message BattleTower_Outside_Text_199D9D
waitmessage
@@ -22,7 +22,7 @@ BattleTower_Outside_EventScript_160168:: @ 8160168
BattleTower_Outside_EventScript_16018E:: @ 816018E
multichoicedefault 21, 6, 53, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, BattleTower_Outside_EventScript_1601D0
case 1, BattleTower_Outside_EventScript_1601FB
case 2, BattleTower_Outside_EventScript_160250
@@ -36,7 +36,7 @@ BattleTower_Outside_EventScript_1601C6:: @ 81601C6
BattleTower_Outside_EventScript_1601D0:: @ 81601D0
msgbox BattleTower_Outside_Text_199DF2, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BattleTower_Outside_EventScript_160226
msgbox BattleTower_Outside_Text_199E4B, 4
call BattleTower_Outside_EventScript_160232
@@ -47,7 +47,7 @@ BattleTower_Outside_EventScript_1601D0:: @ 81601D0
BattleTower_Outside_EventScript_1601FB:: @ 81601FB
msgbox BattleTower_Outside_Text_199E0E, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BattleTower_Outside_EventScript_160226
msgbox BattleTower_Outside_Text_199E4B, 4
call BattleTower_Outside_EventScript_160232
@@ -64,11 +64,11 @@ BattleTower_Outside_EventScript_160226:: @ 8160226
BattleTower_Outside_EventScript_160232:: @ 8160232
closemessage
- applymovement LAST_TALKED, BattleTower_Outside_Movement_1A0845
+ applymovement VAR_LAST_TALKED, BattleTower_Outside_Movement_1A0845
waitmovement 0
delay 30
hideobjectat 5, MAP_BATTLE_TOWER_OUTSIDE
- setvar VAR_SPECIAL_4, 4
+ setvar VAR_0x8004, 4
call BattleTower_Outside_EventScript_1A047C
return
diff --git a/data/maps/CaveOfOrigin_B4F/scripts.inc b/data/maps/CaveOfOrigin_B4F/scripts.inc
index aeec7023f..b689d5158 100644
--- a/data/maps/CaveOfOrigin_B4F/scripts.inc
+++ b/data/maps/CaveOfOrigin_B4F/scripts.inc
@@ -42,9 +42,9 @@ CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7
dofieldeffect FLDEFF_SPARKLE
waitfieldeffect FLDEFF_SPARKLE
.ifdef SAPPHIRE
- setvar RESULT, 3
+ setvar VAR_RESULT, 3
.else
- setvar RESULT, 2
+ setvar VAR_RESULT, 2
.endif
playse SE_TAMA
special sub_80818A4
@@ -63,8 +63,8 @@ CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7
special ScrSpecial_StartGroudonKyogreBattle
waitstate
clearflag FLAG_SYS_CTRL_OBJ_DELETE
- specialvar RESULT, GetBattleOutcome
- compare RESULT, 1
+ specialvar VAR_RESULT, GetBattleOutcome
+ compare VAR_RESULT, 1
call_if_eq CaveOfOrigin_B4F_EventScript_15DE73
setflag FLAG_HIDE_WALLACE_SOOTOPOLIS
setflag FLAG_HIDE_CAVE_OF_ORIGIN_ENTRANCE_WOMAN_1
diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc
index cf1ae8e72..fefb24228 100644
--- a/data/maps/DesertRuins/scripts.inc
+++ b/data/maps/DesertRuins/scripts.inc
@@ -9,7 +9,7 @@ DesertRuins_MapScript1_15CB03:: @ 815CB03
end
DesertRuins_EventScript_15CB0D:: @ 815CB0D
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
DesertRuins_MapScript1_15CB11:: @ 815CB11
diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc
index 63f8c45b9..dec181f27 100644
--- a/data/maps/DewfordTown/scripts.inc
+++ b/data/maps/DewfordTown/scripts.inc
@@ -13,7 +13,7 @@ DewfordTown_EventScript_14E002:: @ 814E002
message DewfordTown_Text_16B522
waitmessage
multichoicedefault 21, 6, 0, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, DewfordTown_EventScript_14E04B
case 1, DewfordTown_EventScript_14E05B
case 2, DewfordTown_EventScript_14E06B
@@ -42,7 +42,7 @@ DewfordTown_EventScript_14E06B:: @ 814E06B
DewfordTown_EventScript_14E076:: @ 814E076
msgbox DewfordTown_Text_16B3BC, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq DewfordTown_EventScript_14E093
msgbox DewfordTown_Text_16B471, 4
release
@@ -75,9 +75,9 @@ DewfordTown_EventScript_14E0C6:: @ 814E0C6
faceplayer
goto_if_set FLAG_RECEIVED_OLD_ROD, DewfordTown_EventScript_14E11B
msgbox DewfordTown_Text_16B665, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq DewfordTown_EventScript_14E0F0
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq DewfordTown_EventScript_14E111
end
@@ -98,9 +98,9 @@ DewfordTown_EventScript_14E11B:: @ 814E11B
message DewfordTown_Text_16B84E
waitmessage
multichoice 20, 8, 50, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DewfordTown_EventScript_14E13D
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DewfordTown_EventScript_14E147
end
@@ -141,7 +141,7 @@ DewfordTown_EventScript_14E151:: @ 814E151
setvar VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 2
resetobjectpriority 255, MAP_DEWFORD_TOWN
warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4
- copyvar VAR_BRINEY_LOCATION, VAR_SPECIAL_8
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
waitstate
release
end
@@ -177,7 +177,7 @@ DewfordTown_EventScript_14E1D8:: @ 814E1D8
call_if_unset FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_14E281
call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_14E28A
closemessage
- copyvar VAR_BRINEY_LOCATION, VAR_SPECIAL_8
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority 255, MAP_DEWFORD_TOWN
resetobjectpriority 2, MAP_ROUTE109
moveobjectoffscreen 2
@@ -595,9 +595,9 @@ DewfordTown_EventScript_14E413:: @ 814E413
faceplayer
call DewfordTown_EventScript_1A0102
msgbox DewfordTown_Text_16B9CE, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq DewfordTown_EventScript_14E439
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq DewfordTown_EventScript_14E443
end
@@ -608,19 +608,19 @@ DewfordTown_EventScript_14E439:: @ 814E439
DewfordTown_EventScript_14E443:: @ 814E443
msgbox DewfordTown_Text_16BADC, 4
- setvar VAR_SPECIAL_4, 9
+ setvar VAR_0x8004, 9
call DewfordTown_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DewfordTown_EventScript_14E46E
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DewfordTown_EventScript_14E485
end
DewfordTown_EventScript_14E46E:: @ 814E46E
incrementgamestat GAME_STAT_STARTED_TRENDS
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq DewfordTown_EventScript_14E48F
msgbox DewfordTown_Text_16BB44, 4
release
diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc
index 3e57e0fec..476880f68 100644
--- a/data/maps/DewfordTown_Gym/scripts.inc
+++ b/data/maps/DewfordTown_Gym/scripts.inc
@@ -9,12 +9,12 @@ DewfordTown_Gym_MapScript1_15306B:: @ 815306B
DewfordTown_Gym_EventScript_153071:: @ 8153071
goto_if_trainer_defeated TRAINER_BRAWLY, DewfordTown_Gym_EventScript_1530AA
call DewfordTown_Gym_EventScript_153122
- copyvar VAR_SPECIAL_1, VAR_SPECIAL_0
- compare VAR_SPECIAL_0, 0
+ copyvar VAR_0x8001, VAR_0x8000
+ compare VAR_0x8000, 0
goto_if_eq DewfordTown_Gym_EventScript_1530BA
- compare VAR_SPECIAL_0, 1
+ compare VAR_0x8000, 1
goto_if_eq DewfordTown_Gym_EventScript_1530B6
- compare VAR_SPECIAL_0, 2
+ compare VAR_0x8000, 2
goto_if_eq DewfordTown_Gym_EventScript_1530B2
goto DewfordTown_Gym_EventScript_1530AE
@@ -41,14 +41,14 @@ DewfordTown_Gym_EventScript_1530BA:: @ 81530BA
DewfordTown_Gym_EventScript_1530BE:: @ 81530BE
call DewfordTown_Gym_EventScript_153122
nop1
- compare VAR_SPECIAL_0, VAR_SPECIAL_1
+ compare VAR_0x8000, VAR_0x8001
goto_if_eq DewfordTown_Gym_EventScript_1530F5
- copyvar VAR_SPECIAL_1, VAR_SPECIAL_0
- compare VAR_SPECIAL_0, 1
+ copyvar VAR_0x8001, VAR_0x8000
+ compare VAR_0x8000, 1
goto_if_eq DewfordTown_Gym_EventScript_1530F6
- compare VAR_SPECIAL_0, 2
+ compare VAR_0x8000, 2
goto_if_eq DewfordTown_Gym_EventScript_153101
- compare VAR_SPECIAL_0, 3
+ compare VAR_0x8000, 3
goto_if_eq DewfordTown_Gym_EventScript_15310C
DewfordTown_Gym_EventScript_1530F5:: @ 81530F5
@@ -79,17 +79,17 @@ DewfordTown_Gym_EventScript_153117:: @ 8153117
return
DewfordTown_Gym_EventScript_153122:: @ 8153122
- setvar VAR_SPECIAL_0, 0
+ setvar VAR_0x8000, 0
goto_if_trainer_not_defeated TRAINER_HIDEKI, DewfordTown_Gym_EventScript_153135
- addvar VAR_SPECIAL_0, 1
+ addvar VAR_0x8000, 1
DewfordTown_Gym_EventScript_153135:: @ 8153135
goto_if_trainer_not_defeated TRAINER_TESSA, DewfordTown_Gym_EventScript_153143
- addvar VAR_SPECIAL_0, 1
+ addvar VAR_0x8000, 1
DewfordTown_Gym_EventScript_153143:: @ 8153143
goto_if_trainer_not_defeated TRAINER_LAURA, DewfordTown_Gym_EventScript_153151
- addvar VAR_SPECIAL_0, 1
+ addvar VAR_0x8000, 1
DewfordTown_Gym_EventScript_153151:: @ 8153151
return
@@ -112,14 +112,14 @@ DewfordTown_Gym_EventScript_153177:: @ 8153177
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq DewfordTown_Gym_EventScript_1A00FB
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
call DewfordTown_Gym_EventScript_1A01C0
goto DewfordTown_Gym_EventScript_1531B5
end
DewfordTown_Gym_EventScript_1531B5:: @ 81531B5
giveitem_std ITEM_TM08_BULK_UP
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DewfordTown_Gym_EventScript_1A029B
msgbox DewfordTown_Gym_Text_1753BF, 4
setflag FLAG_RECEIVED_TM08
diff --git a/data/maps/DewfordTown_Hall/scripts.inc b/data/maps/DewfordTown_Hall/scripts.inc
index 602c4776e..65e16a78a 100644
--- a/data/maps/DewfordTown_Hall/scripts.inc
+++ b/data/maps/DewfordTown_Hall/scripts.inc
@@ -6,7 +6,7 @@ DewfordTown_Hall_EventScript_153293:: @ 8153293
faceplayer
call DewfordTown_Hall_EventScript_1A0102
special TrendyPhraseIsOld
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DewfordTown_Hall_EventScript_1532B2
msgbox DewfordTown_Hall_Text_1754C9, 4
release
@@ -31,9 +31,9 @@ DewfordTown_Hall_EventScript_1532CD:: @ 81532CD
call DewfordTown_Hall_EventScript_1A0102
special BufferRandomHobbyOrLifestyleString
msgbox DewfordTown_Hall_Text_1755F9, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq DewfordTown_Hall_EventScript_1532F6
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq DewfordTown_Hall_EventScript_153300
end
@@ -88,7 +88,7 @@ DewfordTown_Hall_EventScript_153363:: @ 8153363
lockall
call DewfordTown_Hall_EventScript_1A0102
special GetDewfordHallPaintingNameIndex
- switch RESULT
+ switch VAR_RESULT
case 0, DewfordTown_Hall_EventScript_1533CA
case 4, DewfordTown_Hall_EventScript_1533CA
case 1, DewfordTown_Hall_EventScript_1533D4
@@ -121,20 +121,20 @@ DewfordTown_Hall_EventScript_1533E8:: @ 81533E8
DewfordTown_Hall_EventScript_1533F2:: @ 81533F2
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto DewfordTown_Hall_EventScript_15340A
end
DewfordTown_Hall_EventScript_1533FE:: @ 81533FE
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto DewfordTown_Hall_EventScript_15340A
end
DewfordTown_Hall_EventScript_15340A:: @ 815340A
call DewfordTown_Hall_EventScript_1A0102
special GetDewfordHallPaintingNameIndex
- switch RESULT
+ switch VAR_RESULT
case 0, DewfordTown_Hall_EventScript_153470
case 1, DewfordTown_Hall_EventScript_153470
case 2, DewfordTown_Hall_EventScript_15348C
@@ -191,14 +191,14 @@ DewfordTown_Hall_EventScript_1534FC:: @ 81534FC
DewfordTown_Hall_EventScript_1534FD:: @ 81534FD
applymovement 8, DewfordTown_Hall_Movement_153599
waitmovement 0
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
goto_if_eq DewfordTown_Hall_EventScript_15351E
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
goto_if_eq DewfordTown_Hall_EventScript_153534
end
DewfordTown_Hall_EventScript_15351E:: @ 815351E
- compare FACING, 4
+ compare VAR_FACING, 4
goto_if_eq DewfordTown_Hall_EventScript_1534FC
applymovement 255, DewfordTown_Hall_Movement_1A0843
waitmovement 0
@@ -210,16 +210,16 @@ DewfordTown_Hall_EventScript_153534:: @ 8153534
DewfordTown_Hall_EventScript_153535:: @ 8153535
applymovement 7, DewfordTown_Hall_Movement_15359B
waitmovement 0
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
goto_if_eq DewfordTown_Hall_EventScript_153556
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
goto_if_eq DewfordTown_Hall_EventScript_153583
end
DewfordTown_Hall_EventScript_153556:: @ 8153556
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq DewfordTown_Hall_EventScript_15356D
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq DewfordTown_Hall_EventScript_153578
return
@@ -234,7 +234,7 @@ DewfordTown_Hall_EventScript_153578:: @ 8153578
return
DewfordTown_Hall_EventScript_153583:: @ 8153583
- compare FACING, 3
+ compare VAR_FACING, 3
goto_if_eq DewfordTown_Hall_EventScript_1534FC
applymovement 255, DewfordTown_Hall_Movement_1A083F
waitmovement 0
@@ -255,7 +255,7 @@ DewfordTown_Hall_EventScript_15359D:: @ 815359D
goto_if_set FLAG_RECEIVED_TM36, DewfordTown_Hall_EventScript_1535D1
msgbox DewfordTown_Hall_Text_175E13, 4
giveitem_std ITEM_TM36_SLUDGE_BOMB
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DewfordTown_Hall_EventScript_1A029B
setflag FLAG_RECEIVED_TM36
release
diff --git a/data/maps/DewfordTown_House2/scripts.inc b/data/maps/DewfordTown_House2/scripts.inc
index a2341bc76..307e33033 100644
--- a/data/maps/DewfordTown_House2/scripts.inc
+++ b/data/maps/DewfordTown_House2/scripts.inc
@@ -7,7 +7,7 @@ DewfordTown_House2_EventScript_1535DC:: @ 81535DC
goto_if_set FLAG_RECEIVED_SILK_SCARF, DewfordTown_House2_EventScript_153615
msgbox DewfordTown_House2_Text_175EFE, 4
giveitem_std ITEM_SILK_SCARF
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DewfordTown_House2_EventScript_15360B
setflag FLAG_RECEIVED_SILK_SCARF
release
diff --git a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
index 38f242eab..5408bef63 100644
--- a/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/DewfordTown_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ DewfordTown_PokemonCenter_1F_MapScript1_15301A:: @ 815301A
end
DewfordTown_PokemonCenter_1F_EventScript_153023:: @ 8153023
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call DewfordTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
index 55597b1f8..abb8e4121 100644
--- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
@@ -53,16 +53,16 @@ EverGrandeCity_ChampionsRoom_EventScript_15B821:: @ 815B821
closemessage
playse SE_DOOR
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B87C
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B881
addobject 2
call EverGrandeCity_ChampionsRoom_EventScript_15B9BD
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B886
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B8BB
end
@@ -128,9 +128,9 @@ EverGrandeCity_ChampionsRoom_EventScript_15B8F0:: @ 815B8F0
waitmovement 0
msgbox EverGrandeCity_ChampionsRoom_Text_191546, 4
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B9AB
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B9B4
closemessage
applymovement 1, EverGrandeCity_ChampionsRoom_Movement_15B9FF
diff --git a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
index f00a809bd..a90523822 100644
--- a/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_DrakesRoom/scripts.inc
@@ -53,7 +53,7 @@ EverGrandeCity_DrakesRoom_EventScript_15B78B:: @ 815B78B
end
EverGrandeCity_DrakesRoom_EventScript_15B795:: @ 815B795
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special sub_810FF60
setflag FLAG_DEFEATED_ELITE_4_DRAKE
call EverGrandeCity_DrakesRoom_EventScript_1A0693
diff --git a/data/maps/EverGrandeCity_HallOfFame/scripts.inc b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
index 4b54204d3..22cd64497 100644
--- a/data/maps/EverGrandeCity_HallOfFame/scripts.inc
+++ b/data/maps/EverGrandeCity_HallOfFame/scripts.inc
@@ -44,9 +44,9 @@ EverGrandeCity_HallOfFame_EventScript_15BBA8:: @ 815BBA8
setvar VAR_TEMP_1, 1
call EverGrandeCity_HallOfFame_EventScript_19FC13
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EverGrandeCity_HallOfFame_EventScript_15BC41
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EverGrandeCity_HallOfFame_EventScript_15BC4D
end
diff --git a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
index 3c0ad3732..75793b737 100644
--- a/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ EverGrandeCity_PokemonCenter_1F_MapScript1_15BC6C:: @ 815BC6C
EverGrandeCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70
SootopolisCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call SootopolisCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
index 6da717d06..7191b6e3e 100644
--- a/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
+++ b/data/maps/EverGrandeCity_PokemonLeague/scripts.inc
@@ -14,7 +14,7 @@ EverGrandeCity_PokemonLeague_EventScript_15BA8B:: @ 815BA8B
return
EverGrandeCity_PokemonLeague_EventScript_15BA9A:: @ 815BA9A
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call EverGrandeCity_PokemonLeague_EventScript_19FD5B
waitmessage
waitbuttonpress
@@ -89,11 +89,11 @@ EverGrandeCity_PokemonLeague_EventScript_15BB4A:: @ 815BB4A
end
EverGrandeCity_PokemonLeague_EventScript_15BB57:: @ 815BB57
- applymovement LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A0839
+ applymovement VAR_LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A0839
waitmovement 0
msgbox EverGrandeCity_PokemonLeague_Text_191804, 4
closemessage
- applymovement LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A083D
+ applymovement VAR_LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A083D
waitmovement 0
releaseall
end
diff --git a/data/maps/FallarborTown_ContestLobby/scripts.inc b/data/maps/FallarborTown_ContestLobby/scripts.inc
index 9a82f89e2..f594d397d 100644
--- a/data/maps/FallarborTown_ContestLobby/scripts.inc
+++ b/data/maps/FallarborTown_ContestLobby/scripts.inc
@@ -7,8 +7,8 @@ FallarborTown_ContestLobby_MapScript1_1539C7:: @ 81539C7
end
FallarborTown_ContestLobby_EventScript_1539CD:: @ 81539CD
- setvar VAR_SPECIAL_B, 6
- setvar CONTEST_RANK, 1
+ setvar VAR_0x800B, 6
+ setvar VAR_CONTEST_RANK, 1
call FallarborTown_ContestLobby_EventScript_1A4E92
call FallarborTown_ContestLobby_EventScript_1539F8
special SetContestTrainerGfxIds
diff --git a/data/maps/FallarborTown_House1/scripts.inc b/data/maps/FallarborTown_House1/scripts.inc
index f16b6e828..23e47d780 100644
--- a/data/maps/FallarborTown_House1/scripts.inc
+++ b/data/maps/FallarborTown_House1/scripts.inc
@@ -10,7 +10,7 @@ FallarborTown_House1_EventScript_153BB5:: @ 8153BB5
faceplayer
goto_if_set FLAG_RECEIVED_TM27, FallarborTown_House1_EventScript_153C54
checkitem ITEM_METEORITE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_House1_EventScript_153BDA
msgbox FallarborTown_House1_Text_177755, 4
release
@@ -19,13 +19,13 @@ FallarborTown_House1_EventScript_153BB5:: @ 8153BB5
FallarborTown_House1_EventScript_153BDA:: @ 8153BDA
call_if_unset FLAG_TEMP_2, FallarborTown_House1_EventScript_153C2D
call_if_set FLAG_TEMP_2, FallarborTown_House1_EventScript_153C3E
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_House1_EventScript_153C47
msgbox FallarborTown_House1_Text_1778C4, 4
giveitem_std ITEM_TM27_RETURN
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_House1_EventScript_1A029B
- setvar VAR_SPECIAL_4, 280
+ setvar VAR_0x8004, 280
call FallarborTown_House1_EventScript_1A067F
setflag FLAG_RECEIVED_TM27
msgbox FallarborTown_House1_Text_177910, 4
diff --git a/data/maps/FallarborTown_House2/scripts.inc b/data/maps/FallarborTown_House2/scripts.inc
index 41ebd039c..67eb4fac1 100644
--- a/data/maps/FallarborTown_House2/scripts.inc
+++ b/data/maps/FallarborTown_House2/scripts.inc
@@ -13,10 +13,10 @@ FallarborTown_House2_EventScript_153C91:: @ 8153C91
FallarborTown_House2_EventScript_153CB6:: @ 8153CB6
checkitem ITEM_HEART_SCALE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_House2_EventScript_153D60
msgbox FallarborTown_House2_Text_177BDB, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, FallarborTown_House2_EventScript_153D60
goto FallarborTown_House2_EventScript_153CE4
end
@@ -25,12 +25,12 @@ FallarborTown_House2_EventScript_153CE4:: @ 8153CE4
msgbox FallarborTown_House2_Text_177C3F, 4
special SelectMoveTutorMon
waitstate
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq FallarborTown_House2_EventScript_153D60
special IsSelectedMonEgg
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_House2_EventScript_153D52
- compare VAR_SPECIAL_5, 0
+ compare VAR_0x8005, 0
goto_if_eq FallarborTown_House2_EventScript_153D44
goto FallarborTown_House2_EventScript_153D1A
end
@@ -39,7 +39,7 @@ FallarborTown_House2_EventScript_153D1A:: @ 8153D1A
msgbox FallarborTown_House2_Text_177C5D, 4
special DisplayMoveTutorMenu
waitstate
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq FallarborTown_House2_EventScript_153CE4
msgbox FallarborTown_House2_Text_177CC3, 4
takeitem ITEM_HEART_SCALE, 1
diff --git a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
index 801f704e3..9e4fa7579 100644
--- a/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FallarborTown_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ FallarborTown_PokemonCenter_1F_MapScript1_153AF9:: @ 8153AF9
end
FallarborTown_PokemonCenter_1F_EventScript_153B02:: @ 8153B02
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call FallarborTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
@@ -28,7 +28,7 @@ FallarborTown_PokemonCenter_1F_EventScript_153B22:: @ 8153B22
faceplayer
msgbox FallarborTown_PokemonCenter_1F_Text_1774D4, 4
closemessage
- switch FACING
+ switch VAR_FACING
case 2, FallarborTown_PokemonCenter_1F_EventScript_153B49
case 3, FallarborTown_PokemonCenter_1F_EventScript_153B59
end
diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc
index 342e2fdc3..5fe0b96a3 100644
--- a/data/maps/FortreeCity/scripts.inc
+++ b/data/maps/FortreeCity/scripts.inc
@@ -56,7 +56,7 @@ FortreeCity_EventScript_14C9B3:: @ 814C9B3
lock
faceplayer
checkitem ITEM_DEVON_SCOPE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FortreeCity_EventScript_14C9CF
msgbox FortreeCity_Text_167868, 4
release
@@ -64,7 +64,7 @@ FortreeCity_EventScript_14C9B3:: @ 814C9B3
FortreeCity_EventScript_14C9CF:: @ 814C9CF
msgbox FortreeCity_Text_16788B, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FortreeCity_EventScript_14C9E4
release
end
@@ -72,15 +72,15 @@ FortreeCity_EventScript_14C9CF:: @ 814C9CF
FortreeCity_EventScript_14C9E4:: @ 814C9E4
msgbox FortreeCity_Text_1678CB, 4
closemessage
- applymovement LAST_TALKED, FortreeCity_Movement_1A0662
+ applymovement VAR_LAST_TALKED, FortreeCity_Movement_1A0662
waitmovement 0
waitse
playmoncry SPECIES_KECLEON, 2
delay 40
waitmoncry
- applymovement LAST_TALKED, FortreeCity_Movement_14CA13
+ applymovement VAR_LAST_TALKED, FortreeCity_Movement_14CA13
waitmovement 0
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
setflag FLAG_KECLEON_FLED_FORTREE
release
end
diff --git a/data/maps/FortreeCity_Gym/scripts.inc b/data/maps/FortreeCity_Gym/scripts.inc
index 3a814a4b7..3902fc815 100644
--- a/data/maps/FortreeCity_Gym/scripts.inc
+++ b/data/maps/FortreeCity_Gym/scripts.inc
@@ -29,14 +29,14 @@ FortreeCity_Gym_EventScript_157F15:: @ 8157F15
msgbox FortreeCity_Gym_Text_185E73, 4
setflag FLAG_DEFEATED_FORTREE_GYM
setflag FLAG_BADGE06_GET
- setvar VAR_SPECIAL_8, 6
+ setvar VAR_0x8008, 6
call FortreeCity_Gym_EventScript_1A01C0
goto FortreeCity_Gym_EventScript_157F3E
end
FortreeCity_Gym_EventScript_157F3E:: @ 8157F3E
giveitem_std ITEM_TM40_AERIAL_ACE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FortreeCity_Gym_EventScript_1A029B
msgbox FortreeCity_Gym_Text_185F4A, 4
setflag FLAG_RECEIVED_TM40
diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc
index 443cc3a5c..475905070 100644
--- a/data/maps/FortreeCity_House1/scripts.inc
+++ b/data/maps/FortreeCity_House1/scripts.inc
@@ -5,29 +5,29 @@ FortreeCity_House1_EventScript_157E13:: @ 8157E13
lock
faceplayer
goto_if_set FLAG_FORTREE_NPC_TRADE_COMPLETED, FortreeCity_House1_EventScript_157EAD
- setvar VAR_SPECIAL_8, 1
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- specialvar RESULT, GetInGameTradeSpeciesInfo
- copyvar VAR_SPECIAL_9, RESULT
+ setvar VAR_0x8008, 1
+ copyvar VAR_0x8004, VAR_0x8008
+ specialvar VAR_RESULT, GetInGameTradeSpeciesInfo
+ copyvar VAR_0x8009, VAR_RESULT
msgbox FortreeCity_House1_Text_18568C, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FortreeCity_House1_EventScript_157E95
special SelectMonForNPCTrade
waitstate
- copyvar VAR_SPECIAL_A, VAR_SPECIAL_4
- compare VAR_SPECIAL_4, 255
+ copyvar VAR_0x800A, VAR_0x8004
+ compare VAR_0x8004, 255
goto_if_eq FortreeCity_House1_EventScript_157E95
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
- specialvar RESULT, GetTradeSpecies
- copyvar VAR_SPECIAL_B, RESULT
- compare RESULT, VAR_SPECIAL_9
+ copyvar VAR_0x8005, VAR_0x800A
+ specialvar VAR_RESULT, GetTradeSpecies
+ copyvar VAR_0x800B, VAR_RESULT
+ compare VAR_RESULT, VAR_0x8009
goto_if_ne FortreeCity_House1_EventScript_157E9F
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
+ copyvar VAR_0x8004, VAR_0x8008
+ copyvar VAR_0x8005, VAR_0x800A
special CreateInGameTradePokemon
special DoInGameTradeScene
waitstate
- bufferspeciesname 0, VAR_SPECIAL_9
+ bufferspeciesname 0, VAR_0x8009
msgbox FortreeCity_House1_Text_1856F7, 4
setflag FLAG_FORTREE_NPC_TRADE_COMPLETED
release
@@ -39,7 +39,7 @@ FortreeCity_House1_EventScript_157E95:: @ 8157E95
end
FortreeCity_House1_EventScript_157E9F:: @ 8157E9F
- bufferspeciesname 0, VAR_SPECIAL_9
+ bufferspeciesname 0, VAR_0x8009
msgbox FortreeCity_House1_Text_185737, 4
release
end
diff --git a/data/maps/FortreeCity_House2/scripts.inc b/data/maps/FortreeCity_House2/scripts.inc
index 365646d81..5535a8d49 100644
--- a/data/maps/FortreeCity_House2/scripts.inc
+++ b/data/maps/FortreeCity_House2/scripts.inc
@@ -8,19 +8,19 @@ FortreeCity_House2_EventScript_1580B4:: @ 81580B4
call_if_unset FLAG_MET_HIDDEN_POWER_GIVER, FortreeCity_House2_EventScript_15814B
msgbox FortreeCity_House2_Text_186360, 4
multichoice 21, 8, 54, 1
- switch RESULT
+ switch VAR_RESULT
case 1, FortreeCity_House2_EventScript_158161
msgbox FortreeCity_House2_Text_1863F6, 4
multichoice 21, 8, 54, 1
- switch RESULT
+ switch VAR_RESULT
case 1, FortreeCity_House2_EventScript_158161
msgbox FortreeCity_House2_Text_186455, 4
multichoice 21, 8, 54, 1
- switch RESULT
+ switch VAR_RESULT
case 0, FortreeCity_House2_EventScript_158161
msgbox FortreeCity_House2_Text_1864C6, 4
giveitem_std ITEM_TM10_HIDDEN_POWER
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FortreeCity_House2_EventScript_1A029B
setflag FLAG_RECEIVED_TM10
msgbox FortreeCity_House2_Text_18652F, 4
diff --git a/data/maps/FortreeCity_House4/scripts.inc b/data/maps/FortreeCity_House4/scripts.inc
index 77e43be34..36e339fa8 100644
--- a/data/maps/FortreeCity_House4/scripts.inc
+++ b/data/maps/FortreeCity_House4/scripts.inc
@@ -21,25 +21,25 @@ FortreeCity_House4_EventScript_158188:: @ 8158188
end
FortreeCity_House4_EventScript_1581C2:: @ 81581C2
- applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839
+ applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_1A0839
waitmovement 0
msgbox FortreeCity_House4_Text_18684E, 4
releaseall
end
FortreeCity_House4_EventScript_1581D6:: @ 81581D6
- applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839
+ applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_1A0839
waitmovement 0
msgbox FortreeCity_House4_Text_186881, 4
giveitem_std ITEM_MENTAL_HERB
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FortreeCity_House4_EventScript_1A029B
setflag FLAG_RECEIVED_MENTAL_HERB
releaseall
end
FortreeCity_House4_EventScript_158204:: @ 8158204
- applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839
+ applymovement VAR_LAST_TALKED, FortreeCity_House4_Movement_1A0839
waitmovement 0
msgbox FortreeCity_House4_Text_186924, 4
releaseall
diff --git a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
index 999541b31..53f47a324 100644
--- a/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/FortreeCity_PokemonCenter_1F/scripts.inc
@@ -7,7 +7,7 @@ FortreeCity_PokemonCenter_1F_MapScript1_158017:: @ 8158017
end
FortreeCity_PokemonCenter_1F_EventScript_15801B:: @ 815801B
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call FortreeCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/GraniteCave_StevensRoom/scripts.inc b/data/maps/GraniteCave_StevensRoom/scripts.inc
index 013703e92..46ec0f8d1 100644
--- a/data/maps/GraniteCave_StevensRoom/scripts.inc
+++ b/data/maps/GraniteCave_StevensRoom/scripts.inc
@@ -5,22 +5,22 @@ GraniteCave_StevensRoom_EventScript_15CBFA:: @ 815CBFA
lock
faceplayer
msgbox GraniteCave_StevensRoom_Text_194AE5, 4
- setvar VAR_SPECIAL_4, ITEM_LETTER
+ setvar VAR_0x8004, ITEM_LETTER
call GraniteCave_StevensRoom_EventScript_1A067F
setflag FLAG_DELIVERED_STEVEN_LETTER
msgbox GraniteCave_StevensRoom_Text_194BDD, 4
giveitem_std ITEM_TM47_STEEL_WING
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq GraniteCave_StevensRoom_EventScript_15CC83
msgbox GraniteCave_StevensRoom_Text_194C8D, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq GraniteCave_StevensRoom_EventScript_15CC78
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
playse SE_KAIDAN
removeobject 1
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 629db8bf5..59a4e79ee 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -17,9 +17,9 @@ InsideOfTruck_EventScript_15FC29:: @ 815FC29
lockall
setflag FLAG_SPECIAL_FLAG_0
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq InsideOfTruck_EventScript_15FC45
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq InsideOfTruck_EventScript_15FC68
end
diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc
index 41496fcc8..77392a4e7 100644
--- a/data/maps/IslandCave/scripts.inc
+++ b/data/maps/IslandCave/scripts.inc
@@ -9,7 +9,7 @@ IslandCave_MapScript1_15EEC6:: @ 815EEC6
end
IslandCave_EventScript_15EED0:: @ 815EED0
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
IslandCave_MapScript1_15EED4:: @ 815EED4
diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc
index 96ad4a0aa..151da14d1 100644
--- a/data/maps/JaggedPass/scripts.inc
+++ b/data/maps/JaggedPass/scripts.inc
@@ -24,8 +24,8 @@ JaggedPass_EventScript_15D285:: @ 815D285
JaggedPass_EventScript_15D29C:: @ 815D29C
trainerbattle 0, TRAINER_DIANA_1, 0, JaggedPass_Text_195E9E, JaggedPass_Text_195EDF
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq JaggedPass_EventScript_15D2C3
msgbox JaggedPass_Text_195F04, 6
end
@@ -37,8 +37,8 @@ JaggedPass_EventScript_15D2C3:: @ 815D2C3
JaggedPass_EventScript_15D2DA:: @ 815D2DA
trainerbattle 0, TRAINER_ETHAN_1, 0, JaggedPass_Text_195FF2, JaggedPass_Text_196032
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq JaggedPass_EventScript_15D301
msgbox JaggedPass_Text_196077, 6
end
diff --git a/data/maps/LavaridgeTown/scripts.inc b/data/maps/LavaridgeTown/scripts.inc
index c2bf9bb68..6c4b66e4b 100644
--- a/data/maps/LavaridgeTown/scripts.inc
+++ b/data/maps/LavaridgeTown/scripts.inc
@@ -27,7 +27,7 @@ LavaridgeTown_MapScript2_14E4E3:: @ 814E4E3
LavaridgeTown_EventScript_14E4ED:: @ 814E4ED
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
opendoor 12, 15
waitdooranim
addobject 8
@@ -43,16 +43,16 @@ LavaridgeTown_EventScript_14E4ED:: @ 814E4ED
applymovement 8, LavaridgeTown_Movement_1A0835
waitmovement 0
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LavaridgeTown_EventScript_14E56B
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LavaridgeTown_EventScript_14E570
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LavaridgeTown_EventScript_14E68F
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_EventScript_14E5AB
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LavaridgeTown_EventScript_14E5D0
end
@@ -67,16 +67,16 @@ LavaridgeTown_EventScript_14E570:: @ 814E570
LavaridgeTown_EventScript_14E575:: @ 814E575
lock
faceplayer
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LavaridgeTown_EventScript_14E56B
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LavaridgeTown_EventScript_14E570
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_EventScript_14E5AB
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LavaridgeTown_EventScript_14E5D0
end
@@ -98,22 +98,22 @@ LavaridgeTown_EventScript_14E5D0:: @ 814E5D0
LavaridgeTown_EventScript_14E5F5:: @ 814E5F5
closemessage
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LavaridgeTown_EventScript_14E646
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LavaridgeTown_EventScript_14E64E
removeobject 8
addobject 7
delay 30
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LavaridgeTown_EventScript_14E69A
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LavaridgeTown_EventScript_14E6A5
removeobject 7
setvar VAR_LAVARIDGE_RIVAL_STATE, 2
savebgm 0
fadedefaultbgm
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
goto_if_eq LavaridgeTown_EventScript_14E644
releaseall
end
@@ -127,13 +127,13 @@ LavaridgeTown_EventScript_14E646:: @ 814E646
return
LavaridgeTown_EventScript_14E64E:: @ 814E64E
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq LavaridgeTown_EventScript_14E67B
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq LavaridgeTown_EventScript_14E680
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq LavaridgeTown_EventScript_14E685
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LavaridgeTown_EventScript_14E68A
return
@@ -164,13 +164,13 @@ LavaridgeTown_EventScript_14E69A:: @ 814E69A
return
LavaridgeTown_EventScript_14E6A5:: @ 814E6A5
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq LavaridgeTown_EventScript_14E6D2
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq LavaridgeTown_EventScript_14E6D2
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq LavaridgeTown_EventScript_14E6DD
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LavaridgeTown_EventScript_14E6D2
return
@@ -235,8 +235,8 @@ LavaridgeTown_Movement_14E70E:: @ 814E70E
end_movement
LavaridgeTown_EventScript_14E710:: @ 814E710
- specialvar RESULT, GetPlayerFacingDirection
- compare RESULT, 1
+ specialvar VAR_RESULT, GetPlayerFacingDirection
+ compare VAR_RESULT, 1
goto_if_eq LavaridgeTown_EventScript_14E721
end
@@ -273,10 +273,10 @@ LavaridgeTown_EventScript_14E75A:: @ 814E75A
faceplayer
goto_if_set FLAG_RECEIVED_LAVARIDGE_EGG, LavaridgeTown_EventScript_14E79E
msgbox LavaridgeTown_Text_16C174, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LavaridgeTown_EventScript_14E7B2
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq LavaridgeTown_EventScript_14E7A8
msgbox LavaridgeTown_Text_16C2B6, 4
setflag FLAG_RECEIVED_LAVARIDGE_EGG
diff --git a/data/maps/LavaridgeTown_Gym_1F/scripts.inc b/data/maps/LavaridgeTown_Gym_1F/scripts.inc
index 3f5f9a285..16c4e2031 100644
--- a/data/maps/LavaridgeTown_Gym_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_Gym_1F/scripts.inc
@@ -75,7 +75,7 @@ LavaridgeTown_Gym_1F_EventScript_153766:: @ 8153766
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq LavaridgeTown_Gym_1F_EventScript_1A00FB
- setvar VAR_SPECIAL_8, 4
+ setvar VAR_0x8008, 4
call LavaridgeTown_Gym_1F_EventScript_1A01C0
setflag FLAG_HIDE_WALLY_WANDAS_HOUSE
setvar VAR_LAVARIDGE_RIVAL_STATE, 1
@@ -84,7 +84,7 @@ LavaridgeTown_Gym_1F_EventScript_153766:: @ 8153766
LavaridgeTown_Gym_1F_EventScript_1537A7:: @ 81537A7
giveitem_std ITEM_TM50_OVERHEAT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_Gym_1F_EventScript_1A029B
msgbox LavaridgeTown_Gym_1F_Text_176B8F, 4
setflag FLAG_RECEIVED_TM50
diff --git a/data/maps/LavaridgeTown_HerbShop/scripts.inc b/data/maps/LavaridgeTown_HerbShop/scripts.inc
index 71fc2cbfe..5da9d19ad 100644
--- a/data/maps/LavaridgeTown_HerbShop/scripts.inc
+++ b/data/maps/LavaridgeTown_HerbShop/scripts.inc
@@ -31,7 +31,7 @@ LavaridgeTown_HerbShop_EventScript_153655:: @ 8153655
goto_if_set FLAG_RECEIVED_CHARCOAL, LavaridgeTown_HerbShop_EventScript_153684
msgbox LavaridgeTown_HerbShop_Text_1761A2, 4
giveitem_std ITEM_CHARCOAL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LavaridgeTown_HerbShop_EventScript_1A029B
setflag FLAG_RECEIVED_CHARCOAL
release
diff --git a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
index 611ced28f..22382ad54 100644
--- a/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LavaridgeTown_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ LavaridgeTown_PokemonCenter_1F_MapScript1_153912:: @ 8153912
end
LavaridgeTown_PokemonCenter_1F_EventScript_15391B:: @ 815391B
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call LavaridgeTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc
index 53b05fad9..8951fe606 100644
--- a/data/maps/LilycoveCity/scripts.inc
+++ b/data/maps/LilycoveCity/scripts.inc
@@ -64,9 +64,9 @@ LilycoveCity_EventScript_14CB74:: @ 814CB74
goto_if_set FLAG_DAILY_RECEIVED_BERRY_LILYCOVE, LilycoveCity_EventScript_14CBB4
msgbox LilycoveCity_Text_1C5A7A, 4
random 10
- addvar RESULT, ITEM_CHERI_BERRY
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, ITEM_CHERI_BERRY
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_LILYCOVE
msgbox LilycoveCity_Text_1C5B1D, 4
@@ -164,8 +164,8 @@ LilycoveCity_EventScript_14CC79:: @ 814CC79
LilycoveCity_EventScript_14CC82:: @ 814CC82
lockall
- specialvar VAR_SPECIAL_4, sub_80C4D50
- switch VAR_SPECIAL_4
+ specialvar VAR_0x8004, sub_80C4D50
+ switch VAR_0x8004
case 0, LilycoveCity_EventScript_14CCA2
msgbox LilycoveCity_Text_168EA4, 4
releaseall
@@ -204,10 +204,10 @@ LilycoveCity_EventScript_14CCE5:: @ 814CCE5
lockall
goto_if_set FLAG_MET_WAILMER_TRAINER, LilycoveCity_EventScript_14CD18
msgbox LilycoveCity_Text_16864A, 4
- applymovement LAST_TALKED, LilycoveCity_Movement_1A0839
+ applymovement VAR_LAST_TALKED, LilycoveCity_Movement_1A0839
waitmovement 0
msgbox LilycoveCity_Text_168675, 4
- applymovement LAST_TALKED, LilycoveCity_Movement_1A083D
+ applymovement VAR_LAST_TALKED, LilycoveCity_Movement_1A083D
waitmovement 0
setflag FLAG_MET_WAILMER_TRAINER
releaseall
@@ -238,9 +238,9 @@ LilycoveCity_EventScript_14CD46:: @ 814CD46
lock
faceplayer
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_EventScript_14CD60
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_EventScript_14CDD3
end
@@ -248,7 +248,7 @@ LilycoveCity_EventScript_14CD60:: @ 814CD60
playbgm MUS_GIRL_SUP, TRUE
call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_14CDB0
call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_14CDB9
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_EventScript_14CDC2
msgbox LilycoveCity_Text_167B94, 4
switch VAR_STARTER_MON
@@ -277,7 +277,7 @@ LilycoveCity_EventScript_14CDD3:: @ 814CDD3
playbgm MUS_BOY_SUP, TRUE
call_if_set FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_14CE23
call_if_unset FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE, LilycoveCity_EventScript_14CE2C
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_EventScript_14CE35
msgbox LilycoveCity_Text_1680A9, 4
switch VAR_STARTER_MON
@@ -334,11 +334,11 @@ LilycoveCity_EventScript_14CE96:: @ 814CE96
LilycoveCity_EventScript_14CEA6:: @ 814CEA6
msgbox LilycoveCity_Text_167C6B, 4
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_14CEDE
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_EventScript_14CEEE
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_EventScript_14CEF7
clearflag FLAG_HIDE_MAY_UPSTAIRS
clearflag FLAG_HIDE_MAY_PICHU_DOLL
@@ -350,7 +350,7 @@ LilycoveCity_EventScript_14CEDE:: @ 814CEDE
return
LilycoveCity_EventScript_14CEE8:: @ 814CEE8
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
LilycoveCity_EventScript_14CEEE:: @ 814CEEE
@@ -368,11 +368,11 @@ LilycoveCity_EventScript_14CF09:: @ 814CF09
LilycoveCity_EventScript_14CF12:: @ 814CF12
msgbox LilycoveCity_Text_168149, 4
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_14CEDE
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_EventScript_14CF47
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_EventScript_14CF50
clearflag FLAG_HIDE_BRENDAN_UPSTAIRS
goto LilycoveCity_EventScript_14CF6B
@@ -393,13 +393,13 @@ LilycoveCity_EventScript_14CF62:: @ 814CF62
LilycoveCity_EventScript_14CF6B:: @ 814CF6B
closemessage
- applymovement LAST_TALKED, LilycoveCity_Movement_1A0845
+ applymovement VAR_LAST_TALKED, LilycoveCity_Movement_1A0845
waitmovement 0
delay 50
setfieldeffectargument 0, 1
dofieldeffect FLDEFF_NPCFLY_OUT
delay 15
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
waitfieldeffect FLDEFF_NPCFLY_OUT
savebgm 0
fadedefaultbgm
diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc
index 27c19ec39..e96a356ce 100644
--- a/data/maps/LilycoveCity_ContestLobby/scripts.inc
+++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc
@@ -30,9 +30,9 @@ LilycoveCity_ContestLobby_EventScript_158898:: @ 8158898
drawcontestwinner 0
lockall
msgbox LilycoveCity_ContestLobby_Text_1889FD, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_ContestLobby_EventScript_158918
releaseall
end
@@ -42,8 +42,8 @@ LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE
closemessage
special sub_80C4CEC
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
- specialvar RESULT, GiveMonArtistRibbon
- compare RESULT, 1
+ specialvar VAR_RESULT, GiveMonArtistRibbon
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_ContestLobby_EventScript_158948
applymovement 4, LilycoveCity_ContestLobby_Movement_158A43
waitmovement 0
@@ -55,7 +55,7 @@ LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE
LilycoveCity_ContestLobby_EventScript_158918:: @ 8158918
msgbox LilycoveCity_ContestLobby_Text_188C41, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE
msgbox LilycoveCity_ContestLobby_Text_188CBD, 4
closemessage
@@ -86,8 +86,8 @@ LilycoveCity_ContestLobby_EventScript_158948:: @ 8158948
return
LilycoveCity_ContestLobby_EventScript_158994:: @ 8158994
- specialvar VAR_SPECIAL_4, sub_80C4D50
- switch VAR_SPECIAL_4
+ specialvar VAR_0x8004, sub_80C4D50
+ switch VAR_0x8004
case 1, LilycoveCity_ContestLobby_EventScript_1589D6
case 2, LilycoveCity_ContestLobby_EventScript_1589DA
case 3, LilycoveCity_ContestLobby_EventScript_1589DE
@@ -116,7 +116,7 @@ LilycoveCity_ContestLobby_EventScript_1589E6:: @ 81589E6
return
LilycoveCity_ContestLobby_EventScript_1589EA:: @ 81589EA
- switch CONTEST_CATEGORY
+ switch VAR_CONTEST_CATEGORY
case 0, LilycoveCity_ContestLobby_EventScript_158A27
case 1, LilycoveCity_ContestLobby_EventScript_158A2B
case 2, LilycoveCity_ContestLobby_EventScript_158A2F
@@ -203,9 +203,9 @@ LilycoveCity_ContestLobby_EventScript_158A6A:: @ 8158A6A
fadescreen 1
drawcontestwinner 0
msgbox LilycoveCity_ContestLobby_Text_1889FD, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_ContestLobby_EventScript_158AE8
end
@@ -214,8 +214,8 @@ LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE
closemessage
special sub_80C4CEC
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
- specialvar RESULT, GiveMonArtistRibbon
- compare RESULT, 1
+ specialvar VAR_RESULT, GiveMonArtistRibbon
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_ContestLobby_EventScript_158B18
applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D
waitmovement 0
@@ -227,7 +227,7 @@ LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE
LilycoveCity_ContestLobby_EventScript_158AE8:: @ 8158AE8
msgbox LilycoveCity_ContestLobby_Text_188C41, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE
msgbox LilycoveCity_ContestLobby_Text_188CBD, 4
closemessage
@@ -303,7 +303,7 @@ LilycoveCity_ContestLobby_Movement_158B7C:: @ 8158B7C
LilycoveCity_ContestLobby_EventScript_158B85:: @ 8158B85
lockall
checkitem ITEM_CONTEST_PASS, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_158BBA
goto_if_set FLAG_TEMP_2, LilycoveCity_ContestLobby_EventScript_158BAE
message LilycoveCity_ContestLobby_Text_18848C
@@ -325,18 +325,18 @@ LilycoveCity_ContestLobby_EventScript_158BBA:: @ 8158BBA
LilycoveCity_ContestLobby_EventScript_158BC4:: @ 8158BC4
msgbox LilycoveCity_ContestLobby_Text_188521, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35
call S_DoSaveDialog
erasebox 0, 0, 15, 9
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35
setflag FLAG_TEMP_3
return
LilycoveCity_ContestLobby_EventScript_158BF0:: @ 8158BF0
multichoice 0, 0, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_158CEA
case 1, LilycoveCity_ContestLobby_EventScript_158C27
case 2, LilycoveCity_ContestLobby_EventScript_158C35
@@ -356,20 +356,20 @@ LilycoveCity_ContestLobby_EventScript_158C35:: @ 8158C35
LilycoveCity_ContestLobby_EventScript_158C42:: @ 8158C42
msgbox LilycoveCity_ContestLobby_Text_188703, 4
- setvar CONTEST_RANK, 0
+ setvar VAR_CONTEST_RANK, 0
choosecontestmon
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq LilycoveCity_ContestLobby_EventScript_158CEA
special ScrSpecial_CheckSelectedMonAndInitContest
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_158C96
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq LilycoveCity_ContestLobby_EventScript_158CA4
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq LilycoveCity_ContestLobby_EventScript_158CB2
end
@@ -389,11 +389,11 @@ LilycoveCity_ContestLobby_EventScript_158CB2:: @ 8158CB2
end
LilycoveCity_ContestLobby_EventScript_158CC0:: @ 8158CC0
- copyvar VAR_SPECIAL_8, VAR_SPECIAL_4
+ copyvar VAR_0x8008, VAR_0x8004
message LilycoveCity_ContestLobby_Text_1A67A3
waitmessage
yesnobox 20, 8
- switch RESULT
+ switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_158C42
case 1, LilycoveCity_ContestLobby_EventScript_158D24
end
@@ -403,29 +403,29 @@ LilycoveCity_ContestLobby_EventScript_158CEA:: @ 8158CEA
message LilycoveCity_ContestLobby_Text_1886DC
waitmessage
multichoice 0, 0, 4, 0
- switch RESULT
+ switch VAR_RESULT
case 5, LilycoveCity_ContestLobby_EventScript_158C35
case 127, LilycoveCity_ContestLobby_EventScript_158C35
- copyvar CONTEST_CATEGORY, RESULT
+ copyvar VAR_CONTEST_CATEGORY, VAR_RESULT
goto LilycoveCity_ContestLobby_EventScript_158C42
end
LilycoveCity_ContestLobby_EventScript_158D24:: @ 8158D24
message LilycoveCity_ContestLobby_Text_1887C7
waitmessage
- copyvar VAR_SPECIAL_4, RESULT
+ copyvar VAR_0x8004, VAR_RESULT
special sub_808363C
waitstate
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq LilycoveCity_ContestLobby_EventScript_158D90
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq LilycoveCity_ContestLobby_EventScript_158DA1
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq LilycoveCity_ContestLobby_EventScript_158DB2
messageautoscroll LilycoveCity_ContestLobby_Text_18872A
waitmessage
contestlinktransfer
- switch VAR_SPECIAL_4
+ switch VAR_0x8004
case 0, LilycoveCity_ContestLobby_EventScript_158DD1
case 1, LilycoveCity_ContestLobby_EventScript_158D82
case 2, LilycoveCity_ContestLobby_EventScript_158DC3
@@ -467,11 +467,11 @@ LilycoveCity_ContestLobby_EventScript_158DC3:: @ 8158DC3
LilycoveCity_ContestLobby_EventScript_158DD1:: @ 8158DD1
special ScrSpecial_GetContestPlayerMonIdx
- addvar VAR_SPECIAL_4, 1
+ addvar VAR_0x8004, 1
buffernumberstring 1, 32772
messageautoscroll LilycoveCity_ContestLobby_Text_188845
waitmessage
- addvar VAR_SPECIAL_4, -1
+ addvar VAR_0x8004, -1
goto LilycoveCity_ContestLobby_EventScript_158DEE
end
@@ -480,7 +480,7 @@ LilycoveCity_ContestLobby_EventScript_158DEE:: @ 8158DEE
setvar VAR_LINK_CONTEST_ROOM_STATE, 1
special ScrSpecial_SetLinkContestTrainerGfxIdx
setvar VAR_CONTEST_LOCATION, 5
- setvar CONTEST_RANK, 3
+ setvar VAR_CONTEST_RANK, 3
call LilycoveCity_ContestLobby_EventScript_158F08
end
@@ -564,11 +564,11 @@ LilycoveCity_ContestLobby_Movement_158EAE:: @ 8158EAE
end_movement
LilycoveCity_ContestLobby_EventScript_158EB0:: @ 8158EB0
- specialvar RESULT, sub_80C5044
- compare RESULT, 1
+ specialvar VAR_RESULT, sub_80C5044
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_ContestLobby_EventScript_158EE8
- setvar VAR_SPECIAL_B, 8
- setvar CONTEST_RANK, 3
+ setvar VAR_0x800B, 8
+ setvar VAR_CONTEST_RANK, 3
call LilycoveCity_ContestLobby_EventScript_1A4E92
call LilycoveCity_ContestLobby_EventScript_158F86
special SetContestTrainerGfxIds
@@ -582,14 +582,14 @@ LilycoveCity_ContestLobby_EventScript_158EE8:: @ 8158EE8
setflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
copyvar VAR_LILYCOVE_MUSEUM_2F_STATE, 0x1
giveitem ITEM_CONTEST_PASS, 1
- setvar VAR_SPECIAL_B, 8
- setvar CONTEST_RANK, 3
+ setvar VAR_0x800B, 8
+ setvar VAR_CONTEST_RANK, 3
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 1
setflag FLAG_SYS_RIBBON_GET
end
LilycoveCity_ContestLobby_EventScript_158F08:: @ 8158F08
- switch CONTEST_CATEGORY
+ switch VAR_CONTEST_CATEGORY
case 0, LilycoveCity_ContestLobby_EventScript_158F45
case 1, LilycoveCity_ContestLobby_EventScript_158F52
case 2, LilycoveCity_ContestLobby_EventScript_158F5F
diff --git a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
index 5bfc6a5e7..40d757c4a 100644
--- a/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
+++ b/data/maps/LilycoveCity_CoveLilyMotel_2F/scripts.inc
@@ -6,8 +6,8 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_1583A1:: @ 81583A1
faceplayer
call_if_unset FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7
call_if_set FLAG_TEMP_2, LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD
- specialvar RESULT, CompletedHoennPokedex
- compare RESULT, 1
+ specialvar VAR_RESULT, CompletedHoennPokedex
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0
release
end
diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
index f895ea99d..5a157eadd 100644
--- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
@@ -5,12 +5,12 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A39C:: @ 815A39C
lock
faceplayer
call_if_unset FLAG_TEMP_2, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF
- copyvar VAR_SPECIAL_5, VAR_DEPT_STORE_FLOOR
+ copyvar VAR_0x8005, VAR_DEPT_STORE_FLOOR
special DisplayCurrentElevatorFloor
message LilycoveCity_DepartmentStoreElevator_Text_1A0EF6
waitmessage
multichoice 0, 0, 57, 0
- switch RESULT
+ switch VAR_RESULT
case 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A402
case 1, LilycoveCity_DepartmentStoreElevator_EventScript_15A425
case 2, LilycoveCity_DepartmentStoreElevator_EventScript_15A448
@@ -71,7 +71,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1:: @ 815A4B1
LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8:: @ 815A4B8
erasebox 0, 0, 29, 19
- applymovement LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_1A0845
+ applymovement VAR_LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_1A0845
waitmovement 0
special ShakeScreenInElevator
waitstate
diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
index e2274110c..9ed0262ea 100644
--- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
@@ -4,9 +4,9 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: @ 815A13F
LilycoveCity_DepartmentStoreRooftop_MapScript1_15A145:: @ 815A145
getpricereduction 3
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A163
end
@@ -52,7 +52,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A1A0:: @ 815A1A0
lock
faceplayer
getpricereduction 3
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A1BA
msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C61F, 4
release
@@ -78,7 +78,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A1CD:: @ 815A1CD
LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE:: @ 815A1DE
multichoice 16, 0, 42, 0
- copyvar VAR_TEMP_1, RESULT
+ copyvar VAR_TEMP_1, VAR_RESULT
switch VAR_TEMP_1
case 0, LilycoveCity_DepartmentStoreRooftop_EventScript_15A21C
case 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A227
@@ -133,10 +133,10 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A244
compare VAR_TEMP_1, 2
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A37A
checkitemspace VAR_TEMP_0, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
compare VAR_TEMP_1, 0
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A252
@@ -154,10 +154,10 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
bufferstdstring 2, 14
msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4
random 64
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
checkitemspace VAR_TEMP_0, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
playse SE_JIHANKI
msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C780, 4
@@ -166,10 +166,10 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
bufferstdstring 2, 14
msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4
random 64
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
checkitemspace VAR_TEMP_0, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
playse SE_JIHANKI
msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C780, 4
diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
index f6b23bc05..ad2c6aad1 100644
--- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
@@ -13,13 +13,13 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E
goto_if_ne LilycoveCity_DepartmentStore_1F_EventScript_159EB1
goto_if_set FLAG_DAILY_PICKED_LOTTO_TICKET, LilycoveCity_DepartmentStore_1F_EventScript_159E4C
msgbox LilycoveCity_DepartmentStore_1F_Text_1C4B5E, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E56
setflag FLAG_DAILY_PICKED_LOTTO_TICKET
message LilycoveCity_DepartmentStore_1F_Text_1C4CC6
waitmessage
special RetrieveLotteryNumber
- copyvar VAR_SPECIAL_8, RESULT
+ copyvar VAR_0x8008, VAR_RESULT
special BufferLottoTicketNumber
msgbox LilycoveCity_DepartmentStore_1F_Text_1C4CF6, 4
applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_1A0843
@@ -32,24 +32,24 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E
delay 10
applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_1A0839
waitmovement 0
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E60
incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY
- compare VAR_SPECIAL_6, 0
+ compare VAR_0x8006, 0
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E3A
- compare VAR_SPECIAL_6, 1
+ compare VAR_0x8006, 1
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E43
- bufferitemname 0, VAR_SPECIAL_5
- compare VAR_SPECIAL_4, 1
+ bufferitemname 0, VAR_0x8005
+ compare VAR_0x8004, 1
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E78
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E81
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E8A
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E93
- giveitem_std VAR_SPECIAL_5
- compare RESULT, 0
+ giveitem_std VAR_0x8005
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E9C
goto LilycoveCity_DepartmentStore_1F_EventScript_159E6E
end
@@ -99,7 +99,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159E93:: @ 8159E93
return
LilycoveCity_DepartmentStore_1F_EventScript_159E9C:: @ 8159E9C
- copyvar VAR_LOTTERY_PRIZE, VAR_SPECIAL_5
+ copyvar VAR_LOTTERY_PRIZE, VAR_0x8005
goto LilycoveCity_DepartmentStore_1F_EventScript_159EA7
end
@@ -111,7 +111,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159EA7:: @ 8159EA7
LilycoveCity_DepartmentStore_1F_EventScript_159EB1:: @ 8159EB1
msgbox LilycoveCity_DepartmentStore_1F_Text_1C4FCC, 4
giveitem_std VAR_LOTTERY_PRIZE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159EA7
setvar VAR_LOTTERY_PRIZE, 0
release
diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc
index 57ad4b85b..3bb6d47c8 100644
--- a/data/maps/LilycoveCity_Harbor/scripts.inc
+++ b/data/maps/LilycoveCity_Harbor/scripts.inc
@@ -10,7 +10,7 @@ LilycoveCity_Harbor_EventScript_1598A2:: @ 81598A2
lock
faceplayer
checkitem ITEM_EON_TICKET, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_Harbor_EventScript_1599EE
goto LilycoveCity_Harbor_EventScript_1598BA
end
@@ -24,7 +24,7 @@ LilycoveCity_Harbor_EventScript_1598BA:: @ 81598BA
LilycoveCity_Harbor_EventScript_1598CD:: @ 81598CD
msgbox LilycoveCity_Harbor_Text_18B36F, 4
checkitem ITEM_SS_TICKET, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_Harbor_EventScript_159929
message LilycoveCity_Harbor_Text_18B406
waitmessage
@@ -33,7 +33,7 @@ LilycoveCity_Harbor_EventScript_1598CD:: @ 81598CD
LilycoveCity_Harbor_EventScript_1598F1:: @ 81598F1
multichoicedefault 18, 6, 56, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, LilycoveCity_Harbor_EventScript_159933
case 1, LilycoveCity_Harbor_EventScript_15995B
case 2, LilycoveCity_Harbor_EventScript_1599E4
@@ -47,7 +47,7 @@ LilycoveCity_Harbor_EventScript_159929:: @ 8159929
LilycoveCity_Harbor_EventScript_159933:: @ 8159933
msgbox LilycoveCity_Harbor_Text_18B47D, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_Harbor_EventScript_15997E
setvar VAR_PORTHOLE_STATE, 5
call LilycoveCity_Harbor_EventScript_15998A
@@ -58,7 +58,7 @@ LilycoveCity_Harbor_EventScript_159933:: @ 8159933
LilycoveCity_Harbor_EventScript_15995B:: @ 815995B
msgbox LilycoveCity_Harbor_Text_18B499, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_Harbor_EventScript_15997E
call LilycoveCity_Harbor_EventScript_15998A
warp MAP_BATTLE_TOWER_OUTSIDE, 255, 19, 23
@@ -75,17 +75,17 @@ LilycoveCity_Harbor_EventScript_15997E:: @ 815997E
LilycoveCity_Harbor_EventScript_15998A:: @ 815998A
msgbox LilycoveCity_Harbor_Text_18B4B3, 4
closemessage
- applymovement LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841
+ applymovement VAR_LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841
waitmovement 0
delay 30
- hideobjectat LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
- compare FACING, 2
+ hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
+ compare VAR_FACING, 2
call_if_eq LilycoveCity_Harbor_EventScript_1599D9
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LilycoveCity_Harbor_EventScript_1599CE
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
call LilycoveCity_Harbor_EventScript_1A040E
return
@@ -110,10 +110,10 @@ LilycoveCity_Harbor_EventScript_1599EE:: @ 81599EE
goto_if_unset FLAG_SYS_HAS_EON_TICKET, LilycoveCity_Harbor_EventScript_1598BA
msgbox LilycoveCity_Harbor_Text_1C50F2, 4
closemessage
- applymovement LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841
+ applymovement VAR_LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841
waitmovement 0
delay 30
- hideobjectat LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
+ hideobjectat VAR_LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
delay 60
addobject 4
delay 30
@@ -125,14 +125,14 @@ LilycoveCity_Harbor_EventScript_1599EE:: @ 81599EE
waitmovement 0
delay 30
removeobject 4
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq LilycoveCity_Harbor_EventScript_1599D9
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LilycoveCity_Harbor_EventScript_1599CE
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
special ScrSpecial_HealPlayerParty
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
call LilycoveCity_Harbor_EventScript_1A040E
warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22
waitstate
diff --git a/data/maps/LilycoveCity_House2/scripts.inc b/data/maps/LilycoveCity_House2/scripts.inc
index 797c8f203..123e3a79d 100644
--- a/data/maps/LilycoveCity_House2/scripts.inc
+++ b/data/maps/LilycoveCity_House2/scripts.inc
@@ -7,7 +7,7 @@ LilycoveCity_House2_EventScript_159BA3:: @ 8159BA3
goto_if_set FLAG_RECEIVED_TM44, LilycoveCity_House2_EventScript_159BDA
msgbox LilycoveCity_House2_Text_18B83C, 4
giveitem_std ITEM_TM44_REST
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_House2_EventScript_1A029B
setflag FLAG_RECEIVED_TM44
msgbox LilycoveCity_House2_Text_18B883, 4
diff --git a/data/maps/LilycoveCity_House3/scripts.inc b/data/maps/LilycoveCity_House3/scripts.inc
index 1a569bf5b..f771ab1d4 100644
--- a/data/maps/LilycoveCity_House3/scripts.inc
+++ b/data/maps/LilycoveCity_House3/scripts.inc
@@ -4,18 +4,18 @@ LilycoveCity_House3_MapScripts:: @ 8159BE4
LilycoveCity_House3_MapScript1_159BEA:: @ 8159BEA
random 4
- copyvar VAR_TEMP_1, RESULT
+ copyvar VAR_TEMP_1, VAR_RESULT
end
LilycoveCity_House3_EventScript_159BF3:: @ 8159BF3
lock
faceplayer
msgbox LilycoveCity_House3_Text_18B8CC, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_House3_EventScript_159C1D
msgbox LilycoveCity_House3_Text_18BA2B, 4
closemessage
- applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D
+ applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_1A083D
waitmovement 0
release
end
@@ -23,7 +23,7 @@ LilycoveCity_House3_EventScript_159BF3:: @ 8159BF3
LilycoveCity_House3_EventScript_159C1D:: @ 8159C1D
msgbox LilycoveCity_House3_Text_18B9DC, 4
closemessage
- applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D
+ applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_1A083D
waitmovement 0
release
end
@@ -33,7 +33,7 @@ LilycoveCity_House3_EventScript_159C32:: @ 8159C32
faceplayer
msgbox LilycoveCity_House3_Text_18BD64, 4
closemessage
- applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D
+ applymovement VAR_LAST_TALKED, LilycoveCity_House3_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
index b45261aca..0d115eff8 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
@@ -11,9 +11,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_158425:: @ 8158425
message LilycoveCity_LilycoveMuseum_1F_Text_1873B9
waitmessage
multichoice 20, 8, 16, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158458
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_15844F
end
@@ -23,9 +23,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_15844F:: @ 815844F
LilycoveCity_LilycoveMuseum_1F_EventScript_158458:: @ 8158458
msgbox LilycoveCity_LilycoveMuseum_1F_Text_187495, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158477
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158481
end
@@ -39,7 +39,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_158481:: @ 8158481
applymovement 2, LilycoveCity_LilycoveMuseum_1F_Movement_1584FC
waitmovement 0
removeobject 2
- switch FACING
+ switch VAR_FACING
case 2, LilycoveCity_LilycoveMuseum_1F_EventScript_1584BD
case 3, LilycoveCity_LilycoveMuseum_1F_EventScript_1584D2
case 4, LilycoveCity_LilycoveMuseum_1F_EventScript_1584E7
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
index 2ef07a1e9..c6090a5a9 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
@@ -92,8 +92,8 @@ LilycoveCity_LilycoveMuseum_2F_Movement_1586D5:: @ 81586D5
LilycoveCity_LilycoveMuseum_2F_EventScript_1586D8:: @ 81586D8
lockall
goto_if_set FLAG_RECEIVED_GLASS_ORNAMENT, LilycoveCity_LilycoveMuseum_2F_EventScript_158793
- specialvar VAR_SPECIAL_4, sub_80C4D50
- switch VAR_SPECIAL_4
+ specialvar VAR_0x8004, sub_80C4D50
+ switch VAR_0x8004
case 1, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C
case 2, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C
case 3, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C
@@ -119,7 +119,7 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_15875C:: @ 815875C
applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839
msgbox LilycoveCity_LilycoveMuseum_2F_Text_188120, 4
givedecoration_std DECOR_GLASS_ORNAMENT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158783
setflag FLAG_RECEIVED_GLASS_ORNAMENT
closemessage
diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
index 4e67762bb..8adf8b559 100644
--- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
+++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
@@ -6,7 +6,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_159AAE:: @ 8159AAE
applymovement 1, LilycoveCity_MoveDeletersHouse_Movement_1A0839
waitmovement 0
msgbox LilycoveCity_MoveDeletersHouse_Text_18B622, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case YES, LilycoveCity_MoveDeletersHouse_EventScript_159ADE
case NO, LilycoveCity_MoveDeletersHouse_EventScript_159B7B
releaseall
@@ -16,23 +16,23 @@ LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE
msgbox LilycoveCity_MoveDeletersHouse_Text_18B68C, 4
special SelectMonForNPCTrade
waitstate
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B7B
special IsSelectedMonEgg
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B71
special ScrSpecial_CountPokemonMoves
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B64
msgbox LilycoveCity_MoveDeletersHouse_Text_18B6B0, 4
fadescreen 1
special SelectMove
fadescreen 0
- compare VAR_SPECIAL_5, 4
+ compare VAR_0x8005, 4
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159ADE
special ScrSpecial_GetPokemonNicknameAndMoveName
msgbox LilycoveCity_MoveDeletersHouse_Text_18B6F2, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case YES, LilycoveCity_MoveDeletersHouse_EventScript_159B53
case NO, LilycoveCity_MoveDeletersHouse_EventScript_159B7B
releaseall
diff --git a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
index 508f5fab8..61c6db9aa 100644
--- a/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonCenter_1F/scripts.inc
@@ -7,7 +7,7 @@ LilycoveCity_PokemonCenter_1F_MapScript1_15932D:: @ 815932D
end
LilycoveCity_PokemonCenter_1F_EventScript_159331:: @ 8159331
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call LilycoveCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
index bab091a0e..eeb5669ae 100644
--- a/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
+++ b/data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
@@ -69,37 +69,37 @@ LilycoveCity_PokemonTrainerFanClub_MapScript1_159412:: @ 8159412
LilycoveCity_PokemonTrainerFanClub_EventScript_159429:: @ 8159429
special UpdateMovedLilycoveFanClubMembers
- setvar VAR_SPECIAL_4, 8
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 8
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5
- setvar VAR_SPECIAL_4, 9
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 9
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD
- setvar VAR_SPECIAL_4, 10
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 10
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5
- setvar VAR_SPECIAL_4, 11
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 11
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED
- setvar VAR_SPECIAL_4, 12
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 12
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5
- setvar VAR_SPECIAL_4, 13
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 13
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD
- setvar VAR_SPECIAL_4, 14
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 14
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159505
- setvar VAR_SPECIAL_4, 15
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 0
+ setvar VAR_0x8004, 15
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 0
call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15950D
end
@@ -146,23 +146,23 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159515:: @ 8159515
LilycoveCity_PokemonTrainerFanClub_EventScript_15952F:: @ 815952F
lock
faceplayer
- setvar VAR_SPECIAL_4, 13
+ setvar VAR_0x8004, 13
special BufferStreakTrainerText
compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15959C
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15956E
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159592
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A400, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_15956E:: @ 815956E
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159588
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A36A, 4
release
@@ -186,23 +186,23 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15959C:: @ 815959C
LilycoveCity_PokemonTrainerFanClub_EventScript_1595A6:: @ 81595A6
lock
faceplayer
- setvar VAR_SPECIAL_4, 8
+ setvar VAR_0x8004, 8
special BufferStreakTrainerText
compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159613
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159609
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A629, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5:: @ 81595E5
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595FF
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A584, 4
release
@@ -226,23 +226,23 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159613:: @ 8159613
LilycoveCity_PokemonTrainerFanClub_EventScript_15961D:: @ 815961D
lock
faceplayer
- setvar VAR_SPECIAL_4, 9
+ setvar VAR_0x8004, 9
special BufferStreakTrainerText
compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15968A
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15965C
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159680
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A814, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_15965C:: @ 815965C
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159676
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A71E, 4
release
@@ -266,23 +266,23 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15968A:: @ 815968A
LilycoveCity_PokemonTrainerFanClub_EventScript_159694:: @ 8159694
lock
faceplayer
- setvar VAR_SPECIAL_4, 10
+ setvar VAR_0x8004, 10
special BufferStreakTrainerText
compare VAR_LILYCOVE_FAN_CLUB_STATE, 0
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159701
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596F7
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AB0A, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3:: @ 81596D3
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596ED
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AA39, 4
release
@@ -306,21 +306,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159701:: @ 8159701
LilycoveCity_PokemonTrainerFanClub_EventScript_15970B:: @ 815970B
lock
faceplayer
- setvar VAR_SPECIAL_4, 11
+ setvar VAR_0x8004, 11
special BufferStreakTrainerText
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15973F
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159763
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18ACC7, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_15973F:: @ 815973F
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159759
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AC15, 4
release
@@ -339,21 +339,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159763:: @ 8159763
LilycoveCity_PokemonTrainerFanClub_EventScript_15976D:: @ 815976D
lock
faceplayer
- setvar VAR_SPECIAL_4, 12
+ setvar VAR_0x8004, 12
special BufferStreakTrainerText
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597C5
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AE63, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1:: @ 81597A1
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597BB
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AD6D, 4
release
@@ -372,21 +372,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1597C5:: @ 81597C5
LilycoveCity_PokemonTrainerFanClub_EventScript_1597CF:: @ 81597CF
lock
faceplayer
- setvar VAR_SPECIAL_4, 14
+ setvar VAR_0x8004, 14
special BufferStreakTrainerText
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159803
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159827
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B030, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_159803:: @ 8159803
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15981D
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AF62, 4
release
@@ -405,21 +405,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159827:: @ 8159827
LilycoveCity_PokemonTrainerFanClub_EventScript_159831:: @ 8159831
lock
faceplayer
- setvar VAR_SPECIAL_4, 15
+ setvar VAR_0x8004, 15
special BufferStreakTrainerText
- specialvar RESULT, ShouldMoveLilycoveFanClubMember
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldMoveLilycoveFanClubMember
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159865
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 7
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 7
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159889
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B1FD, 4
release
end
LilycoveCity_PokemonTrainerFanClub_EventScript_159865:: @ 8159865
- specialvar RESULT, GetNumMovedLilycoveFanClubMembers
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumMovedLilycoveFanClubMembers
+ compare VAR_RESULT, 1
goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15987F
msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B16E, 4
release
diff --git a/data/maps/LinkContestRoom1/scripts.inc b/data/maps/LinkContestRoom1/scripts.inc
index 8983389c2..b5b6a92ce 100644
--- a/data/maps/LinkContestRoom1/scripts.inc
+++ b/data/maps/LinkContestRoom1/scripts.inc
@@ -13,15 +13,15 @@ LinkContestRoom1_MapScript1_15F595:: @ 815F595
LinkContestRoom1_EventScript_15F5A5:: @ 815F5A5
special ScriptGetMultiplayerId
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LinkContestRoom1_EventScript_15F5E0
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LinkContestRoom1_EventScript_15F5E4
- compare RESULT, 2
+ compare VAR_RESULT, 2
call_if_eq LinkContestRoom1_EventScript_15F5E8
- compare RESULT, 3
+ compare VAR_RESULT, 3
call_if_eq LinkContestRoom1_EventScript_15F5EC
- compare RESULT, 4
+ compare VAR_RESULT, 4
call_if_eq LinkContestRoom1_EventScript_15F5F0
return
@@ -126,10 +126,10 @@ LinkContestRoom1_EventScript_15F6DB:: @ 815F6DB
return
LinkContestRoom1_EventScript_15F6E6:: @ 815F6E6
- setvar RESULT, 32
+ setvar VAR_RESULT, 32
special ScriptRandom
- addvar RESULT, 1
- switch RESULT
+ addvar VAR_RESULT, 1
+ switch VAR_RESULT
case 1, LinkContestRoom1_EventScript_15F859
case 2, LinkContestRoom1_EventScript_15F85F
case 3, LinkContestRoom1_EventScript_15F865
@@ -414,9 +414,9 @@ LilycoveCity_ContestLobby_EventScript_15FBDB:: @ 815FBDB
SlateportCity_ContestLobby_EventScript_15FBDB:: @ 815FBDB
VerdanturfTown_ContestLobby_EventScript_15FBDB:: @ 815FBDB
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_15FBF3
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_15FBF9
return
diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc
index e98f73393..d0b82f8ef 100644
--- a/data/maps/LittlerootTown/scripts.inc
+++ b/data/maps/LittlerootTown/scripts.inc
@@ -54,9 +54,9 @@ LittlerootTown_EventScript_14D5A6:: @ 814D5A6
clearflag FLAG_HIDE_MOM_LITTLEROOT
setobjectmovementtype 4, 8
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D5C5
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D5CD
return
@@ -76,8 +76,8 @@ LittlerootTown_MapScript2_14D5D5:: @ 814D5D5
LittlerootTown_EventScript_14D5EF:: @ 814D5EF
lockall
- setvar VAR_SPECIAL_4, 5
- setvar VAR_SPECIAL_5, 8
+ setvar VAR_0x8004, 5
+ setvar VAR_0x8005, 8
call LittlerootTown_EventScript_14D62B
setflag FLAG_HIDE_MOVING_TRUCK_BRENDAN
warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 255, 8, 8
@@ -87,8 +87,8 @@ LittlerootTown_EventScript_14D5EF:: @ 814D5EF
LittlerootTown_EventScript_14D60D:: @ 814D60D
lockall
- setvar VAR_SPECIAL_4, 14
- setvar VAR_SPECIAL_5, 8
+ setvar VAR_0x8004, 14
+ setvar VAR_0x8005, 8
call LittlerootTown_EventScript_14D62B
setflag FLAG_HIDE_MOVING_TRUCK_MAY
warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 255, 2, 8
@@ -101,12 +101,12 @@ LittlerootTown_EventScript_14D62B:: @ 814D62B
playse SE_DANSA
applymovement 255, LittlerootTown_Movement_14D6C0
waitmovement 0
- opendoor VAR_SPECIAL_4, VAR_SPECIAL_5
+ opendoor VAR_0x8004, VAR_0x8005
waitdooranim
addobject 4
applymovement 4, LittlerootTown_Movement_14D6AC
waitmovement 0
- closedoor VAR_SPECIAL_4, VAR_SPECIAL_5
+ closedoor VAR_0x8004, VAR_0x8005
waitdooranim
delay 10
applymovement 4, LittlerootTown_Movement_14D6AE
@@ -116,7 +116,7 @@ LittlerootTown_EventScript_14D62B:: @ 814D62B
applymovement 4, LittlerootTown_Movement_14D6B1
applymovement 255, LittlerootTown_Movement_14D6B8
waitmovement 0
- opendoor VAR_SPECIAL_4, VAR_SPECIAL_5
+ opendoor VAR_0x8004, VAR_0x8005
waitdooranim
applymovement 4, LittlerootTown_Movement_14D6B5
applymovement 255, LittlerootTown_Movement_14D6BD
@@ -124,7 +124,7 @@ LittlerootTown_EventScript_14D62B:: @ 814D62B
setflag FLAG_HIDE_MOM_LITTLEROOT
setvar VAR_LITTLEROOT_INTRO_STATE, 3
hideobjectat 255, MAP_PETALBURG_CITY
- closedoor VAR_SPECIAL_4, VAR_SPECIAL_5
+ closedoor VAR_0x8004, VAR_0x8005
waitdooranim
clearflag FLAG_HIDE_FAT_MAN_LITTLEROOT
clearflag FLAG_SPECIAL_FLAG_0
@@ -331,9 +331,9 @@ LittlerootTown_EventScript_14D7FF:: @ 814D7FF
LittlerootTown_EventScript_14D808:: @ 814D808
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D822
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D82B
releaseall
end
@@ -349,9 +349,9 @@ LittlerootTown_EventScript_14D82B:: @ 814D82B
LittlerootTown_EventScript_14D834:: @ 814D834
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D84E
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D857
releaseall
end
@@ -366,77 +366,77 @@ LittlerootTown_EventScript_14D857:: @ 814D857
LittlerootTown_EventScript_14D860:: @ 814D860
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
setobjectxy 4, 10, 9
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D873:: @ 814D873
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
setobjectxy 4, 11, 9
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D886:: @ 814D886
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D892:: @ 814D892
lockall
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D89E:: @ 814D89E
lockall
- setvar VAR_SPECIAL_8, 4
+ setvar VAR_0x8008, 4
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D8AA:: @ 814D8AA
lockall
- setvar VAR_SPECIAL_8, 5
+ setvar VAR_0x8008, 5
goto LittlerootTown_EventScript_14D8B6
end
LittlerootTown_EventScript_14D8B6:: @ 814D8B6
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D93C
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D947
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D926
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D931
msgbox LittlerootTown_Text_16A8EE, 4
closemessage
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D952
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D995
call LittlerootTown_EventScript_14DD38
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14DAAA
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14DAED
goto LittlerootTown_EventScript_14DD2B
end
LittlerootTown_EventScript_14D926:: @ 814D926
- setvar VAR_SPECIAL_9, 5
- setvar VAR_SPECIAL_A, 8
+ setvar VAR_0x8009, 5
+ setvar VAR_0x800A, 8
return
LittlerootTown_EventScript_14D931:: @ 814D931
- setvar VAR_SPECIAL_9, 14
- setvar VAR_SPECIAL_A, 8
+ setvar VAR_0x8009, 14
+ setvar VAR_0x800A, 8
return
LittlerootTown_EventScript_14D93C:: @ 814D93C
@@ -450,32 +450,32 @@ LittlerootTown_EventScript_14D947:: @ 814D947
return
LittlerootTown_EventScript_14D952:: @ 814D952
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_EventScript_14D9D8
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_EventScript_14D9ED
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq LittlerootTown_EventScript_14DA02
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq LittlerootTown_EventScript_14DA17
- compare VAR_SPECIAL_8, 4
+ compare VAR_0x8008, 4
call_if_eq LittlerootTown_EventScript_14DA2C
- compare VAR_SPECIAL_8, 5
+ compare VAR_0x8008, 5
call_if_eq LittlerootTown_EventScript_14DA41
return
LittlerootTown_EventScript_14D995:: @ 814D995
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_EventScript_14D9D8
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_EventScript_14D9ED
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq LittlerootTown_EventScript_14DA56
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq LittlerootTown_EventScript_14DA6B
- compare VAR_SPECIAL_8, 4
+ compare VAR_0x8008, 4
call_if_eq LittlerootTown_EventScript_14DA80
- compare VAR_SPECIAL_8, 5
+ compare VAR_0x8008, 5
call_if_eq LittlerootTown_EventScript_14DA95
return
@@ -550,32 +550,32 @@ LittlerootTown_EventScript_14DA95:: @ 814DA95
return
LittlerootTown_EventScript_14DAAA:: @ 814DAAA
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_EventScript_14DB30
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_EventScript_14DB3B
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq LittlerootTown_EventScript_14DB46
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq LittlerootTown_EventScript_14DB6C
- compare VAR_SPECIAL_8, 4
+ compare VAR_0x8008, 4
call_if_eq LittlerootTown_EventScript_14DB92
- compare VAR_SPECIAL_8, 5
+ compare VAR_0x8008, 5
call_if_eq LittlerootTown_EventScript_14DBB8
return
LittlerootTown_EventScript_14DAED:: @ 814DAED
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_EventScript_14DB30
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_EventScript_14DB3B
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq LittlerootTown_EventScript_14DBDE
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq LittlerootTown_EventScript_14DC04
- compare VAR_SPECIAL_8, 4
+ compare VAR_0x8008, 4
call_if_eq LittlerootTown_EventScript_14DC2A
- compare VAR_SPECIAL_8, 5
+ compare VAR_0x8008, 5
call_if_eq LittlerootTown_EventScript_14DC50
return
@@ -592,96 +592,96 @@ LittlerootTown_EventScript_14DB3B:: @ 814DB3B
LittlerootTown_EventScript_14DB46:: @ 814DB46
applymovement 4, LittlerootTown_Movement_14DCB4
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DB6C:: @ 814DB6C
applymovement 4, LittlerootTown_Movement_14DCBA
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DB92:: @ 814DB92
applymovement 4, LittlerootTown_Movement_14DCC1
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DBB8:: @ 814DBB8
applymovement 4, LittlerootTown_Movement_14DCC5
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DBDE:: @ 814DBDE
applymovement 4, LittlerootTown_Movement_14DCCA
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DC04:: @ 814DC04
applymovement 4, LittlerootTown_Movement_14DCCF
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DC2A:: @ 814DC2A
applymovement 4, LittlerootTown_Movement_14DCD3
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
LittlerootTown_EventScript_14DC50:: @ 814DC50
applymovement 4, LittlerootTown_Movement_14DCDA
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
return
@@ -839,19 +839,19 @@ LittlerootTown_EventScript_14DCE2:: @ 814DCE2
lock
faceplayer
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_EventScript_14D926
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_EventScript_14D931
call LittlerootTown_EventScript_14DD38
applymovement 4, LittlerootTown_Movement_1A0841
waitmovement 0
- opendoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ opendoor VAR_0x8009, VAR_0x800A
waitdooranim
applymovement 4, LittlerootTown_Movement_14DCE0
waitmovement 0
hideobjectat 4, MAP_LITTLEROOT_TOWN
- closedoor VAR_SPECIAL_9, VAR_SPECIAL_A
+ closedoor VAR_0x8009, VAR_0x800A
waitdooranim
goto LittlerootTown_EventScript_14DD2B
end
diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
index deaeb6f59..b712826f3 100644
--- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
@@ -17,7 +17,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_152660:: @ 8152660
LittlerootTown_BrendansHouse_1F_EventScript_152673:: @ 8152673
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152680
return
@@ -75,15 +75,15 @@ LittlerootTown_BrendansHouse_1F_Movement_152720:: @ 8152720
LittlerootTown_BrendansHouse_1F_EventScript_152722:: @ 8152722
lockall
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 0
goto LittlerootTown_BrendansHouse_1F_EventScript_1B6956
end
LittlerootTown_BrendansHouse_1F_EventScript_152733:: @ 8152733
lockall
- setvar VAR_SPECIAL_4, 0
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 0
+ setvar VAR_0x8005, 1
goto LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF
end
@@ -115,9 +115,9 @@ LittlerootTown_BrendansHouse_1F_Movement_152782:: @ 8152782
LittlerootTown_BrendansHouse_1F_EventScript_152789:: @ 8152789
lockall
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 0
- applymovement VAR_SPECIAL_4, LittlerootTown_BrendansHouse_1F_Movement_1A083F
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 0
+ applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A083F
waitmovement 0
goto LittlerootTown_BrendansHouse_1F_EventScript_1B69B7
end
diff --git a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
index ed6818fa0..932334f02 100644
--- a/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_2F/scripts.inc
@@ -22,16 +22,16 @@ LittlerootTown_BrendansHouse_2F_MapScript2_1527DA:: @ 81527DA
LittlerootTown_BrendansHouse_2F_EventScript_1527E4:: @ 81527E4
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1A2F68
end
@ 81527F1
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_15280A
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152814
end
@@ -50,14 +50,14 @@ gUnknown_0815281E:: @ 815281E
LittlerootTown_BrendansHouse_2F_EventScript_15281E:: @ 815281E
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152837
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_15285D
end
LittlerootTown_BrendansHouse_2F_EventScript_152837:: @ 8152837
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox LittlerootTown_BrendansHouse_2F_Text_1A10D6, 4
@@ -67,7 +67,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_152837:: @ 8152837
end
gBrendanHouse_TurnPCOff:: @ 8152850
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
playse SE_PC_OFF
special DoPCTurnOffEffect
releaseall
diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
index fa018ca54..587695bcc 100644
--- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
@@ -17,7 +17,7 @@ LittlerootTown_MaysHouse_1F_EventScript_15289E:: @ 815289E
LittlerootTown_MaysHouse_1F_EventScript_1528B1:: @ 81528B1
checkplayergender
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_1528BE
return
@@ -75,15 +75,15 @@ LittlerootTown_MaysHouse_1F_Movement_15295E:: @ 815295E
LittlerootTown_MaysHouse_1F_EventScript_152960:: @ 8152960
lockall
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
goto LittlerootTown_MaysHouse_1F_EventScript_1B6956
end
LittlerootTown_MaysHouse_1F_EventScript_152971:: @ 8152971
lockall
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
goto LittlerootTown_MaysHouse_1F_EventScript_1B6B2E
end
@@ -116,9 +116,9 @@ LittlerootTown_MaysHouse_1F_Movement_1529C0:: @ 81529C0
@ 81529C7
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1529E1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1529E2
releaseall
end
@@ -160,9 +160,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_152A2B:: @ 8152A2B
LittlerootTown_MaysHouse_1F_EventScript_152A35:: @ 8152A35
lockall
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
- applymovement VAR_SPECIAL_4, LittlerootTown_MaysHouse_1F_Movement_1A0843
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
+ applymovement VAR_0x8004, LittlerootTown_MaysHouse_1F_Movement_1A0843
waitmovement 0
goto LittlerootTown_MaysHouse_1F_EventScript_1B69B7
end
diff --git a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
index bcc4ba46b..628f3b18e 100644
--- a/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_2F/scripts.inc
@@ -22,7 +22,7 @@ LittlerootTown_MaysHouse_2F_MapScript2_152A86:: @ 8152A86
LittlerootTown_MaysHouse_2F_EventScript_152A90:: @ 8152A90
checkplayergender
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1A2F68
end
@@ -31,12 +31,12 @@ LittlerootTown_MaysHouse_2F_EventScript_152A9D:: @ 8152A9D
lockall
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_152BB5
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152AD4
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B4A
playse SE_KAIDAN
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
setvar VAR_LITTLEROOT_STATE, 1
savebgm 0
@@ -47,73 +47,73 @@ LittlerootTown_MaysHouse_2F_EventScript_152A9D:: @ 8152A9D
LittlerootTown_BrendansHouse_2F_EventScript_152AD4:: @ 8152AD4
msgbox LittlerootTown_BrendansHouse_2F_Text_17337E, 4
playbgm MUS_GIRL_SUP, TRUE
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
waitmovement 0
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833
waitmovement 0
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1733AF, 4
closemessage
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B29
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B34
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B3F
return
LittlerootTown_BrendansHouse_2F_EventScript_152B29:: @ 8152B29
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C11
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C11
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_152B34:: @ 8152B34
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_152B3F:: @ 8152B3F
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_152B4A:: @ 8152B4A
msgbox LittlerootTown_BrendansHouse_2F_Text_1735C9, 4
playbgm MUS_BOY_SUP, TRUE
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
waitmovement 0
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833
waitmovement 0
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_1735FC, 4
closemessage
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B9F
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B9F
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BAA
return
LittlerootTown_BrendansHouse_2F_EventScript_152B9F:: @ 8152B9F
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C30
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C30
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_152BAA:: @ 8152BAA
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C25
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C25
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_152BB5:: @ 8152BB5
- applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
+ applymovement VAR_LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839
waitmovement 0
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BDB
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BED
setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
releaseall
@@ -190,9 +190,9 @@ gUnknown_08152C39:: @ 8152C39
LittlerootTown_MaysHouse_2F_EventScript_152C39:: @ 8152C39
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_152C52
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_152C5C
end
@@ -202,7 +202,7 @@ LittlerootTown_MaysHouse_2F_EventScript_152C52:: @ 8152C52
end
LittlerootTown_MaysHouse_2F_EventScript_152C5C:: @ 8152C5C
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
special DoPCTurnOnEffect
playse SE_PC_ON
msgbox LittlerootTown_MaysHouse_2F_Text_1A10D6, 4
@@ -212,7 +212,7 @@ LittlerootTown_MaysHouse_2F_EventScript_152C5C:: @ 8152C5C
end
gMayHouse_TurnPCOff:: @ 8152C75
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
playse SE_PC_OFF
special DoPCTurnOffEffect
releaseall
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index 74d5f9193..620cddd0b 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -30,23 +30,23 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152CBE:: @ 8152CBE
playfanfare MUS_FANFA4
waitfanfare
msgbox LittlerootTown_ProfessorBirchsLab_Text_173EF8, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152CEA
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152CFA
end
LittlerootTown_ProfessorBirchsLab_EventScript_152CEA:: @ 8152CEA
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call LittlerootTown_ProfessorBirchsLab_EventScript_1A0678
goto LittlerootTown_ProfessorBirchsLab_EventScript_152CFA
end
LittlerootTown_ProfessorBirchsLab_EventScript_152CFA:: @ 8152CFA
msgbox LittlerootTown_ProfessorBirchsLab_Text_173F3D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D19
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B
end
@@ -59,9 +59,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D19:: @ 8152D19
LittlerootTown_ProfessorBirchsLab_EventScript_152D2B:: @ 8152D2B
msgbox LittlerootTown_ProfessorBirchsLab_Text_174075, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D19
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B
end
@@ -122,9 +122,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152DBA:: @ 8152DBA
applymovement 255, LittlerootTown_ProfessorBirchsLab_Movement_1A0843
waitmovement 0
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E13
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E40
setvar VAR_BIRCH_LAB_STATE, 5
setflag FLAG_ADVENTURE_STARTED
@@ -137,19 +137,19 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152DBA:: @ 8152DBA
LittlerootTown_ProfessorBirchsLab_EventScript_152E13:: @ 8152E13
msgbox LittlerootTown_ProfessorBirchsLab_Text_1743D4, 4
giveitem_std ITEM_POKE_BALL, 5
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E85
msgbox LittlerootTown_ProfessorBirchsLab_Text_17443D, 4
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
LittlerootTown_ProfessorBirchsLab_EventScript_152E40:: @ 8152E40
msgbox LittlerootTown_ProfessorBirchsLab_Text_17453C, 4
giveitem_std ITEM_POKE_BALL, 5
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E8E
msgbox LittlerootTown_ProfessorBirchsLab_Text_17458C, 4
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
LittlerootTown_ProfessorBirchsLab_EventScript_152E6D:: @ 8152E6D
@@ -186,9 +186,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152EA3:: @ 8152EA3
lock
faceplayer
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152EBE
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152EC7
release
end
diff --git a/data/maps/MagmaHideout_B1F/scripts.inc b/data/maps/MagmaHideout_B1F/scripts.inc
index a55d260ab..89eb5ab98 100644
--- a/data/maps/MagmaHideout_B1F/scripts.inc
+++ b/data/maps/MagmaHideout_B1F/scripts.inc
@@ -7,5 +7,5 @@ MagmaHideout_B1F_MapScript1_15F2AE:: @ 815F2AE
end
MagmaHideout_B1F_EventScript_15F2B8:: @ 815F2B8
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
diff --git a/data/maps/MauvilleCity/scripts.inc b/data/maps/MauvilleCity/scripts.inc
index f5eb064e5..c3c6834e4 100644
--- a/data/maps/MauvilleCity/scripts.inc
+++ b/data/maps/MauvilleCity/scripts.inc
@@ -101,12 +101,12 @@ MauvilleCity_EventScript_14C0F9:: @ 814C0F9
end
MauvilleCity_EventScript_14C154:: @ 814C154
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq MauvilleCity_EventScript_14C23C
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_EventScript_14C285
closemessage
- switch FACING
+ switch VAR_FACING
case 2, MauvilleCity_EventScript_14C187
case 4, MauvilleCity_EventScript_14C1D9
end
@@ -299,7 +299,7 @@ MauvilleCity_EventScript_14C332:: @ 814C332
MauvilleCity_EventScript_14C33C:: @ 814C33C
msgbox MauvilleCity_Text_1663EB, 4
giveitem_std ITEM_TM24_THUNDERBOLT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_EventScript_1A029B
setflag FLAG_RECEIVED_TM24
msgbox MauvilleCity_Text_166488, 4
diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc
index 08f11d641..c0dd433a3 100644
--- a/data/maps/MauvilleCity_BikeShop/scripts.inc
+++ b/data/maps/MauvilleCity_BikeShop/scripts.inc
@@ -8,17 +8,17 @@ MauvilleCity_BikeShop_EventScript_156796:: @ 8156796
goto_if_set FLAG_DECLINED_BIKE, MauvilleCity_BikeShop_EventScript_1567D1
msgbox MauvilleCity_BikeShop_Text_180F9F, 4
msgbox MauvilleCity_BikeShop_Text_181016, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MauvilleCity_BikeShop_EventScript_156824
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_BikeShop_EventScript_156817
end
MauvilleCity_BikeShop_EventScript_1567D1:: @ 81567D1
msgbox MauvilleCity_BikeShop_Text_181016, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MauvilleCity_BikeShop_EventScript_156824
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_BikeShop_EventScript_156817
end
@@ -26,7 +26,7 @@ MauvilleCity_BikeShop_EventScript_1567F0:: @ 81567F0
message MauvilleCity_BikeShop_Text_1810B1
waitmessage
multichoice 21, 8, 12, 1
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_15682D
case 1, MauvilleCity_BikeShop_EventScript_156847
end
@@ -62,19 +62,19 @@ MauvilleCity_BikeShop_EventScript_156861:: @ 8156861
MauvilleCity_BikeShop_EventScript_15686E:: @ 815686E
msgbox MauvilleCity_BikeShop_Text_1813A0, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MauvilleCity_BikeShop_EventScript_15688D
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_BikeShop_EventScript_1568BF
end
MauvilleCity_BikeShop_EventScript_15688D:: @ 815688D
msgbox MauvilleCity_BikeShop_Text_1813D4, 4
checkitem ITEM_ACRO_BIKE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_BikeShop_EventScript_1568C9
checkitem ITEM_MACH_BIKE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_BikeShop_EventScript_1568EA
msgbox MauvilleCity_BikeShop_Text_181498, 4
release
@@ -113,7 +113,7 @@ MauvilleCity_BikeShop_EventScript_156914:: @ 8156914
MauvilleCity_BikeShop_EventScript_156920:: @ 8156920
multichoice 0, 0, 43, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_156962
case 1, MauvilleCity_BikeShop_EventScript_15696E
case 2, MauvilleCity_BikeShop_EventScript_15697A
@@ -151,7 +151,7 @@ MauvilleCity_BikeShop_EventScript_156988:: @ 8156988
MauvilleCity_BikeShop_EventScript_156994:: @ 8156994
multichoice 0, 0, 44, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_BikeShop_EventScript_1569D6
case 1, MauvilleCity_BikeShop_EventScript_1569E2
case 2, MauvilleCity_BikeShop_EventScript_1569EE
diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc
index b9f8e5ad1..8026e3b08 100644
--- a/data/maps/MauvilleCity_GameCorner/scripts.inc
+++ b/data/maps/MauvilleCity_GameCorner/scripts.inc
@@ -6,7 +6,7 @@ MauvilleCity_GameCorner_EventScript_156A34:: @ 8156A34
faceplayer
msgbox MauvilleCity_GameCorner_Text_181C35, 4
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156B32
message MauvilleCity_GameCorner_Text_181CB4
waitmessage
@@ -17,7 +17,7 @@ MauvilleCity_GameCorner_EventScript_156A34:: @ 8156A34
MauvilleCity_GameCorner_EventScript_156A60:: @ 8156A60
multichoicedefault 15, 0, 49, 0, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_156AAE
case 1, MauvilleCity_GameCorner_EventScript_156AF0
goto MauvilleCity_GameCorner_EventScript_156B4C
@@ -25,7 +25,7 @@ MauvilleCity_GameCorner_EventScript_156A60:: @ 8156A60
@ 8156A87
multichoicedefault 15, 0, 49, 1, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_156AAE
case 1, MauvilleCity_GameCorner_EventScript_156AF0
goto MauvilleCity_GameCorner_EventScript_156B4C
@@ -36,7 +36,7 @@ MauvilleCity_GameCorner_EventScript_156AAE:: @ 8156AAE
compare VAR_TEMP_1, 9950
goto_if_ge MauvilleCity_GameCorner_EventScript_156B5C
checkmoney 0x3e8, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C
givecoins 50
takemoney 0x3e8, 0
@@ -55,7 +55,7 @@ MauvilleCity_GameCorner_EventScript_156AF0:: @ 8156AF0
compare VAR_TEMP_1, 9500
goto_if_ge MauvilleCity_GameCorner_EventScript_156B5C
checkmoney 0x2710, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C
givecoins 500
takemoney 0x2710, 0
@@ -100,7 +100,7 @@ MauvilleCity_GameCorner_EventScript_156B6C:: @ 8156B6C
faceplayer
msgbox MauvilleCity_GameCorner_Text_181DE1, 4
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_GameCorner_EventScript_156B88
release
end
@@ -119,7 +119,7 @@ MauvilleCity_GameCorner_EventScript_156B9B:: @ 8156B9B
MauvilleCity_GameCorner_EventScript_156BA6:: @ 8156BA6
multichoice 12, 0, 48, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_156BE2
case 1, MauvilleCity_GameCorner_EventScript_156BF0
case 2, MauvilleCity_GameCorner_EventScript_156BFE
@@ -144,7 +144,7 @@ MauvilleCity_GameCorner_EventScript_156BFE:: @ 8156BFE
MauvilleCity_GameCorner_EventScript_156C0C:: @ 8156C0C
msgbox MauvilleCity_GameCorner_Text_181E33, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_GameCorner_EventScript_156D0D
switch VAR_TEMP_1
case 1, MauvilleCity_GameCorner_EventScript_156C46
@@ -158,7 +158,7 @@ MauvilleCity_GameCorner_EventScript_156C46:: @ 8156C46
goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_TREECKO_DOLL
checkdecorspace DECOR_TREECKO_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156D02
takecoins 1000
givedecoration DECOR_TREECKO_DOLL
@@ -174,7 +174,7 @@ MauvilleCity_GameCorner_EventScript_156C80:: @ 8156C80
goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_TORCHIC_DOLL
checkdecorspace DECOR_TORCHIC_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156D02
takecoins 1000
givedecoration DECOR_TORCHIC_DOLL
@@ -190,7 +190,7 @@ MauvilleCity_GameCorner_EventScript_156CBA:: @ 8156CBA
goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_MUDKIP_DOLL
checkdecorspace DECOR_MUDKIP_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156D02
takecoins 1000
givedecoration DECOR_MUDKIP_DOLL
@@ -221,7 +221,7 @@ MauvilleCity_GameCorner_EventScript_156D1A:: @ 8156D1A
faceplayer
msgbox MauvilleCity_GameCorner_Text_181DE1, 4
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_GameCorner_EventScript_156D36
release
end
@@ -240,7 +240,7 @@ MauvilleCity_GameCorner_EventScript_156D49:: @ 8156D49
MauvilleCity_GameCorner_EventScript_156D54:: @ 8156D54
multichoice 12, 0, 55, 0
- switch RESULT
+ switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_156DA6
case 1, MauvilleCity_GameCorner_EventScript_156DB4
case 2, MauvilleCity_GameCorner_EventScript_156DC2
@@ -277,7 +277,7 @@ MauvilleCity_GameCorner_EventScript_156DDE:: @ 8156DDE
MauvilleCity_GameCorner_EventScript_156DEC:: @ 8156DEC
msgbox MauvilleCity_GameCorner_Text_181E33, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_GameCorner_EventScript_156F77
switch VAR_TEMP_1
case 1, MauvilleCity_GameCorner_EventScript_156E3C
@@ -292,7 +292,7 @@ MauvilleCity_GameCorner_EventScript_156E3C:: @ 8156E3C
compare VAR_TEMP_2, 1500
goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM32_DOUBLE_TEAM, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
takecoins 1500
giveitem ITEM_TM32_DOUBLE_TEAM, 1
@@ -307,7 +307,7 @@ MauvilleCity_GameCorner_EventScript_156E76:: @ 8156E76
compare VAR_TEMP_2, 3500
goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM29_PSYCHIC, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
takecoins 3500
giveitem ITEM_TM29_PSYCHIC, 1
@@ -322,7 +322,7 @@ MauvilleCity_GameCorner_EventScript_156EB0:: @ 8156EB0
compare VAR_TEMP_2, 4000
goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM35_FLAMETHROWER, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
takecoins 4000
giveitem ITEM_TM35_FLAMETHROWER, 1
@@ -337,7 +337,7 @@ MauvilleCity_GameCorner_EventScript_156EEA:: @ 8156EEA
compare VAR_TEMP_2, 4000
goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM24_THUNDERBOLT, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
takecoins 4000
giveitem ITEM_TM24_THUNDERBOLT, 1
@@ -352,7 +352,7 @@ MauvilleCity_GameCorner_EventScript_156F24:: @ 8156F24
compare VAR_TEMP_2, 4000
goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM13_ICE_BEAM, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
takecoins 4000
giveitem ITEM_TM13_ICE_BEAM, 1
@@ -391,7 +391,7 @@ MauvilleCity_GameCorner_EventScript_156F96:: @ 8156F96
faceplayer
goto_if_set FLAG_RECEIVED_STARTER_DOLL, MauvilleCity_GameCorner_EventScript_157072
msgbox MauvilleCity_GameCorner_Text_181F3D, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_GameCorner_EventScript_157068
switch VAR_STARTER_MON
case 0, MauvilleCity_GameCorner_EventScript_156FDB
@@ -402,7 +402,7 @@ MauvilleCity_GameCorner_EventScript_156F96:: @ 8156F96
MauvilleCity_GameCorner_EventScript_156FDB:: @ 8156FDB
bufferdecorationname 1, DECOR_TREECKO_DOLL
checkdecorspace DECOR_TREECKO_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_157059
msgbox MauvilleCity_GameCorner_Text_181F89, 4
givedecoration_std DECOR_TREECKO_DOLL
@@ -413,7 +413,7 @@ MauvilleCity_GameCorner_EventScript_156FDB:: @ 8156FDB
MauvilleCity_GameCorner_EventScript_157005:: @ 8157005
bufferdecorationname 1, DECOR_TORCHIC_DOLL
checkdecorspace DECOR_TORCHIC_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_157059
msgbox MauvilleCity_GameCorner_Text_181F89, 4
givedecoration_std DECOR_TORCHIC_DOLL
@@ -424,7 +424,7 @@ MauvilleCity_GameCorner_EventScript_157005:: @ 8157005
MauvilleCity_GameCorner_EventScript_15702F:: @ 815702F
bufferdecorationname 1, DECOR_MUDKIP_DOLL
checkdecorspace DECOR_MUDKIP_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_157059
msgbox MauvilleCity_GameCorner_Text_181F89, 4
givedecoration_std DECOR_MUDKIP_DOLL
@@ -452,7 +452,7 @@ MauvilleCity_GameCorner_EventScript_15707C:: @ 815707C
lock
faceplayer
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_GameCorner_EventScript_15709C
msgbox MauvilleCity_GameCorner_Text_18201E, 4
goto MauvilleCity_GameCorner_EventScript_157108
@@ -498,7 +498,7 @@ MauvilleCity_GameCorner_EventScript_1570F8:: @ 81570F8
MauvilleCity_GameCorner_EventScript_157108:: @ 8157108
closemessage
- applymovement LAST_TALKED, MauvilleCity_GameCorner_Movement_1A083D
+ applymovement VAR_LAST_TALKED, MauvilleCity_GameCorner_Movement_1A083D
waitmovement 0
release
end
@@ -520,132 +520,132 @@ MauvilleCity_GameCorner_EventScript_157125:: @ 8157125
MauvilleCity_GameCorner_EventScript_157135:: @ 8157135
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 0
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 0
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157155:: @ 8157155
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 1
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 1
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157175:: @ 8157175
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 2
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 2
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157195:: @ 8157195
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 3
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 3
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_1571B5:: @ 81571B5
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 4
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 4
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_1571D5:: @ 81571D5
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 5
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 5
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_1571F5:: @ 81571F5
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 6
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 6
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157215:: @ 8157215
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 7
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 7
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157235:: @ 8157235
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 8
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 8
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157255:: @ 8157255
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 9
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 9
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157275:: @ 8157275
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 10
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 10
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_157295:: @ 8157295
lockall
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5
- setvar VAR_SPECIAL_4, 11
- specialvar RESULT, GetSlotMachineId
- playslotmachine RESULT
+ setvar VAR_0x8004, 11
+ specialvar VAR_RESULT, GetSlotMachineId
+ playslotmachine VAR_RESULT
releaseall
end
diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc
index 9fb3042f7..62f5303ec 100644
--- a/data/maps/MauvilleCity_Gym/scripts.inc
+++ b/data/maps/MauvilleCity_Gym/scripts.inc
@@ -44,19 +44,19 @@ MauvilleCity_Gym_EventScript_15649B:: @ 815649B
end
MauvilleCity_Gym_EventScript_15657D:: @ 815657D
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special MauvilleGymSpecial1
goto MauvilleCity_Gym_EventScript_156491
end
MauvilleCity_Gym_EventScript_15658B:: @ 815658B
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
special MauvilleGymSpecial1
goto MauvilleCity_Gym_EventScript_156491
end
MauvilleCity_Gym_EventScript_156599:: @ 8156599
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
special MauvilleGymSpecial1
goto MauvilleCity_Gym_EventScript_156491
end
@@ -84,7 +84,7 @@ MauvilleCity_Gym_EventScript_1565DB:: @ 81565DB
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq MauvilleCity_Gym_EventScript_1A00FB
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
call MauvilleCity_Gym_EventScript_1A01C0
special MauvilleGymSpecial3
special DrawWholeMapView
@@ -94,7 +94,7 @@ MauvilleCity_Gym_EventScript_1565DB:: @ 81565DB
MauvilleCity_Gym_EventScript_15661D:: @ 815661D
giveitem_std ITEM_TM34_SHOCK_WAVE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MauvilleCity_Gym_EventScript_1A029B
msgbox MauvilleCity_Gym_Text_180E76, 4
setflag FLAG_RECEIVED_TM34
@@ -112,7 +112,7 @@ MauvilleCity_Gym_EventScript_15664B:: @ 815664B
compare VAR_MAUVILLE_GYM_STATE, 1
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 1
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto MauvilleCity_Gym_EventScript_1566BA
end
@@ -122,7 +122,7 @@ MauvilleCity_Gym_EventScript_156670:: @ 8156670
compare VAR_MAUVILLE_GYM_STATE, 2
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 2
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto MauvilleCity_Gym_EventScript_1566BA
end
@@ -132,7 +132,7 @@ MauvilleCity_Gym_EventScript_156695:: @ 8156695
compare VAR_MAUVILLE_GYM_STATE, 3
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 3
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
goto MauvilleCity_Gym_EventScript_1566BA
end
diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc
index f18d278b5..321905148 100644
--- a/data/maps/MauvilleCity_House2/scripts.inc
+++ b/data/maps/MauvilleCity_House2/scripts.inc
@@ -7,21 +7,21 @@ MauvilleCity_House2_EventScript_1572C0:: @ 81572C0
goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_15733D
msgbox MauvilleCity_House2_Text_18244E, 4
checkitem ITEM_HARBOR_MAIL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq MauvilleCity_House2_EventScript_1572E5
release
end
MauvilleCity_House2_EventScript_1572E5:: @ 81572E5
playse SE_PIN
- applymovement LAST_TALKED, MauvilleCity_House2_Movement_1A0833
+ applymovement VAR_LAST_TALKED, MauvilleCity_House2_Movement_1A0833
waitmovement 0
- applymovement LAST_TALKED, MauvilleCity_House2_Movement_1A0835
+ applymovement VAR_LAST_TALKED, MauvilleCity_House2_Movement_1A0835
waitmovement 0
msgbox MauvilleCity_House2_Text_1824D8, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MauvilleCity_House2_EventScript_15731B
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MauvilleCity_House2_EventScript_157347
end
diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
index 817679cec..29fcc1278 100644
--- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc
@@ -13,7 +13,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_157365:: @ 8157365
end
MauvilleCity_PokemonCenter_1F_EventScript_157369:: @ 8157369
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call MauvilleCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/MeteorFalls_1F_2R/scripts.inc b/data/maps/MeteorFalls_1F_2R/scripts.inc
index 92b9f4661..971b9c285 100644
--- a/data/maps/MeteorFalls_1F_2R/scripts.inc
+++ b/data/maps/MeteorFalls_1F_2R/scripts.inc
@@ -3,8 +3,8 @@ MeteorFalls_1F_2R_MapScripts:: @ 815C678
MeteorFalls_1F_2R_EventScript_15C679:: @ 815C679
trainerbattle 0, TRAINER_NICOLAS_1, 0, MeteorFalls_1F_2R_Text_1939C5, MeteorFalls_1F_2R_Text_193A35
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq MeteorFalls_1F_2R_EventScript_15C6A0
msgbox MeteorFalls_1F_2R_Text_193A60, 6
end
@@ -16,8 +16,8 @@ MeteorFalls_1F_2R_EventScript_15C6A0:: @ 815C6A0
MeteorFalls_1F_2R_EventScript_15C6B7:: @ 815C6B7
trainerbattle 4, TRAINER_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193BB7, MeteorFalls_1F_2R_Text_193C10, MeteorFalls_1F_2R_Text_193C9F
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq MeteorFalls_1F_2R_EventScript_15C6E2
msgbox MeteorFalls_1F_2R_Text_193C35, 6
end
@@ -29,8 +29,8 @@ MeteorFalls_1F_2R_EventScript_15C6E2:: @ 815C6E2
MeteorFalls_1F_2R_EventScript_15C6FD:: @ 815C6FD
trainerbattle 4, TRAINER_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193D10, MeteorFalls_1F_2R_Text_193D6E, MeteorFalls_1F_2R_Text_193DFB
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq MeteorFalls_1F_2R_EventScript_15C728
msgbox MeteorFalls_1F_2R_Text_193D9A, 6
end
diff --git a/data/maps/MossdeepCity/scripts.inc b/data/maps/MossdeepCity/scripts.inc
index 7ec338927..d34944bb6 100644
--- a/data/maps/MossdeepCity/scripts.inc
+++ b/data/maps/MossdeepCity/scripts.inc
@@ -59,7 +59,7 @@ MossdeepCity_EventScript_14D011:: @ 814D011
lock
faceplayer
msgbox MossdeepCity_Text_16944E, 4
- applymovement LAST_TALKED, MossdeepCity_Movement_1A083D
+ applymovement VAR_LAST_TALKED, MossdeepCity_Movement_1A083D
waitmovement 0
release
end
@@ -69,11 +69,11 @@ MossdeepCity_EventScript_14D027:: @ 814D027
faceplayer
goto_if_set FLAG_RECEIVED_KINGS_ROCK, MossdeepCity_EventScript_14D069
msgbox MossdeepCity_Text_1690A9, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MossdeepCity_EventScript_14D073
msgbox MossdeepCity_Text_169117, 4
giveitem_std ITEM_KINGS_ROCK
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_EventScript_1A029B
setflag FLAG_RECEIVED_KINGS_ROCK
release
diff --git a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
index 7e147c48f..38366ac43 100644
--- a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
+++ b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc
@@ -6,7 +6,7 @@ MossdeepCity_GameCorner_1F_MapScripts:: @ 815AC52
MossdeepCity_GameCorner_1F_MapScript1_15AC62:: @ 815AC62
special ValidateEReaderTrainer
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AC71
end
@@ -17,7 +17,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71
MossdeepCity_GameCorner_1F_MapScript1_15AC84:: @ 815AC84
special ValidateEReaderTrainer
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AC9E
compare VAR_GAME_CORNER_STATE, 0
call_if_ne MossdeepCity_GameCorner_1F_EventScript_15ACAF
@@ -94,28 +94,28 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59
special SavePlayerParty
special BufferEReaderTrainerName
msgbox MossdeepCity_GameCorner_1F_Text_18E650, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
call MossdeepCity_GameCorner_1F_EventScript_15ADF5
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
msgbox MossdeepCity_GameCorner_1F_Text_18E741, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
special LoadPlayerParty
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
erasebox 0, 0, 15, 10
special SavePlayerParty
special ReducePlayerPartyToThree
msgbox MossdeepCity_GameCorner_1F_Text_18E777, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE04
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE16
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE28
warp MAP_MOSSDEEP_CITY_GAME_CORNER_B1F, 255, 3, 1
waitstate
@@ -136,19 +136,19 @@ MossdeepCity_GameCorner_1F_EventScript_15ADF5:: @ 815ADF5
return
MossdeepCity_GameCorner_1F_EventScript_15AE04:: @ 815AE04
- applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46
+ applymovement VAR_LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46
applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE3A
waitmovement 0
return
MossdeepCity_GameCorner_1F_EventScript_15AE16:: @ 815AE16
- applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE49
+ applymovement VAR_LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE49
applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE3E
waitmovement 0
return
MossdeepCity_GameCorner_1F_EventScript_15AE28:: @ 815AE28
- applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46
+ applymovement VAR_LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46
applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE42
waitmovement 0
return
diff --git a/data/maps/MossdeepCity_GameCorner_B1F/scripts.inc b/data/maps/MossdeepCity_GameCorner_B1F/scripts.inc
index 0af775590..aa604b493 100644
--- a/data/maps/MossdeepCity_GameCorner_B1F/scripts.inc
+++ b/data/maps/MossdeepCity_GameCorner_B1F/scripts.inc
@@ -18,15 +18,15 @@ MossdeepCity_GameCorner_B1F_EventScript_15AE6E:: @ 815AE6E
special PrintEReaderTrainerGreeting
msgbox gStringVar4, 4
closemessage
- setvar VAR_SPECIAL_4, 2
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 2
+ setvar VAR_0x8005, 0
special StartSpecialBattle
waitstate
- compare RESULT, 3
+ compare VAR_RESULT, 3
call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AED5
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AEE3
- compare RESULT, 2
+ compare VAR_RESULT, 2
call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AEEE
closemessage
special ScrSpecial_HealPlayerParty
diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc
index aabfd73ec..695953c38 100644
--- a/data/maps/MossdeepCity_Gym/scripts.inc
+++ b/data/maps/MossdeepCity_Gym/scripts.inc
@@ -22,26 +22,26 @@ MossdeepCity_Gym_EventScript_15A506:: @ 815A506
end
MossdeepCity_Gym_EventScript_15A510:: @ 815A510
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 5, 5, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 2, 7, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A4E8
end
MossdeepCity_Gym_EventScript_15A528:: @ 815A528
- setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 8, 14, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 8, 10, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A4F7
end
MossdeepCity_Gym_EventScript_15A540:: @ 815A540
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 15, 17, METATILE_MossdeepGym_RedArrow_Left, 0
+ setmetatile 17, 15, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A506
end
MossdeepCity_Gym_EventScript_15A558:: @ 815A558
- setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 1, 23, METATILE_MossdeepGym_RedArrow_Up, 0
+ setmetatile 5, 24, METATILE_MossdeepGym_Switch_Down, 1
end
MossdeepCity_Gym_EventScript_15A56B:: @ 815A56B
@@ -60,7 +60,7 @@ MossdeepCity_Gym_EventScript_15A594:: @ 815A594
setflag FLAG_BADGE07_GET
clearflag FLAG_HIDE_BRINEY_SLATEPORT_SHIPYARD
clearflag FLAG_UNKNOWN_393
- setvar VAR_SPECIAL_8, 7
+ setvar VAR_0x8008, 7
call MossdeepCity_Gym_EventScript_1A01C0
clearflag FLAG_HIDE_WORKERS_SLATEPORT_HARBOR
goto MossdeepCity_Gym_EventScript_15A5C6
@@ -68,7 +68,7 @@ MossdeepCity_Gym_EventScript_15A594:: @ 815A594
MossdeepCity_Gym_EventScript_15A5C6:: @ 815A5C6
giveitem_std ITEM_TM04_CALM_MIND
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_Gym_EventScript_1A029B
msgbox MossdeepCity_Gym_Text_18D1CF, 4
setflag FLAG_RECEIVED_TM04
@@ -81,8 +81,8 @@ MossdeepCity_Gym_EventScript_15A5EA:: @ 815A5EA
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 5, 5, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 2, 7, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -96,8 +96,8 @@ MossdeepCity_Gym_EventScript_15A621:: @ 815A621
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1
+ setmetatile 5, 5, METATILE_MossdeepGym_RedArrow_Left, 0
+ setmetatile 2, 7, METATILE_MossdeepGym_Switch_Up, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -107,8 +107,8 @@ MossdeepCity_Gym_EventScript_15A646:: @ 815A646
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 8, 14, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 8, 10, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -116,8 +116,8 @@ MossdeepCity_Gym_EventScript_15A675:: @ 815A675
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0
- setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1
+ setmetatile 8, 14, METATILE_MossdeepGym_RedArrow_Down, 0
+ setmetatile 8, 10, METATILE_MossdeepGym_Switch_Up, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -127,8 +127,8 @@ MossdeepCity_Gym_EventScript_15A69A:: @ 815A69A
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 15, 17, METATILE_MossdeepGym_RedArrow_Left, 0
+ setmetatile 17, 15, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -136,8 +136,8 @@ MossdeepCity_Gym_EventScript_15A6C9:: @ 815A6C9
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1
+ setmetatile 15, 17, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 17, 15, METATILE_MossdeepGym_Switch_Up, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -147,8 +147,8 @@ MossdeepCity_Gym_EventScript_15A6EE:: @ 815A6EE
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1
+ setmetatile 1, 23, METATILE_MossdeepGym_RedArrow_Up, 0
+ setmetatile 5, 24, METATILE_MossdeepGym_Switch_Down, 1
goto MossdeepCity_Gym_EventScript_15A619
end
@@ -156,8 +156,8 @@ MossdeepCity_Gym_EventScript_15A71D:: @ 815A71D
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
- setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0
- setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1
+ setmetatile 1, 23, METATILE_MossdeepGym_RedArrow_Right, 0
+ setmetatile 5, 24, METATILE_MossdeepGym_Switch_Up, 1
goto MossdeepCity_Gym_EventScript_15A619
end
diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc
index 97a5fc452..12b2bc2a5 100644
--- a/data/maps/MossdeepCity_House1/scripts.inc
+++ b/data/maps/MossdeepCity_House1/scripts.inc
@@ -6,8 +6,8 @@ MossdeepCity_House1_EventScript_15A82F:: @ 815A82F
faceplayer
bufferleadmonspeciesname 0
msgbox MossdeepCity_House1_Text_18D465, 4
- specialvar RESULT, GetPokeblockNameByMonNature
- compare RESULT, 0
+ specialvar VAR_RESULT, GetPokeblockNameByMonNature
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_House1_EventScript_15A855
msgbox MossdeepCity_House1_Text_18D475, 4
release
diff --git a/data/maps/MossdeepCity_House2/scripts.inc b/data/maps/MossdeepCity_House2/scripts.inc
index c8bccdd52..53cb4511b 100644
--- a/data/maps/MossdeepCity_House2/scripts.inc
+++ b/data/maps/MossdeepCity_House2/scripts.inc
@@ -19,9 +19,9 @@ MossdeepCity_House2_EventScript_15A87B:: @ 815A87B
closemessage
setflag FLAG_WINGULL_DELIVERED_MAIL
clearflag FLAG_HIDE_WINGULL_FORTREE_HOUSE
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq MossdeepCity_House2_EventScript_15A8AE
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq MossdeepCity_House2_EventScript_15A8B9
removeobject 3
release
diff --git a/data/maps/MossdeepCity_House3/scripts.inc b/data/maps/MossdeepCity_House3/scripts.inc
index 4c4d6cbdd..ead159df5 100644
--- a/data/maps/MossdeepCity_House3/scripts.inc
+++ b/data/maps/MossdeepCity_House3/scripts.inc
@@ -6,7 +6,7 @@ MossdeepCity_House3_EventScript_15A972:: @ 815A972
faceplayer
goto_if_set FLAG_RECEIVED_SUPER_ROD, MossdeepCity_House3_EventScript_15A9B1
msgbox MossdeepCity_House3_Text_18D909, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MossdeepCity_House3_EventScript_15A9BB
msgbox MossdeepCity_House3_Text_18D9A9, 4
giveitem_std ITEM_SUPER_ROD
diff --git a/data/maps/MossdeepCity_House4/scripts.inc b/data/maps/MossdeepCity_House4/scripts.inc
index 15ed22c5e..dc5063c15 100644
--- a/data/maps/MossdeepCity_House4/scripts.inc
+++ b/data/maps/MossdeepCity_House4/scripts.inc
@@ -18,7 +18,7 @@ MossdeepCity_House4_EventScript_15AB50:: @ 815AB50
lock
faceplayer
special CheckPlayerHasSecretBase
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_House4_EventScript_15AB6D
special GetSecretBaseNearbyMapName
msgbox MossdeepCity_House4_Text_18E17E, 4
diff --git a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
index 906cf8e83..5fe72062f 100644
--- a/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_PokemonCenter_1F/scripts.inc
@@ -7,7 +7,7 @@ MossdeepCity_PokemonCenter_1F_MapScript1_15A8D6:: @ 815A8D6
end
MossdeepCity_PokemonCenter_1F_EventScript_15A8DA:: @ 815A8DA
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call MossdeepCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
index 83b859c26..7ac7d5f4d 100644
--- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
@@ -5,14 +5,14 @@ MossdeepCity_SpaceCenter_1F_EventScript_15AB8B:: @ 815AB8B
lock
faceplayer
dodailyevents
- specialvar RESULT, GetWeekCount
- buffernumberstring 0, RESULT
- compare RESULT, 0
+ specialvar VAR_RESULT, GetWeekCount
+ buffernumberstring 0, VAR_RESULT
+ compare VAR_RESULT, 0
call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_15ABBA
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_15ABC3
closemessage
- applymovement LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D
waitmovement 0
release
end
@@ -35,7 +35,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_15ABD5:: @ 815ABD5
goto_if_set FLAG_RECEIVED_SUN_STONE_MOSSDEEP, MossdeepCity_SpaceCenter_1F_EventScript_15AC0C
msgbox MossdeepCity_SpaceCenter_1F_Text_18E335, 4
giveitem_std ITEM_SUN_STONE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_1A029B
setflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP
msgbox MossdeepCity_SpaceCenter_1F_Text_18E39B, 4
@@ -56,7 +56,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_15AC1F:: @ 815AC1F
faceplayer
msgbox MossdeepCity_SpaceCenter_1F_Text_18E427, 4
closemessage
- applymovement LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc
index 073416b5a..6025a6b6b 100644
--- a/data/maps/MossdeepCity_StevensHouse/scripts.inc
+++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc
@@ -71,12 +71,12 @@ MossdeepCity_StevensHouse_Movement_15AA76:: @ 815AA76
MossdeepCity_StevensHouse_EventScript_15AA7C:: @ 815AA7C
lockall
msgbox MossdeepCity_StevensHouse_Text_18DD12, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MossdeepCity_StevensHouse_EventScript_15AAE6
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq MossdeepCity_StevensHouse_EventScript_15AADC
- copyvar VAR_SPECIAL_4, RESULT
+ copyvar VAR_0x8004, VAR_RESULT
removeobject 2
playfanfare MUS_FANFA4
message MossdeepCity_StevensHouse_Text_18DD61
@@ -85,7 +85,7 @@ MossdeepCity_StevensHouse_EventScript_15AA7C:: @ 815AA7C
givemon SPECIES_BELDUM, 5, ITEM_NONE, 0x0, 0x0, 0
bufferspeciesname 1, SPECIES_BELDUM
msgbox MossdeepCity_StevensHouse_Text_1A1102, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq MossdeepCity_StevensHouse_EventScript_1A0678
setflag FLAG_HIDE_BELDUM_BALL_STEVENS_HOUSE
setflag FLAG_RECEIVED_BELDUM
diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc
index a3906af8c..e06433dfa 100644
--- a/data/maps/MtChimney/scripts.inc
+++ b/data/maps/MtChimney/scripts.inc
@@ -18,17 +18,17 @@ MtChimney_EventScript_15CF95:: @ 815CF95
showmoneybox 0, 0
nop
msgbox MtChimney_Text_195760, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MtChimney_EventScript_15D00B
checkmoney 0xc8, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MtChimney_EventScript_15D018
msgbox MtChimney_Text_1957A9, 4
checkitemspace ITEM_LAVA_COOKIE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq MtChimney_EventScript_15D000
giveitem_std ITEM_LAVA_COOKIE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MtChimney_EventScript_15CFF3
hidemoneybox 0, 0
release
@@ -409,7 +409,7 @@ MtChimney_EventScript_15D17D:: @ 815D17D
goto_if_unset FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, MtChimney_EventScript_15D1D0
goto_if_set FLAG_RECEIVED_METEORITE, MtChimney_EventScript_15D1C6
msgbox MtChimney_Text_195870, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MtChimney_EventScript_15D1BC
msgbox MtChimney_Text_1958C6, 4
giveitem_std ITEM_METEORITE
@@ -438,8 +438,8 @@ MtChimney_EventScript_15D1DA:: @ 815D1DA
MtChimney_EventScript_15D1E3:: @ 815D1E3
trainerbattle 0, TRAINER_SHELBY_1, 0, MtChimney_Text_19597F, MtChimney_Text_1959D8
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq MtChimney_EventScript_15D20A
msgbox MtChimney_Text_195A04, 6
end
diff --git a/data/maps/MtChimney_CableCarStation/scripts.inc b/data/maps/MtChimney_CableCarStation/scripts.inc
index 7161e8800..cf80ed39c 100644
--- a/data/maps/MtChimney_CableCarStation/scripts.inc
+++ b/data/maps/MtChimney_CableCarStation/scripts.inc
@@ -32,9 +32,9 @@ MtChimney_CableCarStation_EventScript_15C14B:: @ 815C14B
lock
faceplayer
msgbox MtChimney_CableCarStation_Text_19256A, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MtChimney_CableCarStation_EventScript_15C16C
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MtChimney_CableCarStation_EventScript_15C19B
end
@@ -44,7 +44,7 @@ MtChimney_CableCarStation_EventScript_15C16C:: @ 815C16C
applymovement 1, MtChimney_CableCarStation_Movement_15C1A5
applymovement 255, MtChimney_CableCarStation_Movement_15C1AF
waitmovement 0
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
setvar VAR_CABLE_CAR_STATION_STATE, 2
incrementgamestat GAME_STAT_RODE_CABLE_CAR
special CableCarWarp
diff --git a/data/maps/MtPyre_1F/scripts.inc b/data/maps/MtPyre_1F/scripts.inc
index f34c31da0..3629c375f 100644
--- a/data/maps/MtPyre_1F/scripts.inc
+++ b/data/maps/MtPyre_1F/scripts.inc
@@ -7,7 +7,7 @@ MtPyre_1F_EventScript_15D323:: @ 815D323
goto_if_set FLAG_RECEIVED_CLEANSE_TAG, MtPyre_1F_EventScript_15D352
msgbox MtPyre_1F_Text_196151, 4
giveitem_std ITEM_CLEANSE_TAG
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq MtPyre_1F_EventScript_1A029B
setflag FLAG_RECEIVED_CLEANSE_TAG
release
diff --git a/data/maps/MtPyre_6F/scripts.inc b/data/maps/MtPyre_6F/scripts.inc
index 92086949f..5bf36092b 100644
--- a/data/maps/MtPyre_6F/scripts.inc
+++ b/data/maps/MtPyre_6F/scripts.inc
@@ -3,8 +3,8 @@ MtPyre_6F_MapScripts:: @ 815D447
MtPyre_6F_EventScript_15D448:: @ 815D448
trainerbattle 0, TRAINER_VALERIE_1, 0, MtPyre_6F_Text_1969FE, MtPyre_6F_Text_196A30
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq MtPyre_6F_EventScript_15D46F
msgbox MtPyre_6F_Text_196A4C, 6
end
diff --git a/data/maps/MtPyre_Summit/scripts.inc b/data/maps/MtPyre_Summit/scripts.inc
index 36b72ad12..90e41c233 100644
--- a/data/maps/MtPyre_Summit/scripts.inc
+++ b/data/maps/MtPyre_Summit/scripts.inc
@@ -8,19 +8,19 @@ MtPyre_Summit_MapScript1_15D4B7:: @ 815D4B7
MtPyre_Summit_EventScript_15D4BD:: @ 815D4BD
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto MtPyre_Summit_EventScript_15D4E1
end
MtPyre_Summit_EventScript_15D4C9:: @ 815D4C9
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto MtPyre_Summit_EventScript_15D4E1
end
MtPyre_Summit_EventScript_15D4D5:: @ 815D4D5
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto MtPyre_Summit_EventScript_15D4E1
end
@@ -30,11 +30,11 @@ MtPyre_Summit_EventScript_15D4E1:: @ 815D4E1
applymovement 2, MtPyre_Summit_Movement_1A0845
waitmovement 0
delay 50
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq MtPyre_Summit_EventScript_15D593
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq MtPyre_Summit_EventScript_15D59E
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq MtPyre_Summit_EventScript_15D59F
.ifdef SAPPHIRE
msgbox UnknownString_81B52B0, 4
@@ -52,11 +52,11 @@ MtPyre_Summit_EventScript_15D4E1:: @ 815D4E1
fadescreen 0
delay 20
call MtPyre_Summit_EventScript_15D57A
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq MtPyre_Summit_EventScript_15D5AA
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq MtPyre_Summit_EventScript_15D5BF
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq MtPyre_Summit_EventScript_15D5CA
.ifdef SAPPHIRE
msgbox UnknownString_81B53AB, 4
@@ -143,9 +143,9 @@ MtPyre_Summit_EventScript_15D5EF:: @ 815D5EF
.else
msgbox MtPyre_Summit_Text_1B64B3, MSGBOX_YESNO
.endif
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq MtPyre_Summit_EventScript_15D611
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq MtPyre_Summit_EventScript_15D61A
release
end
@@ -186,20 +186,20 @@ MtPyre_Summit_EventScript_15D64A:: @ 815D64A
.else
msgbox MtPyre_Summit_Text_1B6283, MSGBOX_YESNO
.endif
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MtPyre_Summit_EventScript_15D669
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MtPyre_Summit_EventScript_15D69B
end
MtPyre_Summit_EventScript_15D669:: @ 815D669
- setvar VAR_SPECIAL_4, ITEM_RED_OR_BLUE_ORB
+ setvar VAR_0x8004, ITEM_RED_OR_BLUE_ORB
call MtPyre_Summit_EventScript_1A067F
closemessage
- applymovement LAST_TALKED, MtPyre_Summit_Movement_1A0841
+ applymovement VAR_LAST_TALKED, MtPyre_Summit_Movement_1A0841
waitmovement 0
delay 40
- applymovement LAST_TALKED, MtPyre_Summit_Movement_1A0839
+ applymovement VAR_LAST_TALKED, MtPyre_Summit_Movement_1A0839
waitmovement 0
delay 10
.ifdef SAPPHIRE
@@ -217,9 +217,9 @@ MtPyre_Summit_EventScript_15D69B:: @ 815D69B
.else
msgbox MtPyre_Summit_Text_1B62E7, MSGBOX_YESNO
.endif
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq MtPyre_Summit_EventScript_15D669
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq MtPyre_Summit_EventScript_15D69B
end
@@ -243,19 +243,19 @@ MtPyre_Summit_EventScript_15D6C4:: @ 815D6C4
MtPyre_Summit_EventScript_15D6CE:: @ 815D6CE
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto MtPyre_Summit_EventScript_15D6F2
end
MtPyre_Summit_EventScript_15D6DA:: @ 815D6DA
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto MtPyre_Summit_EventScript_15D6F2
end
MtPyre_Summit_EventScript_15D6E6:: @ 815D6E6
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto MtPyre_Summit_EventScript_15D6F2
end
@@ -265,11 +265,11 @@ MtPyre_Summit_EventScript_15D6F2:: @ 815D6F2
applymovement 2, MtPyre_Summit_Movement_1A0845
waitmovement 0
delay 50
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq MtPyre_Summit_EventScript_15D75E
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq MtPyre_Summit_EventScript_15D769
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq MtPyre_Summit_EventScript_15D774
.ifdef SAPPHIRE
msgbox UnknownString_81B5BFC, 4
@@ -277,11 +277,11 @@ MtPyre_Summit_EventScript_15D6F2:: @ 815D6F2
msgbox MtPyre_Summit_Text_1B6848, 4
.endif
closemessage
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq MtPyre_Summit_EventScript_15D77F
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq MtPyre_Summit_EventScript_15D78A
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq MtPyre_Summit_EventScript_15D795
removeobject 2
setvar VAR_MT_PYRE_STATE, 3
diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc
index da46a8053..b954c69c8 100644
--- a/data/maps/NewMauville_Entrance/scripts.inc
+++ b/data/maps/NewMauville_Entrance/scripts.inc
@@ -27,10 +27,10 @@ NewMauville_Entrance_EventScript_15E4DC:: @ 815E4DC
waitmovement 0
msgbox NewMauville_Entrance_Text_1982C0, 4
checkitem ITEM_BASEMENT_KEY, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq NewMauville_Entrance_EventScript_15E55D
msgbox NewMauville_Entrance_Text_1982D4, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq NewMauville_Entrance_EventScript_15E55D
msgbox NewMauville_Entrance_Text_1982EA, 4
setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0
diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc
index 02d17a3ef..d995b1f69 100644
--- a/data/maps/NewMauville_Inside/scripts.inc
+++ b/data/maps/NewMauville_Inside/scripts.inc
@@ -13,7 +13,7 @@ NewMauville_Inside_MapScript1_15E56F:: @ 815E56F
end
NewMauville_Inside_EventScript_15E58F:: @ 815E58F
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
NewMauville_Inside_MapScript1_15E593:: @ 815E593
diff --git a/data/maps/OldaleTown/scripts.inc b/data/maps/OldaleTown/scripts.inc
index dcac39584..ad30b2014 100644
--- a/data/maps/OldaleTown/scripts.inc
+++ b/data/maps/OldaleTown/scripts.inc
@@ -41,7 +41,7 @@ OldaleTown_EventScript_14DDBC:: @ 814DDBC
playbgm MUS_TSURETEK, FALSE
msgbox OldaleTown_Text_16AEF2, 4
closemessage
- switch FACING
+ switch VAR_FACING
case 1, OldaleTown_EventScript_14DE07
case 2, OldaleTown_EventScript_14DE1E
case 4, OldaleTown_EventScript_14DE35
@@ -71,7 +71,7 @@ OldaleTown_EventScript_14DE35:: @ 814DE35
OldaleTown_EventScript_14DE4C:: @ 814DE4C
msgbox OldaleTown_Text_16AF2F, 4
giveitem_std ITEM_POTION
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_EventScript_14DE83
msgbox OldaleTown_Text_16AFE1, 4
setflag FLAG_RECEIVED_POTION_OLDALE
@@ -251,9 +251,9 @@ OldaleTown_EventScript_14DF77:: @ 814DF77
OldaleTown_EventScript_14DF92:: @ 814DF92
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_EventScript_14DFAA
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_EventScript_14DFB8
end
diff --git a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
index 16e11d6a2..a3f05e593 100644
--- a/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/OldaleTown_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ OldaleTown_PokemonCenter_1F_MapScript1_152F0E:: @ 8152F0E
end
OldaleTown_PokemonCenter_1F_EventScript_152F17:: @ 8152F17
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call OldaleTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc
index 110bdcbe6..5798680bd 100644
--- a/data/maps/PacifidlogTown_House2/scripts.inc
+++ b/data/maps/PacifidlogTown_House2/scripts.inc
@@ -10,19 +10,19 @@ PacifidlogTown_House2_EventScript_154168:: @ 8154168
call_if_set FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_1541CE
call_if_unset FLAG_MET_FANCLUB_YOUNGER_BROTHER, PacifidlogTown_House2_EventScript_1541D7
setflag FLAG_MET_FANCLUB_YOUNGER_BROTHER
- specialvar RESULT, GetLeadMonFriendshipScore
- compare RESULT, 4
+ specialvar VAR_RESULT, GetLeadMonFriendshipScore
+ compare VAR_RESULT, 4
goto_if_ge PacifidlogTown_House2_EventScript_1541EC
- specialvar RESULT, GetLeadMonFriendshipScore
- compare RESULT, 2
+ specialvar VAR_RESULT, GetLeadMonFriendshipScore
+ compare VAR_RESULT, 2
goto_if_ge PacifidlogTown_House2_EventScript_15421B
goto PacifidlogTown_House2_EventScript_154225
end
PacifidlogTown_House2_EventScript_1541B4:: @ 81541B4
goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_1A14DC
- specialvar RESULT, GetDaysUntilPacifidlogTMAvailable
- compare RESULT, 0
+ specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
+ compare VAR_RESULT, 0
call_if_eq PacifidlogTown_House2_EventScript_1541E8
return
@@ -42,7 +42,7 @@ PacifidlogTown_House2_EventScript_1541E8:: @ 81541E8
PacifidlogTown_House2_EventScript_1541EC:: @ 81541EC
msgbox PacifidlogTown_House2_Text_179169, 4
giveitem_std ITEM_TM27_RETURN
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PacifidlogTown_House2_EventScript_1A029B
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay
@@ -58,7 +58,7 @@ PacifidlogTown_House2_EventScript_15421B:: @ 815421B
PacifidlogTown_House2_EventScript_154225:: @ 8154225
msgbox PacifidlogTown_House2_Text_17922D, 4
giveitem_std ITEM_TM21_FRUSTRATION
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PacifidlogTown_House2_EventScript_1A029B
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay
@@ -67,8 +67,8 @@ PacifidlogTown_House2_EventScript_154225:: @ 8154225
end
PacifidlogTown_House2_EventScript_154254:: @ 8154254
- specialvar RESULT, GetDaysUntilPacifidlogTMAvailable
- buffernumberstring 0, RESULT
+ specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
+ buffernumberstring 0, VAR_RESULT
msgbox PacifidlogTown_House2_Text_1792F2, 4
release
end
diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc
index 3b21ac996..055287bfb 100644
--- a/data/maps/PacifidlogTown_House3/scripts.inc
+++ b/data/maps/PacifidlogTown_House3/scripts.inc
@@ -5,29 +5,29 @@ PacifidlogTown_House3_EventScript_15429E:: @ 815429E
lock
faceplayer
goto_if_set FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED, PacifidlogTown_House3_EventScript_154338
- setvar VAR_SPECIAL_8, 2
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- specialvar RESULT, GetInGameTradeSpeciesInfo
- copyvar VAR_SPECIAL_9, RESULT
+ setvar VAR_0x8008, 2
+ copyvar VAR_0x8004, VAR_0x8008
+ specialvar VAR_RESULT, GetInGameTradeSpeciesInfo
+ copyvar VAR_0x8009, VAR_RESULT
msgbox PacifidlogTown_House3_Text_17940E, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PacifidlogTown_House3_EventScript_154320
special SelectMonForNPCTrade
waitstate
- copyvar VAR_SPECIAL_A, VAR_SPECIAL_4
- compare VAR_SPECIAL_4, 255
+ copyvar VAR_0x800A, VAR_0x8004
+ compare VAR_0x8004, 255
goto_if_eq PacifidlogTown_House3_EventScript_154320
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
- specialvar RESULT, GetTradeSpecies
- copyvar VAR_SPECIAL_B, RESULT
- compare RESULT, VAR_SPECIAL_9
+ copyvar VAR_0x8005, VAR_0x800A
+ specialvar VAR_RESULT, GetTradeSpecies
+ copyvar VAR_0x800B, VAR_RESULT
+ compare VAR_RESULT, VAR_0x8009
goto_if_ne PacifidlogTown_House3_EventScript_15432A
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
+ copyvar VAR_0x8004, VAR_0x8008
+ copyvar VAR_0x8005, VAR_0x800A
special CreateInGameTradePokemon
special DoInGameTradeScene
waitstate
- bufferspeciesname 0, VAR_SPECIAL_9
+ bufferspeciesname 0, VAR_0x8009
msgbox PacifidlogTown_House3_Text_1794C4, 4
setflag FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED
release
@@ -39,7 +39,7 @@ PacifidlogTown_House3_EventScript_154320:: @ 8154320
end
PacifidlogTown_House3_EventScript_15432A:: @ 815432A
- bufferspeciesname 0, VAR_SPECIAL_9
+ bufferspeciesname 0, VAR_0x8009
msgbox PacifidlogTown_House3_Text_1794DF, 4
release
end
diff --git a/data/maps/PacifidlogTown_House4/scripts.inc b/data/maps/PacifidlogTown_House4/scripts.inc
index 584366c88..84a477156 100644
--- a/data/maps/PacifidlogTown_House4/scripts.inc
+++ b/data/maps/PacifidlogTown_House4/scripts.inc
@@ -13,9 +13,9 @@ PacifidlogTown_House4_EventScript_15435E:: @ 815435E
lock
faceplayer
msgbox PacifidlogTown_House4_Text_17963D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PacifidlogTown_House4_EventScript_15437F
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PacifidlogTown_House4_EventScript_154389
end
diff --git a/data/maps/PacifidlogTown_House5/scripts.inc b/data/maps/PacifidlogTown_House5/scripts.inc
index 46b1990df..8c24cddcb 100644
--- a/data/maps/PacifidlogTown_House5/scripts.inc
+++ b/data/maps/PacifidlogTown_House5/scripts.inc
@@ -4,8 +4,8 @@ PacifidlogTown_House5_MapScripts:: @ 8154393
PacifidlogTown_House5_EventScript_154394:: @ 8154394
lock
faceplayer
- specialvar RESULT, IsMirageIslandPresent
- compare RESULT, 1
+ specialvar VAR_RESULT, IsMirageIslandPresent
+ compare VAR_RESULT, 1
goto_if_eq PacifidlogTown_House5_EventScript_1543B0
msgbox PacifidlogTown_House5_Text_179718, 4
release
diff --git a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
index ea7a8e056..e5756cd71 100644
--- a/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PacifidlogTown_PokemonCenter_1F/scripts.inc
@@ -7,7 +7,7 @@ PacifidlogTown_PokemonCenter_1F_MapScript1_154105:: @ 8154105
end
@ 8154109
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc
index 77b12b556..fee198977 100644
--- a/data/maps/PetalburgCity/scripts.inc
+++ b/data/maps/PetalburgCity/scripts.inc
@@ -156,25 +156,25 @@ PetalburgCity_EventScript_14B82D:: @ 814B82D
PetalburgCity_EventScript_14B836:: @ 814B836
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto PetalburgCity_EventScript_14B866
end
PetalburgCity_EventScript_14B842:: @ 814B842
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto PetalburgCity_EventScript_14B866
end
PetalburgCity_EventScript_14B84E:: @ 814B84E
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto PetalburgCity_EventScript_14B866
end
PetalburgCity_EventScript_14B85A:: @ 814B85A
lockall
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto PetalburgCity_EventScript_14B866
end
@@ -187,23 +187,23 @@ PetalburgCity_EventScript_14B866:: @ 814B866
waitmovement 0
applymovement 9, PetalburgCity_Movement_1A0835
waitmovement 0
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_EventScript_14B91B
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_EventScript_14B930
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_EventScript_14B93B
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_EventScript_14B950
msgbox PetalburgCity_Text_16438A, 4
closemessage
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_EventScript_14B965
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_EventScript_14B977
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_EventScript_14B989
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_EventScript_14B99B
msgbox PetalburgCity_Text_164426, 4
applymovement 9, PetalburgCity_Movement_1A0843
diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc
index c7efb49ae..09d969ec8 100644
--- a/data/maps/PetalburgCity_Gym/scripts.inc
+++ b/data/maps/PetalburgCity_Gym/scripts.inc
@@ -13,7 +13,7 @@ PetalburgCity_Gym_MapScript1_15448C:: @ 815448C
end
PetalburgCity_Gym_EventScript_1544A3:: @ 81544A3
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
call PetalburgCity_Gym_EventScript_154F9A
call_if_trainer_defeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_154FBB
call_if_trainer_defeated TRAINER_MARY, PetalburgCity_Gym_EventScript_154FDC
@@ -25,7 +25,7 @@ PetalburgCity_Gym_EventScript_1544A3:: @ 81544A3
end
PetalburgCity_Gym_EventScript_1544ED:: @ 81544ED
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
call PetalburgCity_Gym_EventScript_154F9A
call PetalburgCity_Gym_EventScript_154FBB
call PetalburgCity_Gym_EventScript_154FDC
@@ -106,7 +106,7 @@ PetalburgCity_Gym_EventScript_1545B9:: @ 81545B9
case 7, PetalburgCity_Gym_EventScript_15493D
msgbox PetalburgCity_Gym_Text_179DF6, 4
closemessage
- switch FACING
+ switch VAR_FACING
case 1, PetalburgCity_Gym_EventScript_15463D
case 2, PetalburgCity_Gym_EventScript_154648
case 3, PetalburgCity_Gym_EventScript_154653
@@ -114,87 +114,87 @@ PetalburgCity_Gym_EventScript_1545B9:: @ 81545B9
end
PetalburgCity_Gym_EventScript_15463D:: @ 815463D
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto PetalburgCity_Gym_EventScript_154669
end
PetalburgCity_Gym_EventScript_154648:: @ 8154648
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto PetalburgCity_Gym_EventScript_154669
end
PetalburgCity_Gym_EventScript_154653:: @ 8154653
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto PetalburgCity_Gym_EventScript_154669
end
PetalburgCity_Gym_EventScript_15465E:: @ 815465E
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto PetalburgCity_Gym_EventScript_154669
end
PetalburgCity_Gym_EventScript_154669:: @ 8154669
addobject 10
playse SE_DOOR
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_1547EE
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_154800
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_15481C
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_15481C
msgbox PetalburgCity_Gym_Text_179F07, 4
msgbox PetalburgCity_Gym_Text_179F37, 4
msgbox PetalburgCity_Gym_Text_179F70, 4
msgbox PetalburgCity_Gym_Text_17A03A, 4
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_154884
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_15488F
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_1548A1
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_1548B3
msgbox PetalburgCity_Gym_Text_17A04A, 4
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_1548C5
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_1548D0
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_1548DB
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_1548E6
msgbox PetalburgCity_Gym_Text_17A0A8, 4
msgbox PetalburgCity_Gym_Text_17A0EB, 4
msgbox PetalburgCity_Gym_Text_17A156, 4
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_15492F
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_154930
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_15493B
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_15493C
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_1548F1
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_1548FC
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_1548F1
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_1548F1
msgbox PetalburgCity_Gym_Text_17A171, 4
closemessage
setflag FLAG_SPECIAL_FLAG_1
playbgm MUS_TSURETEK, FALSE
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq PetalburgCity_Gym_EventScript_154835
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq PetalburgCity_Gym_EventScript_15484E
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq PetalburgCity_Gym_EventScript_154860
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq PetalburgCity_Gym_EventScript_154872
removeobject 10
setflag FLAG_HIDE_WALLY_MOM_PETALBURG_1
@@ -344,7 +344,7 @@ PetalburgCity_Gym_EventScript_15493C:: @ 815493C
PetalburgCity_Gym_EventScript_15493D:: @ 815493D
call PetalburgCity_Gym_EventScript_154969
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_Gym_EventScript_1549B8
goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_154A2C
goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_154B69
@@ -353,28 +353,28 @@ PetalburgCity_Gym_EventScript_15493D:: @ 815493D
end
PetalburgCity_Gym_EventScript_154969:: @ 8154969
- specialvar RESULT, IsEnigmaBerryValid
- compare RESULT, 0
+ specialvar VAR_RESULT, IsEnigmaBerryValid
+ compare VAR_RESULT, 0
goto_if_eq PetalburgCity_Gym_EventScript_1549B2
checkitem ITEM_ENIGMA_BERRY, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_Gym_EventScript_1549B2
checkpcitem ITEM_ENIGMA_BERRY, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_Gym_EventScript_1549B2
compare VAR_ENIGMA_BERRY_AVAILABLE, 0
goto_if_eq PetalburgCity_Gym_EventScript_1549B2
msgbox PetalburgCity_Gym_Text_1C5570, 4
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
PetalburgCity_Gym_EventScript_1549B2:: @ 81549B2
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
PetalburgCity_Gym_EventScript_1549B8:: @ 81549B8
giveitem_std ITEM_ENIGMA_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgCity_Gym_EventScript_1A029B
setvar VAR_ENIGMA_BERRY_AVAILABLE, 0
release
@@ -393,7 +393,7 @@ PetalburgCity_Gym_EventScript_1549D6:: @ 81549D6
call PetalburgCity_Gym_EventScript_1A0424
setflag FLAG_HIDE_WATTSON_MAUVILLE_GYM
clearflag FLAG_HIDE_WATTSON_MAUVILLE
- setvar VAR_SPECIAL_8, 5
+ setvar VAR_0x8008, 5
call PetalburgCity_Gym_EventScript_1A01C0
clearflag FLAG_HIDE_SLUDGE_BOMB_MAN_DEWFORD_HALL
call PetalburgCity_Gym_EventScript_1544ED
@@ -403,28 +403,28 @@ PetalburgCity_Gym_EventScript_1549D6:: @ 81549D6
PetalburgCity_Gym_EventScript_154A2C:: @ 8154A2C
giveitem_std ITEM_TM42_FACADE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgCity_Gym_EventScript_1A029B
setflag FLAG_RECEIVED_TM42
msgbox PetalburgCity_Gym_Text_17A8CF, 4
msgbox PetalburgCity_Gym_Text_17A976, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq PetalburgCity_Gym_EventScript_154ABC
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq PetalburgCity_Gym_EventScript_154AC7
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq PetalburgCity_Gym_EventScript_154AD2
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq PetalburgCity_Gym_EventScript_154ADD
delay 70
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq PetalburgCity_Gym_EventScript_154AE8
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq PetalburgCity_Gym_EventScript_154AF3
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq PetalburgCity_Gym_EventScript_154AFE
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq PetalburgCity_Gym_EventScript_154B09
msgbox PetalburgCity_Gym_Text_17A9F6, 4
release
@@ -584,12 +584,12 @@ PetalburgCity_Gym_EventScript_154B73:: @ 8154B73
lockall
compare VAR_PETALBURG_GYM_STATE, 6
goto_if_lt PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 85
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 85
msgbox PetalburgCity_Gym_Text_17B870, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
@@ -614,132 +614,132 @@ PetalburgCity_Gym_EventScript_154BC3:: @ 8154BC3
lockall
compare VAR_PETALBURG_GYM_STATE, 6
goto_if_lt PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 98
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 98
msgbox PetalburgCity_Gym_Text_17B8D4, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154BF8:: @ 8154BF8
lockall
goto_if_trainer_not_defeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 46
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 46
msgbox PetalburgCity_Gym_Text_17B90F, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154C2B:: @ 8154C2B
lockall
goto_if_trainer_not_defeated TRAINER_RANDALL, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 59
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 59
msgbox PetalburgCity_Gym_Text_17B950, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154C5E:: @ 8154C5E
lockall
goto_if_trainer_not_defeated TRAINER_MARY, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 59
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 59
msgbox PetalburgCity_Gym_Text_17B950, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154C91:: @ 8154C91
lockall
goto_if_trainer_not_defeated TRAINER_MARY, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 72
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 72
msgbox PetalburgCity_Gym_Text_17B98A, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154CC4:: @ 8154CC4
lockall
goto_if_trainer_not_defeated TRAINER_PARKER, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 20
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 20
msgbox PetalburgCity_Gym_Text_17B9C5, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154CF7:: @ 8154CF7
lockall
goto_if_trainer_not_defeated TRAINER_LORI, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 20
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 20
msgbox PetalburgCity_Gym_Text_17B9C5, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154D2A:: @ 8154D2A
lockall
goto_if_trainer_not_defeated TRAINER_LORI, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 33
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 33
msgbox PetalburgCity_Gym_Text_17BA00, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154D5D:: @ 8154D5D
lockall
goto_if_trainer_not_defeated TRAINER_GEORGE, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 33
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 33
msgbox PetalburgCity_Gym_Text_17BA00, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154D90:: @ 8154D90
lockall
goto_if_trainer_not_defeated TRAINER_JODY, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 7
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 7
msgbox PetalburgCity_Gym_Text_17BA3D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
PetalburgCity_Gym_EventScript_154DC3:: @ 8154DC3
lockall
goto_if_trainer_not_defeated TRAINER_BERKE, PetalburgCity_Gym_EventScript_154BB9
- setvar VAR_SPECIAL_8, 7
- setvar VAR_SPECIAL_9, 7
+ setvar VAR_0x8008, 7
+ setvar VAR_0x8009, 7
msgbox PetalburgCity_Gym_Text_17BA3D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq PetalburgCity_Gym_EventScript_154BA8
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq PetalburgCity_Gym_EventScript_154BB7
end
@@ -750,7 +750,7 @@ PetalburgCity_Gym_EventScript_154DF6:: @ 8154DF6
end
PetalburgCity_Gym_EventScript_154E1A:: @ 8154E1A
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_154FBB
special DrawWholeMapView
release
@@ -767,7 +767,7 @@ PetalburgCity_Gym_EventScript_154E32:: @ 8154E32
end
PetalburgCity_Gym_EventScript_154E56:: @ 8154E56
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_154FFD
special DrawWholeMapView
release
@@ -784,7 +784,7 @@ PetalburgCity_Gym_EventScript_154E6E:: @ 8154E6E
end
PetalburgCity_Gym_EventScript_154E92:: @ 8154E92
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_15503F
special DrawWholeMapView
release
@@ -801,7 +801,7 @@ PetalburgCity_Gym_EventScript_154EAA:: @ 8154EAA
end
PetalburgCity_Gym_EventScript_154ECE:: @ 8154ECE
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_155081
special DrawWholeMapView
release
@@ -818,7 +818,7 @@ PetalburgCity_Gym_EventScript_154EE6:: @ 8154EE6
end
PetalburgCity_Gym_EventScript_154F0A:: @ 8154F0A
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_154FDC
special DrawWholeMapView
release
@@ -835,7 +835,7 @@ PetalburgCity_Gym_EventScript_154F22:: @ 8154F22
end
PetalburgCity_Gym_EventScript_154F46:: @ 8154F46
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_15501E
special DrawWholeMapView
release
@@ -852,7 +852,7 @@ PetalburgCity_Gym_EventScript_154F5E:: @ 8154F5E
end
PetalburgCity_Gym_EventScript_154F82:: @ 8154F82
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
call PetalburgCity_Gym_EventScript_155060
special DrawWholeMapView
release
@@ -863,73 +863,73 @@ PetalburgCity_Gym_EventScript_154F91:: @ 8154F91
end
PetalburgCity_Gym_EventScript_154F9A:: @ 8154F9A
- setvar VAR_SPECIAL_4, 1
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 1
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_1550A2
return
PetalburgCity_Gym_EventScript_154FBB:: @ 8154FBB
- setvar VAR_SPECIAL_4, 2
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 2
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_1550C7
return
PetalburgCity_Gym_EventScript_154FDC:: @ 8154FDC
- setvar VAR_SPECIAL_4, 3
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 3
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_1550EC
return
PetalburgCity_Gym_EventScript_154FFD:: @ 8154FFD
- setvar VAR_SPECIAL_4, 4
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 4
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_155111
return
PetalburgCity_Gym_EventScript_15501E:: @ 815501E
- setvar VAR_SPECIAL_4, 5
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 5
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_155124
return
PetalburgCity_Gym_EventScript_15503F:: @ 815503F
- setvar VAR_SPECIAL_4, 6
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 6
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_155149
return
PetalburgCity_Gym_EventScript_155060:: @ 8155060
- setvar VAR_SPECIAL_4, 7
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 7
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_15515C
return
PetalburgCity_Gym_EventScript_155081:: @ 8155081
- setvar VAR_SPECIAL_4, 8
- compare VAR_SPECIAL_5, 0
+ setvar VAR_0x8004, 8
+ compare VAR_0x8005, 0
call_if_eq PetalburgCity_Gym_EventScript_155182
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_15516F
return
diff --git a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
index 6753865e0..eff4c8650 100644
--- a/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/PetalburgCity_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ PetalburgCity_PokemonCenter_1F_MapScript1_15520A:: @ 815520A
end
PetalburgCity_PokemonCenter_1F_EventScript_155213:: @ 8155213
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call PetalburgCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
@@ -27,8 +27,8 @@ PetalburgCity_PokemonCenter_1F_EventScript_155233:: @ 8155233
lock
faceplayer
msgbox PetalburgCity_PokemonCenter_1F_Text_17BDC5, 4
- specialvar RESULT, IsStarterInParty
- compare RESULT, 1
+ specialvar VAR_RESULT, IsStarterInParty
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_15524F
release
end
diff --git a/data/maps/PetalburgWoods/scripts.inc b/data/maps/PetalburgWoods/scripts.inc
index 8d1651d3a..57e4d1478 100644
--- a/data/maps/PetalburgWoods/scripts.inc
+++ b/data/maps/PetalburgWoods/scripts.inc
@@ -91,7 +91,7 @@ PetalburgWoods_EventScript_15CDFA:: @ 815CDFA
waitmovement 0
msgbox PetalburgWoods_Text_19507E, 4
giveitem_std ITEM_GREAT_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgWoods_EventScript_15CE3F
goto PetalburgWoods_EventScript_15CE4D
end
@@ -244,7 +244,7 @@ PetalburgWoods_EventScript_15CEDC:: @ 815CEDC
goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_15CF0B
msgbox PetalburgWoods_Text_19549E, 4
giveitem_std ITEM_MIRACLE_SEED
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgWoods_EventScript_1A029B
setflag FLAG_RECEIVED_MIRACLE_SEED
release
@@ -270,8 +270,8 @@ PetalburgWoods_EventScript_15CF27:: @ 815CF27
PetalburgWoods_EventScript_15CF3E:: @ 815CF3E
trainerbattle 0, TRAINER_JAMES_1, 0, PetalburgWoods_Text_19526A, PetalburgWoods_Text_1952AE
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq PetalburgWoods_EventScript_15CF65
msgbox PetalburgWoods_Text_1952CC, 6
end
diff --git a/data/maps/Route102/scripts.inc b/data/maps/Route102/scripts.inc
index 758d05d45..bdc1803c2 100644
--- a/data/maps/Route102/scripts.inc
+++ b/data/maps/Route102/scripts.inc
@@ -19,8 +19,8 @@ Route102_EventScript_14EAF5:: @ 814EAF5
Route102_EventScript_14EAFE:: @ 814EAFE
trainerbattle 0, TRAINER_CALVIN_1, 0, Route102_Text_1B79C3, Route102_Text_1B7A2C
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route102_EventScript_14EB25
msgbox Route102_Text_1B7A60, 6
end
diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc
index 625fc5271..ec9ae2420 100644
--- a/data/maps/Route103/scripts.inc
+++ b/data/maps/Route103/scripts.inc
@@ -10,9 +10,9 @@ Route103_MapScript1_14EB87:: @ 814EB87
Route103_EventScript_14EB92:: @ 814EB92
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route103_EventScript_14EBAB
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route103_EventScript_14EC04
end
@@ -90,7 +90,7 @@ Route103_EventScript_14ECCB:: @ 814ECCB
Route103_EventScript_14ECD9:: @ 814ECD9
closemessage
- switch FACING
+ switch VAR_FACING
case 1, Route103_EventScript_14ED29
case 2, Route103_EventScript_14ED0C
case 3, Route103_EventScript_14ED29
@@ -173,8 +173,8 @@ Route103_EventScript_14ED94:: @ 814ED94
Route103_EventScript_14EDAB:: @ 814EDAB
trainerbattle 4, TRAINER_AMY_AND_LIV_1, 0, Route103_Text_1B7DF7, Route103_Text_1B7E3B, Route103_Text_1B7EAC
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route103_EventScript_14EDD6
msgbox Route103_Text_1B7E50, 6
end
@@ -186,8 +186,8 @@ Route103_EventScript_14EDD6:: @ 814EDD6
Route103_EventScript_14EDF1:: @ 814EDF1
trainerbattle 4, TRAINER_AMY_AND_LIV_1, 0, Route103_Text_1B7EFB, Route103_Text_1B7F20, Route103_Text_1B7F8E
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route103_EventScript_14EE1C
msgbox Route103_Text_1B7F40, 6
end
@@ -204,8 +204,8 @@ Route103_EventScript_14EE37:: @ 814EE37
Route103_EventScript_14EE4E:: @ 814EE4E
trainerbattle 0, TRAINER_MIGUEL_1, 0, Route103_Text_1B82A9, Route103_Text_1B82EC
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route103_EventScript_14EE75
msgbox Route103_Text_1B830D, 6
end
diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc
index 9b055f134..9e475791f 100644
--- a/data/maps/Route104/scripts.inc
+++ b/data/maps/Route104/scripts.inc
@@ -32,7 +32,7 @@ Route104_EventScript_14EEC8:: @ 814EEC8
goto_if_set FLAG_RECEIVED_CHESTO_BERRY_ROUTE104, Route104_EventScript_14EEFF
msgbox Route104_Text_1C55B9, 4
giveitem_std ITEM_CHESTO_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route104_EventScript_1A029B
setflag FLAG_RECEIVED_CHESTO_BERRY_ROUTE104
msgbox Route104_Text_1C5665, 4
@@ -50,7 +50,7 @@ Route104_EventScript_14EF09:: @ 814EF09
goto_if_set FLAG_RECEIVED_WHITE_HERB, Route104_EventScript_14EF38
msgbox Route104_Text_16DD91, 4
giveitem_std ITEM_WHITE_HERB
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route104_EventScript_1A029B
setflag FLAG_RECEIVED_WHITE_HERB
release
@@ -103,7 +103,7 @@ Route104_EventScript_14EF93:: @ 814EF93
goto_if_set FLAG_RECEIVED_TM09, Route104_EventScript_14EFC2
msgbox Route104_Text_16DC5F, 4
giveitem_std ITEM_TM09_BULLET_SEED
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route104_EventScript_1A029B
setflag FLAG_RECEIVED_TM09
release
@@ -148,7 +148,7 @@ Route104_EventScript_14EFD5:: @ 814EFD5
call Route104_EventScript_1A02EF
setflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104
hideobjectat 7, MAP_ROUTE104
- copyvar VAR_BRINEY_LOCATION, VAR_SPECIAL_8
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority 255, MAP_ROUTE104
resetobjectpriority 2, MAP_DEWFORD_TOWN
moveobjectoffscreen 2
@@ -402,8 +402,8 @@ Route104_EventScript_14F189:: @ 814F189
Route104_EventScript_14F1A0:: @ 814F1A0
trainerbattle 0, TRAINER_HALEY_1, 0, Route104_Text_1B8770, Route104_Text_1B87A7
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route104_EventScript_14F1C7
msgbox Route104_Text_1B87C3, 6
end
@@ -415,8 +415,8 @@ Route104_EventScript_14F1C7:: @ 814F1C7
Route104_EventScript_14F1DE:: @ 814F1DE
trainerbattle 0, TRAINER_WINSTON_1, 0, Route104_Text_1B88D4, Route104_Text_1B8911
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route104_EventScript_14F205
msgbox Route104_Text_1B8925, 6
end
@@ -428,8 +428,8 @@ Route104_EventScript_14F205:: @ 814F205
Route104_EventScript_14F21C:: @ 814F21C
trainerbattle 0, TRAINER_CINDY_1, 0, Route104_Text_1B8A24, Route104_Text_1B8A61
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route104_EventScript_14F243
msgbox Route104_Text_1B8A69, 6
end
diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc
index 514b1b9cc..708cc249c 100644
--- a/data/maps/Route104_MrBrineysHouse/scripts.inc
+++ b/data/maps/Route104_MrBrineysHouse/scripts.inc
@@ -33,7 +33,7 @@ Route104_MrBrineysHouse_EventScript_15BD0E:: @ 815BD0E
setflag FLAG_MR_BRINEY_SAILING_INTRO
msgbox Route104_MrBrineysHouse_Text_191A82, 4
msgbox Route104_MrBrineysHouse_Text_191AAD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97
goto Route104_MrBrineysHouse_EventScript_15BDAB
end
@@ -42,7 +42,7 @@ Route104_MrBrineysHouse_EventScript_15BD32:: @ 815BD32
message Route104_MrBrineysHouse_Text_191E80
waitmessage
multichoicedefault 21, 8, 14, 1, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route104_MrBrineysHouse_EventScript_15BDAB
case 1, Route104_MrBrineysHouse_EventScript_15BDA1
case 127, Route104_MrBrineysHouse_EventScript_15BDA1
@@ -50,14 +50,14 @@ Route104_MrBrineysHouse_EventScript_15BD32:: @ 815BD32
Route104_MrBrineysHouse_EventScript_15BD65:: @ 815BD65
msgbox Route104_MrBrineysHouse_Text_191CC3, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97
goto Route104_MrBrineysHouse_EventScript_15BDAB
end
Route104_MrBrineysHouse_EventScript_15BD7E:: @ 815BD7E
msgbox Route104_MrBrineysHouse_Text_191DA6, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97
goto Route104_MrBrineysHouse_EventScript_15BDAB
end
diff --git a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
index 5e70a8ec2..fa9d98c16 100644
--- a/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
+++ b/data/maps/Route104_PrettyPetalFlowerShop/scripts.inc
@@ -21,18 +21,18 @@ Route104_PrettyPetalFlowerShop_EventScript_15BE0B:: @ 815BE0B
goto_if_set FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_15BE4A
setflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER
msgbox Route104_PrettyPetalFlowerShop_Text_1C5F48, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE6A
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE73
release
end
Route104_PrettyPetalFlowerShop_EventScript_15BE4A:: @ 815BE4A
msgbox Route104_PrettyPetalFlowerShop_Text_1C5F1B, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE6A
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE73
release
end
@@ -88,9 +88,9 @@ Route104_PrettyPetalFlowerShop_EventScript_15BEDA:: @ 815BEDA
goto_if_set FLAG_DAILY_RECEIVED_BERRY_FLOWER_SHOP, Route104_PrettyPetalFlowerShop_EventScript_15BF1A
msgbox Route104_PrettyPetalFlowerShop_Text_1C62DA, 4
random 8
- addvar RESULT, ITEM_CHERI_BERRY
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, ITEM_CHERI_BERRY
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_FLOWER_SHOP
msgbox Route104_PrettyPetalFlowerShop_Text_1C6335, 4
diff --git a/data/maps/Route106/scripts.inc b/data/maps/Route106/scripts.inc
index 16132e530..1fe49235b 100644
--- a/data/maps/Route106/scripts.inc
+++ b/data/maps/Route106/scripts.inc
@@ -17,8 +17,8 @@ Route106_EventScript_14F34F:: @ 814F34F
Route106_EventScript_14F366:: @ 814F366
trainerbattle 0, TRAINER_ELLIOT_1, 0, Route106_Text_1B8EF0, Route106_Text_1B8F25
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route106_EventScript_14F38D
msgbox Route106_Text_1B8F55, 6
end
diff --git a/data/maps/Route107/scripts.inc b/data/maps/Route107/scripts.inc
index 3f8d2dc0f..5ad30f9f4 100644
--- a/data/maps/Route107/scripts.inc
+++ b/data/maps/Route107/scripts.inc
@@ -8,8 +8,8 @@ Route107_EventScript_14F3BC:: @ 814F3BC
Route107_EventScript_14F3D3:: @ 814F3D3
trainerbattle 0, TRAINER_TONY_1, 0, Route107_Text_1B933A, Route107_Text_1B9365
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route107_EventScript_14F3FA
msgbox Route107_Text_1B938E, 6
end
diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc
index 899952d1a..eeb21cacf 100644
--- a/data/maps/Route109/scripts.inc
+++ b/data/maps/Route109/scripts.inc
@@ -8,7 +8,7 @@ Route109_EventScript_14F4D3:: @ 814F4D3
applymovement 2, Route109_Movement_14F67B
waitmovement 0
removeobject 2
- switch FACING
+ switch VAR_FACING
case 1, Route109_EventScript_14F518
case 3, Route109_EventScript_14F538
case 4, Route109_EventScript_14F528
@@ -54,7 +54,7 @@ Route109_EventScript_14F548:: @ 814F548
hideobjectat 1, MAP_ROUTE109
msgbox Route109_Text_16B4B5, 4
closemessage
- copyvar VAR_BRINEY_LOCATION, VAR_SPECIAL_8
+ copyvar VAR_BRINEY_LOCATION, VAR_0x8008
resetobjectpriority 255, MAP_ROUTE109
resetobjectpriority 2, MAP_DEWFORD_TOWN
moveobjectoffscreen 2
@@ -278,7 +278,7 @@ Route109_EventScript_14F680:: @ 814F680
Route109_EventScript_14F691:: @ 814F691
message Route109_Text_16E0F9
msgbox Route109_Text_16E0F9, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route109_EventScript_14F6F1
goto Route109_EventScript_14F6E2
end
@@ -287,7 +287,7 @@ Route109_EventScript_14F6AF:: @ 814F6AF
message Route109_Text_16E26A
waitmessage
multichoicedefault 21, 8, 14, 1, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route109_EventScript_14F6E2
case 1, Route109_EventScript_14F6FB
case 127, Route109_EventScript_14F6FB
@@ -318,7 +318,7 @@ Route109_EventScript_14F70E:: @ 814F70E
faceplayer
msgbox Route109_Text_16E405, 4
closemessage
- applymovement LAST_TALKED, Route109_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route109_Movement_1A083D
waitmovement 0
release
end
@@ -330,10 +330,10 @@ Route109_EventScript_14F725:: @ 814F725
goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_14F762
msgbox Route109_Text_16E433, 4
giveitem_std ITEM_SOFT_SAND
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route109_EventScript_1A029B
closemessage
- applymovement LAST_TALKED, Route109_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route109_Movement_1A083D
waitmovement 0
setflag FLAG_RECEIVED_SOFT_SAND
release
@@ -341,7 +341,7 @@ Route109_EventScript_14F725:: @ 814F725
Route109_EventScript_14F762:: @ 814F762
msgbox Route109_Text_16E446, 4
- applymovement LAST_TALKED, Route109_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route109_Movement_1A083D
waitmovement 0
release
end
@@ -394,8 +394,8 @@ Route109_EventScript_14F7F2:: @ 814F7F2
Route109_EventScript_14F809:: @ 814F809
trainerbattle 0, TRAINER_RICKY_1, 0, Route109_Text_1B9C23, Route109_Text_1B9C65
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route109_EventScript_14F830
msgbox Route109_Text_1B9C6E, 6
end
@@ -407,8 +407,8 @@ Route109_EventScript_14F830:: @ 814F830
Route109_EventScript_14F847:: @ 814F847
trainerbattle 0, TRAINER_LOLA_1, 0, Route109_Text_1B9D54, Route109_Text_1B9D87
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route109_EventScript_14F86E
msgbox Route109_Text_1B9D8E, 6
end
diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc
index 1506e18f9..b4a731471 100644
--- a/data/maps/Route109_SeashoreHouse/scripts.inc
+++ b/data/maps/Route109_SeashoreHouse/scripts.inc
@@ -25,7 +25,7 @@ Route109_SeashoreHouse_EventScript_160DFE:: @ 8160DFE
Route109_SeashoreHouse_EventScript_160E08:: @ 8160E08
msgbox Route109_SeashoreHouse_Text_19B609, 4
giveitem_std ITEM_SODA_POP, 6
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route109_SeashoreHouse_EventScript_160E2C
setflag FLAG_RECEIVED_6_SODA_POP
release
@@ -40,7 +40,7 @@ Route109_SeashoreHouse_EventScript_160E36:: @ 8160E36
showmoneybox 0, 0
nop
msgbox Route109_SeashoreHouse_Text_19B702, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route109_SeashoreHouse_EventScript_160E5A
msgbox Route109_SeashoreHouse_Text_19B773, 4
hidemoneybox 0, 0
@@ -49,10 +49,10 @@ Route109_SeashoreHouse_EventScript_160E36:: @ 8160E36
Route109_SeashoreHouse_EventScript_160E5A:: @ 8160E5A
checkmoney 0x12c, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route109_SeashoreHouse_EventScript_160E9E
checkitemspace ITEM_SODA_POP, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route109_SeashoreHouse_EventScript_160EAB
msgbox Route109_SeashoreHouse_Text_19B74C, 4
takemoney 0x12c, 0
diff --git a/data/maps/Route110/scripts.inc b/data/maps/Route110/scripts.inc
index 93333ce56..077770cd2 100644
--- a/data/maps/Route110/scripts.inc
+++ b/data/maps/Route110/scripts.inc
@@ -33,7 +33,7 @@ Route110_EventScript_14F946:: @ 814F946
lock
faceplayer
msgbox Route110_Text_16E6C0, 4
- applymovement LAST_TALKED, Route110_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route110_Movement_1A083D
waitmovement 0
release
end
@@ -42,7 +42,7 @@ Route110_EventScript_14F95C:: @ 814F95C
lock
faceplayer
msgbox Route110_Text_16E6F2, 4
- applymovement LAST_TALKED, Route110_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route110_Movement_1A083D
waitmovement 0
release
end
@@ -51,7 +51,7 @@ Route110_EventScript_14F972:: @ 814F972
lock
faceplayer
msgbox Route110_Text_16E729, 4
- applymovement LAST_TALKED, Route110_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route110_Movement_1A083D
waitmovement 0
release
end
@@ -60,7 +60,7 @@ Route110_EventScript_14F988:: @ 814F988
lock
faceplayer
msgbox Route110_Text_16E76A, 4
- applymovement LAST_TALKED, Route110_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route110_Movement_1A083D
waitmovement 0
release
end
@@ -131,8 +131,8 @@ Route110_EventScript_14FA25:: @ 814FA25
Route110_EventScript_14FA2E:: @ 814FA2E
lockall
- specialvar RESULT, GetRecordedCyclingRoadResults
- compare RESULT, 0
+ specialvar VAR_RESULT, GetRecordedCyclingRoadResults
+ compare VAR_RESULT, 0
goto_if_eq Route110_EventScript_14FA49
msgbox Route110_Text_16F53A, 4
releaseall
@@ -146,8 +146,8 @@ Route110_EventScript_14FA49:: @ 814FA49
Route110_EventScript_14FA53:: @ 814FA53
lock
faceplayer
- specialvar RESULT, GetPlayerAvatarBike
- compare RESULT, 1
+ specialvar VAR_RESULT, GetPlayerAvatarBike
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FA84
compare VAR_CYCLING_CHALLENGE_STATE, 0
goto_if_eq Route110_EventScript_14FA7A
@@ -177,8 +177,8 @@ Route110_EventScript_14FAA5:: @ 814FAA5
Route110_EventScript_14FABC:: @ 814FABC
trainerbattle 0, TRAINER_EDWIN_1, 0, Route110_Text_1BA7D2, Route110_Text_1BA803
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FAE3
msgbox Route110_Text_1BA829, 6
end
@@ -205,8 +205,8 @@ Route110_EventScript_14FB28:: @ 814FB28
Route110_EventScript_14FB3F:: @ 814FB3F
trainerbattle 0, TRAINER_BENJAMIN_1, 0, Route110_Text_1BA352, Route110_Text_1BA379
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FB66
msgbox Route110_Text_1BA3A5, 6
end
@@ -223,8 +223,8 @@ Route110_EventScript_14FB7D:: @ 814FB7D
Route110_EventScript_14FB94:: @ 814FB94
trainerbattle 0, TRAINER_ABIGAIL_1, 0, Route110_Text_1BA4A0, Route110_Text_1BA50F
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FBBB
msgbox Route110_Text_1BA52E, 6
end
@@ -236,8 +236,8 @@ Route110_EventScript_14FBBB:: @ 814FBBB
Route110_EventScript_14FBD2:: @ 814FBD2
trainerbattle 0, TRAINER_ISABEL_1, 0, Route110_Text_1BA990, Route110_Text_1BA9D0
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FBF9
msgbox Route110_Text_1BA9E9, 6
end
@@ -263,7 +263,7 @@ Route110_EventScript_14FC27:: @ 814FC27
Route110_EventScript_14FC39:: @ 814FC39
special FinishCyclingRoadChallenge
msgbox Route110_Text_16EF65, 4
- switch RESULT
+ switch VAR_RESULT
case 10, Route110_EventScript_14FCC3
case 9, Route110_EventScript_14FCD1
case 8, Route110_EventScript_14FCD1
@@ -309,26 +309,26 @@ Route110_EventScript_14FD09:: @ 814FD09
return
Route110_EventScript_14FD13:: @ 814FD13
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto Route110_EventScript_14FD34
end
Route110_EventScript_14FD1E:: @ 814FD1E
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto Route110_EventScript_14FD34
end
Route110_EventScript_14FD29:: @ 814FD29
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto Route110_EventScript_14FD34
end
Route110_EventScript_14FD34:: @ 814FD34
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_EventScript_14FDA7
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route110_EventScript_14FDAC
applymovement 28, Route110_Movement_1A0845
waitmovement 0
@@ -337,16 +337,16 @@ Route110_EventScript_14FD34:: @ 814FD34
applymovement 28, Route110_Movement_1A0835
waitmovement 0
delay 30
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq Route110_EventScript_14FF14
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq Route110_EventScript_14FF1F
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq Route110_EventScript_14FF2A
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route110_EventScript_14FDB1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_EventScript_14FE2B
releaseall
end
@@ -425,22 +425,22 @@ Route110_EventScript_14FEA5:: @ 814FEA5
Route110_EventScript_14FEB2:: @ 814FEB2
closemessage
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq Route110_EventScript_14FF56
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq Route110_EventScript_14FF5E
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq Route110_EventScript_14FF66
setobjectmovementtype 28, 10
setobjectmovementtype 29, 10
removeobject 28
addobject 29
delay 45
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq Route110_EventScript_14FF35
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq Route110_EventScript_14FF40
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq Route110_EventScript_14FF4B
removeobject 29
setvar VAR_ROUTE110_STATE, 1
diff --git a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc
index 8d6465c89..35809885d 100644
--- a/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc
+++ b/data/maps/Route110_SeasideCyclingRoadNorthEntrance/scripts.inc
@@ -23,10 +23,10 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634EB:: @ 81634EB
Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634F7:: @ 81634F7
@ Coord event directly in front of the gatesman heading left to right
lockall
- specialvar RESULT, GetPlayerAvatarBike @ player state?
- compare RESULT, 2
+ specialvar VAR_RESULT, GetPlayerAvatarBike @ player state?
+ compare VAR_RESULT, 2
call_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523
setflag FLAG_SYS_CYCLING_ROAD
setvar VAR_TEMP_1, 1
diff --git a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
index edae49291..67ef10af6 100644
--- a/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
+++ b/data/maps/Route110_SeasideCyclingRoadSouthEntrance/scripts.inc
@@ -10,8 +10,8 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_16347F:: @ 816347F
Route110_SeasideCyclingRoadSouthEntrance_EventScript_16348B:: @ 816348B
lockall
- specialvar RESULT, GetPlayerAvatarBike
- compare RESULT, 0
+ specialvar VAR_RESULT, GetPlayerAvatarBike
+ compare VAR_RESULT, 0
goto_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_1634A6
setflag FLAG_SYS_CYCLING_ROAD
setvar VAR_TEMP_1, 1
diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc
index 4817f3f2e..f294ea2b2 100644
--- a/data/maps/Route110_TrickHouseEnd/scripts.inc
+++ b/data/maps/Route110_TrickHouseEnd/scripts.inc
@@ -61,7 +61,7 @@ Route110_TrickHouseEnd_EventScript_161A0B:: @ 8161A0B
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_RARE_CANDY
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -74,7 +74,7 @@ Route110_TrickHouseEnd_EventScript_161A47:: @ 8161A47
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TIMER_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -87,7 +87,7 @@ Route110_TrickHouseEnd_EventScript_161A83:: @ 8161A83
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_HARD_STONE
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -100,7 +100,7 @@ Route110_TrickHouseEnd_EventScript_161ABF:: @ 8161ABF
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_SMOKE_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -113,7 +113,7 @@ Route110_TrickHouseEnd_EventScript_161AFB:: @ 8161AFB
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TM12_TAUNT
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -126,7 +126,7 @@ Route110_TrickHouseEnd_EventScript_161B37:: @ 8161B37
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_MAGNET
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -139,7 +139,7 @@ Route110_TrickHouseEnd_EventScript_161B73:: @ 8161B73
msgbox Route110_TrickHouseEnd_Text_19C90B, 4
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_PP_MAX
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
@@ -150,13 +150,13 @@ Route110_TrickHouseEnd_EventScript_161B73:: @ 8161B73
Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF
msgbox Route110_TrickHouseEnd_Text_19C5AF, 4
closemessage
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq Route110_TrickHouseEnd_EventScript_161C74
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route110_TrickHouseEnd_EventScript_161C7F
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq Route110_TrickHouseEnd_EventScript_161C8A
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route110_TrickHouseEnd_EventScript_161C95
delay 30
msgbox Route110_TrickHouseEnd_Text_19C602, 4
@@ -171,7 +171,7 @@ Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF
.else
givedecoration_std DECOR_RED_TENT
.endc
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEnd_EventScript_161C61
msgbox Route110_TrickHouseEnd_Text_19C85C, 4
call Route110_TrickHouseEnd_EventScript_161C2E
diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc
index 19d5a606d..ae36aa84a 100644
--- a/data/maps/Route110_TrickHouseEntrance/scripts.inc
+++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc
@@ -362,9 +362,9 @@ Route110_TrickHouseEntrance_EventScript_16136E:: @ 816136E
Route110_TrickHouseEntrance_EventScript_1613CE:: @ 81613CE
giveitem_std ITEM_RARE_CANDY
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -372,9 +372,9 @@ Route110_TrickHouseEntrance_EventScript_1613CE:: @ 81613CE
Route110_TrickHouseEntrance_EventScript_1613FA:: @ 81613FA
giveitem_std ITEM_TIMER_BALL
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -382,9 +382,9 @@ Route110_TrickHouseEntrance_EventScript_1613FA:: @ 81613FA
Route110_TrickHouseEntrance_EventScript_161426:: @ 8161426
giveitem_std ITEM_HARD_STONE
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -392,9 +392,9 @@ Route110_TrickHouseEntrance_EventScript_161426:: @ 8161426
Route110_TrickHouseEntrance_EventScript_161452:: @ 8161452
giveitem_std ITEM_SMOKE_BALL
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -402,9 +402,9 @@ Route110_TrickHouseEntrance_EventScript_161452:: @ 8161452
Route110_TrickHouseEntrance_EventScript_16147E:: @ 816147E
giveitem_std ITEM_TM12_TAUNT
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -412,9 +412,9 @@ Route110_TrickHouseEntrance_EventScript_16147E:: @ 816147E
Route110_TrickHouseEntrance_EventScript_1614AA:: @ 81614AA
giveitem_std ITEM_MAGNET
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -422,9 +422,9 @@ Route110_TrickHouseEntrance_EventScript_1614AA:: @ 81614AA
Route110_TrickHouseEntrance_EventScript_1614D6:: @ 81614D6
giveitem_std ITEM_PP_MAX
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
@@ -447,9 +447,9 @@ Route110_TrickHouseEntrance_EventScript_161518:: @ 8161518
.else
givedecoration_std DECOR_RED_TENT
.endif
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161551
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route110_TrickHouseEntrance_EventScript_1A02B8
msgbox Route110_TrickHouseEntrance_Text_19C18D, 4
releaseall
@@ -488,7 +488,7 @@ Route110_TrickHouseEntrance_EventScript_1615BD:: @ 81615BD
Route110_TrickHouseEntrance_EventScript_1615C7:: @ 81615C7
msgbox Route110_TrickHouseEntrance_Text_19BE7D, MSGBOX_YESNO
closemessage
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route110_TrickHouseEntrance_EventScript_1615DD
releaseall
end
@@ -729,23 +729,23 @@ Route110_TrickHouseEntrance_EventScript_1618B0:: @ 81618B0
end
Route110_TrickHouseEntrance_EventScript_1618E1:: @ 81618E1
- setvar VAR_SPECIAL_4, 6
- setvar VAR_SPECIAL_5, 3
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 6
+ setvar VAR_0x8005, 3
+ setvar VAR_0x8006, 0
call Route110_TrickHouseEntrance_EventScript_161920
return
Route110_TrickHouseEntrance_EventScript_1618F6:: @ 81618F6
- setvar VAR_SPECIAL_4, 11
- setvar VAR_SPECIAL_5, 5
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 11
+ setvar VAR_0x8005, 5
+ setvar VAR_0x8006, 0
call Route110_TrickHouseEntrance_EventScript_161920
return
Route110_TrickHouseEntrance_EventScript_16190B:: @ 816190B
- setvar VAR_SPECIAL_4, 9
- setvar VAR_SPECIAL_5, 2
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8004, 9
+ setvar VAR_0x8005, 2
+ setvar VAR_0x8006, 0
call Route110_TrickHouseEntrance_EventScript_161920
return
diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
index a7f283b2d..51fdc9afb 100644
--- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
@@ -173,7 +173,7 @@ Route110_TrickHousePuzzle5_EventScript_16293F:: @ 816293F
call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D423, 4
random 3
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162B83
case 1, Route110_TrickHousePuzzle5_EventScript_162BA6
case 2, Route110_TrickHousePuzzle5_EventScript_162BC9
@@ -195,7 +195,7 @@ Route110_TrickHousePuzzle5_EventScript_1629B3:: @ 81629B3
call_if_eq Route110_TrickHousePuzzle5_EventScript_162F0B
msgbox Route110_TrickHousePuzzle5_Text_19D636, 4
random 3
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162BEC
case 1, Route110_TrickHousePuzzle5_EventScript_162C0F
case 2, Route110_TrickHousePuzzle5_EventScript_162C32
@@ -217,7 +217,7 @@ Route110_TrickHousePuzzle5_EventScript_162A27:: @ 8162A27
call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D7D3, 4
random 3
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162C55
case 1, Route110_TrickHousePuzzle5_EventScript_162C78
case 2, Route110_TrickHousePuzzle5_EventScript_162C9B
@@ -239,7 +239,7 @@ Route110_TrickHousePuzzle5_EventScript_162A9B:: @ 8162A9B
call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D93D, 4
random 3
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162CBE
case 1, Route110_TrickHousePuzzle5_EventScript_162CE1
case 2, Route110_TrickHousePuzzle5_EventScript_162D04
@@ -261,7 +261,7 @@ Route110_TrickHousePuzzle5_EventScript_162B0F:: @ 8162B0F
call_if_eq Route110_TrickHousePuzzle5_EventScript_162F0B
msgbox Route110_TrickHousePuzzle5_Text_19DA9A, 4
random 3
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162D27
case 1, Route110_TrickHousePuzzle5_EventScript_162D4A
case 2, Route110_TrickHousePuzzle5_EventScript_162D6D
@@ -270,7 +270,7 @@ Route110_TrickHousePuzzle5_EventScript_162B0F:: @ 8162B0F
Route110_TrickHousePuzzle5_EventScript_162B83:: @ 8162B83
msgbox Route110_TrickHousePuzzle5_Text_19D4AE, 4
multichoice 0, 0, 25, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -278,7 +278,7 @@ Route110_TrickHousePuzzle5_EventScript_162B83:: @ 8162B83
Route110_TrickHousePuzzle5_EventScript_162BA6:: @ 8162BA6
msgbox Route110_TrickHousePuzzle5_Text_19D501, 4
multichoice 0, 0, 26, 1
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -286,7 +286,7 @@ Route110_TrickHousePuzzle5_EventScript_162BA6:: @ 8162BA6
Route110_TrickHousePuzzle5_EventScript_162BC9:: @ 8162BC9
msgbox Route110_TrickHousePuzzle5_Text_19D553, 4
multichoice 0, 0, 27, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -294,7 +294,7 @@ Route110_TrickHousePuzzle5_EventScript_162BC9:: @ 8162BC9
Route110_TrickHousePuzzle5_EventScript_162BEC:: @ 8162BEC
msgbox Route110_TrickHousePuzzle5_Text_19D68E, 4
multichoice 0, 0, 28, 1
- switch RESULT
+ switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -302,7 +302,7 @@ Route110_TrickHousePuzzle5_EventScript_162BEC:: @ 8162BEC
Route110_TrickHousePuzzle5_EventScript_162C0F:: @ 8162C0F
msgbox Route110_TrickHousePuzzle5_Text_19D6EC, 4
multichoice 0, 0, 29, 1
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -310,7 +310,7 @@ Route110_TrickHousePuzzle5_EventScript_162C0F:: @ 8162C0F
Route110_TrickHousePuzzle5_EventScript_162C32:: @ 8162C32
msgbox Route110_TrickHousePuzzle5_Text_19D745, 4
multichoice 0, 0, 30, 1
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -318,7 +318,7 @@ Route110_TrickHousePuzzle5_EventScript_162C32:: @ 8162C32
Route110_TrickHousePuzzle5_EventScript_162C55:: @ 8162C55
msgbox Route110_TrickHousePuzzle5_Text_19D81B, 4
multichoice 0, 0, 31, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -326,7 +326,7 @@ Route110_TrickHousePuzzle5_EventScript_162C55:: @ 8162C55
Route110_TrickHousePuzzle5_EventScript_162C78:: @ 8162C78
msgbox Route110_TrickHousePuzzle5_Text_19D865, 4
multichoice 0, 0, 32, 1
- switch RESULT
+ switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -334,7 +334,7 @@ Route110_TrickHousePuzzle5_EventScript_162C78:: @ 8162C78
Route110_TrickHousePuzzle5_EventScript_162C9B:: @ 8162C9B
msgbox Route110_TrickHousePuzzle5_Text_19D8BA, 4
multichoice 0, 0, 33, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -342,7 +342,7 @@ Route110_TrickHousePuzzle5_EventScript_162C9B:: @ 8162C9B
Route110_TrickHousePuzzle5_EventScript_162CBE:: @ 8162CBE
msgbox Route110_TrickHousePuzzle5_Text_19D987, 4
multichoice 0, 0, 34, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -350,7 +350,7 @@ Route110_TrickHousePuzzle5_EventScript_162CBE:: @ 8162CBE
Route110_TrickHousePuzzle5_EventScript_162CE1:: @ 8162CE1
msgbox Route110_TrickHousePuzzle5_Text_19D9DC, 4
multichoice 0, 0, 35, 1
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -358,7 +358,7 @@ Route110_TrickHousePuzzle5_EventScript_162CE1:: @ 8162CE1
Route110_TrickHousePuzzle5_EventScript_162D04:: @ 8162D04
msgbox Route110_TrickHousePuzzle5_Text_19DA1D, 4
multichoice 0, 0, 36, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -366,7 +366,7 @@ Route110_TrickHousePuzzle5_EventScript_162D04:: @ 8162D04
Route110_TrickHousePuzzle5_EventScript_162D27:: @ 8162D27
msgbox Route110_TrickHousePuzzle5_Text_19DAEF, 4
multichoice 0, 0, 37, 1
- switch RESULT
+ switch VAR_RESULT
case 1, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -374,7 +374,7 @@ Route110_TrickHousePuzzle5_EventScript_162D27:: @ 8162D27
Route110_TrickHousePuzzle5_EventScript_162D4A:: @ 8162D4A
msgbox Route110_TrickHousePuzzle5_Text_19DB43, 4
multichoice 0, 0, 38, 1
- switch RESULT
+ switch VAR_RESULT
case 0, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
@@ -382,7 +382,7 @@ Route110_TrickHousePuzzle5_EventScript_162D4A:: @ 8162D4A
Route110_TrickHousePuzzle5_EventScript_162D6D:: @ 8162D6D
msgbox Route110_TrickHousePuzzle5_Text_19DB97, 4
multichoice 0, 0, 39, 1
- switch RESULT
+ switch VAR_RESULT
case 2, Route110_TrickHousePuzzle5_EventScript_162DDF
goto Route110_TrickHousePuzzle5_EventScript_162D90
end
diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc
index 4f223e37e..0092d793d 100644
--- a/data/maps/Route111/scripts.inc
+++ b/data/maps/Route111/scripts.inc
@@ -50,7 +50,7 @@ Route111_EventScript_15000D:: @ 815000D
Route111_EventScript_150023:: @ 8150023
lockall
msgbox Route111_Text_16FA54, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route111_EventScript_15005F
giveitem_std ITEM_ROOT_FOSSIL
closemessage
@@ -72,7 +72,7 @@ Route111_EventScript_15005F:: @ 815005F
Route111_EventScript_150069:: @ 8150069
lockall
msgbox Route111_Text_16FAED, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route111_EventScript_1500A5
giveitem_std ITEM_CLAW_FOSSIL
closemessage
@@ -122,7 +122,7 @@ Route111_EventScript_1500C5:: @ 81500C5
goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE111, Route111_EventScript_150100
msgbox Route111_Text_1C56F0, 4
giveitem_std ITEM_RAZZ_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route111_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_ROUTE111
special GetPlayerBigGuyGirlString
@@ -137,31 +137,31 @@ Route111_EventScript_150100:: @ 8150100
@ 815010A
lockall
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto Route111_EventScript_15013A
end
Route111_EventScript_150116:: @ 8150116
lockall
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto Route111_EventScript_15013A
end
Route111_EventScript_150122:: @ 8150122
lockall
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
goto Route111_EventScript_15013A
end
@ 815012E
lockall
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
goto Route111_EventScript_15013A
end
Route111_EventScript_15013A:: @ 815013A
checkitem ITEM_GO_GOGGLES, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route111_EventScript_150151
setvar VAR_TEMP_3, 1
releaseall
@@ -170,13 +170,13 @@ Route111_EventScript_15013A:: @ 815013A
Route111_EventScript_150151:: @ 8150151
msgbox Route111_Text_1A0F93, 4
closemessage
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
call_if_eq Route111_EventScript_150188
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq Route111_EventScript_150193
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
call_if_eq Route111_EventScript_15019E
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
call_if_eq Route111_EventScript_1501A9
releaseall
end
@@ -235,7 +235,7 @@ Route111_EventScript_1501D1:: @ 81501D1
faceplayer
setflag FLAG_LANDMARK_WINSTRATE_FAMILY
msgbox Route111_Text_16F705, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route111_EventScript_1501F3
msgbox Route111_Text_16F785, 4
release
@@ -389,8 +389,8 @@ Route111_EventScript_1503EC:: @ 81503EC
Route111_EventScript_150403:: @ 8150403
trainerbattle 0, TRAINER_DUSTY_1, 0, Route111_Text_1BAEC9, Route111_Text_1BAF14
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route111_EventScript_15042A
msgbox Route111_Text_1BAF5B, 6
end
@@ -417,8 +417,8 @@ Route111_EventScript_15046F:: @ 815046F
Route111_EventScript_150486:: @ 8150486
trainerbattle 0, TRAINER_WILTON_1, 0, Route111_Text_1BB2E3, Route111_Text_1BB313
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route111_EventScript_1504AD
msgbox Route111_Text_1BB33E, 6
end
@@ -430,8 +430,8 @@ Route111_EventScript_1504AD:: @ 81504AD
Route111_EventScript_1504C4:: @ 81504C4
trainerbattle 0, TRAINER_BROOKE_1, 0, Route111_Text_1BB44F, Route111_Text_1BB49F
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route111_EventScript_1504EB
msgbox Route111_Text_1BB4CE, 6
end
diff --git a/data/maps/Route111_OldLadysRestStop/scripts.inc b/data/maps/Route111_OldLadysRestStop/scripts.inc
index 1263c4b83..277b0402c 100644
--- a/data/maps/Route111_OldLadysRestStop/scripts.inc
+++ b/data/maps/Route111_OldLadysRestStop/scripts.inc
@@ -10,9 +10,9 @@ Route111_OldLadysRestStop_EventScript_15BFDB:: @ 815BFDB
lock
faceplayer
msgbox Route111_OldLadysRestStop_Text_1923AF, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route111_OldLadysRestStop_EventScript_15BFFC
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route111_OldLadysRestStop_EventScript_15C029
end
@@ -21,9 +21,9 @@ Route111_OldLadysRestStop_EventScript_15BFFC:: @ 815BFFC
closemessage
call Route111_OldLadysRestStop_EventScript_1A02CA
msgbox Route111_OldLadysRestStop_Text_19244D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route111_OldLadysRestStop_EventScript_15BFFC
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route111_OldLadysRestStop_EventScript_15C029
end
diff --git a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
index 020b51791..e971a8b9f 100644
--- a/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
+++ b/data/maps/Route111_WinstrateFamilysHouse/scripts.inc
@@ -4,7 +4,7 @@ Route111_WinstrateFamilysHouse_MapScripts:: @ 815BF24
Route111_WinstrateFamilysHouse_EventScript_15BF25:: @ 815BF25
lock
faceplayer
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
msgbox Route111_WinstrateFamilysHouse_Text_191FCE, 4
goto Route111_WinstrateFamilysHouse_EventScript_15BFC4
end
@@ -12,11 +12,11 @@ Route111_WinstrateFamilysHouse_EventScript_15BF25:: @ 815BF25
Route111_WinstrateFamilysHouse_EventScript_15BF3A:: @ 815BF3A
lock
faceplayer
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto_if_set FLAG_RECEIVED_MACHO_BRACE, Route111_WinstrateFamilysHouse_EventScript_15BF72
msgbox Route111_WinstrateFamilysHouse_Text_19208A, 4
giveitem_std ITEM_MACHO_BRACE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route111_WinstrateFamilysHouse_EventScript_1A029B
setflag FLAG_RECEIVED_MACHO_BRACE
goto Route111_WinstrateFamilysHouse_EventScript_15BFC4
@@ -30,7 +30,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF72:: @ 815BF72
Route111_WinstrateFamilysHouse_EventScript_15BF80:: @ 815BF80
lock
faceplayer
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
msgbox Route111_WinstrateFamilysHouse_Text_192190, 4
goto Route111_WinstrateFamilysHouse_EventScript_15BFC4
end
@@ -38,7 +38,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF80:: @ 815BF80
Route111_WinstrateFamilysHouse_EventScript_15BF95:: @ 815BF95
lock
faceplayer
- setvar VAR_SPECIAL_8, 4
+ setvar VAR_0x8008, 4
goto_if_set FLAG_TEMP_4, Route111_WinstrateFamilysHouse_EventScript_15BFB6
msgbox Route111_WinstrateFamilysHouse_Text_192219, 4
setflag FLAG_TEMP_4
@@ -52,7 +52,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BFB6:: @ 815BFB6
Route111_WinstrateFamilysHouse_EventScript_15BFC4:: @ 815BFC4
closemessage
- applymovement VAR_SPECIAL_8, Route111_WinstrateFamilysHouse_Movement_1A083D
+ applymovement VAR_0x8008, Route111_WinstrateFamilysHouse_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/Route112/scripts.inc b/data/maps/Route112/scripts.inc
index 8e3f73fc0..ae03b2248 100644
--- a/data/maps/Route112/scripts.inc
+++ b/data/maps/Route112/scripts.inc
@@ -38,8 +38,8 @@ Route112_EventScript_150549:: @ 8150549
Route112_EventScript_150560:: @ 8150560
trainerbattle 0, TRAINER_TRENT_1, 0, Route112_Text_1BB6A0, Route112_Text_1BB707
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route112_EventScript_150587
msgbox Route112_Text_1BB721, 6
end
diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc
index a593ccccc..2460aada9 100644
--- a/data/maps/Route112_CableCarStation/scripts.inc
+++ b/data/maps/Route112_CableCarStation/scripts.inc
@@ -33,9 +33,9 @@ Route112_CableCarStation_EventScript_15C08C:: @ 815C08C
lock
faceplayer
msgbox Route112_CableCarStation_Text_1924F5, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route112_CableCarStation_EventScript_15C0AD
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route112_CableCarStation_EventScript_15C0DC
end
@@ -45,7 +45,7 @@ Route112_CableCarStation_EventScript_15C0AD:: @ 815C0AD
applymovement 1, Route112_CableCarStation_Movement_15C0E6
applymovement 255, Route112_CableCarStation_Movement_15C0F0
waitmovement 0
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
setvar VAR_CABLE_CAR_STATION_STATE, 1
incrementgamestat GAME_STAT_RODE_CABLE_CAR
special CableCarWarp
diff --git a/data/maps/Route113/scripts.inc b/data/maps/Route113/scripts.inc
index 5b44f2442..58c769273 100644
--- a/data/maps/Route113/scripts.inc
+++ b/data/maps/Route113/scripts.inc
@@ -60,8 +60,8 @@ Route113_EventScript_150652:: @ 8150652
Route113_EventScript_150669:: @ 8150669
trainerbattle 0, TRAINER_MADELINE_1, 0, Route113_Text_1BBB27, Route113_Text_1BBB7A
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route113_EventScript_150690
msgbox Route113_Text_1BBB9A, 6
end
@@ -73,8 +73,8 @@ Route113_EventScript_150690:: @ 8150690
Route113_EventScript_1506A7:: @ 81506A7
trainerbattle 0, TRAINER_LAO_1, 0, Route113_Text_1BBC59, Route113_Text_1BBC90
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route113_EventScript_1506CE
msgbox Route113_Text_1BBCAB, 6
end
diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc
index e42a6f89a..7940b9cd7 100644
--- a/data/maps/Route113_GlassWorkshop/scripts.inc
+++ b/data/maps/Route113_GlassWorkshop/scripts.inc
@@ -35,7 +35,7 @@ Route113_GlassWorkshop_EventScript_1635AB:: @ 81635AB
Route113_GlassWorkshop_EventScript_1635B5:: @ 81635B5
checkitem ITEM_SOOT_SACK, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_1635E4
msgbox Route113_GlassWorkshop_Text_19E65B, 4
compare VAR_ASH_GATHER_COUNT, 250
@@ -51,10 +51,10 @@ Route113_GlassWorkshop_EventScript_1635E4:: @ 81635E4
end
Route113_GlassWorkshop_EventScript_1635EE:: @ 81635EE
- setvar VAR_SPECIAL_9, 0
+ setvar VAR_0x8009, 0
special ShowGlassWorkshopMenu
waitstate
- switch RESULT
+ switch VAR_RESULT
case 0, Route113_GlassWorkshop_EventScript_163660
case 1, Route113_GlassWorkshop_EventScript_16369C
case 2, Route113_GlassWorkshop_EventScript_1636D8
@@ -67,13 +67,13 @@ Route113_GlassWorkshop_EventScript_1635EE:: @ 81635EE
end
Route113_GlassWorkshop_EventScript_163660:: @ 8163660
- setvar VAR_SPECIAL_8, ITEM_BLUE_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 250
+ setvar VAR_0x8008, ITEM_BLUE_FLUTE
+ bufferitemname 0, VAR_0x8008
+ setvar VAR_0x800A, 250
compare VAR_ASH_GATHER_COUNT, 250
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 10
subvar VAR_ASH_GATHER_COUNT, 250
@@ -81,13 +81,13 @@ Route113_GlassWorkshop_EventScript_163660:: @ 8163660
end
Route113_GlassWorkshop_EventScript_16369C:: @ 816369C
- setvar VAR_SPECIAL_8, ITEM_YELLOW_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 500
+ setvar VAR_0x8008, ITEM_YELLOW_FLUTE
+ bufferitemname 0, VAR_0x8008
+ setvar VAR_0x800A, 500
compare VAR_ASH_GATHER_COUNT, 500
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 11
subvar VAR_ASH_GATHER_COUNT, 500
@@ -95,13 +95,13 @@ Route113_GlassWorkshop_EventScript_16369C:: @ 816369C
end
Route113_GlassWorkshop_EventScript_1636D8:: @ 81636D8
- setvar VAR_SPECIAL_8, ITEM_RED_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 500
+ setvar VAR_0x8008, ITEM_RED_FLUTE
+ bufferitemname 0, VAR_0x8008
+ setvar VAR_0x800A, 500
compare VAR_ASH_GATHER_COUNT, 500
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 12
subvar VAR_ASH_GATHER_COUNT, 500
@@ -109,13 +109,13 @@ Route113_GlassWorkshop_EventScript_1636D8:: @ 81636D8
end
Route113_GlassWorkshop_EventScript_163714:: @ 8163714
- setvar VAR_SPECIAL_8, ITEM_WHITE_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 1000
+ setvar VAR_0x8008, ITEM_WHITE_FLUTE
+ bufferitemname 0, VAR_0x8008
+ setvar VAR_0x800A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 13
subvar VAR_ASH_GATHER_COUNT, 1000
@@ -123,13 +123,13 @@ Route113_GlassWorkshop_EventScript_163714:: @ 8163714
end
Route113_GlassWorkshop_EventScript_163750:: @ 8163750
- setvar VAR_SPECIAL_8, ITEM_BLACK_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 1000
+ setvar VAR_0x8008, ITEM_BLACK_FLUTE
+ bufferitemname 0, VAR_0x8008
+ setvar VAR_0x800A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 14
subvar VAR_ASH_GATHER_COUNT, 1000
@@ -137,14 +137,14 @@ Route113_GlassWorkshop_EventScript_163750:: @ 8163750
end
Route113_GlassWorkshop_EventScript_16378C:: @ 816378C
- setvar VAR_SPECIAL_9, 1
- setvar VAR_SPECIAL_8, DECOR_PRETTY_CHAIR
- bufferdecorationname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 6000
+ setvar VAR_0x8009, 1
+ setvar VAR_0x8008, DECOR_PRETTY_CHAIR
+ bufferdecorationname 0, VAR_0x8008
+ setvar VAR_0x800A, 6000
compare VAR_ASH_GATHER_COUNT, 6000
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 15
subvar VAR_ASH_GATHER_COUNT, 6000
@@ -152,14 +152,14 @@ Route113_GlassWorkshop_EventScript_16378C:: @ 816378C
end
Route113_GlassWorkshop_EventScript_1637CD:: @ 81637CD
- setvar VAR_SPECIAL_9, 1
- setvar VAR_SPECIAL_8, DECOR_PRETTY_DESK
- bufferdecorationname 0, VAR_SPECIAL_8
- setvar VAR_SPECIAL_A, 8000
+ setvar VAR_0x8009, 1
+ setvar VAR_0x8008, DECOR_PRETTY_DESK
+ bufferdecorationname 0, VAR_0x8008
+ setvar VAR_0x800A, 8000
compare VAR_ASH_GATHER_COUNT, 8000
goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
setvar VAR_GLASS_WORKSHOP_STATE, 16
subvar VAR_ASH_GATHER_COUNT, 8000
@@ -172,15 +172,15 @@ Route113_GlassWorkshop_EventScript_16380E:: @ 816380E
end
Route113_GlassWorkshop_EventScript_163818:: @ 8163818
- setvar VAR_SPECIAL_A, 250
- subvar VAR_SPECIAL_A, 16456
+ setvar VAR_0x800A, 250
+ subvar VAR_0x800A, 16456
buffernumberstring 0, 32778
msgbox Route113_GlassWorkshop_Text_19E697, 4
release
end
Route113_GlassWorkshop_EventScript_163830:: @ 8163830
- subvar VAR_SPECIAL_A, 16456
+ subvar VAR_0x800A, 16456
buffernumberstring 1, 32778
message Route113_GlassWorkshop_Text_19E890
waitmessage
@@ -201,23 +201,23 @@ Route113_GlassWorkshop_EventScript_163851:: @ 8163851
delay 30
fadescreen 0
msgbox Route113_GlassWorkshop_Text_19E9D7, 4
- compare VAR_SPECIAL_9, 0
+ compare VAR_0x8009, 0
call_if_eq Route113_GlassWorkshop_EventScript_163889
- compare VAR_SPECIAL_9, 1
+ compare VAR_0x8009, 1
call_if_eq Route113_GlassWorkshop_EventScript_1638A1
setvar VAR_GLASS_WORKSHOP_STATE, 2
release
end
Route113_GlassWorkshop_EventScript_163889:: @ 8163889
- giveitem_std VAR_SPECIAL_8
- compare RESULT, 0
+ giveitem_std VAR_0x8008
+ compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_1638B4
return
Route113_GlassWorkshop_EventScript_1638A1:: @ 81638A1
- givedecoration_std VAR_SPECIAL_8
- compare RESULT, 0
+ givedecoration_std VAR_0x8008
+ compare VAR_RESULT, 0
goto_if_eq Route113_GlassWorkshop_EventScript_1638C3
return
@@ -245,59 +245,59 @@ Route113_GlassWorkshop_EventScript_1638D2:: @ 81638D2
end
Route113_GlassWorkshop_EventScript_163925:: @ 8163925
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_8, ITEM_BLUE_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
+ setvar VAR_0x8009, 0
+ setvar VAR_0x8008, ITEM_BLUE_FLUTE
+ bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_163939:: @ 8163939
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_8, ITEM_YELLOW_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
+ setvar VAR_0x8009, 0
+ setvar VAR_0x8008, ITEM_YELLOW_FLUTE
+ bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_16394D:: @ 816394D
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_8, ITEM_RED_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
+ setvar VAR_0x8009, 0
+ setvar VAR_0x8008, ITEM_RED_FLUTE
+ bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_163961:: @ 8163961
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_8, ITEM_WHITE_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
+ setvar VAR_0x8009, 0
+ setvar VAR_0x8008, ITEM_WHITE_FLUTE
+ bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_163975:: @ 8163975
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_8, ITEM_BLACK_FLUTE
- bufferitemname 0, VAR_SPECIAL_8
+ setvar VAR_0x8009, 0
+ setvar VAR_0x8008, ITEM_BLACK_FLUTE
+ bufferitemname 0, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_163989:: @ 8163989
- setvar VAR_SPECIAL_9, 1
- setvar VAR_SPECIAL_8, DECOR_PRETTY_CHAIR
+ setvar VAR_0x8009, 1
+ setvar VAR_0x8008, DECOR_PRETTY_CHAIR
bufferdecorationname 0, DECOR_PRETTY_CHAIR
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_16399D:: @ 816399D
- setvar VAR_SPECIAL_9, 1
- setvar VAR_SPECIAL_8, DECOR_PRETTY_DESK
+ setvar VAR_0x8009, 1
+ setvar VAR_0x8008, DECOR_PRETTY_DESK
bufferdecorationname 0, DECOR_PRETTY_DESK
goto Route113_GlassWorkshop_EventScript_1639B1
end
Route113_GlassWorkshop_EventScript_1639B1:: @ 81639B1
msgbox Route113_GlassWorkshop_Text_19E9D7, 4
- compare VAR_SPECIAL_9, 0
+ compare VAR_0x8009, 0
call_if_eq Route113_GlassWorkshop_EventScript_163889
- compare VAR_SPECIAL_9, 1
+ compare VAR_0x8009, 1
call_if_eq Route113_GlassWorkshop_EventScript_1638A1
setvar VAR_GLASS_WORKSHOP_STATE, 2
release
diff --git a/data/maps/Route114/scripts.inc b/data/maps/Route114/scripts.inc
index dd5ec1695..7af6aaec0 100644
--- a/data/maps/Route114/scripts.inc
+++ b/data/maps/Route114/scripts.inc
@@ -8,10 +8,10 @@ Route114_EventScript_150733:: @ 8150733
goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE114, Route114_EventScript_150778
msgbox Route114_Text_1C5803, 4
random 5
- addvar RESULT, 15
- addvar RESULT, 133
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, 15
+ addvar VAR_RESULT, 133
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq Route114_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_ROUTE114
msgbox Route114_Text_1C5861, 4
@@ -29,7 +29,7 @@ Route114_EventScript_150782:: @ 8150782
goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_1507B9
msgbox Route114_Text_170154, 4
giveitem_std ITEM_TM05_ROAR
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route114_EventScript_1A029B
setflag FLAG_RECEIVED_TM05
msgbox Route114_Text_1701C5, 4
@@ -85,8 +85,8 @@ Route114_EventScript_150836:: @ 8150836
Route114_EventScript_15084D:: @ 815084D
trainerbattle 0, TRAINER_STEVE_1, 0, Route114_Text_1BC2F5, Route114_Text_1BC327
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route114_EventScript_150874
msgbox Route114_Text_1BC337, 6
end
@@ -98,8 +98,8 @@ Route114_EventScript_150874:: @ 8150874
Route114_EventScript_15088B:: @ 815088B
trainerbattle 0, TRAINER_BERNIE_1, 0, Route114_Text_1BC45A, Route114_Text_1BC499
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route114_EventScript_1508B2
msgbox Route114_Text_1BC4B5, 6
end
diff --git a/data/maps/Route114_FossilManiacsHouse/scripts.inc b/data/maps/Route114_FossilManiacsHouse/scripts.inc
index c93584561..8313eacb1 100644
--- a/data/maps/Route114_FossilManiacsHouse/scripts.inc
+++ b/data/maps/Route114_FossilManiacsHouse/scripts.inc
@@ -12,7 +12,7 @@ Route114_FossilManiacsHouse_EventScript_15C1C3:: @ 815C1C3
goto_if_set FLAG_RECEIVED_TM28, Route114_FossilManiacsHouse_EventScript_15C1F2
msgbox Route114_FossilManiacsHouse_Text_1925E1, 4
giveitem_std ITEM_TM28_DIG
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route114_FossilManiacsHouse_EventScript_1A029B
setflag FLAG_RECEIVED_TM28
release
diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
index 740a48314..23440b191 100644
--- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc
+++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
@@ -6,10 +6,10 @@ Route114_FossilManiacsTunnel_EventScript_15C20F:: @ 815C20F
faceplayer
goto_if_set FLAG_RECEIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_15C24E
checkitem ITEM_ROOT_FOSSIL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C244
checkitem ITEM_CLAW_FOSSIL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C244
msgbox Route114_FossilManiacsTunnel_Text_192795, 4
release
diff --git a/data/maps/Route114_LanettesHouse/scripts.inc b/data/maps/Route114_LanettesHouse/scripts.inc
index 30eb844ac..2fe385c18 100644
--- a/data/maps/Route114_LanettesHouse/scripts.inc
+++ b/data/maps/Route114_LanettesHouse/scripts.inc
@@ -17,7 +17,7 @@ Route114_LanettesHouse_EventScript_15C262:: @ 815C262
.else
givedecoration_std DECOR_SEEDOT_DOLL
.endif
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route114_LanettesHouse_EventScript_1A02AE
setflag FLAG_RECEIVED_DOLL_LANETTE
release
@@ -31,7 +31,7 @@ Route114_LanettesHouse_EventScript_15C28F:: @ 815C28F
Route114_LanettesHouse_EventScript_15C299:: @ 815C299
lockall
msgbox Route114_LanettesHouse_Text_192B4A, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route114_LanettesHouse_EventScript_15C2B7
msgbox Route114_LanettesHouse_Text_192DA9, 4
releaseall
@@ -39,7 +39,7 @@ Route114_LanettesHouse_EventScript_15C299:: @ 815C299
Route114_LanettesHouse_EventScript_15C2B7:: @ 815C2B7
msgbox Route114_LanettesHouse_Text_192C01, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq Route114_LanettesHouse_EventScript_15C2CC
releaseall
end
diff --git a/data/maps/Route115/scripts.inc b/data/maps/Route115/scripts.inc
index 9cb3652f1..6fd262de4 100644
--- a/data/maps/Route115/scripts.inc
+++ b/data/maps/Route115/scripts.inc
@@ -15,8 +15,8 @@ Route115_EventScript_150940:: @ 8150940
Route115_EventScript_150949:: @ 8150949
trainerbattle 0, TRAINER_TIMOTHY_1, 0, Route115_Text_1BC9AC, Route115_Text_1BC9E6
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route115_EventScript_150970
msgbox Route115_Text_1BCA0E, 6
end
@@ -33,8 +33,8 @@ Route115_EventScript_150987:: @ 8150987
Route115_EventScript_15099E:: @ 815099E
trainerbattle 0, TRAINER_NOB_1, 0, Route115_Text_1BCB8A, Route115_Text_1BCBC1
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route115_EventScript_1509C5
msgbox Route115_Text_1BCBDE, 6
end
@@ -46,8 +46,8 @@ Route115_EventScript_1509C5:: @ 81509C5
Route115_EventScript_1509DC:: @ 81509DC
trainerbattle 0, TRAINER_CYNDY_1, 0, Route115_Text_1BCCF4, Route115_Text_1BCD32
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route115_EventScript_150A03
msgbox Route115_Text_1BCD4C, 6
end
diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc
index 284ce3363..29ddd8ae2 100644
--- a/data/maps/Route116/scripts.inc
+++ b/data/maps/Route116/scripts.inc
@@ -40,31 +40,31 @@ Route116_EventScript_150A7B:: @ 8150A7B
Route116_EventScript_150A94:: @ 8150A94
setflag FLAG_MET_DEVON_EMPLOYEE
giveitem_std ITEM_REPEAT_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route116_EventScript_150B12
msgbox Route116_Text_1707B8, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route116_EventScript_150AEE
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq Route116_EventScript_150AEE
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq Route116_EventScript_150AEE
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route116_EventScript_150AF9
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
clearflag FLAG_HIDE_EMPLOYEE_DEVON_CORP_3F
setflag FLAG_RECEIVED_REPEAT_BALL
release
end
Route116_EventScript_150AEE:: @ 8150AEE
- applymovement LAST_TALKED, Route116_Movement_150B1C
+ applymovement VAR_LAST_TALKED, Route116_Movement_150B1C
waitmovement 0
return
Route116_EventScript_150AF9:: @ 8150AF9
- applymovement LAST_TALKED, Route116_Movement_150B25
+ applymovement VAR_LAST_TALKED, Route116_Movement_150B25
waitmovement 0
return
@@ -144,10 +144,10 @@ Route116_EventScript_150B8F:: @ 8150B8F
lock
faceplayer
checkitem ITEM_BLACK_GLASSES, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route116_EventScript_150BCA
- specialvar RESULT, FoundBlackGlasses
- compare RESULT, 1
+ specialvar VAR_RESULT, FoundBlackGlasses
+ compare VAR_RESULT, 1
goto_if_eq Route116_EventScript_150BBB
msgbox Route116_Text_1708EE, 4
release
@@ -162,8 +162,8 @@ Route116_EventScript_150BBB:: @ 8150BBB
Route116_EventScript_150BCA:: @ 8150BCA
msgbox Route116_Text_1708EE, 4
msgbox Route116_Text_170921, 4
- specialvar RESULT, FoundBlackGlasses
- compare RESULT, 1
+ specialvar VAR_RESULT, FoundBlackGlasses
+ compare VAR_RESULT, 1
goto_if_eq Route116_EventScript_150BF4
msgbox Route116_Text_170A03, 4
release
@@ -177,25 +177,25 @@ Route116_EventScript_150BF4:: @ 8150BF4
Route116_EventScript_150C03:: @ 8150C03
delay 20
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route116_EventScript_150C37
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq Route116_EventScript_150C37
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq Route116_EventScript_150C37
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route116_EventScript_150C42
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
release
end
Route116_EventScript_150C37:: @ 8150C37
- applymovement LAST_TALKED, Route116_Movement_150C4D
+ applymovement VAR_LAST_TALKED, Route116_Movement_150C4D
waitmovement 0
return
Route116_EventScript_150C42:: @ 8150C42
- applymovement LAST_TALKED, Route116_Movement_150C57
+ applymovement VAR_LAST_TALKED, Route116_Movement_150C57
waitmovement 0
return
@@ -236,8 +236,8 @@ Route116_EventScript_150C79:: @ 8150C79
Route116_EventScript_150C90:: @ 8150C90
trainerbattle 0, TRAINER_JERRY_1, 0, Route116_Text_1BD1C0, Route116_Text_1BD21A
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route116_EventScript_150CB7
msgbox Route116_Text_1BD248, 6
end
@@ -259,8 +259,8 @@ Route116_EventScript_150CE5:: @ 8150CE5
Route116_EventScript_150CFC:: @ 8150CFC
trainerbattle 0, TRAINER_KAREN_1, 0, Route116_Text_1BD377, Route116_Text_1BD3AC
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route116_EventScript_150D23
msgbox Route116_Text_1BD3C3, 6
end
diff --git a/data/maps/Route117/scripts.inc b/data/maps/Route117/scripts.inc
index 3c5bc8a66..363b19280 100644
--- a/data/maps/Route117/scripts.inc
+++ b/data/maps/Route117/scripts.inc
@@ -39,8 +39,8 @@ Route117_EventScript_150D84:: @ 8150D84
Route117_EventScript_150D8D:: @ 8150D8D
trainerbattle 0, TRAINER_ISAAC_1, 0, Route117_Text_1BD49E, Route117_Text_1BD4D9
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150DB4
msgbox Route117_Text_1BD4F9, 6
end
@@ -52,8 +52,8 @@ Route117_EventScript_150DB4:: @ 8150DB4
Route117_EventScript_150DCB:: @ 8150DCB
trainerbattle 0, TRAINER_LYDIA_1, 0, Route117_Text_1BD634, Route117_Text_1BD67B
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150DF2
msgbox Route117_Text_1BD69B, 6
end
@@ -65,8 +65,8 @@ Route117_EventScript_150DF2:: @ 8150DF2
Route117_EventScript_150E09:: @ 8150E09
trainerbattle 0, TRAINER_DYLAN_1, 0, Route117_Text_1BD79A, Route117_Text_1BD7E0
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150E30
msgbox Route117_Text_1BD7F5, 6
end
@@ -78,8 +78,8 @@ Route117_EventScript_150E30:: @ 8150E30
Route117_EventScript_150E47:: @ 8150E47
trainerbattle 0, TRAINER_MARIA_1, 0, Route117_Text_1BD914, Route117_Text_1BD965
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150E6E
msgbox Route117_Text_1BD98F, 6
end
@@ -96,8 +96,8 @@ Route117_EventScript_150E85:: @ 8150E85
Route117_EventScript_150E9C:: @ 8150E9C
trainerbattle 4, TRAINER_ANNA_AND_MEG_1, 0, Route117_Text_1BDBC3, Route117_Text_1BDC07, Route117_Text_1BDC96
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150EC7
msgbox Route117_Text_1BDC44, 6
end
@@ -109,8 +109,8 @@ Route117_EventScript_150EC7:: @ 8150EC7
Route117_EventScript_150EE2:: @ 8150EE2
trainerbattle 4, TRAINER_ANNA_AND_MEG_1, 0, Route117_Text_1BDCD2, Route117_Text_1BDD1E, Route117_Text_1BDD8B
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_150F0D
msgbox Route117_Text_1BDD4E, 6
end
diff --git a/data/maps/Route118/scripts.inc b/data/maps/Route118/scripts.inc
index 850d9138d..0bb082903 100644
--- a/data/maps/Route118/scripts.inc
+++ b/data/maps/Route118/scripts.inc
@@ -11,9 +11,9 @@ Route118_EventScript_150F34:: @ 8150F34
faceplayer
goto_if_set FLAG_RECEIVED_GOOD_ROD, Route118_EventScript_150F89
msgbox Route118_Text_170F12, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route118_EventScript_150F5E
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route118_EventScript_150F7F
end
@@ -49,7 +49,7 @@ Route118_EventScript_150FA5:: @ 8150FA5
Route118_EventScript_150FAE:: @ 8150FAE
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
applymovement 255, Route118_Movement_1A0841
waitmovement 0
applymovement 19, Route118_Movement_151069
@@ -59,7 +59,7 @@ Route118_EventScript_150FAE:: @ 8150FAE
Route118_EventScript_150FCE:: @ 8150FCE
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
applymovement 255, Route118_Movement_1A0841
waitmovement 0
goto Route118_EventScript_151004
@@ -67,7 +67,7 @@ Route118_EventScript_150FCE:: @ 8150FCE
Route118_EventScript_150FE4:: @ 8150FE4
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
applymovement 255, Route118_Movement_1A0841
waitmovement 0
applymovement 19, Route118_Movement_15106B
@@ -82,11 +82,11 @@ Route118_EventScript_151004:: @ 8151004
delay 30
msgbox Route118_Text_170D66, 4
closemessage
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq Route118_EventScript_151048
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq Route118_EventScript_151053
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq Route118_EventScript_15105E
setvar VAR_ROUTE118_STATE, 1
removeobject 19
@@ -160,8 +160,8 @@ Route118_Movement_151086:: @ 8151086
Route118_EventScript_15108F:: @ 815108F
trainerbattle 0, TRAINER_ROSE_1, 0, Route118_Text_1BDFF4, Route118_Text_1BE03C
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route118_EventScript_1510B6
msgbox Route118_Text_1BE05E, 6
end
@@ -183,8 +183,8 @@ Route118_EventScript_1510E4:: @ 81510E4
Route118_EventScript_1510FB:: @ 81510FB
trainerbattle 0, TRAINER_DALTON_1, 0, Route118_Text_1BE3E8, Route118_Text_1BE406
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route118_EventScript_151122
msgbox Route118_Text_1BE413, 6
end
diff --git a/data/maps/Route119/scripts.inc b/data/maps/Route119/scripts.inc
index 9874d3098..c94ce00e2 100644
--- a/data/maps/Route119/scripts.inc
+++ b/data/maps/Route119/scripts.inc
@@ -8,9 +8,9 @@ Route119_MapScript1_151172:: @ 8151172
end
Route119_EventScript_15117C:: @ 815117C
- compare VAR_SPECIAL_4, 6
+ compare VAR_0x8004, 6
call_if_eq Route119_EventScript_151193
- compare VAR_SPECIAL_4, 7
+ compare VAR_0x8004, 7
call_if_eq Route119_EventScript_151197
return
@@ -51,9 +51,9 @@ Route119_EventScript_1511DB:: @ 81511DB
lockall
addobject 25
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq Route119_EventScript_151254
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route119_EventScript_151259
delay 65
compare VAR_TEMP_1, 1
@@ -71,9 +71,9 @@ Route119_EventScript_1511DB:: @ 81511DB
addobject 16
delay 30
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route119_EventScript_15125E
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route119_EventScript_1512D8
releaseall
end
@@ -295,8 +295,8 @@ Route119_EventScript_1514A8:: @ 81514A8
Route119_EventScript_1514BF:: @ 81514BF
trainerbattle 0, TRAINER_JACKSON_1, 0, Route119_Text_1BE8BB, Route119_Text_1BE90E
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route119_EventScript_1514E6
msgbox Route119_Text_1BE937, 6
end
@@ -308,8 +308,8 @@ Route119_EventScript_1514E6:: @ 81514E6
Route119_EventScript_1514FD:: @ 81514FD
trainerbattle 0, TRAINER_CATHERINE_1, 0, Route119_Text_1BEA3A, Route119_Text_1BEA88
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route119_EventScript_151524
msgbox Route119_Text_1BEAB3, 6
end
@@ -354,7 +354,7 @@ Route119_EventScript_1515C5:: @ 81515C5
faceplayer
msgbox Route119_Text_171520, 4
closemessage
- applymovement LAST_TALKED, Route119_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A083D
waitmovement 0
release
end
@@ -364,7 +364,7 @@ Route119_EventScript_1515DC:: @ 81515DC
faceplayer
msgbox Route119_Text_17157C, 4
closemessage
- applymovement LAST_TALKED, Route119_Movement_1A083D
+ applymovement VAR_LAST_TALKED, Route119_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
index 8a8737dad..a2317a791 100644
--- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc
+++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
@@ -56,7 +56,7 @@ Route119_WeatherInstitute_2F_EventScript_163D45:: @ 8163D45
Route119_WeatherInstitute_2F_EventScript_163D7A:: @ 8163D7A
msgbox Route119_WeatherInstitute_2F_Text_19F1CF, 4
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq Route119_WeatherInstitute_2F_EventScript_163DB4
playfanfare MUS_FANFA4
message Route119_WeatherInstitute_2F_Text_19F267
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index 4d2eca797..4c7aefdea 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -9,17 +9,17 @@ Route120_MapScript1_15161E:: @ 815161E
end
Route120_EventScript_151628:: @ 8151628
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
call_if_eq Route120_EventScript_15166B
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq Route120_EventScript_151672
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
call_if_eq Route120_EventScript_151676
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
call_if_eq Route120_EventScript_15167A
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
call_if_eq Route120_EventScript_15167E
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
call_if_eq Route120_EventScript_151682
return
@@ -111,12 +111,12 @@ Route120_EventScript_151739:: @ 8151739
dodailyevents
goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE120, Route120_EventScript_151837
msgbox Route120_Text_1C58F1, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq Route120_EventScript_151841
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq Route120_EventScript_15184A
- specialvar RESULT, GetPlayerTrainerIdOnesDigit
- switch RESULT
+ specialvar VAR_RESULT, GetPlayerTrainerIdOnesDigit
+ switch VAR_RESULT
case 0, Route120_EventScript_1517DC
case 5, Route120_EventScript_1517DC
case 1, Route120_EventScript_1517E7
@@ -130,33 +130,33 @@ Route120_EventScript_151739:: @ 8151739
end
Route120_EventScript_1517DC:: @ 81517DC
- setvar VAR_SPECIAL_4, ITEM_FIGY_BERRY
+ setvar VAR_0x8004, ITEM_FIGY_BERRY
goto Route120_EventScript_151813
end
Route120_EventScript_1517E7:: @ 81517E7
- setvar VAR_SPECIAL_4, ITEM_WIKI_BERRY
+ setvar VAR_0x8004, ITEM_WIKI_BERRY
goto Route120_EventScript_151813
end
Route120_EventScript_1517F2:: @ 81517F2
- setvar VAR_SPECIAL_4, ITEM_MAGO_BERRY
+ setvar VAR_0x8004, ITEM_MAGO_BERRY
goto Route120_EventScript_151813
end
Route120_EventScript_1517FD:: @ 81517FD
- setvar VAR_SPECIAL_4, ITEM_AGUAV_BERRY
+ setvar VAR_0x8004, ITEM_AGUAV_BERRY
goto Route120_EventScript_151813
end
Route120_EventScript_151808:: @ 8151808
- setvar VAR_SPECIAL_4, ITEM_IAPAPA_BERRY
+ setvar VAR_0x8004, ITEM_IAPAPA_BERRY
goto Route120_EventScript_151813
end
Route120_EventScript_151813:: @ 8151813
- giveitem_std VAR_SPECIAL_4
- compare RESULT, 0
+ giveitem_std VAR_0x8004
+ compare VAR_RESULT, 0
goto_if_eq Route120_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_ROUTE120
msgbox Route120_Text_1C5A0B, 4
@@ -181,7 +181,7 @@ Route120_EventScript_151853:: @ 8151853
faceplayer
goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE120, Route120_EventScript_151884
msgbox Route120_Text_171827, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route120_EventScript_151877
goto Route120_EventScript_15189D
end
@@ -194,7 +194,7 @@ Route120_EventScript_151877:: @ 8151877
Route120_EventScript_151884:: @ 8151884
msgbox Route120_Text_17196F, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route120_EventScript_151877
goto Route120_EventScript_15189D
end
@@ -202,9 +202,9 @@ Route120_EventScript_151884:: @ 8151884
Route120_EventScript_15189D:: @ 815189D
msgbox Route120_Text_1719A0, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route120_EventScript_15197F
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq Route120_EventScript_15198A
applymovement 31, Route120_Movement_1A083F
waitmovement 0
@@ -220,7 +220,7 @@ Route120_EventScript_15189D:: @ 815189D
delay 40
waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
@@ -286,8 +286,8 @@ Route120_EventScript_1519B3:: @ 81519B3
Route120_EventScript_1519CA:: @ 81519CA
trainerbattle 0, TRAINER_ROBERT_1, 0, Route120_Text_1BF07E, Route120_Text_1BF0A5
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route120_EventScript_1519F1
msgbox Route120_Text_1BF0C3, 6
end
@@ -309,8 +309,8 @@ Route120_EventScript_151A1F:: @ 8151A1F
Route120_EventScript_151A36:: @ 8151A36
trainerbattle 0, TRAINER_BRANDON_1, 0, Route120_Text_1BF32B, Route120_Text_1BF36B
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route120_EventScript_151A5D
msgbox Route120_Text_1BF38D, 6
end
diff --git a/data/maps/Route121/scripts.inc b/data/maps/Route121/scripts.inc
index d154d3f6b..b6a0abe09 100644
--- a/data/maps/Route121/scripts.inc
+++ b/data/maps/Route121/scripts.inc
@@ -73,8 +73,8 @@ Route121_EventScript_151B72:: @ 8151B72
Route121_EventScript_151B89:: @ 8151B89
trainerbattle 0, TRAINER_WALTER_1, 0, Route121_Text_1BFA1B, Route121_Text_1BFA8C
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route121_EventScript_151BB0
msgbox Route121_Text_1BFA9D, 6
end
@@ -101,8 +101,8 @@ Route121_EventScript_151BF9:: @ 8151BF9
Route121_EventScript_151C14:: @ 8151C14
trainerbattle 0, TRAINER_JESSICA_1, 0, Route121_Text_1BFE51, Route121_Text_1BFE80
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route121_EventScript_151C3B
msgbox Route121_Text_1BFEAE, 6
end
diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc
index 30cba964b..75f134e7e 100644
--- a/data/maps/Route121_SafariZoneEntrance/scripts.inc
+++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc
@@ -34,7 +34,7 @@ Route121_SafariZoneEntrance_EventScript_15C35A:: @ 815C35A
lock
faceplayer
msgbox Route121_SafariZoneEntrance_Text_1C3704, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C379
msgbox Route121_SafariZoneEntrance_Text_1C373C, 4
release
@@ -52,7 +52,7 @@ Route121_SafariZoneEntrance_EventScript_15C383:: @ 815C383
showmoneybox 0, 0
nop
msgbox Route121_SafariZoneEntrance_Text_1C3832, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C3B3
msgbox Route121_SafariZoneEntrance_Text_1C3895, 4
goto Route121_SafariZoneEntrance_EventScript_15C46C
@@ -60,11 +60,11 @@ Route121_SafariZoneEntrance_EventScript_15C383:: @ 815C383
Route121_SafariZoneEntrance_EventScript_15C3B3:: @ 815C3B3
checkitem ITEM_POKEBLOCK_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C450
call Route121_SafariZoneEntrance_EventScript_15C425
checkmoney 0x1f4, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C45E
msgbox Route121_SafariZoneEntrance_Text_1C38D9, 4
takemoney 0x1f4, 0
@@ -88,10 +88,10 @@ Route121_SafariZoneEntrance_EventScript_15C3B3:: @ 815C3B3
Route121_SafariZoneEntrance_EventScript_15C425:: @ 815C425
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_ne Route121_SafariZoneEntrance_EventScript_15C44F
- specialvar RESULT, CheckFreePokemonStorageSpace
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckFreePokemonStorageSpace
+ compare VAR_RESULT, 1
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C44F
msgbox Route121_SafariZoneEntrance_Text_1C39A3, 4
goto Route121_SafariZoneEntrance_EventScript_15C46C
diff --git a/data/maps/Route123/scripts.inc b/data/maps/Route123/scripts.inc
index 4dda69997..f3ed72b9b 100644
--- a/data/maps/Route123/scripts.inc
+++ b/data/maps/Route123/scripts.inc
@@ -12,11 +12,11 @@ Route123_EventScript_151C5D:: @ 8151C5D
goto_if_set FLAG_RECEIVED_TM19, Route123_EventScript_151CAC
msgbox Route123_Text_171D83, 4
special IsGrassTypeInParty
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_EventScript_151CAA
msgbox Route123_Text_171DC2, 4
giveitem_std ITEM_TM19_GIGA_DRAIN
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_EventScript_1A029B
setflag FLAG_RECEIVED_TM19
msgbox Route123_Text_171E34, 4
@@ -61,8 +61,8 @@ Route123_EventScript_151CFF:: @ 8151CFF
Route123_EventScript_151D16:: @ 8151D16
trainerbattle 0, TRAINER_CAMERON_1, 0, Route123_Text_1C013F, Route123_Text_1C01A3
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route123_EventScript_151D3D
msgbox Route123_Text_1C01B1, 6
end
@@ -74,8 +74,8 @@ Route123_EventScript_151D3D:: @ 8151D3D
Route123_EventScript_151D54:: @ 8151D54
trainerbattle 0, TRAINER_JACKI_1, 0, Route123_Text_1C028C, Route123_Text_1C0303
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route123_EventScript_151D7B
msgbox Route123_Text_1C030F, 6
end
diff --git a/data/maps/Route123_BerryMastersHouse/scripts.inc b/data/maps/Route123_BerryMastersHouse/scripts.inc
index 3356df83b..d81cf9aee 100644
--- a/data/maps/Route123_BerryMastersHouse/scripts.inc
+++ b/data/maps/Route123_BerryMastersHouse/scripts.inc
@@ -13,18 +13,18 @@ Route123_BerryMastersHouse_EventScript_1639E9:: @ 81639E9
goto_if_set FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER, Route123_BerryMastersHouse_EventScript_163A5A
msgbox Route123_BerryMastersHouse_Text_1C5BC4, 4
random 10
- addvar RESULT, 20
- addvar RESULT, 133
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, 20
+ addvar VAR_RESULT, 133
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER
msgbox Route123_BerryMastersHouse_Text_1C5C66, 4
random 10
- addvar RESULT, 20
- addvar RESULT, 133
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, 20
+ addvar VAR_RESULT, 133
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
msgbox Route123_BerryMastersHouse_Text_1C5C83, 4
release
@@ -41,13 +41,13 @@ Route123_BerryMastersHouse_EventScript_163A64:: @ 8163A64
dodailyevents
goto_if_set FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER_WIFE, Route123_BerryMastersHouse_EventScript_163C13
msgbox Route123_BerryMastersHouse_Text_1C5D24, 4
- setvar VAR_SPECIAL_4, 13
+ setvar VAR_0x8004, 13
call Route123_BerryMastersHouse_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq Route123_BerryMastersHouse_EventScript_163AAD
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_163A9B
end
@@ -58,26 +58,26 @@ Route123_BerryMastersHouse_EventScript_163A9B:: @ 8163A9B
end
Route123_BerryMastersHouse_EventScript_163AAD:: @ 8163AAD
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq Route123_BerryMastersHouse_EventScript_163B1E
- compare VAR_SPECIAL_4, 2
+ compare VAR_0x8004, 2
goto_if_eq Route123_BerryMastersHouse_EventScript_163B4F
- compare VAR_SPECIAL_4, 3
+ compare VAR_0x8004, 3
goto_if_eq Route123_BerryMastersHouse_EventScript_163B80
- compare VAR_SPECIAL_4, 4
+ compare VAR_0x8004, 4
goto_if_eq Route123_BerryMastersHouse_EventScript_163BB1
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
goto_if_eq Route123_BerryMastersHouse_EventScript_163BE2
end
Route123_BerryMastersHouse_EventScript_163AF0:: @ 8163AF0
msgbox Route123_BerryMastersHouse_Text_1C5E0E, 4
random 10
- addvar RESULT, ITEM_CHERI_BERRY
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, ITEM_CHERI_BERRY
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
goto Route123_BerryMastersHouse_EventScript_163C1D
release
@@ -87,7 +87,7 @@ Route123_BerryMastersHouse_EventScript_163B1E:: @ 8163B1E
goto_if_set FLAG_RECEIVED_SPELON_BERRY, Route123_BerryMastersHouse_EventScript_163AF0
msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4
giveitem_std ITEM_SPELON_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_RECEIVED_SPELON_BERRY
goto Route123_BerryMastersHouse_EventScript_163C1D
@@ -97,7 +97,7 @@ Route123_BerryMastersHouse_EventScript_163B4F:: @ 8163B4F
goto_if_set FLAG_RECEIVED_PAMTRE_BERRY, Route123_BerryMastersHouse_EventScript_163AF0
msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4
giveitem_std ITEM_PAMTRE_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_RECEIVED_PAMTRE_BERRY
goto Route123_BerryMastersHouse_EventScript_163C1D
@@ -107,7 +107,7 @@ Route123_BerryMastersHouse_EventScript_163B80:: @ 8163B80
goto_if_set FLAG_RECEIVED_WATMEL_BERRY, Route123_BerryMastersHouse_EventScript_163AF0
msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4
giveitem_std ITEM_WATMEL_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_RECEIVED_WATMEL_BERRY
goto Route123_BerryMastersHouse_EventScript_163C1D
@@ -117,7 +117,7 @@ Route123_BerryMastersHouse_EventScript_163BB1:: @ 8163BB1
goto_if_set FLAG_RECEIVED_DURIN_BERRY, Route123_BerryMastersHouse_EventScript_163AF0
msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4
giveitem_std ITEM_DURIN_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_RECEIVED_DURIN_BERRY
goto Route123_BerryMastersHouse_EventScript_163C1D
@@ -127,7 +127,7 @@ Route123_BerryMastersHouse_EventScript_163BE2:: @ 8163BE2
goto_if_set FLAG_RECEIVED_BELUE_BERRY, Route123_BerryMastersHouse_EventScript_163AF0
msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4
giveitem_std ITEM_BELUE_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B
setflag FLAG_RECEIVED_BELUE_BERRY
goto Route123_BerryMastersHouse_EventScript_163C1D
diff --git a/data/maps/Route124/scripts.inc b/data/maps/Route124/scripts.inc
index cb42e1944..8232dee34 100644
--- a/data/maps/Route124/scripts.inc
+++ b/data/maps/Route124/scripts.inc
@@ -22,8 +22,8 @@ Route124_EventScript_151E0F:: @ 8151E0F
Route124_EventScript_151E26:: @ 8151E26
trainerbattle 0, TRAINER_JENNY_1, 0, Route124_Text_1C07B4, Route124_Text_1C07F9
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route124_EventScript_151E4D
msgbox Route124_Text_1C080E, 6
end
@@ -45,8 +45,8 @@ Route124_EventScript_151E7B:: @ 8151E7B
Route124_EventScript_151E92:: @ 8151E92
trainerbattle 4, TRAINER_RITA_AND_SAM_1, 0, Route124_Text_1C0ABD, Route124_Text_1C0B36, Route124_Text_1C0BC8
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route124_EventScript_151EBD
msgbox Route124_Text_1C0B72, 6
end
@@ -58,8 +58,8 @@ Route124_EventScript_151EBD:: @ 8151EBD
Route124_EventScript_151ED8:: @ 8151ED8
trainerbattle 4, TRAINER_RITA_AND_SAM_1, 0, Route124_Text_1C0C0E, Route124_Text_1C0C4F, Route124_Text_1C0CE0
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route124_EventScript_151F03
msgbox Route124_Text_1C0C7F, 6
end
diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
index 7bcddfe19..128b48a25 100644
--- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
+++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
@@ -30,16 +30,16 @@ Route124_DivingTreasureHuntersHouse_EventScript_163E2E:: @ 8163E2E
Route124_DivingTreasureHuntersHouse_EventScript_163E44:: @ 8163E44
setvar VAR_TEMP_1, 0
checkitem ITEM_RED_SHARD, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E8A
checkitem ITEM_YELLOW_SHARD, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E90
checkitem ITEM_BLUE_SHARD, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E96
checkitem ITEM_GREEN_SHARD, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E9C
return
@@ -87,7 +87,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163EB0:: @ 8163EB0
Route124_DivingTreasureHuntersHouse_EventScript_163F61:: @ 8163F61
multichoice 0, 0, 58, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F
goto Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -95,7 +95,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163F61:: @ 8163F61
Route124_DivingTreasureHuntersHouse_EventScript_163F87:: @ 8163F87
multichoice 0, 0, 59, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F
goto Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -103,7 +103,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163F87:: @ 8163F87
Route124_DivingTreasureHuntersHouse_EventScript_163FAD:: @ 8163FAD
multichoice 0, 0, 60, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -112,7 +112,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163FAD:: @ 8163FAD
Route124_DivingTreasureHuntersHouse_EventScript_163FDE:: @ 8163FDE
multichoice 0, 0, 61, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F
goto Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -120,7 +120,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163FDE:: @ 8163FDE
Route124_DivingTreasureHuntersHouse_EventScript_164004:: @ 8164004
multichoice 0, 0, 62, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -129,7 +129,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164004:: @ 8164004
Route124_DivingTreasureHuntersHouse_EventScript_164035:: @ 8164035
multichoice 0, 0, 63, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -138,7 +138,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164035:: @ 8164035
Route124_DivingTreasureHuntersHouse_EventScript_164066:: @ 8164066
multichoice 0, 0, 64, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 2, Route124_DivingTreasureHuntersHouse_EventScript_164274
@@ -148,7 +148,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164066:: @ 8164066
Route124_DivingTreasureHuntersHouse_EventScript_1640A2:: @ 81640A2
multichoice 0, 0, 65, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164283
case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F
goto Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -156,7 +156,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640A2:: @ 81640A2
Route124_DivingTreasureHuntersHouse_EventScript_1640C8:: @ 81640C8
multichoice 0, 0, 66, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -165,7 +165,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640C8:: @ 81640C8
Route124_DivingTreasureHuntersHouse_EventScript_1640F9:: @ 81640F9
multichoice 0, 0, 67, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -174,7 +174,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640F9:: @ 81640F9
Route124_DivingTreasureHuntersHouse_EventScript_16412A:: @ 816412A
multichoice 0, 0, 68, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283
@@ -184,7 +184,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_16412A:: @ 816412A
Route124_DivingTreasureHuntersHouse_EventScript_164166:: @ 8164166
multichoice 0, 0, 69, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283
case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F
@@ -193,7 +193,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164166:: @ 8164166
Route124_DivingTreasureHuntersHouse_EventScript_164197:: @ 8164197
multichoice 0, 0, 70, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283
@@ -203,7 +203,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164197:: @ 8164197
Route124_DivingTreasureHuntersHouse_EventScript_1641D3:: @ 81641D3
multichoice 0, 0, 71, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274
case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283
@@ -213,7 +213,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1641D3:: @ 81641D3
Route124_DivingTreasureHuntersHouse_EventScript_16420F:: @ 816420F
multichoice 0, 0, 72, 0
- switch RESULT
+ switch VAR_RESULT
case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256
case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265
case 2, Route124_DivingTreasureHuntersHouse_EventScript_164274
@@ -223,49 +223,49 @@ Route124_DivingTreasureHuntersHouse_EventScript_16420F:: @ 816420F
end
Route124_DivingTreasureHuntersHouse_EventScript_164256:: @ 8164256
- setvar VAR_SPECIAL_8, ITEM_RED_SHARD
- setvar VAR_SPECIAL_9, ITEM_FIRE_STONE
+ setvar VAR_0x8008, ITEM_RED_SHARD
+ setvar VAR_0x8009, ITEM_FIRE_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_164292
Route124_DivingTreasureHuntersHouse_EventScript_164265:: @ 8164265
- setvar VAR_SPECIAL_8, ITEM_YELLOW_SHARD
- setvar VAR_SPECIAL_9, ITEM_THUNDER_STONE
+ setvar VAR_0x8008, ITEM_YELLOW_SHARD
+ setvar VAR_0x8009, ITEM_THUNDER_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_164292
Route124_DivingTreasureHuntersHouse_EventScript_164274:: @ 8164274
- setvar VAR_SPECIAL_8, ITEM_BLUE_SHARD
- setvar VAR_SPECIAL_9, ITEM_WATER_STONE
+ setvar VAR_0x8008, ITEM_BLUE_SHARD
+ setvar VAR_0x8009, ITEM_WATER_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_164292
Route124_DivingTreasureHuntersHouse_EventScript_164283:: @ 8164283
- setvar VAR_SPECIAL_8, ITEM_GREEN_SHARD
- setvar VAR_SPECIAL_9, ITEM_LEAF_STONE
+ setvar VAR_0x8008, ITEM_GREEN_SHARD
+ setvar VAR_0x8009, ITEM_LEAF_STONE
goto Route124_DivingTreasureHuntersHouse_EventScript_164292
Route124_DivingTreasureHuntersHouse_EventScript_164292:: @ 8164292
- bufferitemname 0, VAR_SPECIAL_8
- bufferitemname 1, VAR_SPECIAL_9
+ bufferitemname 0, VAR_0x8008
+ bufferitemname 1, VAR_0x8009
msgbox Route124_DivingTreasureHuntersHouse_Text_19F5E0, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_16431F
- checkitemspace VAR_SPECIAL_9, 1
- compare RESULT, 1
+ checkitemspace VAR_0x8009, 1
+ compare VAR_RESULT, 1
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_1642D3
- checkitem VAR_SPECIAL_8, 2
- compare RESULT, 0
+ checkitem VAR_0x8008, 2
+ compare VAR_RESULT, 0
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_1642D3
goto Route124_DivingTreasureHuntersHouse_EventScript_164315
end
Route124_DivingTreasureHuntersHouse_EventScript_1642D3:: @ 81642D3
- takeitem VAR_SPECIAL_8, 1
- giveitem_std VAR_SPECIAL_9
+ takeitem VAR_0x8008, 1
+ giveitem_std VAR_0x8009
msgbox Route124_DivingTreasureHuntersHouse_Text_19F606, 4
call Route124_DivingTreasureHuntersHouse_EventScript_163E44
compare VAR_TEMP_1, 0
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_164333
msgbox Route124_DivingTreasureHuntersHouse_Text_19F629, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163EB0
goto Route124_DivingTreasureHuntersHouse_EventScript_16431F
end
diff --git a/data/maps/Route125/scripts.inc b/data/maps/Route125/scripts.inc
index 4ff30f363..3e1febd5d 100644
--- a/data/maps/Route125/scripts.inc
+++ b/data/maps/Route125/scripts.inc
@@ -28,8 +28,8 @@ Route125_EventScript_151F73:: @ 8151F73
Route125_EventScript_151F8A:: @ 8151F8A
trainerbattle 0, TRAINER_ERNEST_1, 0, Route125_Text_1C11AF, Route125_Text_1C11ED
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route125_EventScript_151FB1
msgbox Route125_Text_1C1208, 6
end
diff --git a/data/maps/Route128/scripts.inc b/data/maps/Route128/scripts.inc
index 12d9bace5..3b3522a6f 100644
--- a/data/maps/Route128/scripts.inc
+++ b/data/maps/Route128/scripts.inc
@@ -181,8 +181,8 @@ Route128_Movement_1522A1:: @ 81522A1
Route128_EventScript_1522A4:: @ 81522A4
trainerbattle 0, TRAINER_ISAIAH_1, 0, Route128_Text_1C1C67, Route128_Text_1C1C95
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route128_EventScript_1522CB
msgbox Route128_Text_1C1CC3, 6
end
@@ -194,8 +194,8 @@ Route128_EventScript_1522CB:: @ 81522CB
Route128_EventScript_1522E2:: @ 81522E2
trainerbattle 0, TRAINER_KATELYN_1, 0, Route128_Text_1C1DB0, Route128_Text_1C1E25
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq Route128_EventScript_152309
msgbox Route128_Text_1C1E4A, 6
end
diff --git a/data/maps/Route130/scripts.inc b/data/maps/Route130/scripts.inc
index 70eace112..a1e7b27d4 100644
--- a/data/maps/Route130/scripts.inc
+++ b/data/maps/Route130/scripts.inc
@@ -3,8 +3,8 @@ Route130_MapScripts:: @ 81523C2
.byte 0
Route130_MapScript1_1523C8:: @ 81523C8
- specialvar RESULT, IsMirageIslandPresent
- compare RESULT, 1
+ specialvar VAR_RESULT, IsMirageIslandPresent
+ compare VAR_RESULT, 1
goto_if_eq Route130_EventScript_15240C
setflag FLAG_TEMP_11
setflag FLAG_TEMP_12
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 72699ab79..710b8c700 100644
--- a/data/maps/RustboroCity/scripts.inc
+++ b/data/maps/RustboroCity/scripts.inc
@@ -123,7 +123,7 @@ RustboroCity_EventScript_14C481:: @ 814C481
lockall
setobjectxyperm 9, 14, 21
setobjectmovementtype 9, 10
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto RustboroCity_EventScript_14C4F4
end
@@ -131,7 +131,7 @@ RustboroCity_EventScript_14C498:: @ 814C498
lockall
setobjectxyperm 9, 14, 21
setobjectmovementtype 9, 10
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto RustboroCity_EventScript_14C4F4
end
@@ -139,7 +139,7 @@ RustboroCity_EventScript_14C4AF:: @ 814C4AF
lockall
setobjectxyperm 9, 14, 21
setobjectmovementtype 9, 10
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
goto RustboroCity_EventScript_14C4F4
end
@@ -147,7 +147,7 @@ RustboroCity_EventScript_14C4C6:: @ 814C4C6
lockall
setobjectxyperm 9, 14, 21
setobjectmovementtype 9, 10
- setvar VAR_SPECIAL_4, 3
+ setvar VAR_0x8004, 3
goto RustboroCity_EventScript_14C4F4
end
@@ -155,7 +155,7 @@ RustboroCity_EventScript_14C4DD:: @ 814C4DD
lockall
setobjectxyperm 9, 14, 21
setobjectmovementtype 9, 10
- setvar VAR_SPECIAL_4, 4
+ setvar VAR_0x8004, 4
goto RustboroCity_EventScript_14C4F4
end
@@ -465,7 +465,7 @@ RustboroCity_EventScript_14C77D:: @ 814C77D
call_if_eq RustboroCity_EventScript_14C8B8
msgbox RustboroCity_Text_166FB4, 4
giveitem_std ITEM_GREAT_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq RustboroCity_EventScript_14C7F5
msgbox RustboroCity_Text_16707F, 4
closemessage
@@ -547,9 +547,9 @@ RustboroCity_EventScript_14C8DA:: @ 814C8DA
faceplayer
goto_if_set FLAG_MET_RIVAL_RUSTBORO, RustboroCity_EventScript_14C917
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_EventScript_14C8FD
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_EventScript_14C90A
end
@@ -567,9 +567,9 @@ RustboroCity_EventScript_14C90A:: @ 814C90A
RustboroCity_EventScript_14C917:: @ 814C917
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_EventScript_14C92F
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_EventScript_14C939
end
diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
index e0b0e30f8..92c16e002 100644
--- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
@@ -68,10 +68,10 @@ RustboroCity_DevonCorp_2F_EventScript_157564:: @ 8157564
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157640
msgbox RustboroCity_DevonCorp_2F_Text_182ED5, 4
checkitem ITEM_ROOT_FOSSIL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_1575A6
checkitem ITEM_CLAW_FOSSIL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_1575EE
release
end
@@ -84,7 +84,7 @@ RustboroCity_DevonCorp_2F_EventScript_1575A6:: @ 81575A6
applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0835
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_182F35, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157636
bufferitemname 0, ITEM_ROOT_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_183023, 4
@@ -102,7 +102,7 @@ RustboroCity_DevonCorp_2F_EventScript_1575EE:: @ 81575EE
applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0835
waitmovement 0
msgbox RustboroCity_DevonCorp_2F_Text_182F35, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157636
bufferitemname 0, ITEM_CLAW_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_183023, 4
@@ -133,9 +133,9 @@ RustboroCity_DevonCorp_2F_EventScript_157661:: @ 8157661
bufferspeciesname 1, SPECIES_LILEEP
msgbox RustboroCity_DevonCorp_2F_Text_183124, 4
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157707
- copyvar VAR_SPECIAL_4, RESULT
+ copyvar VAR_0x8004, VAR_RESULT
setvar VAR_FOSSIL_RESURRECTION_STATE, 0
setflag FLAG_RECEIVED_FOSSIL_MON
playfanfare MUS_FANFA4
@@ -144,7 +144,7 @@ RustboroCity_DevonCorp_2F_EventScript_157661:: @ 8157661
waitmessage
givemon SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0
msgbox RustboroCity_DevonCorp_2F_Text_1A1102, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq RustboroCity_DevonCorp_2F_EventScript_1A0678
release
end
@@ -153,9 +153,9 @@ RustboroCity_DevonCorp_2F_EventScript_1576B4:: @ 81576B4
bufferspeciesname 1, SPECIES_ANORITH
msgbox RustboroCity_DevonCorp_2F_Text_183124, 4
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157707
- copyvar VAR_SPECIAL_4, RESULT
+ copyvar VAR_0x8004, VAR_RESULT
setvar VAR_FOSSIL_RESURRECTION_STATE, 0
setflag FLAG_RECEIVED_FOSSIL_MON
playfanfare MUS_FANFA4
@@ -164,7 +164,7 @@ RustboroCity_DevonCorp_2F_EventScript_1576B4:: @ 81576B4
waitmessage
givemon SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0
msgbox RustboroCity_DevonCorp_2F_Text_1A1102, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq RustboroCity_DevonCorp_2F_EventScript_1A0678
release
end
diff --git a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
index cead5e5a2..e8d2f4d68 100644
--- a/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_3F/scripts.inc
@@ -150,7 +150,7 @@ RustboroCity_DevonCorp_3F_EventScript_15783B:: @ 815783B
goto_if_set FLAG_DELIVERED_STEVEN_LETTER, RustboroCity_DevonCorp_3F_EventScript_157864
msgbox RustboroCity_DevonCorp_3F_Text_18351E, 4
closemessage
- applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
waitmovement 0
release
end
@@ -158,12 +158,12 @@ RustboroCity_DevonCorp_3F_EventScript_15783B:: @ 815783B
RustboroCity_DevonCorp_3F_EventScript_157864:: @ 8157864
msgbox RustboroCity_DevonCorp_3F_Text_18353E, 4
giveitem_std ITEM_EXP_SHARE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_DevonCorp_3F_EventScript_1A029B
setflag FLAG_RECEIVED_EXP_SHARE
msgbox RustboroCity_DevonCorp_3F_Text_1835B3, 4
closemessage
- applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
waitmovement 0
release
end
@@ -171,7 +171,7 @@ RustboroCity_DevonCorp_3F_EventScript_157864:: @ 8157864
RustboroCity_DevonCorp_3F_EventScript_15789B:: @ 815789B
msgbox RustboroCity_DevonCorp_3F_Text_18368D, 4
closemessage
- applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/RustboroCity_Flat2_2F/scripts.inc b/data/maps/RustboroCity_Flat2_2F/scripts.inc
index 5ed9ac0ef..c100687a2 100644
--- a/data/maps/RustboroCity_Flat2_2F/scripts.inc
+++ b/data/maps/RustboroCity_Flat2_2F/scripts.inc
@@ -11,7 +11,7 @@ RustboroCity_Flat2_2F_EventScript_157DA0:: @ 8157DA0
goto_if_set FLAG_RECEIVED_PREMIER_BALL_RUSTBORO, RustboroCity_Flat2_2F_EventScript_157DCF
msgbox RustboroCity_Flat2_2F_Text_185461, 4
giveitem_std ITEM_PREMIER_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_Flat2_2F_EventScript_1A029B
setflag FLAG_RECEIVED_PREMIER_BALL_RUSTBORO
release
diff --git a/data/maps/RustboroCity_Gym/scripts.inc b/data/maps/RustboroCity_Gym/scripts.inc
index 9c379107f..f1eb9d171 100644
--- a/data/maps/RustboroCity_Gym/scripts.inc
+++ b/data/maps/RustboroCity_Gym/scripts.inc
@@ -17,7 +17,7 @@ RustboroCity_Gym_EventScript_1578FE:: @ 81578FE
setflag FLAG_BADGE01_GET
setvar VAR_RUSTBORO_STATE, 1
addvar VAR_PETALBURG_GYM_STATE, 1
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
call RustboroCity_Gym_EventScript_1A01C0
compare VAR_PETALBURG_GYM_STATE, 6
call_if_eq RustboroCity_Gym_EventScript_1A00FB
@@ -26,7 +26,7 @@ RustboroCity_Gym_EventScript_1578FE:: @ 81578FE
RustboroCity_Gym_EventScript_15793C:: @ 815793C
giveitem_std ITEM_TM39_ROCK_TOMB
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_Gym_EventScript_1A029B
setflag FLAG_RECEIVED_TM39
msgbox RustboroCity_Gym_Text_184170, 4
diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc
index abbac505b..f49581ef9 100644
--- a/data/maps/RustboroCity_House1/scripts.inc
+++ b/data/maps/RustboroCity_House1/scripts.inc
@@ -5,25 +5,25 @@ RustboroCity_House1_EventScript_157C7D:: @ 8157C7D
lock
faceplayer
goto_if_set FLAG_RUSTBORO_NPC_TRADE_COMPLETED, RustboroCity_House1_EventScript_157D13
- setvar VAR_SPECIAL_8, 0
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- specialvar RESULT, GetInGameTradeSpeciesInfo
- copyvar VAR_SPECIAL_9, RESULT
+ setvar VAR_0x8008, 0
+ copyvar VAR_0x8004, VAR_0x8008
+ specialvar VAR_RESULT, GetInGameTradeSpeciesInfo
+ copyvar VAR_0x8009, VAR_RESULT
msgbox RustboroCity_House1_Text_184EBA, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq RustboroCity_House1_EventScript_157CFB
special SelectMonForNPCTrade
waitstate
- copyvar VAR_SPECIAL_A, VAR_SPECIAL_4
- compare VAR_SPECIAL_4, 255
+ copyvar VAR_0x800A, VAR_0x8004
+ compare VAR_0x8004, 255
goto_if_eq RustboroCity_House1_EventScript_157CFB
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
- specialvar RESULT, GetTradeSpecies
- copyvar VAR_SPECIAL_B, RESULT
- compare RESULT, VAR_SPECIAL_9
+ copyvar VAR_0x8005, VAR_0x800A
+ specialvar VAR_RESULT, GetTradeSpecies
+ copyvar VAR_0x800B, VAR_RESULT
+ compare VAR_RESULT, VAR_0x8009
goto_if_ne RustboroCity_House1_EventScript_157D05
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
- copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
+ copyvar VAR_0x8004, VAR_0x8008
+ copyvar VAR_0x8005, VAR_0x800A
special CreateInGameTradePokemon
special DoInGameTradeScene
waitstate
@@ -38,7 +38,7 @@ RustboroCity_House1_EventScript_157CFB:: @ 8157CFB
end
RustboroCity_House1_EventScript_157D05:: @ 8157D05
- bufferspeciesname 0, VAR_SPECIAL_9
+ bufferspeciesname 0, VAR_0x8009
msgbox RustboroCity_House1_Text_184F8F, 4
release
end
diff --git a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
index c0bb5c2dd..6da36aef8 100644
--- a/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/RustboroCity_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ RustboroCity_PokemonCenter_1F_MapScript1_157B7F:: @ 8157B7F
end
RustboroCity_PokemonCenter_1F_EventScript_157B88:: @ 8157B88
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call RustboroCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/RustboroCity_PokemonSchool/scripts.inc b/data/maps/RustboroCity_PokemonSchool/scripts.inc
index f8193cbb8..467a62b04 100644
--- a/data/maps/RustboroCity_PokemonSchool/scripts.inc
+++ b/data/maps/RustboroCity_PokemonSchool/scripts.inc
@@ -11,7 +11,7 @@ RustboroCity_PokemonSchool_EventScript_1579F1:: @ 81579F1
message RustboroCity_PokemonSchool_Text_184368
waitmessage
multichoicegrid 8, 1, 13, 3, 0
- switch RESULT
+ switch VAR_RESULT
case 0, RustboroCity_PokemonSchool_EventScript_157A50
case 1, RustboroCity_PokemonSchool_EventScript_157A5E
case 2, RustboroCity_PokemonSchool_EventScript_157A6C
@@ -78,35 +78,35 @@ RustboroCity_PokemonSchool_EventScript_157ACE:: @ 8157ACE
lock
faceplayer
goto_if_set FLAG_RECEIVED_QUICK_CLAW, RustboroCity_PokemonSchool_EventScript_157B34
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq RustboroCity_PokemonSchool_EventScript_157B1E
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq RustboroCity_PokemonSchool_EventScript_157B29
msgbox RustboroCity_PokemonSchool_Text_1846A2, 4
giveitem_std ITEM_QUICK_CLAW
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq RustboroCity_PokemonSchool_EventScript_1A029B
closemessage
- applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845
+ applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845
waitmovement 0
setflag FLAG_RECEIVED_QUICK_CLAW
release
end
RustboroCity_PokemonSchool_EventScript_157B1E:: @ 8157B1E
- applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B60
+ applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B60
waitmovement 0
return
RustboroCity_PokemonSchool_EventScript_157B29:: @ 8157B29
- applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B49
+ applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B49
waitmovement 0
return
RustboroCity_PokemonSchool_EventScript_157B34:: @ 8157B34
msgbox RustboroCity_PokemonSchool_Text_184737, 4
closemessage
- applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845
+ applymovement VAR_LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845
waitmovement 0
release
end
diff --git a/data/maps/RusturfTunnel/scripts.inc b/data/maps/RusturfTunnel/scripts.inc
index 6c3f759cc..0e3c71b22 100644
--- a/data/maps/RusturfTunnel/scripts.inc
+++ b/data/maps/RusturfTunnel/scripts.inc
@@ -24,7 +24,7 @@ RusturfTunnel_EventScript_15C782:: @ 815C782
faceplayer
msgbox RusturfTunnel_Text_194766, 4
closemessage
- applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_1A083D
waitmovement 0
release
end
@@ -36,7 +36,7 @@ RusturfTunnel_EventScript_15C799:: @ 815C799
setflag FLAG_TEMP_1
msgbox RusturfTunnel_Text_1944C5, 4
closemessage
- applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_1A083D
waitmovement 0
release
end
@@ -44,7 +44,7 @@ RusturfTunnel_EventScript_15C799:: @ 815C799
RusturfTunnel_EventScript_15C7BC:: @ 815C7BC
msgbox RusturfTunnel_Text_1945B2, 4
closemessage
- applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
+ applymovement VAR_LAST_TALKED, RusturfTunnel_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/SSTidalRooms/scripts.inc b/data/maps/SSTidalRooms/scripts.inc
index 52927d54e..fd7854875 100644
--- a/data/maps/SSTidalRooms/scripts.inc
+++ b/data/maps/SSTidalRooms/scripts.inc
@@ -7,7 +7,7 @@ SSTidalRooms_EventScript_15FF06:: @ 815FF06
goto_if_set FLAG_RECEIVED_TM49, SSTidalRooms_EventScript_15FF3D
msgbox SSTidalRooms_Text_199B65, 4
giveitem_std ITEM_TM49_SNATCH
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SSTidalRooms_EventScript_1A029B
setflag FLAG_RECEIVED_TM49
msgbox SSTidalRooms_Text_199C1A, 4
diff --git a/data/maps/SafariZone_Southeast/scripts.inc b/data/maps/SafariZone_Southeast/scripts.inc
index d7d581891..e989748b1 100644
--- a/data/maps/SafariZone_Southeast/scripts.inc
+++ b/data/maps/SafariZone_Southeast/scripts.inc
@@ -55,7 +55,7 @@ SafariZone_Southeast_EventScript_1600A7:: @ 81600A7
compare VAR_TEMP_1, 0
goto_if_eq SafariZone_Southeast_EventScript_1600D1
msgbox SafariZone_Southeast_Text_1C3A56, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SafariZone_Southeast_EventScript_1600E0
msgbox SafariZone_Southeast_Text_1C3A9C, 4
release
@@ -70,7 +70,7 @@ SafariZone_Southeast_EventScript_1600D1:: @ 81600D1
SafariZone_Southeast_EventScript_1600E0:: @ 81600E0
msgbox SafariZone_Southeast_Text_1C3ACA, 4
closemessage
- switch FACING
+ switch VAR_FACING
case 2, SafariZone_Southeast_EventScript_160105
case 4, SafariZone_Southeast_EventScript_16011F
end
diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc
index d50a591f7..6d6b58be8 100644
--- a/data/maps/SeafloorCavern_Room9/scripts.inc
+++ b/data/maps/SeafloorCavern_Room9/scripts.inc
@@ -14,10 +14,10 @@ SeafloorCavern_Room9_MapScript1_15DAEC:: @ 815DAEC
SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
lockall
- setvar VAR_SPECIAL_4, 2
- setvar VAR_SPECIAL_5, 3
- setvar VAR_SPECIAL_6, 4
- setvar VAR_SPECIAL_7, 5
+ setvar VAR_0x8004, 2
+ setvar VAR_0x8005, 3
+ setvar VAR_0x8006, 4
+ setvar VAR_0x8007, 5
applymovement 255, SeafloorCavern_Room9_Movement_1A0841
waitmovement 0
applymovement 255, SeafloorCavern_Room9_Movement_15DD68
@@ -28,24 +28,24 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
msgbox SeafloorCavern_Room9_Text_1B4850, 4
.endif
closemessage
- addobject VAR_SPECIAL_4
+ addobject VAR_0x8004
applymovement 255, SeafloorCavern_Room9_Movement_1A083F
waitmovement 0
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_15DD36
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_15DD36
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B41D5, 4
.else
msgbox SeafloorCavern_Room9_Text_1B486C, 4
.endif
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0841
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0841
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B4201, 4
.else
msgbox SeafloorCavern_Room9_Text_1B4897, 4
.endif
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0839
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0839
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B4289, 4
@@ -74,9 +74,9 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
special WaitWeather
waitstate
.ifdef SAPPHIRE
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
.else
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
.endif
playse SE_W197
setfieldeffectargument 0, 16
@@ -85,14 +85,14 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
dofieldeffect FLDEFF_SPARKLE
waitfieldeffect FLDEFF_SPARKLE
.ifdef SAPPHIRE
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
.else
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
.endif
playfanfare MUS_ME_TAMA
playse SE_TAMA
special sub_80818A4
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0841
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0841
applymovement 255, SeafloorCavern_Room9_Movement_1A0841
waitmovement 0
delay 150
@@ -104,23 +104,23 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
waitmovement 0
special sub_80818FC
waitstate
- setvar VAR_SPECIAL_4, 1
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8004, 1
+ setvar VAR_0x8005, 1
special sub_810F758
waitstate
applymovement 1, SeafloorCavern_Room9_Movement_15DD57
waitmovement 0
removeobject 1
delay 4
- setvar VAR_SPECIAL_4, 2
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8004, 2
+ setvar VAR_0x8005, 2
special sub_810F758
waitstate
delay 30
- setvar VAR_SPECIAL_4, 2
- setvar VAR_SPECIAL_5, 3
- setvar VAR_SPECIAL_6, 4
- setvar VAR_SPECIAL_7, 5
+ setvar VAR_0x8004, 2
+ setvar VAR_0x8005, 3
+ setvar VAR_0x8006, 4
+ setvar VAR_0x8007, 5
.ifdef SAPPHIRE
msgbox UnknownString_81B43F2, 4
.else
@@ -135,7 +135,7 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
msgbox SeafloorCavern_Room9_Text_1B4ADB, 4
.endif
closemessage
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_15DD41
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_15DD41
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B447A, 4
@@ -145,7 +145,7 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
closemessage
playse SE_PC_OFF
delay 20
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0845
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0845
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B45C6, 4
@@ -153,14 +153,14 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
msgbox SeafloorCavern_Room9_Text_1B4C79, 4
.endif
closemessage
- addobject VAR_SPECIAL_5
- addobject VAR_SPECIAL_6
- addobject VAR_SPECIAL_7
- applymovement VAR_SPECIAL_7, SeafloorCavern_Room9_Movement_15DD63
- applymovement VAR_SPECIAL_6, SeafloorCavern_Room9_Movement_15DD63
- applymovement VAR_SPECIAL_5, SeafloorCavern_Room9_Movement_15DD5A
+ addobject VAR_0x8005
+ addobject VAR_0x8006
+ addobject VAR_0x8007
+ applymovement VAR_0x8007, SeafloorCavern_Room9_Movement_15DD63
+ applymovement VAR_0x8006, SeafloorCavern_Room9_Movement_15DD63
+ applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_15DD5A
waitmovement 0
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A083F
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A083F
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B464D, 4
@@ -168,9 +168,9 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
msgbox SeafloorCavern_Room9_Text_1B4D02, 4
.endif
playse SE_PIN
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0833
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0833
waitmovement 0
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_1A0835
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_1A0835
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B4723, 4
@@ -183,8 +183,8 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA
msgbox SeafloorCavern_Room9_Text_1B4E37, 4
.endif
closemessage
- applymovement VAR_SPECIAL_5, SeafloorCavern_Room9_Movement_15DD60
- applymovement VAR_SPECIAL_4, SeafloorCavern_Room9_Movement_15DD46
+ applymovement VAR_0x8005, SeafloorCavern_Room9_Movement_15DD60
+ applymovement VAR_0x8004, SeafloorCavern_Room9_Movement_15DD46
waitmovement 0
.ifdef SAPPHIRE
msgbox UnknownString_81B4818, 4
diff --git a/data/maps/SealedChamber_InnerRoom/scripts.inc b/data/maps/SealedChamber_InnerRoom/scripts.inc
index 11aba3ac8..c8d4929b9 100644
--- a/data/maps/SealedChamber_InnerRoom/scripts.inc
+++ b/data/maps/SealedChamber_InnerRoom/scripts.inc
@@ -7,8 +7,8 @@ SealedChamber_InnerRoom_EventScript_15F1E8:: @ 815F1E8
waitbuttonpress
erasebox 0, 0, 29, 19
goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_15F247
- specialvar RESULT, CheckRelicanthWailord
- compare RESULT, 0
+ specialvar VAR_RESULT, CheckRelicanthWailord
+ compare VAR_RESULT, 0
goto_if_eq SealedChamber_InnerRoom_EventScript_15F247
fadeoutbgm 0
playse SE_TRACK_MOVE
diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
index 2005cb67b..76de79e6f 100644
--- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
@@ -21,24 +21,24 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076
dodailyevents
call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_15E176
checkitem ITEM_SHOAL_SALT, 4
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E138
checkitem ITEM_SHOAL_SHELL, 4
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E138
msgbox ShoalCave_LowTideEntranceRoom_Text_1C6793, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E16C
checkitemspace ITEM_SHELL_BELL, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E106
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E12E
msgbox ShoalCave_LowTideEntranceRoom_Text_1C6808, 4
takeitem ITEM_SHOAL_SALT, 4
takeitem ITEM_SHOAL_SHELL, 4
giveitem_std ITEM_SHELL_BELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_1A029B
msgbox ShoalCave_LowTideEntranceRoom_Text_1C688E, 4
setflag FLAG_TEMP_2
@@ -47,18 +47,18 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076
ShoalCave_LowTideEntranceRoom_EventScript_15E106:: @ 815E106
checkitem ITEM_SHOAL_SALT, 5
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E117
return
ShoalCave_LowTideEntranceRoom_EventScript_15E117:: @ 815E117
checkitem ITEM_SHOAL_SHELL, 5
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E128
return
ShoalCave_LowTideEntranceRoom_EventScript_15E128:: @ 815E128
- setvar RESULT, 2
+ setvar VAR_RESULT, 2
return
ShoalCave_LowTideEntranceRoom_EventScript_15E12E:: @ 815E12E
@@ -68,10 +68,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E12E:: @ 815E12E
ShoalCave_LowTideEntranceRoom_EventScript_15E138:: @ 815E138
checkitem ITEM_SHOAL_SALT, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E162
checkitem ITEM_SHOAL_SHELL, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E162
msgbox ShoalCave_LowTideEntranceRoom_Text_1C6668, 4
release
diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
index 546481765..512de471c 100644
--- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
@@ -63,7 +63,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E257:: @ 815E257
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0
special DrawWholeMapView
@@ -80,7 +80,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0
special DrawWholeMapView
@@ -92,7 +92,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0
special DrawWholeMapView
@@ -104,7 +104,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0
special DrawWholeMapView
@@ -116,7 +116,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E329:: @ 815E329
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_15E35B
giveitem_std ITEM_SHOAL_SALT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0
special DrawWholeMapView
@@ -133,7 +133,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E365:: @ 815E365
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_15E35B
giveitem_std ITEM_SHOAL_SALT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0
special DrawWholeMapView
diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
index 19223a499..aa271034d 100644
--- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
@@ -18,7 +18,7 @@ ShoalCave_LowTideLowerRoom_EventScript_15E413:: @ 815E413
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_15E445
giveitem_std ITEM_SHOAL_SALT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_1A029B
setmetatile 18, 2, 858, 0
special DrawWholeMapView
@@ -37,7 +37,7 @@ ShoalCave_LowTideLowerRoom_EventScript_15E44F:: @ 815E44F
goto_if_set FLAG_RECEIVED_FOCUS_BAND, ShoalCave_LowTideLowerRoom_EventScript_15E47E
msgbox ShoalCave_LowTideLowerRoom_Text_198200, 4
giveitem_std ITEM_FOCUS_BAND
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_1A029B
setflag FLAG_RECEIVED_FOCUS_BAND
release
diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
index f3a629582..3a935af56 100644
--- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
@@ -18,7 +18,7 @@ ShoalCave_LowTideStairsRoom_EventScript_15E3B7:: @ 815E3B7
lockall
goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_15E3E9
giveitem_std ITEM_SHOAL_SALT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_1A029B
setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, 0
special DrawWholeMapView
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 82149a4bc..d7d68c06a 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -7,7 +7,7 @@ SkyPillar_Top_MapScript1_15F308:: @ 815F308
end
SkyPillar_Top_EventScript_15F312:: @ 815F312
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
return
SkyPillar_Top_EventScript_15F316:: @ 815F316
diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc
index 5583762d3..a6c98a621 100644
--- a/data/maps/SlateportCity/scripts.inc
+++ b/data/maps/SlateportCity/scripts.inc
@@ -66,11 +66,11 @@ SlateportCity_EventScript_14BAE0:: @ 814BAE0
faceplayer
bufferleadmonspeciesname 0
msgbox SlateportCity_Text_164682, 4
- specialvar RESULT, LeadMonHasEffortRibbon
- compare RESULT, 1
+ specialvar VAR_RESULT, LeadMonHasEffortRibbon
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_EventScript_14BB35
- specialvar RESULT, ScrSpecial_AreLeadMonEVsMaxedOut
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_AreLeadMonEVsMaxedOut
+ compare VAR_RESULT, 0
call_if_eq SlateportCity_EventScript_14BB2B
msgbox SlateportCity_Text_164691, 4
playfanfare MUS_FANFA4
@@ -283,9 +283,9 @@ SlateportCity_EventScript_14BD06:: @ 814BD06
lock
faceplayer
msgbox SlateportCity_Text_1650F1, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq SlateportCity_EventScript_14BD28
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq SlateportCity_EventScript_14BD31
release
end
diff --git a/data/maps/SlateportCity_ContestHall/scripts.inc b/data/maps/SlateportCity_ContestHall/scripts.inc
index 5f6a3c15d..d4b43ee56 100644
--- a/data/maps/SlateportCity_ContestHall/scripts.inc
+++ b/data/maps/SlateportCity_ContestHall/scripts.inc
@@ -15,7 +15,7 @@ SlateportCity_ContestHall_EventScript_15555E:: @ 815555E
goto_if_set FLAG_RECEIVED_TM41, SlateportCity_ContestHall_EventScript_155595
msgbox SlateportCity_ContestHall_Text_17CCE2, 4
giveitem_std ITEM_TM41_TORMENT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_ContestHall_EventScript_1A029B
setflag FLAG_RECEIVED_TM41
msgbox SlateportCity_ContestHall_Text_17CE28, 4
diff --git a/data/maps/SlateportCity_ContestLobby/scripts.inc b/data/maps/SlateportCity_ContestLobby/scripts.inc
index 356b64518..3bf5a3d06 100644
--- a/data/maps/SlateportCity_ContestLobby/scripts.inc
+++ b/data/maps/SlateportCity_ContestLobby/scripts.inc
@@ -7,8 +7,8 @@ SlateportCity_ContestLobby_MapScript1_155417:: @ 8155417
end
SlateportCity_ContestLobby_EventScript_15541D:: @ 815541D
- setvar VAR_SPECIAL_B, 7
- setvar CONTEST_RANK, 2
+ setvar VAR_0x800B, 7
+ setvar VAR_CONTEST_RANK, 2
call SlateportCity_ContestLobby_EventScript_1A4E92
call SlateportCity_ContestLobby_EventScript_155448
special SetContestTrainerGfxIds
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index 872c70352..76f9379b1 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -23,25 +23,25 @@ SlateportCity_Harbor_EventScript_155F89:: @ 8155F89
SlateportCity_Harbor_EventScript_155F9B:: @ 8155F9B
lockall
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
goto SlateportCity_Harbor_EventScript_155FD5
end
SlateportCity_Harbor_EventScript_155FA7:: @ 8155FA7
lockall
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
goto SlateportCity_Harbor_EventScript_155FD5
end
SlateportCity_Harbor_EventScript_155FB3:: @ 8155FB3
lockall
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto SlateportCity_Harbor_EventScript_155FD5
end
SlateportCity_Harbor_EventScript_155FBF:: @ 8155FBF
lockall
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
applymovement 255, SlateportCity_Harbor_Movement_1560C2
waitmovement 0
goto SlateportCity_Harbor_EventScript_155FD5
@@ -62,13 +62,13 @@ SlateportCity_Harbor_EventScript_155FD5:: @ 8155FD5
removeobject 7
removeobject 8
setvar VAR_SLATEPORT_HARBOR_STATE, 2
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq SlateportCity_Harbor_EventScript_15605C
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq SlateportCity_Harbor_EventScript_156071
- compare VAR_SPECIAL_8, 2
+ compare VAR_0x8008, 2
call_if_eq SlateportCity_Harbor_EventScript_156086
- compare VAR_SPECIAL_8, 3
+ compare VAR_0x8008, 3
call_if_eq SlateportCity_Harbor_EventScript_156086
msgbox SlateportCity_Harbor_Text_17FE60, 4
closemessage
@@ -166,7 +166,7 @@ SlateportCity_Harbor_EventScript_1560C4:: @ 81560C4
SlateportCity_Harbor_EventScript_1560D9:: @ 81560D9
msgbox SlateportCity_Harbor_Text_17FA73, 4
checkitem ITEM_SS_TICKET, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_Harbor_EventScript_156135
message SlateportCity_Harbor_Text_17FB0A
waitmessage
@@ -175,7 +175,7 @@ SlateportCity_Harbor_EventScript_1560D9:: @ 81560D9
SlateportCity_Harbor_EventScript_1560FD:: @ 81560FD
multichoicedefault 18, 6, 52, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_15613F
case 1, SlateportCity_Harbor_EventScript_156167
case 2, SlateportCity_Harbor_EventScript_1561DA
@@ -189,7 +189,7 @@ SlateportCity_Harbor_EventScript_156135:: @ 8156135
SlateportCity_Harbor_EventScript_15613F:: @ 815613F
msgbox SlateportCity_Harbor_Text_17FB81, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_Harbor_EventScript_15618A
setvar VAR_PORTHOLE_STATE, 1
call SlateportCity_Harbor_EventScript_156196
@@ -200,7 +200,7 @@ SlateportCity_Harbor_EventScript_15613F:: @ 815613F
SlateportCity_Harbor_EventScript_156167:: @ 8156167
msgbox SlateportCity_Harbor_Text_17FB9C, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_Harbor_EventScript_15618A
call SlateportCity_Harbor_EventScript_156196
warp MAP_BATTLE_TOWER_OUTSIDE, 255, 19, 23
@@ -217,17 +217,17 @@ SlateportCity_Harbor_EventScript_15618A:: @ 815618A
SlateportCity_Harbor_EventScript_156196:: @ 8156196
msgbox SlateportCity_Harbor_Text_17FBB6, 4
closemessage
- applymovement LAST_TALKED, SlateportCity_Harbor_Movement_1A0841
+ applymovement VAR_LAST_TALKED, SlateportCity_Harbor_Movement_1A0841
waitmovement 0
delay 30
- hideobjectat LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
- compare FACING, 2
+ hideobjectat VAR_LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
+ compare VAR_FACING, 2
call_if_eq SlateportCity_Harbor_EventScript_1561EF
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq SlateportCity_Harbor_EventScript_1561E4
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
- setvar VAR_SPECIAL_4, 5
+ setvar VAR_0x8004, 5
call SlateportCity_Harbor_EventScript_1A040E
return
@@ -273,7 +273,7 @@ SlateportCity_Harbor_EventScript_156211:: @ 8156211
goto_if_eq SlateportCity_Harbor_EventScript_15624E
msgbox SlateportCity_Harbor_Text_17FD1C, 4
closemessage
- applymovement LAST_TALKED, SlateportCity_Harbor_Movement_1A083D
+ applymovement VAR_LAST_TALKED, SlateportCity_Harbor_Movement_1A083D
waitmovement 0
release
end
@@ -298,7 +298,7 @@ SlateportCity_Harbor_EventScript_15626F:: @ 815626F
compare VAR_TEMP_1, 1
goto_if_eq SlateportCity_Harbor_EventScript_156380
checkitem ITEM_SCANNER, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_Harbor_EventScript_1562A7
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_15629D
msgbox SlateportCity_Harbor_Text_18017B, 4
@@ -318,7 +318,7 @@ SlateportCity_Harbor_EventScript_1562A7:: @ 81562A7
SlateportCity_Harbor_EventScript_1562B3:: @ 81562B3
multichoice 0, 0, 46, 0
- switch RESULT
+ switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_1562EA
case 1, SlateportCity_Harbor_EventScript_15632A
case 2, SlateportCity_Harbor_EventScript_15636A
@@ -327,10 +327,10 @@ SlateportCity_Harbor_EventScript_1562B3:: @ 81562B3
SlateportCity_Harbor_EventScript_1562EA:: @ 81562EA
msgbox SlateportCity_Harbor_Text_1803DD, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_Harbor_EventScript_156374
giveitem_std ITEM_DEEP_SEA_TOOTH
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_Harbor_EventScript_1A029B
takeitem ITEM_SCANNER, 1
msgbox SlateportCity_Harbor_Text_18046B, 4
@@ -340,10 +340,10 @@ SlateportCity_Harbor_EventScript_1562EA:: @ 81562EA
SlateportCity_Harbor_EventScript_15632A:: @ 815632A
msgbox SlateportCity_Harbor_Text_180412, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_Harbor_EventScript_156374
giveitem_std ITEM_DEEP_SEA_SCALE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_Harbor_EventScript_1A029B
takeitem ITEM_SCANNER, 1
msgbox SlateportCity_Harbor_Text_18046B, 4
diff --git a/data/maps/SlateportCity_House1/scripts.inc b/data/maps/SlateportCity_House1/scripts.inc
index be2955937..589800008 100644
--- a/data/maps/SlateportCity_House1/scripts.inc
+++ b/data/maps/SlateportCity_House1/scripts.inc
@@ -5,9 +5,9 @@ SlateportCity_House1_EventScript_15567B:: @ 815567B
lock
faceplayer
msgbox SlateportCity_House1_Text_17D46A, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_House1_EventScript_15569C
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_House1_EventScript_1556BF
end
@@ -15,9 +15,9 @@ SlateportCity_House1_EventScript_15569C:: @ 815569C
msgbox SlateportCity_House1_Text_17D4DB, 4
special SelectMonForNPCTrade
waitstate
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_ne SlateportCity_House1_EventScript_1556C9
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq SlateportCity_House1_EventScript_1556BF
end
@@ -27,21 +27,21 @@ SlateportCity_House1_EventScript_1556BF:: @ 81556BF
end
SlateportCity_House1_EventScript_1556C9:: @ 81556C9
- specialvar RESULT, ScriptGetPartyMonSpecies
- compare RESULT, SPECIES_EGG
+ specialvar VAR_RESULT, ScriptGetPartyMonSpecies
+ compare VAR_RESULT, SPECIES_EGG
goto_if_eq SlateportCity_House1_EventScript_15571C
special TV_CopyNicknameToStringVar1AndEnsureTerminated
special TV_CheckMonOTIDEqualsPlayerID
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_House1_EventScript_155726
- specialvar RESULT, MonOTNameMatchesPlayer
+ specialvar VAR_RESULT, MonOTNameMatchesPlayer
special TV_CopyNicknameToStringVar1AndEnsureTerminated
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_House1_EventScript_155726
msgbox SlateportCity_House1_Text_17D505, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_House1_EventScript_155730
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SlateportCity_House1_EventScript_1556BF
end
@@ -58,9 +58,9 @@ SlateportCity_House1_EventScript_155726:: @ 8155726
SlateportCity_House1_EventScript_155730:: @ 8155730
msgbox SlateportCity_House1_Text_17D580, 4
call SlateportCity_House1_EventScript_1A0678
- specialvar RESULT, TV_PutNameRaterShowOnTheAirIfNicnkameChanged
+ specialvar VAR_RESULT, TV_PutNameRaterShowOnTheAirIfNicnkameChanged
special TV_CopyNicknameToStringVar1AndEnsureTerminated
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_House1_EventScript_15575A
msgbox SlateportCity_House1_Text_17D63A, 4
release
diff --git a/data/maps/SlateportCity_House2/scripts.inc b/data/maps/SlateportCity_House2/scripts.inc
index 934fae153..986b27124 100644
--- a/data/maps/SlateportCity_House2/scripts.inc
+++ b/data/maps/SlateportCity_House2/scripts.inc
@@ -9,7 +9,7 @@ SlateportCity_House2_EventScript_156399:: @ 8156399
lock
faceplayer
checkitem ITEM_CONTEST_PASS, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SlateportCity_House2_EventScript_1563B5
msgbox SlateportCity_House2_Text_180567, 4
release
diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
index cb65f1be5..9a1696b6e 100644
--- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
@@ -34,7 +34,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_155B06:: @ 8155B06
showmoneybox 0, 0
nop
msgbox SlateportCity_OceanicMuseum_1F_Text_17E18D, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155B2D
closemessage
hidemoneybox 0, 0
@@ -45,7 +45,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_155B06:: @ 8155B06
SlateportCity_OceanicMuseum_1F_EventScript_155B2D:: @ 8155B2D
checkmoney 0x32, 0
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155B5A
takemoney 0x32, 0
updatemoneybox 0, 0
@@ -164,14 +164,14 @@ SlateportCity_OceanicMuseum_1F_EventScript_155C3A:: @ 8155C3A
waitmovement 0
msgbox SlateportCity_OceanicMuseum_1F_Text_17E582, 4
giveitem_std ITEM_TM46_THIEF
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155CC2
setflag FLAG_RECEIVED_TM46
msgbox SlateportCity_OceanicMuseum_1F_Text_17E606, 4
closemessage
- compare FACING, 2
+ compare VAR_FACING, 2
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155C98
- compare FACING, 2
+ compare VAR_FACING, 2
goto_if_ne SlateportCity_OceanicMuseum_1F_EventScript_155CAD
end
diff --git a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
index 58e4ba240..569da9944 100644
--- a/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_2F/scripts.inc
@@ -21,21 +21,21 @@ SlateportCity_OceanicMuseum_2F_EventScript_155CE6:: @ 8155CE6
applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_155EB8
applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EC5
waitmovement 0
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E62
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E62
msgbox SlateportCity_OceanicMuseum_2F_Text_17EDAE, 4
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_ne SlateportCity_OceanicMuseum_2F_EventScript_155E6D
msgbox SlateportCity_OceanicMuseum_2F_Text_17EDD7, 4
msgbox SlateportCity_OceanicMuseum_2F_Text_17EE01, 4
closemessage
applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EB2
waitmovement 0
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E78
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E83
trainerbattle 3, TRAINER_MUSEUM_2F_GRUNT_1, 0, SlateportCity_OceanicMuseum_2F_Text_17EE4E
msgbox SlateportCity_OceanicMuseum_2F_Text_17EE66, 4
@@ -78,7 +78,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_155CE6:: @ 8155CE6
applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_1A0843
waitmovement 0
msgbox SlateportCity_OceanicMuseum_2F_Text_17F352, 4
- setvar VAR_SPECIAL_4, 269
+ setvar VAR_0x8004, 269
call SlateportCity_OceanicMuseum_2F_EventScript_1A067F
msgbox SlateportCity_OceanicMuseum_2F_Text_17F433, 4
closemessage
@@ -266,7 +266,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_155F46:: @ 8155F46
faceplayer
msgbox SlateportCity_OceanicMuseum_2F_Text_17F53B, 4
closemessage
- applymovement LAST_TALKED, SlateportCity_OceanicMuseum_2F_Movement_1A083D
+ applymovement VAR_LAST_TALKED, SlateportCity_OceanicMuseum_2F_Movement_1A083D
waitmovement 0
release
end
diff --git a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
index 1164e96d6..fef6401e7 100644
--- a/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SlateportCity_PokemonCenter_1F/scripts.inc
@@ -8,7 +8,7 @@ SlateportCity_PokemonCenter_1F_MapScript1_1563C5:: @ 81563C5
end
SlateportCity_PokemonCenter_1F_EventScript_1563CE:: @ 81563CE
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call SlateportCity_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
index 6a8c88e1e..b47b7b317 100644
--- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc
+++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
@@ -75,7 +75,7 @@ SlateportCity_PokemonFanClub_EventScript_155899:: @ 8155899
SlateportCity_PokemonFanClub_EventScript_1558A3:: @ 81558A3
checkitemspace ITEM_RED_SCARF, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998
msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4
setflag FLAG_RECEIVED_RED_SCARF
@@ -86,7 +86,7 @@ SlateportCity_PokemonFanClub_EventScript_1558A3:: @ 81558A3
SlateportCity_PokemonFanClub_EventScript_1558D4:: @ 81558D4
checkitemspace ITEM_BLUE_SCARF, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998
msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4
setflag FLAG_RECEIVED_BLUE_SCARF
@@ -97,7 +97,7 @@ SlateportCity_PokemonFanClub_EventScript_1558D4:: @ 81558D4
SlateportCity_PokemonFanClub_EventScript_155905:: @ 8155905
checkitemspace ITEM_PINK_SCARF, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998
msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4
setflag FLAG_RECEIVED_PINK_SCARF
@@ -108,7 +108,7 @@ SlateportCity_PokemonFanClub_EventScript_155905:: @ 8155905
SlateportCity_PokemonFanClub_EventScript_155936:: @ 8155936
checkitemspace ITEM_GREEN_SCARF, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998
msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4
setflag FLAG_RECEIVED_GREEN_SCARF
@@ -119,7 +119,7 @@ SlateportCity_PokemonFanClub_EventScript_155936:: @ 8155936
SlateportCity_PokemonFanClub_EventScript_155967:: @ 8155967
checkitemspace ITEM_YELLOW_SCARF, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998
msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4
setflag FLAG_RECEIVED_YELLOW_SCARF
@@ -134,8 +134,8 @@ SlateportCity_PokemonFanClub_EventScript_155998:: @ 8155998
end
SlateportCity_PokemonFanClub_EventScript_1559A2:: @ 81559A2
- specialvar RESULT, CheckLeadMonCool
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckLeadMonCool
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_PokemonFanClub_EventScript_1559B3
return
@@ -144,8 +144,8 @@ SlateportCity_PokemonFanClub_EventScript_1559B3:: @ 81559B3
return
SlateportCity_PokemonFanClub_EventScript_1559B9:: @ 81559B9
- specialvar RESULT, CheckLeadMonBeauty
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckLeadMonBeauty
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_PokemonFanClub_EventScript_1559CA
return
@@ -154,8 +154,8 @@ SlateportCity_PokemonFanClub_EventScript_1559CA:: @ 81559CA
return
SlateportCity_PokemonFanClub_EventScript_1559D0:: @ 81559D0
- specialvar RESULT, CheckLeadMonCute
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckLeadMonCute
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_PokemonFanClub_EventScript_1559E1
return
@@ -164,8 +164,8 @@ SlateportCity_PokemonFanClub_EventScript_1559E1:: @ 81559E1
return
SlateportCity_PokemonFanClub_EventScript_1559E7:: @ 81559E7
- specialvar RESULT, CheckLeadMonSmart
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckLeadMonSmart
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_PokemonFanClub_EventScript_1559F8
return
@@ -174,8 +174,8 @@ SlateportCity_PokemonFanClub_EventScript_1559F8:: @ 81559F8
return
SlateportCity_PokemonFanClub_EventScript_1559FE:: @ 81559FE
- specialvar RESULT, CheckLeadMonTough
- compare RESULT, 1
+ specialvar VAR_RESULT, CheckLeadMonTough
+ compare VAR_RESULT, 1
call_if_eq SlateportCity_PokemonFanClub_EventScript_155A0F
return
@@ -188,21 +188,21 @@ SlateportCity_PokemonFanClub_EventScript_155A15:: @ 8155A15
faceplayer
goto_if_set FLAG_RECEIVED_SOOTHE_BELL, SlateportCity_PokemonFanClub_EventScript_155A75
msgbox SlateportCity_PokemonFanClub_Text_17DE6B, 4
- specialvar RESULT, GetLeadMonFriendshipScore
- compare RESULT, 4
+ specialvar VAR_RESULT, GetLeadMonFriendshipScore
+ compare VAR_RESULT, 4
goto_if_ge SlateportCity_PokemonFanClub_EventScript_155A3A
release
end
SlateportCity_PokemonFanClub_EventScript_155A3A:: @ 8155A3A
playse SE_PIN
- applymovement LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0833
+ applymovement VAR_LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0833
waitmovement 0
- applymovement LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0835
+ applymovement VAR_LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0835
waitmovement 0
msgbox SlateportCity_PokemonFanClub_Text_17DF57, 4
giveitem_std ITEM_SOOTHE_BELL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1A029B
setflag FLAG_RECEIVED_SOOTHE_BELL
release
diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc
index af4934b2f..8806d6e76 100644
--- a/data/maps/SootopolisCity/scripts.inc
+++ b/data/maps/SootopolisCity/scripts.inc
@@ -89,23 +89,23 @@ SootopolisCity_EventScript_14D19F:: @ 814D19F
goto_if_set FLAG_DAILY_RECEIVED_BERRY_SOOTOPOLIS, SootopolisCity_EventScript_14D241
msgbox SootopolisCity_Text_1C63F2, 4
random 10
- addvar RESULT, 20
- addvar RESULT, ITEM_CHERI_BERRY
- giveitem_std RESULT
- compare RESULT, 0
+ addvar VAR_RESULT, 20
+ addvar VAR_RESULT, ITEM_CHERI_BERRY
+ giveitem_std VAR_RESULT
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_EventScript_1A029B
setflag FLAG_DAILY_RECEIVED_BERRY_SOOTOPOLIS
msgbox SootopolisCity_Text_1C64D0, 4
random 2
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_EventScript_14D1FF
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SootopolisCity_EventScript_14D220
end
SootopolisCity_EventScript_14D1FF:: @ 814D1FF
giveitem_std ITEM_FIGY_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_EventScript_1A029B
msgbox SootopolisCity_Text_1C650B, 4
release
@@ -113,7 +113,7 @@ SootopolisCity_EventScript_14D1FF:: @ 814D1FF
SootopolisCity_EventScript_14D220:: @ 814D220
giveitem_std ITEM_IAPAPA_BERRY
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_EventScript_1A029B
msgbox SootopolisCity_Text_1C650B, 4
release
@@ -121,7 +121,7 @@ SootopolisCity_EventScript_14D220:: @ 814D220
SootopolisCity_EventScript_14D241:: @ 814D241
msgbox SootopolisCity_Text_1C6540, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SootopolisCity_EventScript_14D25E
msgbox SootopolisCity_Text_1C6626, 4
release
@@ -446,13 +446,13 @@ SootopolisCity_EventScript_14D498:: @ 814D498
SootopolisCity_EventScript_14D4AD:: @ 814D4AD
msgbox SootopolisCity_Text_16A33E, 4
closemessage
- applymovement LAST_TALKED, SootopolisCity_Movement_1A0845
+ applymovement VAR_LAST_TALKED, SootopolisCity_Movement_1A0845
waitmovement 0
delay 50
setfieldeffectargument 0, 1
dofieldeffect FLDEFF_NPCFLY_OUT
delay 15
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
waitfieldeffect FLDEFF_NPCFLY_OUT
release
end
diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc
index c54dec972..211620b00 100644
--- a/data/maps/SootopolisCity_Gym_1F/scripts.inc
+++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc
@@ -100,14 +100,14 @@ SootopolisCity_Gym_1F_EventScript_15B02D:: @ 815B02D
msgbox SootopolisCity_Gym_1F_Text_18F36B, 4
setflag FLAG_DEFEATED_SOOTOPOLIS_GYM
setflag FLAG_BADGE08_GET
- setvar VAR_SPECIAL_8, 8
+ setvar VAR_0x8008, 8
call SootopolisCity_Gym_1F_EventScript_1A01C0
goto SootopolisCity_Gym_1F_EventScript_15B056
end
SootopolisCity_Gym_1F_EventScript_15B056:: @ 815B056
giveitem_std ITEM_TM03_WATER_PULSE
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_Gym_1F_EventScript_1A029B
msgbox SootopolisCity_Gym_1F_Text_18F466, 4
setflag FLAG_RECEIVED_TM03
diff --git a/data/maps/SootopolisCity_House2/scripts.inc b/data/maps/SootopolisCity_House2/scripts.inc
index d714993d4..4fe8050a5 100644
--- a/data/maps/SootopolisCity_House2/scripts.inc
+++ b/data/maps/SootopolisCity_House2/scripts.inc
@@ -5,9 +5,9 @@ SootopolisCity_House2_EventScript_15B2E5:: @ 815B2E5
lock
faceplayer
msgbox SootopolisCity_House2_Text_18FA66, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
call_if_eq SootopolisCity_House2_EventScript_15B307
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq SootopolisCity_House2_EventScript_15B310
release
end
diff --git a/data/maps/SootopolisCity_House3/scripts.inc b/data/maps/SootopolisCity_House3/scripts.inc
index 6ffa30d3d..20eeeb933 100644
--- a/data/maps/SootopolisCity_House3/scripts.inc
+++ b/data/maps/SootopolisCity_House3/scripts.inc
@@ -5,7 +5,7 @@ SootopolisCity_House3_EventScript_15B31A:: @ 815B31A
lock
faceplayer
msgbox SootopolisCity_House3_Text_18FB36, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq SootopolisCity_House3_EventScript_15B339
msgbox SootopolisCity_House3_Text_18FBC0, 4
release
diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc
index 24c59500a..897531b5b 100644
--- a/data/maps/SootopolisCity_House6/scripts.inc
+++ b/data/maps/SootopolisCity_House6/scripts.inc
@@ -6,11 +6,11 @@ SootopolisCity_House6_EventScript_15B386:: @ 815B386
faceplayer
goto_if_set FLAG_RECEIVED_WAILMER_DOLL, SootopolisCity_House6_EventScript_15B3CD
msgbox SootopolisCity_House6_Text_18FEA1, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
call_if_eq SootopolisCity_House6_EventScript_15B3C3
msgbox SootopolisCity_House6_Text_18FF12, 4
givedecoration_std DECOR_WAILMER_DOLL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_House6_EventScript_15B3D7
setflag FLAG_RECEIVED_WAILMER_DOLL
release
diff --git a/data/maps/SootopolisCity_House8/scripts.inc b/data/maps/SootopolisCity_House8/scripts.inc
index 91dd3490b..f7971a225 100644
--- a/data/maps/SootopolisCity_House8/scripts.inc
+++ b/data/maps/SootopolisCity_House8/scripts.inc
@@ -8,15 +8,15 @@ SootopolisCity_House8_EventScript_15B401:: @ 815B401
msgbox SootopolisCity_House8_Text_1900F7, 4
special SelectMonForNPCTrade
waitstate
- copyvar RESULT, VAR_SPECIAL_4
- compare RESULT, 255
+ copyvar VAR_RESULT, VAR_0x8004
+ compare VAR_RESULT, 255
goto_if_eq SootopolisCity_House8_EventScript_15B448
special CompareShroomishSize
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SootopolisCity_House8_EventScript_15B452
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq SootopolisCity_House8_EventScript_15B45C
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq SootopolisCity_House8_EventScript_15B466
release
end
@@ -39,7 +39,7 @@ SootopolisCity_House8_EventScript_15B45C:: @ 815B45C
SootopolisCity_House8_EventScript_15B466:: @ 815B466
msgbox SootopolisCity_House8_Text_19021D, 4
giveitem_std ITEM_ELIXIR
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_House8_EventScript_15B488
closemessage
release
@@ -57,15 +57,15 @@ SootopolisCity_House8_EventScript_15B492:: @ 815B492
msgbox SootopolisCity_House8_Text_190431, 4
special SelectMonForNPCTrade
waitstate
- copyvar RESULT, VAR_SPECIAL_4
- compare RESULT, 255
+ copyvar VAR_RESULT, VAR_0x8004
+ compare VAR_RESULT, 255
goto_if_eq SootopolisCity_House8_EventScript_15B4D9
special CompareBarboachSize
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SootopolisCity_House8_EventScript_15B4E3
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq SootopolisCity_House8_EventScript_15B4ED
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq SootopolisCity_House8_EventScript_15B4F7
release
end
@@ -88,7 +88,7 @@ SootopolisCity_House8_EventScript_15B4ED:: @ 815B4ED
SootopolisCity_House8_EventScript_15B4F7:: @ 815B4F7
msgbox SootopolisCity_House8_Text_190536, 4
giveitem_std ITEM_ELIXIR
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SootopolisCity_House8_EventScript_15B519
closemessage
release
diff --git a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
index ebfaf4e23..96fbb9c5b 100644
--- a/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
+++ b/data/maps/SootopolisCity_PokemonCenter_1F/scripts.inc
@@ -7,7 +7,7 @@ SootopolisCity_PokemonCenter_1F_MapScript1_15B196:: @ 815B196
end
@ 815B19A
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc
index 13e4774e2..abb25bda0 100644
--- a/data/maps/SouthernIsland_Exterior/scripts.inc
+++ b/data/maps/SouthernIsland_Exterior/scripts.inc
@@ -10,15 +10,15 @@ SouthernIsland_Exterior_EventScript_160AE0:: @ 8160AE0
lock
faceplayer
msgbox SouthernIsland_Exterior_Text_1C5215, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq SouthernIsland_Exterior_EventScript_160B25
msgbox SouthernIsland_Exterior_Text_1C5281, 4
closemessage
- applymovement LAST_TALKED, SouthernIsland_Exterior_Movement_1A0845
+ applymovement VAR_LAST_TALKED, SouthernIsland_Exterior_Movement_1A0845
waitmovement 0
delay 30
hideobjectat 1, MAP_SOUTHERN_ISLAND_EXTERIOR
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
call SouthernIsland_Exterior_EventScript_1A047C
warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
waitstate
diff --git a/data/maps/SouthernIsland_Interior/scripts.inc b/data/maps/SouthernIsland_Interior/scripts.inc
index 7094ebed8..4183964ba 100644
--- a/data/maps/SouthernIsland_Interior/scripts.inc
+++ b/data/maps/SouthernIsland_Interior/scripts.inc
@@ -22,9 +22,9 @@ SouthernIsland_Interior_MapScript1_160B6C:: @ 8160B6C
SouthernIsland_Interior_EventScript_160B77:: @ 8160B77
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq SouthernIsland_Interior_EventScript_160B8F
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq SouthernIsland_Interior_EventScript_160B95
end
@@ -38,7 +38,7 @@ SouthernIsland_Interior_EventScript_160B95:: @ 8160B95
SouthernIsland_Interior_EventScript_160B9B:: @ 8160B9B
lockall
- setvar VAR_SPECIAL_8, 12
+ setvar VAR_0x8008, 12
goto SouthernIsland_Interior_EventScript_160BA7
end
diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc
index 3151c4575..5d2236507 100644
--- a/data/maps/Underwater_SealedChamber/scripts.inc
+++ b/data/maps/Underwater_SealedChamber/scripts.inc
@@ -3,10 +3,10 @@ Underwater_SealedChamber_MapScripts:: @ 815F080
.byte 0
Underwater_SealedChamber_MapScript1_15F086:: @ 815F086
- getplayerxy VAR_SPECIAL_4, VAR_SPECIAL_5
- compare VAR_SPECIAL_4, 12
+ getplayerxy VAR_0x8004, VAR_0x8005
+ compare VAR_0x8004, 12
goto_if_ne Underwater_SealedChamber_EventScript_15F0A6
- compare VAR_SPECIAL_5, 44
+ compare VAR_0x8005, 44
goto_if_ne Underwater_SealedChamber_EventScript_15F0A6
goto Underwater_SealedChamber_EventScript_15F0AF
diff --git a/data/maps/VerdanturfTown_ContestLobby/scripts.inc b/data/maps/VerdanturfTown_ContestLobby/scripts.inc
index 1ee3708ac..ff95f3c64 100644
--- a/data/maps/VerdanturfTown_ContestLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_ContestLobby/scripts.inc
@@ -7,8 +7,8 @@ VerdanturfTown_ContestLobby_MapScript1_153D70:: @ 8153D70
end
VerdanturfTown_ContestLobby_EventScript_153D76:: @ 8153D76
- setvar VAR_SPECIAL_B, 5
- setvar CONTEST_RANK, 0
+ setvar VAR_0x800B, 5
+ setvar VAR_CONTEST_RANK, 0
call VerdanturfTown_ContestLobby_EventScript_1A4E92
call VerdanturfTown_ContestLobby_EventScript_153DA1
special SetContestTrainerGfxIds
@@ -104,7 +104,7 @@ VerdanturfTown_ContestLobby_EventScript_153E47:: @ 8153E47
goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_ContestLobby_EventScript_153E76
msgbox VerdanturfTown_ContestLobby_Text_177DEC, 4
giveitem_std ITEM_TM45_ATTRACT
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq VerdanturfTown_ContestLobby_EventScript_1A029B
setflag FLAG_RECEIVED_TM45
release
diff --git a/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc b/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc
index ed60ec1c7..4ec0af464 100644
--- a/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc
+++ b/data/maps/VerdanturfTown_FriendshipRatersHouse/scripts.inc
@@ -5,8 +5,8 @@ VerdanturfTown_FriendshipRatersHouse_EventScript_154030:: @ 8154030
lock
faceplayer
msgbox VerdanturfTown_FriendshipRatersHouse_Text_178A9C, 4
- specialvar RESULT, GetLeadMonFriendshipScore
- switch RESULT
+ specialvar VAR_RESULT, GetLeadMonFriendshipScore
+ switch VAR_RESULT
case 0, VerdanturfTown_FriendshipRatersHouse_EventScript_154093
case 1, VerdanturfTown_FriendshipRatersHouse_EventScript_15409D
case 2, VerdanturfTown_FriendshipRatersHouse_EventScript_1540A7
diff --git a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
index de2f770d6..6aa3c746f 100644
--- a/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
+++ b/data/maps/VerdanturfTown_PokemonCenter_1F/scripts.inc
@@ -9,7 +9,7 @@ VerdanturfTown_PokemonCenter_1F_MapScript1_153F0F:: @ 8153F0F
PacifidlogTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18
VerdanturfTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18
- setvar VAR_SPECIAL_B, 1
+ setvar VAR_0x800B, 1
call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B
waitmessage
waitbuttonpress
diff --git a/data/maps/VictoryRoad_1F/scripts.inc b/data/maps/VictoryRoad_1F/scripts.inc
index b4931325a..7247ce1d7 100644
--- a/data/maps/VictoryRoad_1F/scripts.inc
+++ b/data/maps/VictoryRoad_1F/scripts.inc
@@ -92,8 +92,8 @@ VictoryRoad_1F_EventScript_15DF28:: @ 815DF28
VictoryRoad_1F_EventScript_15DF31:: @ 815DF31
trainerbattle 0, TRAINER_WALLY_3, 0, VictoryRoad_1F_Text_1979BA, VictoryRoad_1F_Text_197A23
- specialvar RESULT, ShouldTryRematchBattle
- compare RESULT, 1
+ specialvar VAR_RESULT, ShouldTryRematchBattle
+ compare VAR_RESULT, 1
goto_if_eq VictoryRoad_1F_EventScript_15DF58
msgbox VictoryRoad_1F_Text_197A47, 6
end
diff --git a/data/pokemon_storage_system.s b/data/pokemon_storage_system.s
index ddb672e8e..e4a4cf95c 100644
--- a/data/pokemon_storage_system.s
+++ b/data/pokemon_storage_system.s
@@ -73,9 +73,14 @@ gSpriteTemplate_83BBC88:: @ 83BBC88
spr_template 1, 56006, gOamData_83BBC34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_809CB74
.if DEBUG
+.if DEBUG_TRANSLATE
+gUnknown_Debug_0x83E6268:: @ 0x83E6268
+ .string "SET$"
+.else
gUnknown_Debug_0x83E6268:: @ 0x83E6268
.string "セットする$"
.endif
+.endif
.align 2
gUnknown_083BBCA0:: @ 83BBCA0
diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc
index 10734411f..17897223a 100644
--- a/data/scripts/berry_tree.inc
+++ b/data/scripts/berry_tree.inc
@@ -1,6 +1,6 @@
S_BerryTree:: @ 81A14DD
special EventObjectInteractionGetBerryTreeData
- switch VAR_SPECIAL_4
+ switch VAR_0x8004
case 255, BerryTree_EventScript_1A1533
case 0, BerryTree_EventScript_1A153D
case 1, BerryTree_EventScript_1A1595
@@ -21,8 +21,8 @@ BerryTree_EventScript_1A1533:: @ 81A1533
BerryTree_EventScript_1A153D:: @ 81A153D
lock
faceplayer
- specialvar RESULT, PlayerHasBerries
- compare RESULT, 1
+ specialvar VAR_RESULT, PlayerHasBerries
+ compare VAR_RESULT, 1
goto_if_eq BerryTree_EventScript_1A1558
message Route102_Text_1A16B6
waitmessage
@@ -32,9 +32,9 @@ BerryTree_EventScript_1A153D:: @ 81A153D
BerryTree_EventScript_1A1558:: @ 81A1558
msgbox Route102_Text_1A16CD, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq BerryTree_EventScript_1A1577
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BerryTree_EventScript_1A1593
end
@@ -43,9 +43,9 @@ BerryTree_EventScript_1A1577:: @ 81A1577
closemessage
special Berry_FadeAndGoToBerryBagMenu
waitstate
- compare ITEM_ID, 0
+ compare VAR_ITEM_ID, 0
goto_if_eq BerryTree_EventScript_1A1593
- takeitem ITEM_ID, 1
+ takeitem VAR_ITEM_ID, 1
call S_PlantBerryTree
BerryTree_EventScript_1A1593:: @ 81A1593
release
@@ -81,9 +81,9 @@ BerryTree_EventScript_1A15BC:: @ 81A15BC
goto BerryTree_EventScript_1A165F
BerryTree_EventScript_1A15CE:: @ 81A15CE
- compare VAR_SPECIAL_5, 0
+ compare VAR_0x8005, 0
goto_if_eq BerryTree_EventScript_1A15F2
- compare VAR_SPECIAL_5, 4
+ compare VAR_0x8005, 4
goto_if_eq BerryTree_EventScript_1A15EB
bufferstring 1, Route102_Text_1A17B7
return
@@ -97,18 +97,18 @@ BerryTree_EventScript_1A15F2:: @ 81A15F2
return
BerryTree_EventScript_1A15F9:: @ 81A15F9
- buffernumberstring 1, VAR_SPECIAL_6
+ buffernumberstring 1, VAR_0x8006
lock
faceplayer
msgbox Route102_Text_1A17C0, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq BerryTree_EventScript_1A161D
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BerryTree_EventScript_1A164B
BerryTree_EventScript_1A161D:: @ 81A161D
special EventObjectInteractionPickBerryTree
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq BerryTree_EventScript_1A1642
special EventObjectInteractionRemoveBerryTree
message Route102_Text_1A17FD
@@ -145,12 +145,12 @@ S_PlantBerryTreeFromBag:: @ 81A1654
BerryTree_EventScript_1A165F:: @ 81A165F
checkitem ITEM_WAILMER_PAIL, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq BerryTree_EventScript_1A168D
msgbox Route102_Text_1A18E6, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq S_WaterBerryTree
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq BerryTree_EventScript_1A168D
BerryTree_EventScript_1A168D:: @ 81A168D
releaseall
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index 4e29db7c9..56a03f346 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -21,7 +21,7 @@ VerdanturfTown_PokemonCenter_2F_MapScript2_1A3D03:: @ 81A3D03
.2byte 0
OldaleTown_PokemonCenter_2F_EventScript_1A3D2D:: @ 81A3D2D
- turnobject VAR_SPECIAL_7, 4
+ turnobject VAR_0x8007, 4
end
DewfordTown_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32
@@ -90,9 +90,9 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3DB2:: @ 81A3DB2
setvar VAR_CABLE_CLUB_STATE, 0
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358
waitmovement 0
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3DD9
- applymovement VAR_SPECIAL_7, OldaleTown_PokemonCenter_2F_Movement_1A4354
+ applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354
waitmovement 0
OldaleTown_PokemonCenter_2F_EventScript_1A3DD9:: @ 81A3DD9
@@ -101,13 +101,13 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3DD9:: @ 81A3DD9
OldaleTown_PokemonCenter_2F_EventScript_1A3DDA:: @ 81A3DDA
special CloseLink
setvar VAR_CABLE_CLUB_STATE, 0
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C
- applymovement VAR_SPECIAL_7, OldaleTown_PokemonCenter_2F_Movement_1A4356
+ applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356
waitmovement 0
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358
waitmovement 0
- applymovement VAR_SPECIAL_7, OldaleTown_PokemonCenter_2F_Movement_1A4354
+ applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354
waitmovement 0
return
@@ -128,11 +128,11 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E17:: @ 81A3E17
OldaleTown_PokemonCenter_2F_EventScript_1A3E30:: @ 81A3E30
special CloseLink
setvar VAR_CABLE_CLUB_STATE, 0
- compare VAR_SPECIAL_7, 0
+ compare VAR_0x8007, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4361
waitmovement 0
- applymovement VAR_SPECIAL_7, OldaleTown_PokemonCenter_2F_Movement_1A4356
+ applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356
waitmovement 0
message OldaleTown_PokemonCenter_2F_Text_1A4E50
waitmessage
@@ -141,7 +141,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E30:: @ 81A3E30
waitmessage
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358
waitmovement 0
- applymovement VAR_SPECIAL_7, OldaleTown_PokemonCenter_2F_Movement_1A4354
+ applymovement VAR_0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354
waitmovement 0
return
@@ -175,7 +175,7 @@ SlateportCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
SootopolisCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
VerdanturfTown_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_1A4342
- copyvar VAR_SPECIAL_7, LAST_TALKED
+ copyvar VAR_0x8007, VAR_LAST_TALKED
lock
faceplayer
message OldaleTown_PokemonCenter_2F_Text_1A4510
@@ -183,7 +183,7 @@ VerdanturfTown_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC
multichoice 17, 6, 17, 0
- switch RESULT
+ switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_1A3EF2
case 1, OldaleTown_PokemonCenter_2F_EventScript_1A4319
case 2, OldaleTown_PokemonCenter_2F_EventScript_1A3FDD
@@ -191,39 +191,39 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC
OldaleTown_PokemonCenter_2F_EventScript_1A3EF2:: @ 81A3EF2
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
call OldaleTown_PokemonCenter_2F_EventScript_1A3FEF
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
message OldaleTown_PokemonCenter_2F_Text_1A490C
waitmessage
special sub_808347C
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3F5E
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4068
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5
OldaleTown_PokemonCenter_2F_EventScript_1A3F5E:: @ 81A3F5E
special ScrSpecial_HealPlayerParty
special SavePlayerParty
special LoadPlayerBag
- copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22
waitmessage
setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0
special DrawWholeMapView
delay 60
- applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
+ applymovement VAR_LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
waitmovement 0
closemessage
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B
@@ -236,7 +236,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3F5E:: @ 81A3F5E
closedoor 5, 1
waitdooranim
release
- compare VAR_SPECIAL_4, 5
+ compare VAR_0x8004, 5
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3FCD
special SetCableClubWarp
warp MAP_SINGLE_BATTLE_COLOSSEUM, 255, 6, 8
@@ -263,7 +263,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3FEF:: @ 81A3FEF
message OldaleTown_PokemonCenter_2F_Text_1A4840
waitmessage
multichoice 0, 0, 18, 0
- switch RESULT
+ switch VAR_RESULT
case 0, OldaleTown_PokemonCenter_2F_EventScript_1A4062
case 1, OldaleTown_PokemonCenter_2F_EventScript_1A4042
case 2, OldaleTown_PokemonCenter_2F_EventScript_1A403C
@@ -271,18 +271,18 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3FEF:: @ 81A3FEF
case 127, OldaleTown_PokemonCenter_2F_EventScript_1A4036
OldaleTown_PokemonCenter_2F_EventScript_1A4036:: @ 81A4036
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
return
OldaleTown_PokemonCenter_2F_EventScript_1A403C:: @ 81A403C
- setvar VAR_SPECIAL_4, 5
+ setvar VAR_0x8004, 5
return
OldaleTown_PokemonCenter_2F_EventScript_1A4042:: @ 81A4042
special CheckForAlivePartyMons
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_1A4056
- setvar VAR_SPECIAL_4, 2
+ setvar VAR_0x8004, 2
return
OldaleTown_PokemonCenter_2F_EventScript_1A4056:: @ 81A4056
@@ -292,11 +292,11 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4056:: @ 81A4056
goto OldaleTown_PokemonCenter_2F_EventScript_1A3FEF
OldaleTown_PokemonCenter_2F_EventScript_1A4062:: @ 81A4062
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
return
OldaleTown_PokemonCenter_2F_EventScript_1A4068:: @ 81A4068
- switch VAR_SPECIAL_4
+ switch VAR_0x8004
case 1, OldaleTown_PokemonCenter_2F_EventScript_1A40B1
case 2, OldaleTown_PokemonCenter_2F_EventScript_1A40A2
case 5, OldaleTown_PokemonCenter_2F_EventScript_1A4093
@@ -346,48 +346,48 @@ SlateportCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
SootopolisCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
VerdanturfTown_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_1A4339
- copyvar VAR_SPECIAL_7, LAST_TALKED
+ copyvar VAR_0x8007, VAR_LAST_TALKED
lock
faceplayer
msgbox OldaleTown_PokemonCenter_2F_Text_1A457E, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A40FA
OldaleTown_PokemonCenter_2F_EventScript_1A40FA:: @ 81A40FA
call OldaleTown_PokemonCenter_2F_EventScript_1A41BB
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
message OldaleTown_PokemonCenter_2F_Text_1A490C
waitmessage
special sub_80834E4
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4166
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A432D
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5
OldaleTown_PokemonCenter_2F_EventScript_1A4166:: @ 81A4166
- setvar VAR_SPECIAL_4, 3
- copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4
+ setvar VAR_0x8004, 3
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22
waitmessage
setmetatile 8, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0
special DrawWholeMapView
delay 60
- applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
+ applymovement VAR_LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
waitmovement 0
closemessage
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B
@@ -403,27 +403,27 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4166:: @ 81A4166
goto OldaleTown_PokemonCenter_2F_EventScript_1A4325
OldaleTown_PokemonCenter_2F_EventScript_1A41BB:: @ 81A41BB
- specialvar RESULT, CalculatePlayerPartyCount
- compare RESULT, 2
+ specialvar VAR_RESULT, CalculatePlayerPartyCount
+ compare VAR_RESULT, 2
goto_if_lt OldaleTown_PokemonCenter_2F_EventScript_1A41E1
- specialvar RESULT, GetNameOfEnigmaBerryInPlayerParty
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNameOfEnigmaBerryInPlayerParty
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A41EE
- setvar RESULT, 1
+ setvar VAR_RESULT, 1
return
OldaleTown_PokemonCenter_2F_EventScript_1A41E1:: @ 81A41E1
message OldaleTown_PokemonCenter_2F_Text_1A48A3
waitmessage
waitbuttonpress
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
OldaleTown_PokemonCenter_2F_EventScript_1A41EE:: @ 81A41EE
message OldaleTown_PokemonCenter_2F_Text_1A48DD
waitmessage
waitbuttonpress
- setvar RESULT, 0
+ setvar VAR_RESULT, 0
return
DewfordTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
@@ -442,18 +442,18 @@ SlateportCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
SootopolisCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
VerdanturfTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
goto_if_unset FLAG_VISITED_MAUVILLE_CITY, OldaleTown_PokemonCenter_2F_EventScript_1A434B
- copyvar VAR_SPECIAL_7, LAST_TALKED
+ copyvar VAR_0x8007, VAR_LAST_TALKED
lock
faceplayer
msgbox OldaleTown_PokemonCenter_2F_Text_1A45FE, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4229
OldaleTown_PokemonCenter_2F_EventScript_1A4229:: @ 81A4229
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
message OldaleTown_PokemonCenter_2F_Text_1A490C
waitmessage
@@ -461,30 +461,30 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4229:: @ 81A4229
waitstate
special sub_80835D8
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4294
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A432D
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5
- compare RESULT, 7
+ compare VAR_RESULT, 7
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42E9
OldaleTown_PokemonCenter_2F_EventScript_1A4294:: @ 81A4294
- setvar VAR_SPECIAL_4, 4
- copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4
+ setvar VAR_0x8004, 4
+ copyvar VAR_CABLE_CLUB_STATE, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22
waitmessage
setmetatile 11, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0
special DrawWholeMapView
delay 60
- applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
+ applymovement VAR_LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356
waitmovement 0
closemessage
applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B
@@ -601,13 +601,13 @@ gUnknown_081A4363:: @ 81A4363
end
SingleBattleColosseum_EventScript_1A436F:: @ 81A436F
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
special sub_8083B90
waitstate
end
SingleBattleColosseum_EventScript_1A4379:: @ 81A4379
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special sub_8083B90
waitstate
end
@@ -616,9 +616,9 @@ DoubleBattleColosseum_EventScript_1A4383:: @ 81A4383
fadescreen 1
special sub_80C5568
waitstate
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoubleBattleColosseum_EventScript_1A43EF
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
special sub_8083B90
waitstate
end
@@ -627,9 +627,9 @@ DoubleBattleColosseum_EventScript_1A439E:: @ 81A439E
fadescreen 1
special sub_80C5568
waitstate
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoubleBattleColosseum_EventScript_1A43EF
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special sub_8083B90
waitstate
end
@@ -638,9 +638,9 @@ DoubleBattleColosseum_EventScript_1A43B9:: @ 81A43B9
fadescreen 1
special sub_80C5568
waitstate
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoubleBattleColosseum_EventScript_1A43EF
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
special sub_8083B90
waitstate
end
@@ -649,9 +649,9 @@ DoubleBattleColosseum_EventScript_1A43D4:: @ 81A43D4
fadescreen 1
special sub_80C5568
waitstate
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq DoubleBattleColosseum_EventScript_1A43EF
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8005, 3
special sub_8083B90
waitstate
end
@@ -660,31 +660,31 @@ DoubleBattleColosseum_EventScript_1A43EF:: @ 81A43EF
end
TradeCenter_EventScript_1A43F0:: @ 81A43F0
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
special sub_8083B5C
waitstate
end
TradeCenter_EventScript_1A43FA:: @ 81A43FA
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special sub_8083B5C
waitstate
end
@ 81A4404
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
special sub_8083B5C
waitstate
end
@ 81A440E
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8005, 3
special sub_8083B5C
waitstate
end
RecordCorner_EventScript_1A4418:: @ 81A4418
- setvar VAR_SPECIAL_5, 0
+ setvar VAR_0x8005, 0
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
@@ -692,7 +692,7 @@ RecordCorner_EventScript_1A4418:: @ 81A4418
end
RecordCorner_EventScript_1A442D:: @ 81A442D
- setvar VAR_SPECIAL_5, 1
+ setvar VAR_0x8005, 1
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
@@ -700,7 +700,7 @@ RecordCorner_EventScript_1A442D:: @ 81A442D
end
RecordCorner_EventScript_1A4442:: @ 81A4442
- setvar VAR_SPECIAL_5, 2
+ setvar VAR_0x8005, 2
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
@@ -708,7 +708,7 @@ RecordCorner_EventScript_1A4442:: @ 81A4442
end
RecordCorner_EventScript_1A4457:: @ 81A4457
- setvar VAR_SPECIAL_5, 3
+ setvar VAR_0x8005, 3
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
@@ -788,7 +788,7 @@ RecordCorner_EventScript_1A44D6:: @ 81A44D6
TradeRoom_PromptToCancelLink:: @ 81A44E5
msgbox TradeRoom_WillLinkBeTerminated, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq TradeRoom_TerminateLink
erasebox 0, 0, 29, 19
end
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index 165cc4409..2a63d97f8 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -5,15 +5,15 @@ VerdanturfTown_ContestLobby_EventScript_1A4E92:: @ 81A4E92
lock
faceplayer
checkitem ITEM_CONTEST_PASS, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq FallarborTown_ContestLobby_EventScript_1A4EDD
compare VAR_CONTEST_PRIZE_PICKUP, 0
goto_if_ne FallarborTown_ContestLobby_EventScript_1A4F4E
goto_if_set FLAG_TEMP_1, FallarborTown_ContestLobby_EventScript_1A4F8F
- bufferstdstring 0, VAR_SPECIAL_B
+ bufferstdstring 0, VAR_0x800B
msgbox FallarborTown_ContestLobby_Text_1A5DFC, 4
checkitem ITEM_CONTEST_PASS, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1A4EE1
setflag FLAG_TEMP_1
goto FallarborTown_ContestLobby_EventScript_1A4F8F
@@ -24,7 +24,7 @@ FallarborTown_ContestLobby_EventScript_1A4EDD:: @ 81A4EDD
return
FallarborTown_ContestLobby_EventScript_1A4EE1:: @ 81A4EE1
- compare CONTEST_RANK, 0
+ compare VAR_CONTEST_RANK, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1A4EF6
msgbox FallarborTown_ContestLobby_Text_1A6340, 4
releaseall
@@ -32,7 +32,7 @@ FallarborTown_ContestLobby_EventScript_1A4EE1:: @ 81A4EE1
FallarborTown_ContestLobby_EventScript_1A4EF6:: @ 81A4EF6
msgbox FallarborTown_ContestLobby_Text_1A64F4, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F13
msgbox FallarborTown_ContestLobby_Text_1A65EA, 4
releaseall
@@ -61,7 +61,7 @@ FallarborTown_ContestLobby_EventScript_1A4F4E:: @ 81A4F4E
FallarborTown_ContestLobby_EventScript_1A4F67:: @ 81A4F67
giveitem_std ITEM_LUXURY_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F86
setvar VAR_CONTEST_PRIZE_PICKUP, 0
closemessage
@@ -76,7 +76,7 @@ FallarborTown_ContestLobby_EventScript_1A4F8F:: @ 81A4F8F
message FallarborTown_ContestLobby_Text_1A5E46
waitmessage
multichoice 0, 0, 2, 0
- switch RESULT
+ switch VAR_RESULT
case 0, FallarborTown_ContestLobby_EventScript_1A5097
case 1, FallarborTown_ContestLobby_EventScript_1A4FCC
case 2, FallarborTown_ContestLobby_EventScript_1A503E
@@ -87,7 +87,7 @@ FallarborTown_ContestLobby_EventScript_1A4FCC:: @ 81A4FCC
message FallarborTown_ContestLobby_Text_1A5E7C
waitmessage
multichoice 0, 0, 3, 0
- switch RESULT
+ switch VAR_RESULT
case 0, FallarborTown_ContestLobby_EventScript_1A5014
case 1, FallarborTown_ContestLobby_EventScript_1A5022
case 2, FallarborTown_ContestLobby_EventScript_1A5030
@@ -118,18 +118,18 @@ FallarborTown_ContestLobby_EventScript_1A503E:: @ 81A503E
FallarborTown_ContestLobby_EventScript_1A5048:: @ 81A5048
msgbox FallarborTown_ContestLobby_Text_1A6319, 4
choosecontestmon
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq FallarborTown_ContestLobby_EventScript_1A5097
special ScrSpecial_CheckSelectedMonAndInitContest
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1A50C8
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1A50D7
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq FallarborTown_ContestLobby_EventScript_1A50FB
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq FallarborTown_ContestLobby_EventScript_1A511F
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq FallarborTown_ContestLobby_EventScript_1A512E
end
@@ -137,10 +137,10 @@ FallarborTown_ContestLobby_EventScript_1A5097:: @ 81A5097
message FallarborTown_ContestLobby_Text_1A6623
waitmessage
multichoice 0, 0, 4, 0
- switch RESULT
+ switch VAR_RESULT
case 5, FallarborTown_ContestLobby_EventScript_1A503E
case 127, FallarborTown_ContestLobby_EventScript_1A503E
- copyvar CONTEST_CATEGORY, RESULT
+ copyvar VAR_CONTEST_CATEGORY, VAR_RESULT
goto FallarborTown_ContestLobby_EventScript_1A5048
end
@@ -152,14 +152,14 @@ FallarborTown_ContestLobby_EventScript_1A50C8:: @ 81A50C8
FallarborTown_ContestLobby_EventScript_1A50D7:: @ 81A50D7
msgbox FallarborTown_ContestLobby_Text_1A67A3, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, FallarborTown_ContestLobby_EventScript_1A5048
case YES, FallarborTown_ContestLobby_EventScript_1A513D
end
FallarborTown_ContestLobby_EventScript_1A50FB:: @ 81A50FB
msgbox FallarborTown_ContestLobby_Text_1A6724, MSGBOX_YESNO
- switch RESULT
+ switch VAR_RESULT
case NO, FallarborTown_ContestLobby_EventScript_1A5048
case YES, FallarborTown_ContestLobby_EventScript_1A513D
end
@@ -184,7 +184,7 @@ FallarborTown_ContestLobby_EventScript_1A513D:: @ 81A513D
return
LinkContestRoom1_EventScript_1A514D:: @ 81A514D
- setvar VAR_SPECIAL_6, 0
+ setvar VAR_0x8006, 0
lockall
applymovement 14, LinkContestRoom1_Movement_1A5DBF
waitmovement 0
@@ -205,7 +205,7 @@ LinkContestRoom1_EventScript_1A514D:: @ 81A514D
return
LinkContestRoom1_EventScript_1A51A0:: @ 81A51A0
- switch CONTEST_RANK
+ switch VAR_CONTEST_RANK
case 0, LinkContestRoom1_EventScript_1A51D2
case 1, LinkContestRoom1_EventScript_1A51D8
case 2, LinkContestRoom1_EventScript_1A51DE
@@ -213,23 +213,23 @@ LinkContestRoom1_EventScript_1A51A0:: @ 81A51A0
return
LinkContestRoom1_EventScript_1A51D2:: @ 81A51D2
- setvar VAR_SPECIAL_9, 5
+ setvar VAR_0x8009, 5
return
LinkContestRoom1_EventScript_1A51D8:: @ 81A51D8
- setvar VAR_SPECIAL_9, 6
+ setvar VAR_0x8009, 6
return
LinkContestRoom1_EventScript_1A51DE:: @ 81A51DE
- setvar VAR_SPECIAL_9, 7
+ setvar VAR_0x8009, 7
return
LinkContestRoom1_EventScript_1A51E4:: @ 81A51E4
- setvar VAR_SPECIAL_9, 8
+ setvar VAR_0x8009, 8
return
LinkContestRoom1_EventScript_1A51EA:: @ 81A51EA
- switch CONTEST_CATEGORY
+ switch VAR_CONTEST_CATEGORY
case 0, LinkContestRoom1_EventScript_1A5227
case 1, LinkContestRoom1_EventScript_1A522D
case 2, LinkContestRoom1_EventScript_1A5233
@@ -238,28 +238,28 @@ LinkContestRoom1_EventScript_1A51EA:: @ 81A51EA
return
LinkContestRoom1_EventScript_1A5227:: @ 81A5227
- setvar VAR_SPECIAL_8, 0
+ setvar VAR_0x8008, 0
return
LinkContestRoom1_EventScript_1A522D:: @ 81A522D
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
return
LinkContestRoom1_EventScript_1A5233:: @ 81A5233
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
return
LinkContestRoom1_EventScript_1A5239:: @ 81A5239
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
return
LinkContestRoom1_EventScript_1A523F:: @ 81A523F
- setvar VAR_SPECIAL_8, 4
+ setvar VAR_0x8008, 4
return
LinkContestRoom1_EventScript_1A5245:: @ 81A5245
- bufferstdstring 1, VAR_SPECIAL_8
- bufferstdstring 2, VAR_SPECIAL_9
+ bufferstdstring 1, VAR_0x8008
+ bufferstdstring 2, VAR_0x8009
call LinkContestRoom1_EventScript_1A525F
lockall
applymovement 1, LinkContestRoom1_Movement_1A5D87
@@ -284,21 +284,21 @@ LinkContestRoom1_EventScript_1A527A:: @ 81A527A
call LinkContestRoom1_EventScript_1A5455
call LinkContestRoom1_EventScript_1A53E5
call LinkContestRoom1_EventScript_1A5880
- addvar VAR_SPECIAL_6, 1
- compare VAR_SPECIAL_6, 4
+ addvar VAR_0x8006, 1
+ compare VAR_0x8006, 4
goto_if_ne LinkContestRoom1_EventScript_1A527A
call LinkContestRoom1_EventScript_1A5377
setvar VAR_TEMP_1, 6
return
LinkContestRoom1_EventScript_1A52AE:: @ 81A52AE
- compare VAR_SPECIAL_6, 0
+ compare VAR_0x8006, 0
goto_if_eq LinkContestRoom1_EventScript_1A52DB
- compare VAR_SPECIAL_6, 1
+ compare VAR_0x8006, 1
goto_if_eq LinkContestRoom1_EventScript_1A52ED
- compare VAR_SPECIAL_6, 2
+ compare VAR_0x8006, 2
goto_if_eq LinkContestRoom1_EventScript_1A52FF
- compare VAR_SPECIAL_6, 3
+ compare VAR_0x8006, 3
goto_if_eq LinkContestRoom1_EventScript_1A5311
return
@@ -307,7 +307,7 @@ LinkContestRoom1_EventScript_1A52DB:: @ 81A52DB
applymovement 3, LinkContestRoom1_Movement_1A5DCE
waitmovement 0
releaseall
- setvar VAR_SPECIAL_B, 3
+ setvar VAR_0x800B, 3
return
LinkContestRoom1_EventScript_1A52ED:: @ 81A52ED
@@ -315,7 +315,7 @@ LinkContestRoom1_EventScript_1A52ED:: @ 81A52ED
applymovement 4, LinkContestRoom1_Movement_1A5DDA
waitmovement 0
releaseall
- setvar VAR_SPECIAL_B, 4
+ setvar VAR_0x800B, 4
return
LinkContestRoom1_EventScript_1A52FF:: @ 81A52FF
@@ -323,7 +323,7 @@ LinkContestRoom1_EventScript_1A52FF:: @ 81A52FF
applymovement 5, LinkContestRoom1_Movement_1A5DE2
waitmovement 0
releaseall
- setvar VAR_SPECIAL_B, 5
+ setvar VAR_0x800B, 5
return
LinkContestRoom1_EventScript_1A5311:: @ 81A5311
@@ -331,24 +331,24 @@ LinkContestRoom1_EventScript_1A5311:: @ 81A5311
applymovement 14, LinkContestRoom1_Movement_1A5DEA
waitmovement 0
releaseall
- setvar VAR_SPECIAL_B, 14
+ setvar VAR_0x800B, 14
return
LinkContestRoom1_EventScript_1A5323:: @ 81A5323
special sub_80C4C64
- addvar VAR_SPECIAL_6, 1
- buffernumberstring 1, VAR_SPECIAL_6
+ addvar VAR_0x8006, 1
+ buffernumberstring 1, VAR_0x8006
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5D9C
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5D9C
waitmovement 0
releaseall
addobject 13
playse SE_DANSA
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5D9C
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5D9C
waitmovement 0
releaseall
- addvar VAR_SPECIAL_6, -1
+ addvar VAR_0x8006, -1
playse SE_BOWA2
special ShowContestEntryMonPic
call LinkContestRoom1_EventScript_1A535E
@@ -460,23 +460,23 @@ LinkContestRoom1_EventScript_1A5455:: @ 81A5455
return
LinkContestRoom1_EventScript_1A54EB:: @ 81A54EB
- setvar RESULT, 8
+ setvar VAR_RESULT, 8
special ScriptRandom
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LinkContestRoom1_EventScript_1A5760
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LinkContestRoom1_EventScript_1A5784
- compare RESULT, 2
+ compare VAR_RESULT, 2
call_if_eq LinkContestRoom1_EventScript_1A57A8
- compare RESULT, 3
+ compare VAR_RESULT, 3
call_if_eq LinkContestRoom1_EventScript_1A57CC
- compare RESULT, 4
+ compare VAR_RESULT, 4
call_if_eq LinkContestRoom1_EventScript_1A57F0
- compare RESULT, 5
+ compare VAR_RESULT, 5
call_if_eq LinkContestRoom1_EventScript_1A5814
- compare RESULT, 6
+ compare VAR_RESULT, 6
call_if_eq LinkContestRoom1_EventScript_1A5838
- compare RESULT, 7
+ compare VAR_RESULT, 7
call_if_eq LinkContestRoom1_EventScript_1A585C
compare VAR_TEMP_0, 0
goto_if_gt LinkContestRoom1_EventScript_1A54EB
@@ -484,101 +484,101 @@ LinkContestRoom1_EventScript_1A54EB:: @ 81A54EB
return
LinkContestRoom1_EventScript_1A555A:: @ 81A555A
- compare VAR_SPECIAL_4, 80
+ compare VAR_0x8004, 80
goto_if_gt LinkContestRoom1_EventScript_1A575A
- compare VAR_SPECIAL_4, 70
+ compare VAR_0x8004, 70
goto_if_gt LinkContestRoom1_EventScript_1A5754
- compare VAR_SPECIAL_4, 60
+ compare VAR_0x8004, 60
goto_if_gt LinkContestRoom1_EventScript_1A574E
- compare VAR_SPECIAL_4, 50
+ compare VAR_0x8004, 50
goto_if_gt LinkContestRoom1_EventScript_1A5748
- compare VAR_SPECIAL_4, 40
+ compare VAR_0x8004, 40
goto_if_gt LinkContestRoom1_EventScript_1A5742
- compare VAR_SPECIAL_4, 30
+ compare VAR_0x8004, 30
goto_if_gt LinkContestRoom1_EventScript_1A573C
- compare VAR_SPECIAL_4, 20
+ compare VAR_0x8004, 20
goto_if_gt LinkContestRoom1_EventScript_1A5736
- compare VAR_SPECIAL_4, 10
+ compare VAR_0x8004, 10
goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A55B8:: @ 81A55B8
- compare VAR_SPECIAL_4, 230
+ compare VAR_0x8004, 230
goto_if_gt LinkContestRoom1_EventScript_1A575A
- compare VAR_SPECIAL_4, 210
+ compare VAR_0x8004, 210
goto_if_gt LinkContestRoom1_EventScript_1A5754
- compare VAR_SPECIAL_4, 190
+ compare VAR_0x8004, 190
goto_if_gt LinkContestRoom1_EventScript_1A574E
- compare VAR_SPECIAL_4, 170
+ compare VAR_0x8004, 170
goto_if_gt LinkContestRoom1_EventScript_1A5748
- compare VAR_SPECIAL_4, 150
+ compare VAR_0x8004, 150
goto_if_gt LinkContestRoom1_EventScript_1A5742
- compare VAR_SPECIAL_4, 130
+ compare VAR_0x8004, 130
goto_if_gt LinkContestRoom1_EventScript_1A573C
- compare VAR_SPECIAL_4, 110
+ compare VAR_0x8004, 110
goto_if_gt LinkContestRoom1_EventScript_1A5736
- compare VAR_SPECIAL_4, 90
+ compare VAR_0x8004, 90
goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A5616:: @ 81A5616
- compare VAR_SPECIAL_4, 380
+ compare VAR_0x8004, 380
goto_if_gt LinkContestRoom1_EventScript_1A575A
- compare VAR_SPECIAL_4, 350
+ compare VAR_0x8004, 350
goto_if_gt LinkContestRoom1_EventScript_1A5754
- compare VAR_SPECIAL_4, 320
+ compare VAR_0x8004, 320
goto_if_gt LinkContestRoom1_EventScript_1A574E
- compare VAR_SPECIAL_4, 290
+ compare VAR_0x8004, 290
goto_if_gt LinkContestRoom1_EventScript_1A5748
- compare VAR_SPECIAL_4, 260
+ compare VAR_0x8004, 260
goto_if_gt LinkContestRoom1_EventScript_1A5742
- compare VAR_SPECIAL_4, 230
+ compare VAR_0x8004, 230
goto_if_gt LinkContestRoom1_EventScript_1A573C
- compare VAR_SPECIAL_4, 200
+ compare VAR_0x8004, 200
goto_if_gt LinkContestRoom1_EventScript_1A5736
- compare VAR_SPECIAL_4, 170
+ compare VAR_0x8004, 170
goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A5674:: @ 81A5674
- compare VAR_SPECIAL_4, 600
+ compare VAR_0x8004, 600
goto_if_gt LinkContestRoom1_EventScript_1A575A
- compare VAR_SPECIAL_4, 560
+ compare VAR_0x8004, 560
goto_if_gt LinkContestRoom1_EventScript_1A5754
- compare VAR_SPECIAL_4, 520
+ compare VAR_0x8004, 520
goto_if_gt LinkContestRoom1_EventScript_1A574E
- compare VAR_SPECIAL_4, 480
+ compare VAR_0x8004, 480
goto_if_gt LinkContestRoom1_EventScript_1A5748
- compare VAR_SPECIAL_4, 440
+ compare VAR_0x8004, 440
goto_if_gt LinkContestRoom1_EventScript_1A5742
- compare VAR_SPECIAL_4, 400
+ compare VAR_0x8004, 400
goto_if_gt LinkContestRoom1_EventScript_1A573C
- compare VAR_SPECIAL_4, 360
+ compare VAR_0x8004, 360
goto_if_gt LinkContestRoom1_EventScript_1A5736
- compare VAR_SPECIAL_4, 320
+ compare VAR_0x8004, 320
goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A56D2:: @ 81A56D2
- compare VAR_SPECIAL_4, 600
+ compare VAR_0x8004, 600
goto_if_gt LinkContestRoom1_EventScript_1A575A
- compare VAR_SPECIAL_4, 550
+ compare VAR_0x8004, 550
goto_if_gt LinkContestRoom1_EventScript_1A5754
- compare VAR_SPECIAL_4, 500
+ compare VAR_0x8004, 500
goto_if_gt LinkContestRoom1_EventScript_1A574E
- compare VAR_SPECIAL_4, 450
+ compare VAR_0x8004, 450
goto_if_gt LinkContestRoom1_EventScript_1A5748
- compare VAR_SPECIAL_4, 400
+ compare VAR_0x8004, 400
goto_if_gt LinkContestRoom1_EventScript_1A5742
- compare VAR_SPECIAL_4, 300
+ compare VAR_0x8004, 300
goto_if_gt LinkContestRoom1_EventScript_1A573C
- compare VAR_SPECIAL_4, 200
+ compare VAR_0x8004, 200
goto_if_gt LinkContestRoom1_EventScript_1A5736
- compare VAR_SPECIAL_4, 100
+ compare VAR_0x8004, 100
goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
@@ -724,7 +724,7 @@ LinkContestRoom1_EventScript_1A5880:: @ 81A5880
release
removeobject 13
special sub_80C5164
- switch VAR_SPECIAL_6
+ switch VAR_0x8006
case 0, LinkContestRoom1_EventScript_1A58BA
case 1, LinkContestRoom1_EventScript_1A58C7
case 2, LinkContestRoom1_EventScript_1A58D4
@@ -733,28 +733,28 @@ LinkContestRoom1_EventScript_1A5880:: @ 81A5880
LinkContestRoom1_EventScript_1A58BA:: @ 81A58BA
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5DD4
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5DD4
waitmovement 0
releaseall
return
LinkContestRoom1_EventScript_1A58C7:: @ 81A58C7
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5DDE
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5DDE
waitmovement 0
releaseall
return
LinkContestRoom1_EventScript_1A58D4:: @ 81A58D4
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5DE6
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5DE6
waitmovement 0
releaseall
return
LinkContestRoom1_EventScript_1A58E1:: @ 81A58E1
lockall
- applymovement VAR_SPECIAL_B, LinkContestRoom1_Movement_1A5DF0
+ applymovement VAR_0x800B, LinkContestRoom1_Movement_1A5DF0
waitmovement 0
releaseall
return
@@ -856,7 +856,7 @@ LinkContestRoom1_EventScript_1A59F2:: @ 81A59F2
LinkContestRoom1_EventScript_1A59FC:: @ 81A59FC
special ScrSpecial_GetContestWinnerIdx
- switch VAR_SPECIAL_5
+ switch VAR_0x8005
case 0, LinkContestRoom1_EventScript_1A5A31
case 1, LinkContestRoom1_EventScript_1A5A37
case 2, LinkContestRoom1_EventScript_1A5A3D
@@ -882,9 +882,9 @@ LinkContestRoom1_EventScript_1A5A43:: @ 81A5A43
LinkContestRoom1_EventScript_1A5A49:: @ 81A5A49
special ScrSpecial_GetContestWinnerTrainerName
special ScrSpecial_GetContestWinnerNick
- addvar VAR_SPECIAL_5, 1
- buffernumberstring 1, VAR_SPECIAL_5
- addvar VAR_SPECIAL_5, -1
+ addvar VAR_0x8005, 1
+ buffernumberstring 1, VAR_0x8005
+ addvar VAR_0x8005, -1
call LinkContestRoom1_EventScript_1A5A75
applymovement VAR_TEMP_3, LinkContestRoom1_Movement_1A5D99
waitmovement 0
@@ -1004,7 +1004,7 @@ LinkContestRoom1_EventScript_1A5BAB:: @ 81A5BAB
call LinkContestRoom1_EventScript_1A5A90
delay 30
special sub_80C4CF8
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq LinkContestRoom1_EventScript_1A5C46
return
@@ -1013,24 +1013,24 @@ LinkContestRoom1_EventScript_1A5BF6:: @ 81A5BF6
msgbox LinkContestRoom1_Text_1A6DF1, 3
delay 90
special sub_80C4CF8
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq LinkContestRoom1_EventScript_1A5C46
return
LinkContestRoom1_EventScript_1A5C12:: @ 81A5C12
- specialvar RESULT, ScrSpecial_CanMonParticipateInSelectedLinkContest
- compare RESULT, 1
+ specialvar VAR_RESULT, ScrSpecial_CanMonParticipateInSelectedLinkContest
+ compare VAR_RESULT, 1
goto_if_eq LinkContestRoom1_EventScript_1A5C23
return
LinkContestRoom1_EventScript_1A5C23:: @ 81A5C23
special ScrSpecial_GetContestWinnerIdx
- compare VAR_SPECIAL_5, 3
+ compare VAR_0x8005, 3
goto_if_eq LinkContestRoom1_EventScript_1A5C32
return
LinkContestRoom1_EventScript_1A5C32:: @ 81A5C32
- compare CONTEST_RANK, 3
+ compare VAR_CONTEST_RANK, 3
goto_if_eq LinkContestRoom1_EventScript_1A5C41
setflag FLAG_TEMP_2
return
@@ -1050,7 +1050,7 @@ LinkContestRoom1_EventScript_1A5C4C:: @ 81A5C4C
delay 60
call LinkContestRoom1_EventScript_1A5C6A
special sub_80C4CF8
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
goto_if_eq LinkContestRoom1_EventScript_1A5C64
closemessage
return
@@ -1062,7 +1062,7 @@ LinkContestRoom1_EventScript_1A5C64:: @ 81A5C64
LinkContestRoom1_EventScript_1A5C6A:: @ 81A5C6A
special ScrSpecial_GetContestPlayerMonIdx
special ScrSpecial_GetContestWinnerIdx
- compare VAR_SPECIAL_4, VAR_SPECIAL_5
+ compare VAR_0x8004, VAR_0x8005
goto_if_eq LinkContestRoom1_EventScript_1A5C7C
return
@@ -1071,7 +1071,7 @@ LinkContestRoom1_EventScript_1A5C7C:: @ 81A5C7C
return
LinkContestRoom1_EventScript_1A5C7F:: @ 81A5C7F
- switch VAR_SPECIAL_5
+ switch VAR_0x8005
case 0, LinkContestRoom1_EventScript_1A5CB1
case 1, LinkContestRoom1_EventScript_1A5CBE
case 2, LinkContestRoom1_EventScript_1A5CCB
@@ -1108,7 +1108,7 @@ LinkContestRoom1_EventScript_1A5CD8:: @ 81A5CD8
LinkContestRoom1_EventScript_1A5CE5:: @ 81A5CE5
special ScrSpecial_GetContestWinnerIdx
- compare VAR_SPECIAL_5, 3
+ compare VAR_0x8005, 3
goto_if_eq LinkContestRoom1_EventScript_1A5CFC
msgbox LinkContestRoom1_Text_1A6DF1, 3
return
@@ -1117,10 +1117,10 @@ LinkContestRoom1_EventScript_1A5CFC:: @ 81A5CFC
compare VAR_CONTEST_LOCATION, 2
call_if_eq LinkContestRoom1_EventScript_1A5C42
incrementgamestat GAME_STAT_WON_CONTEST
- specialvar RESULT, ScrSpecial_CanMonParticipateInSelectedLinkContest
- compare RESULT, 0
+ specialvar VAR_RESULT, ScrSpecial_CanMonParticipateInSelectedLinkContest
+ compare VAR_RESULT, 0
goto_if_eq LinkContestRoom1_EventScript_1A5D5B
- compare CONTEST_RANK, 3
+ compare VAR_CONTEST_RANK, 3
goto_if_eq LinkContestRoom1_EventScript_1A5D3B
msgbox LinkContestRoom1_Text_1A6DF1, 3
return
@@ -1132,7 +1132,7 @@ LinkContestRoom1_EventScript_1A5D2D:: @ 81A5D2D
LinkContestRoom1_EventScript_1A5D3B:: @ 81A5D3B
giveitem_std ITEM_LUXURY_BALL
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LinkContestRoom1_EventScript_1A5D2D
msgbox LinkContestRoom1_Text_1A6DF1, 3
return
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 34ba18f08..1a7e56cfd 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -2,12 +2,12 @@ Route117_EventScript_1B222D:: @ 81B222D
lock
faceplayer
special GetDaycareMonNicknames
- specialvar RESULT, GetDaycareState
- compare RESULT, 1
+ specialvar VAR_RESULT, GetDaycareState
+ compare VAR_RESULT, 1
goto_if_eq Route117_EventScript_1B2262
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq Route117_EventScript_1B22E7
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq Route117_EventScript_1B22FE
msgbox Route117_Text_1B25CB, 4
release
@@ -15,10 +15,10 @@ Route117_EventScript_1B222D:: @ 81B222D
Route117_EventScript_1B2262:: @ 81B2262
msgbox Route117_Text_1B2659, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_EventScript_1B2298
msgbox Route117_Text_1B28C4, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_EventScript_1B2298
msgbox Route117_Text_1B2745, 4
clearflag FLAG_PENDING_DAYCARE_EGG
@@ -27,8 +27,8 @@ Route117_EventScript_1B2262:: @ 81B2262
end
Route117_EventScript_1B2298:: @ 81B2298
- specialvar RESULT, CalculatePlayerPartyCount
- compare RESULT, 6
+ specialvar VAR_RESULT, CalculatePlayerPartyCount
+ compare VAR_RESULT, 6
goto_if_ne Route117_EventScript_1B22B2
msgbox Route117_Text_1B2766, 4
release
@@ -47,8 +47,8 @@ Route117_EventScript_1B22B2:: @ 81B22B2
end
Route117_EventScript_1B22CD:: @ 81B22CD
- specialvar RESULT, DaycareMonReceivedMail
- compare RESULT, 1
+ specialvar VAR_RESULT, DaycareMonReceivedMail
+ compare VAR_RESULT, 1
call_if_eq Route117_EventScript_1B22DE
return
@@ -59,7 +59,7 @@ Route117_EventScript_1B22DE:: @ 81B22DE
Route117_EventScript_1B22E7:: @ 81B22E7
special GetDaycareMonNicknames
msgbox Route117_Text_1B2710, 4
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call Route117_EventScript_1B22CD
release
end
@@ -71,9 +71,9 @@ Route117_EventScript_1B22FE:: @ 81B22FE
special ShowFieldMessageStringVar4
waitmessage
waitbuttonpress
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call Route117_EventScript_1B22CD
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
call Route117_EventScript_1B22CD
release
end
@@ -81,42 +81,42 @@ Route117_EventScript_1B22FE:: @ 81B22FE
Route117_PokemonDayCare_EventScript_1B2327:: @ 81B2327
lock
faceplayer
- specialvar RESULT, GetDaycareState
- compare RESULT, 1
+ specialvar VAR_RESULT, GetDaycareState
+ compare VAR_RESULT, 1
goto_if_eq Route117_PokemonDayCare_EventScript_1B2407
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B242B
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq Route117_PokemonDayCare_EventScript_1B2558
msgbox Route117_PokemonDayCare_Text_1B28F2, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B236C
msgbox Route117_PokemonDayCare_Text_1B2A14, 4
release
end
Route117_PokemonDayCare_EventScript_1B236C:: @ 81B236C
- specialvar RESULT, GetNumValidDaycarePartyMons
- compare RESULT, 1
+ specialvar VAR_RESULT, GetNumValidDaycarePartyMons
+ compare VAR_RESULT, 1
goto_if_eq Route117_PokemonDayCare_EventScript_1B23F3
msgbox Route117_PokemonDayCare_Text_1B2947, 4
fadescreen 1
special ChooseSendDaycareMon
waitstate
- compare VAR_SPECIAL_4, 255
+ compare VAR_0x8004, 255
goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0
- specialvar RESULT, CountAlivePartyMonsExceptSelectedOne
- compare RESULT, 0
+ specialvar VAR_RESULT, CountAlivePartyMonsExceptSelectedOne
+ compare VAR_RESULT, 0
goto_if_eq Route117_PokemonDayCare_EventScript_1B23FD
- specialvar VAR_SPECIAL_5, GetSelectedDaycareMonNickname
+ specialvar VAR_0x8005, GetSelectedDaycareMonNickname
waitse
- playmoncry VAR_SPECIAL_5, 0
+ playmoncry VAR_0x8005, 0
msgbox Route117_PokemonDayCare_Text_1B296E, 4
waitmoncry
special StoreSelectedPokemonInDaycare
incrementgamestat GAME_STAT_USED_DAYCARE
- specialvar RESULT, GetDaycareState
- compare RESULT, 2
+ specialvar VAR_RESULT, GetDaycareState
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B23DA
release
end
@@ -128,7 +128,7 @@ Route117_PokemonDayCare_EventScript_1B23D0:: @ 81B23D0
Route117_PokemonDayCare_EventScript_1B23DA:: @ 81B23DA
msgbox Route117_PokemonDayCare_Text_1B29AD, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B236C
goto Route117_PokemonDayCare_EventScript_1B23D0
end
@@ -153,36 +153,36 @@ Route117_PokemonDayCare_EventScript_1B2411:: @ 81B2411
return
Route117_PokemonDayCare_EventScript_1B241A:: @ 81B241A
- specialvar RESULT, GetNumLevelsGainedFromDaycare
- compare RESULT, 0
+ specialvar VAR_RESULT, GetNumLevelsGainedFromDaycare
+ compare VAR_RESULT, 0
call_if_ne Route117_PokemonDayCare_EventScript_1B2411
return
Route117_PokemonDayCare_EventScript_1B242B:: @ 81B242B
msgbox Route117_PokemonDayCare_Text_1B2A88, 4
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call Route117_PokemonDayCare_EventScript_1B241A
msgbox Route117_PokemonDayCare_Text_1B29AD, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B236C
msgbox Route117_PokemonDayCare_Text_1B2BF6, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B2469
goto Route117_PokemonDayCare_EventScript_1B23D0
end
Route117_PokemonDayCare_EventScript_1B2469:: @ 81B2469
- specialvar RESULT, CalculatePlayerPartyCount
- compare RESULT, 6
+ specialvar VAR_RESULT, CalculatePlayerPartyCount
+ compare VAR_RESULT, 6
goto_if_eq Route117_PokemonDayCare_EventScript_1B2539
- specialvar RESULT, GetDaycareState
- setvar VAR_SPECIAL_4, 0
- compare RESULT, 2
+ specialvar VAR_RESULT, GetDaycareState
+ setvar VAR_0x8004, 0
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B24A8
special ShowDaycareLevelMenu
waitstate
- copyvar VAR_SPECIAL_4, RESULT
- compare RESULT, 2
+ copyvar VAR_0x8004, VAR_RESULT
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0
goto Route117_PokemonDayCare_EventScript_1B24A8
end
@@ -190,14 +190,14 @@ Route117_PokemonDayCare_EventScript_1B2469:: @ 81B2469
Route117_PokemonDayCare_EventScript_1B24A8:: @ 81B24A8
special GetDaycareCost
msgbox Route117_PokemonDayCare_Text_1B2B49, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B24C4
goto Route117_PokemonDayCare_EventScript_1B23D0
end
Route117_PokemonDayCare_EventScript_1B24C4:: @ 81B24C4
- specialvar RESULT, HasEnoughMoneyFor
- compare RESULT, 1
+ specialvar VAR_RESULT, HasEnoughMoneyFor
+ compare VAR_RESULT, 1
goto_if_eq Route117_PokemonDayCare_EventScript_1B24DE
msgbox Route117_PokemonDayCare_Text_1B2A30, 4
release
@@ -206,23 +206,23 @@ Route117_PokemonDayCare_EventScript_1B24C4:: @ 81B24C4
Route117_PokemonDayCare_EventScript_1B24DE:: @ 81B24DE
applymovement 1, Route117_PokemonDayCare_Movement_1B2543
waitmovement 0
- specialvar RESULT, TakePokemonFromDaycare
+ specialvar VAR_RESULT, TakePokemonFromDaycare
special PayMoneyFor
playse SE_REGI
msgbox Route117_PokemonDayCare_Text_1B2B75, 4
waitse
- playmoncry RESULT, 0
+ playmoncry VAR_RESULT, 0
msgbox Route117_PokemonDayCare_Text_1B2B93, 4
waitmoncry
- specialvar RESULT, GetDaycareState
- compare RESULT, 2
+ specialvar VAR_RESULT, GetDaycareState
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B2520
goto Route117_PokemonDayCare_EventScript_1B23D0
end
Route117_PokemonDayCare_EventScript_1B2520:: @ 81B2520
msgbox Route117_PokemonDayCare_Text_1B2A4F, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B2469
goto Route117_PokemonDayCare_EventScript_1B23D0
end
@@ -259,12 +259,12 @@ Route117_PokemonDayCare_Movement_1B2543:: @ 81B2543
Route117_PokemonDayCare_EventScript_1B2558:: @ 81B2558
msgbox Route117_PokemonDayCare_Text_1B2A88, 4
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call Route117_PokemonDayCare_EventScript_1B241A
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
call Route117_PokemonDayCare_EventScript_1B241A
msgbox Route117_PokemonDayCare_Text_1B2BF6, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route117_PokemonDayCare_EventScript_1B2469
msgbox Route117_PokemonDayCare_Text_1B2A76, 4
release
@@ -273,10 +273,10 @@ Route117_PokemonDayCare_EventScript_1B2558:: @ 81B2558
@ 81B2591
special ShowDaycareLevelMenu
waitstate
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0
- copyvar VAR_SPECIAL_4, RESULT
- specialvar RESULT, TakePokemonFromDaycare
+ copyvar VAR_0x8004, VAR_RESULT
+ specialvar VAR_RESULT, TakePokemonFromDaycare
msgbox Route117_PokemonDayCare_Text_1B2B75, 4
msgbox Route117_PokemonDayCare_Text_1B2A76, 4
release
diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc
index 5427ea6cd..c11e78a8d 100644
--- a/data/scripts/debug.inc
+++ b/data/scripts/debug.inc
@@ -7,7 +7,7 @@ DebugScript_081C1CFE:: @ 81C1CFE
DebugScript_081C1D07:: @ 81C1D07
checkitem ITEM_COIN_CASE, 1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DebugScript_081C1D1D
giveitem ITEM_COIN_CASE, 1
end
@@ -34,7 +34,7 @@ DebugScript_081C1D34:: @ 81C1D34
DebugScript_081C1D35:: @ 81C1D35
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq DebugScript_081C1D45
giveegg SPECIES_KYOGRE
end
@@ -463,15 +463,15 @@ DebugScript_081C23F6:: @ 81C23F6
DebugScript_081C23FD:: @ 81C23FD
getpartysize
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DebugScript_081C2436
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq DebugScript_081C2445
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq DebugScript_081C2454
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq DebugScript_081C2463
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq DebugScript_081C2472
end
@@ -489,15 +489,15 @@ DebugScript_081C2472:
DebugScript_081C2482:: @ 81C2482
getpartysize
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq DebugScript_081C24BB
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq DebugScript_081C24CA
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq DebugScript_081C24D9
- compare RESULT, 4
+ compare VAR_RESULT, 4
goto_if_eq DebugScript_081C24E8
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq DebugScript_081C24F7
end
@@ -515,7 +515,7 @@ DebugScript_081C24F7:
DebugScript_081C2507:: @ 81C2507
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq DebugScript_081C2517
giveegg SPECIES_BARBOACH
end
@@ -525,7 +525,7 @@ DebugScript_081C2517:: @ 81C2517
DebugScript_081C2518:: @ 81C2518
getpartysize
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq DebugScript_081C2528
giveegg SPECIES_SHROOMISH
end
diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc
index b1c47fa62..29e05c513 100644
--- a/data/scripts/gabby_and_ty.inc
+++ b/data/scripts/gabby_and_ty.inc
@@ -2,8 +2,8 @@ Route111_EventScript_1AE313:: @ 81AE313
Route118_EventScript_1AE313:: @ 81AE313
Route120_EventScript_1AE313:: @ 81AE313
cleartrainerflag TRAINER_GABBY_AND_TY_6
- specialvar RESULT, GabbyAndTyGetBattleNum
- switch RESULT
+ specialvar VAR_RESULT, GabbyAndTyGetBattleNum
+ switch VAR_RESULT
case 0, Route111_EventScript_1AE384
case 1, Route111_EventScript_1AE38A
case 2, Route111_EventScript_1AE395
@@ -202,11 +202,11 @@ Route120_EventScript_1AE582:: @ 81AE582
Route111_EventScript_1AE5A2:: @ 81AE5A2
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToEventObjectLocalIds
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route111_EventScript_1AE5E0
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq Route111_EventScript_1AE5EB
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route111_EventScript_1AE5FD
goto_if_set FLAG_TEMP_1, Route111_EventScript_1AE73A
msgbox Route111_Text_1AC015, MSGBOX_YESNO
@@ -214,19 +214,19 @@ Route111_EventScript_1AE5A2:: @ 81AE5A2
end
Route111_EventScript_1AE5E0:: @ 81AE5E0
- applymovement VAR_SPECIAL_4, Route111_Movement_1AE699
+ applymovement VAR_0x8004, Route111_Movement_1AE699
waitmovement 0
return
Route111_EventScript_1AE5EB:: @ 81AE5EB
- applymovement VAR_SPECIAL_4, Route111_Movement_1AE69B
- applymovement VAR_SPECIAL_5, Route111_Movement_1A0841
+ applymovement VAR_0x8004, Route111_Movement_1AE69B
+ applymovement VAR_0x8005, Route111_Movement_1A0841
waitmovement 0
return
Route111_EventScript_1AE5FD:: @ 81AE5FD
- applymovement VAR_SPECIAL_4, Route111_Movement_1AE69D
- applymovement VAR_SPECIAL_5, Route111_Movement_1A083F
+ applymovement VAR_0x8004, Route111_Movement_1AE69D
+ applymovement VAR_0x8005, Route111_Movement_1A083F
waitmovement 0
return
@@ -235,19 +235,19 @@ Route118_EventScript_1AE60F:: @ 81AE60F
Route120_EventScript_1AE60F:: @ 81AE60F
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToEventObjectLocalIds
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route111_EventScript_1AE5E0
- compare FACING, 1
+ compare VAR_FACING, 1
call_if_eq Route111_EventScript_1AE5EB
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route111_EventScript_1AE5FD
goto_if_set FLAG_TEMP_1, Route111_EventScript_1AE73A
- specialvar RESULT, GabbyAndTyGetLastQuote
- compare RESULT, 0
+ specialvar VAR_RESULT, GabbyAndTyGetLastQuote
+ compare VAR_RESULT, 0
goto_if_eq Route111_EventScript_1AE69F
msgbox Route111_Text_1AC10A, 4
- specialvar RESULT, GabbyAndTyGetLastBattleTrivia
- switch RESULT
+ specialvar VAR_RESULT, GabbyAndTyGetLastBattleTrivia
+ switch VAR_RESULT
case 0, Route111_EventScript_1AE6AD
case 1, Route111_EventScript_1AE6BB
case 2, Route111_EventScript_1AE6C9
@@ -298,14 +298,14 @@ Route111_EventScript_1AE6E5:: @ 81AE6E5
end
Route111_EventScript_1AE6F3:: @ 81AE6F3
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq Route111_EventScript_1AE72D
msgbox Route111_Text_1AC40F, 4
- setvar VAR_SPECIAL_4, 10
+ setvar VAR_0x8004, 10
call Route111_EventScript_1A00F3
lock
faceplayer
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route111_EventScript_1AE72D
msgbox Route111_Text_1AC487, 4
special GabbyAndTyAfterInterview
diff --git a/data/scripts/magma_chimney.inc b/data/scripts/magma_chimney.inc
index 5f70c1295..ff31d8b97 100644
--- a/data/scripts/magma_chimney.inc
+++ b/data/scripts/magma_chimney.inc
@@ -65,9 +65,9 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB
fadescreen 0
setobjectxyperm 1, 10, 12
addobject 1
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq MtChimney_EventScript_1B2D7D
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq MtChimney_EventScript_1B2D88
applymovement 255, MtChimney_Movement_1A083F
waitmovement 0
@@ -77,9 +77,9 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB
msgbox MtChimney_Text_1B3FFE, 4
.endif
closemessage
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq MtChimney_EventScript_1B2D93
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq MtChimney_EventScript_1B2D9E
removeobject 1
setflag FLAG_HIDE_OTHER_TEAM_MT_CHIMNEY
diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc
index 0e1835ae4..9e2db94a1 100644
--- a/data/scripts/mauville_man.inc
+++ b/data/scripts/mauville_man.inc
@@ -2,7 +2,7 @@
MauvilleCity_PokemonCenter_1F_EventScript_1AE744:: @ 81AE744
special ScrSpecial_GetCurrentMauvilleMan
- switch RESULT
+ switch VAR_RESULT
case MAUVILLE_MAN_BARD, SpeakToBard
case MAUVILLE_MAN_HIPSTER, SpeakToHipster
case MAUVILLE_MAN_TRADER, SpeakToTrader
@@ -19,19 +19,19 @@ SpeakToBard:
lock
faceplayer
msgbox gTextBard_HiImTheBard, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq yes_hear_song
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_hear_song
end
yes_hear_song:
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
@ Give the player ear rape
special ScrSpecial_PlayBardSong
delay 60
special ScrSpecial_HasBardSongBeenChanged
- compare RESULT, FALSE
+ compare VAR_RESULT, FALSE
@ Prompt new lyrics only if song hasn't been changed
goto_if_eq prompt_write_lyrics
msgbox gTextBard_OhWhatAMovingSong, 4
@@ -45,26 +45,26 @@ dont_hear_song:
prompt_write_lyrics:
msgbox gTextBard_SoHowDoYouLikeMySong, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq write_lyrics
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_write_lyrics
end
write_lyrics:
- setvar VAR_SPECIAL_4, 6
+ setvar VAR_0x8004, 6
call MauvilleCity_PokemonCenter_1F_EventScript_1A00F3
lock
faceplayer
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_write_lyrics
msgbox gTextBard_ThankYouKindly, 4
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
@ Give the player ear rape again
special ScrSpecial_PlayBardSong
delay 60
msgbox gTextBard_WasThatHowYouWanted, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq write_lyrics @ Keep looping until player responds YES
special ScrSpecial_SaveBardSongLyrics
msgbox gTextBard_OkayThatsIt, 4
@@ -87,7 +87,7 @@ SpeakToHipster:
setflag FLAG_SYS_HIPSTER_MEET
msgbox gTextHipster_TheyCallMeTheHipster, 4
special ScrSpecial_GetHipsterSpokenFlag
- compare RESULT, FALSE
+ compare VAR_RESULT, FALSE
goto_if_eq hipster_first_time
msgbox gTextHipster_TaughtYouAlready, 4
release
@@ -95,7 +95,7 @@ SpeakToHipster:
hipster_first_time:
special ScrSpecial_HipsterTeachWord
- compare RESULT, TRUE @ TRUE if player learned a new word
+ compare VAR_RESULT, TRUE @ TRUE if player learned a new word
goto_if_eq teach_new_word
msgbox gTextHipster_YouAlreadyKnowALot, 4
release
@@ -118,10 +118,10 @@ SpeakToTrader:
lock
faceplayer
msgbox gTextTrader_Introduction, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_want_to_trade
special ScrSpecial_GetTraderTradedFlag
- compare RESULT, TRUE
+ compare VAR_RESULT, TRUE
goto_if_eq already_traded
message gTextTrader_MenuPrompt
waitmessage
@@ -139,15 +139,15 @@ already_traded:
do_trader_menu_get:
special ScrSpecial_TraderMenuGetDecoration
waitstate
- compare VAR_SPECIAL_4, 0
+ compare VAR_0x8004, 0
goto_if_eq cancelled_get_menu
- compare VAR_SPECIAL_4, -1
+ compare VAR_0x8004, -1
goto_if_eq rare_item_cant_trade_away
msgbox gTextTrader_ItemOnceBelongedTo, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_want_item
special ScrSpecial_DoesPlayerHaveNoDecorations
- compare RESULT, TRUE
+ compare VAR_RESULT, TRUE
goto_if_eq player_has_no_decorations
goto do_trader_menu_give
end
@@ -176,15 +176,15 @@ do_trader_menu_give:
msgbox gTextTrader_PickDecorationYoullTrade, 4
special ScrSpecial_TraderMenuGiveDecoration
waitstate
- compare VAR_SPECIAL_6, 0
+ compare VAR_0x8006, 0
goto_if_eq cancelled_give_menu
- compare VAR_SPECIAL_6, -1
+ compare VAR_0x8006, -1
goto_if_eq decoration_is_in_use
special ScrSpecial_IsDecorationFull
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq decorations_full
msgbox gTextTrader_SoWellTrade, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq do_trader_menu_give
special ScrSpecial_TraderDoDecorationTrade
msgbox gTextTrader_ThenWellTrade, 2
@@ -211,58 +211,58 @@ decorations_full:
.include "data/text/storyteller.inc"
SpeakToStoryteller:
- setvar VAR_SPECIAL_8, 0
- setvar VAR_SPECIAL_9, 0
- setvar VAR_SPECIAL_A, 0
- setvar VAR_SPECIAL_B, 0
+ setvar VAR_0x8008, 0
+ setvar VAR_0x8009, 0
+ setvar VAR_0x800A, 0
+ setvar VAR_0x800B, 0
lock
faceplayer
msgbox gTextStoryteller_Introduction, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_hear_story
- specialvar RESULT, ScrSpecial_StorytellerGetFreeStorySlot
- compare RESULT, 0 @ If slot is 0, then the list is empty
+ specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot
+ compare VAR_RESULT, 0 @ If slot is 0, then the list is empty
goto_if_eq no_stories_recorded
choose_story:
message gTextStoryteller_WhichTale
waitmessage
special ScrSpecial_StorytellerStoryListMenu
waitstate
- compare RESULT, FALSE
+ compare VAR_RESULT, FALSE
goto_if_eq cancel_story_menu
- setvar VAR_SPECIAL_8, 1
+ setvar VAR_0x8008, 1
special ScrSpecial_StorytellerDisplayStory
waitmessage
waitbuttonpress
- specialvar RESULT, ScrSpecial_StorytellerUpdateStat
- compare RESULT, FALSE
+ specialvar VAR_RESULT, ScrSpecial_StorytellerUpdateStat
+ compare VAR_RESULT, FALSE
goto_if_eq no_stat_update
goto stat_update
cancel_story_menu:
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
goto_if_eq dont_hear_story
goto yes_hear_story
no_stat_update:
msgbox gTextStoryteller_CouldThereBeOtherTrainers, 4
msgbox gTextStoryteller_HearAnotherLegendaryTale, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq choose_story
yes_hear_story:
- specialvar RESULT, ScrSpecial_HasStorytellerAlreadyRecorded
- compare RESULT, TRUE
+ specialvar VAR_RESULT, ScrSpecial_HasStorytellerAlreadyRecorded
+ compare VAR_RESULT, TRUE
goto_if_eq cant_record_story @ already recorded story
- specialvar RESULT, ScrSpecial_StorytellerGetFreeStorySlot
- compare RESULT, 4
+ specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot
+ compare VAR_RESULT, 4
goto_if_eq cant_record_story @ story list is full
goto prompt_record_story
no_stories_recorded:
msgbox gTextStoryteller_ButIKnowOfNoLegendaryTrainers, 4
prompt_record_story:
msgbox gTextStoryteller_HaveYouAnyTales, MSGBOX_YESNO
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_hear_story
- specialvar RESULT, ScrSpecial_StorytellerInitializeRandomStat
- compare RESULT, TRUE
+ specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat
+ compare VAR_RESULT, TRUE
goto_if_eq stat_update
msgbox gTextStoryteller_ImNotSatisfied, 4
closemessage
@@ -298,25 +298,25 @@ SpeakToGiddy:
lock
faceplayer
msgbox gTextGiddy_Introduction, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq yes_hear_giddy
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq dont_hear_giddy
end
yes_hear_giddy:
special ScrSpecial_GiddyShouldTellAnotherTale
- compare RESULT, TRUE
+ compare VAR_RESULT, TRUE
goto_if_eq tell_giddy_tale
- compare RESULT, FALSE
+ compare VAR_RESULT, FALSE
goto_if_eq bye_bye
end
tell_another_giddy_tale:
special ScrSpecial_GiddyShouldTellAnotherTale
- compare RESULT, TRUE
+ compare VAR_RESULT, TRUE
goto_if_eq also_i_was_thinking
- compare RESULT, FALSE
+ compare VAR_RESULT, FALSE
goto_if_eq bye_bye
end
@@ -330,9 +330,9 @@ tell_giddy_tale:
special ShowFieldMessageStringVar4
waitmessage
yesnobox 20, 8
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq tell_another_giddy_tale
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq tell_another_giddy_tale
end
diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc
index 4813caa68..34c546a39 100644
--- a/data/scripts/mystery_event_club.inc
+++ b/data/scripts/mystery_event_club.inc
@@ -9,7 +9,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1B14:: @ 81B1B14
PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D:: @ 81B1B2D
msgbox PetalburgCity_PokemonCenter_1F_Text_1B1D10, 4
multichoice 17, 6, 20, 0
- switch RESULT
+ switch VAR_RESULT
case 0, PetalburgCity_PokemonCenter_1F_EventScript_1B1B7A
case 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1BD1
case 2, PetalburgCity_PokemonCenter_1F_EventScript_1B1B6C
@@ -24,15 +24,15 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1B6C:: @ 81B1B6C
PetalburgCity_PokemonCenter_1F_EventScript_1B1B7A:: @ 81B1B7A
msgbox PetalburgCity_PokemonCenter_1F_Text_1B1F7B, 4
closemessage
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call PetalburgCity_PokemonCenter_1F_EventScript_1A00F3
lock
faceplayer
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB
end
@@ -42,7 +42,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1:: @ 81B1BB1
end
PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB:: @ 81B1BBB
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
special sub_80EB7C4
waitmessage
delay 80
@@ -63,7 +63,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB:: @ 81B1BDB
PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9:: @ 81B1BE9
msgbox PetalburgCity_PokemonCenter_1F_Text_1B2063, 4
multichoice 17, 6, 20, 0
- switch RESULT
+ switch VAR_RESULT
case 0, PetalburgCity_PokemonCenter_1F_EventScript_1B1C36
case 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C6D
case 2, PetalburgCity_PokemonCenter_1F_EventScript_1B1C28
@@ -78,15 +78,15 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1C28:: @ 81B1C28
PetalburgCity_PokemonCenter_1F_EventScript_1B1C36:: @ 81B1C36
msgbox PetalburgCity_PokemonCenter_1F_Text_1B207F, 4
closemessage
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
call PetalburgCity_PokemonCenter_1F_EventScript_1A00F3
lock
faceplayer
- compare VAR_SPECIAL_4, 1
+ compare VAR_0x8004, 1
call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB
end
diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc
index 9f0e67cb6..a4de5d113 100644
--- a/data/scripts/players_house.inc
+++ b/data/scripts/players_house.inc
@@ -6,17 +6,17 @@ LittlerootTown_MaysHouse_2F_EventScript_1B6950:: @ 81B6950
LittlerootTown_BrendansHouse_1F_EventScript_1B6956:: @ 81B6956
LittlerootTown_MaysHouse_1F_EventScript_1B6956:: @ 81B6956
msgbox LittlerootTown_BrendansHouse_1F_Text_172429, 4
- applymovement VAR_SPECIAL_4, LittlerootTown_BrendansHouse_1F_Movement_1A0839
+ applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0839
waitmovement 0
- compare VAR_SPECIAL_5, 0
+ compare VAR_0x8005, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B699F
- compare VAR_SPECIAL_5, 1
+ compare VAR_0x8005, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B69AA
msgbox LittlerootTown_BrendansHouse_1F_Text_172453, 4
closemessage
setvar VAR_LITTLEROOT_INTRO_STATE, 4
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B69B5
- applymovement VAR_SPECIAL_4, LittlerootTown_BrendansHouse_1F_Movement_1A0841
+ applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841
waitmovement 0
releaseall
end
@@ -39,7 +39,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B69B7:: @ 81B69B7
LittlerootTown_MaysHouse_1F_EventScript_1B69B7:: @ 81B69B7
msgbox LittlerootTown_BrendansHouse_1F_Text_172531, 4
closemessage
- applymovement VAR_SPECIAL_4, LittlerootTown_BrendansHouse_1F_Movement_1A0841
+ applymovement VAR_0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CDC
waitmovement 0
releaseall
@@ -47,13 +47,13 @@ LittlerootTown_MaysHouse_1F_EventScript_1B69B7:: @ 81B69B7
LittlerootTown_BrendansHouse_2F_EventScript_1B69D3:: @ 81B69D3
lockall
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
goto LittlerootTown_BrendansHouse_2F_EventScript_1B69EB
end
LittlerootTown_MaysHouse_2F_EventScript_1B69DF:: @ 81B69DF
lockall
- setvar VAR_SPECIAL_4, 1
+ setvar VAR_0x8004, 1
goto LittlerootTown_MaysHouse_2F_EventScript_1B69EB
end
@@ -68,38 +68,38 @@ LittlerootTown_MaysHouse_2F_EventScript_1B69EB:: @ 81B69EB
setflag FLAG_HIDE_MACHOKE_MOVER_1
setflag FLAG_HIDE_MACHOKE_MOVER_2
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A31
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A61
playse SE_KAIDAN
- removeobject VAR_SPECIAL_8
+ removeobject VAR_0x8008
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_1B6A31:: @ 81B6A31
- setvar VAR_SPECIAL_8, 14
- addobject VAR_SPECIAL_8
- applymovement VAR_SPECIAL_8, LittlerootTown_BrendansHouse_2F_Movement_1B6AA2
+ setvar VAR_0x8008, 14
+ addobject VAR_0x8008
+ applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA2
waitmovement 0
applymovement 255, LittlerootTown_BrendansHouse_2F_Movement_1A0843
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_172E4C, 4
closemessage
- applymovement VAR_SPECIAL_8, LittlerootTown_BrendansHouse_2F_Movement_1B6AA9
+ applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA9
waitmovement 0
return
LittlerootTown_BrendansHouse_2F_EventScript_1B6A61:: @ 81B6A61
- setvar VAR_SPECIAL_8, 14
- addobject VAR_SPECIAL_8
- applymovement VAR_SPECIAL_8, LittlerootTown_BrendansHouse_2F_Movement_1B6AAD
+ setvar VAR_0x8008, 14
+ addobject VAR_0x8008
+ applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AAD
waitmovement 0
applymovement 255, LittlerootTown_BrendansHouse_2F_Movement_1A083F
waitmovement 0
msgbox LittlerootTown_BrendansHouse_2F_Text_172E4C, 4
closemessage
- applymovement VAR_SPECIAL_8, LittlerootTown_BrendansHouse_2F_Movement_1B6AB4
+ applymovement VAR_0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AB4
waitmovement 0
return
@@ -154,7 +154,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6AB8:: @ 81B6AB8
end
LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF:: @ 81B6ABF
- applymovement VAR_SPECIAL_5, LittlerootTown_BrendansHouse_1F_Movement_1A0843
+ applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0843
waitmovement 0
call LittlerootTown_BrendansHouse_1F_EventScript_1B6B9D
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CCC
@@ -162,7 +162,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF:: @ 81B6ABF
playbgm MUS_INTER_V, FALSE
msgbox LittlerootTown_BrendansHouse_1F_Text_1725C9, 4
closemessage
- applymovement VAR_SPECIAL_5, LittlerootTown_BrendansHouse_1F_Movement_1B6BDB
+ applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BDB
waitmovement 0
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CD2
waitmovement 0
@@ -173,13 +173,13 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF:: @ 81B6ABF
msgbox LittlerootTown_BrendansHouse_1F_Text_172644, 4
closemessage
setvar VAR_TEMP_1, 1
- applymovement VAR_SPECIAL_5, LittlerootTown_BrendansHouse_1F_Movement_1B6BE1
+ applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BE1
waitmovement 0
goto LittlerootTown_BrendansHouse_1F_EventScript_1B6AB8
end
LittlerootTown_MaysHouse_1F_EventScript_1B6B2E:: @ 81B6B2E
- applymovement VAR_SPECIAL_5, LittlerootTown_MaysHouse_1F_Movement_1A083F
+ applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_1A083F
waitmovement 0
call LittlerootTown_MaysHouse_1F_EventScript_1B6B9D
applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1B6CD4
@@ -187,7 +187,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6B2E:: @ 81B6B2E
playbgm MUS_INTER_V, FALSE
msgbox LittlerootTown_MaysHouse_1F_Text_1725C9, 4
closemessage
- applymovement VAR_SPECIAL_5, LittlerootTown_MaysHouse_1F_Movement_1B6BDE
+ applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BDE
waitmovement 0
applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1B6CDA
waitmovement 0
@@ -198,7 +198,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6B2E:: @ 81B6B2E
msgbox LittlerootTown_MaysHouse_1F_Text_172644, 4
closemessage
setvar VAR_TEMP_1, 1
- applymovement VAR_SPECIAL_5, LittlerootTown_MaysHouse_1F_Movement_1B6BE5
+ applymovement VAR_0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BE5
waitmovement 0
goto LittlerootTown_MaysHouse_1F_EventScript_1B6AB8
end
@@ -206,9 +206,9 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6B2E:: @ 81B6B2E
LittlerootTown_BrendansHouse_1F_EventScript_1B6B9D:: @ 81B6B9D
LittlerootTown_MaysHouse_1F_EventScript_1B6B9D:: @ 81B6B9D
playse SE_PIN
- applymovement VAR_SPECIAL_5, LittlerootTown_BrendansHouse_1F_Movement_1A0833
+ applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0833
waitmovement 0
- applymovement VAR_SPECIAL_5, LittlerootTown_BrendansHouse_1F_Movement_1A0835
+ applymovement VAR_0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0835
waitmovement 0
msgbox LittlerootTown_BrendansHouse_1F_Text_1725A3, 4
closemessage
@@ -274,7 +274,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D:: @ 81B6C3D
goto_if_set FLAG_RECEIVED_AMULET_COIN, LittlerootTown_BrendansHouse_1F_EventScript_1B6C72
msgbox LittlerootTown_BrendansHouse_1F_Text_172782, 4
giveitem_std ITEM_AMULET_COIN
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1A029B
msgbox LittlerootTown_BrendansHouse_1F_Text_1727CD, 4
setflag FLAG_RECEIVED_AMULET_COIN
@@ -358,42 +358,42 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6CDE:: @ 81B6CDE
LittlerootTown_MaysHouse_1F_EventScript_1B6CDE:: @ 81B6CDE
lockall
checkplayergender
- compare RESULT, 0
+ compare VAR_RESULT, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD
- compare RESULT, 1
+ compare VAR_RESULT, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E28
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1A0839
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0839
waitmovement 0
playse SE_PIN
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1A0833
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0833
waitmovement 0
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1A0835
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0835
waitmovement 0
delay 20
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8
msgbox LittlerootTown_BrendansHouse_1F_Text_17298B, 4
giveitem_std ITEM_SS_TICKET
msgbox LittlerootTown_BrendansHouse_1F_Text_172A7D, 4
closemessage
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE
msgbox LittlerootTown_BrendansHouse_1F_Text_172B5E, 4
closemessage
- compare VAR_SPECIAL_8, 0
+ compare VAR_0x8008, 0
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9
- compare VAR_SPECIAL_8, 1
+ compare VAR_0x8008, 1
call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B
playse SE_DOOR
- removeobject VAR_SPECIAL_9
+ removeobject VAR_0x8009
setflag FLAG_RECEIVED_SS_TICKET
setvar VAR_LITTLEROOT_HOUSES_STATE, 4
setvar VAR_LITTLEROOT_HOUSES_STATE_2, 4
@@ -401,46 +401,46 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6CDE:: @ 81B6CDE
end
LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD:: @ 81B6DAD
- setvar VAR_SPECIAL_8, 0
- setvar VAR_SPECIAL_9, 5
- setvar VAR_SPECIAL_A, 1
+ setvar VAR_0x8008, 0
+ setvar VAR_0x8009, 5
+ setvar VAR_0x800A, 1
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD:: @ 81B6DBD
- setvar VAR_SPECIAL_8, 1
- setvar VAR_SPECIAL_9, 5
- setvar VAR_SPECIAL_A, 1
+ setvar VAR_0x8008, 1
+ setvar VAR_0x8009, 5
+ setvar VAR_0x800A, 1
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD:: @ 81B6DCD
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E33
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E33
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8:: @ 81B6DD8
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E36
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E36
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3:: @ 81B6DE3
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E39
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E39
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE:: @ 81B6DEE
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E3B
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3B
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9:: @ 81B6DF9
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E3D
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3D
waitmovement 0
return
LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B:: @ 81B6E0B
applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F
- applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1B6E43
+ applymovement VAR_0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E43
waitmovement 0
return
diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc
index 6f8cb1176..95525b4c9 100644
--- a/data/scripts/pokeblocks.inc
+++ b/data/scripts/pokeblocks.inc
@@ -1,34 +1,34 @@
FallarborTown_ContestLobby_EventScript_1B7604:: @ 81B7604
- setvar VAR_SPECIAL_8, 4
- setvar VAR_SPECIAL_9, 1
- applymovement VAR_SPECIAL_8, FallarborTown_ContestLobby_Movement_1B7821
+ setvar VAR_0x8008, 4
+ setvar VAR_0x8009, 1
+ applymovement VAR_0x8008, FallarborTown_ContestLobby_Movement_1B7821
waitmovement 0
goto FallarborTown_ContestLobby_EventScript_1B7681
end
SlateportCity_ContestLobby_EventScript_1B761E:: @ 81B761E
- setvar VAR_SPECIAL_8, 2
- setvar VAR_SPECIAL_9, 2
+ setvar VAR_0x8008, 2
+ setvar VAR_0x8009, 2
applymovement 6, SlateportCity_ContestLobby_Movement_1A083D
- applymovement VAR_SPECIAL_8, SlateportCity_ContestLobby_Movement_1B7821
+ applymovement VAR_0x8008, SlateportCity_ContestLobby_Movement_1B7821
waitmovement 0
goto SlateportCity_ContestLobby_EventScript_1B7681
end
VerdanturfTown_ContestLobby_EventScript_1B763F:: @ 81B763F
- setvar VAR_SPECIAL_8, 2
- setvar VAR_SPECIAL_9, 1
- applymovement VAR_SPECIAL_8, VerdanturfTown_ContestLobby_Movement_1B7821
+ setvar VAR_0x8008, 2
+ setvar VAR_0x8009, 1
+ applymovement VAR_0x8008, VerdanturfTown_ContestLobby_Movement_1B7821
waitmovement 0
goto VerdanturfTown_ContestLobby_EventScript_1B7681
end
LilycoveCity_ContestLobby_EventScript_1B7659:: @ 81B7659
- setvar VAR_SPECIAL_8, 3
- setvar VAR_SPECIAL_9, 3
+ setvar VAR_0x8008, 3
+ setvar VAR_0x8009, 3
applymovement 9, LilycoveCity_ContestLobby_Movement_1A083D
applymovement 10, LilycoveCity_ContestLobby_Movement_1A083D
- applymovement VAR_SPECIAL_8, LilycoveCity_ContestLobby_Movement_1B7821
+ applymovement VAR_0x8008, LilycoveCity_ContestLobby_Movement_1B7821
waitmovement 0
goto LilycoveCity_ContestLobby_EventScript_1B7681
end
@@ -39,24 +39,24 @@ SlateportCity_ContestLobby_EventScript_1B7681:: @ 81B7681
VerdanturfTown_ContestLobby_EventScript_1B7681:: @ 81B7681
lockall
msgbox FallarborTown_ContestLobby_Text_1B6E63, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1B76A1
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_ContestLobby_EventScript_1B76E5
end
FallarborTown_ContestLobby_EventScript_1B76A1:: @ 81B76A1
checkitem ITEM_POKEBLOCK_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7780
- specialvar RESULT, PlayerHasBerries
- compare RESULT, 0
+ specialvar VAR_RESULT, PlayerHasBerries
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B770E
msgbox FallarborTown_ContestLobby_Text_1B6E9D, 4
- specialvar RESULT, GetFirstFreePokeblockSlot
- compare RESULT, -1
+ specialvar VAR_RESULT, GetFirstFreePokeblockSlot
+ compare VAR_RESULT, -1
goto_if_ne FallarborTown_ContestLobby_EventScript_1B76EF
- compare RESULT, -1
+ compare VAR_RESULT, -1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7776
end
@@ -67,9 +67,9 @@ FallarborTown_ContestLobby_EventScript_1B76E5:: @ 81B76E5
FallarborTown_ContestLobby_EventScript_1B76EF:: @ 81B76EF
msgbox FallarborTown_ContestLobby_Text_1B6ED0, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7734
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7726
end
@@ -91,7 +91,7 @@ FallarborTown_ContestLobby_EventScript_1B7734:: @ 81B7734
end
FallarborTown_ContestLobby_EventScript_1B7742:: @ 81B7742
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_9
+ copyvar VAR_0x8004, VAR_0x8009
fadescreen 1
special DoBerryBlending
waitstate
@@ -121,22 +121,22 @@ FallarborTown_ContestLobby_EventScript_1B7780:: @ 81B7780
end
FallarborTown_ContestLobby_EventScript_1B778A:: @ 81B778A
- setvar VAR_SPECIAL_8, 4
+ setvar VAR_0x8008, 4
goto FallarborTown_ContestLobby_EventScript_1B77B6
end
SlateportCity_ContestLobby_EventScript_1B7795:: @ 81B7795
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto SlateportCity_ContestLobby_EventScript_1B77B6
end
VerdanturfTown_ContestLobby_EventScript_1B77A0:: @ 81B77A0
- setvar VAR_SPECIAL_8, 2
+ setvar VAR_0x8008, 2
goto VerdanturfTown_ContestLobby_EventScript_1B77B6
end
LilycoveCity_ContestLobby_EventScript_1B77AB:: @ 81B77AB
- setvar VAR_SPECIAL_8, 3
+ setvar VAR_0x8008, 3
goto LilycoveCity_ContestLobby_EventScript_1B77B6
end
@@ -147,10 +147,10 @@ VerdanturfTown_ContestLobby_EventScript_1B77B6:: @ 81B77B6
lock
faceplayer
msgbox FallarborTown_ContestLobby_Text_1B742F, 4
- specialvar RESULT, PlayerHasBerries
- compare RESULT, 1
+ specialvar VAR_RESULT, PlayerHasBerries
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B77DC
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B77E6
end
@@ -206,24 +206,24 @@ LilycoveCity_ContestLobby_EventScript_1B783B:: @ 81B783B
SlateportCity_ContestLobby_EventScript_1B783B:: @ 81B783B
VerdanturfTown_ContestLobby_EventScript_1B783B:: @ 81B783B
lockall
- specialvar RESULT, PlayerHasBerries
- compare RESULT, 0
+ specialvar VAR_RESULT, PlayerHasBerries
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7897
checkitem ITEM_POKEBLOCK_CASE, 1
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7942
- specialvar RESULT, GetFirstFreePokeblockSlot
- compare RESULT, -1
+ specialvar VAR_RESULT, GetFirstFreePokeblockSlot
+ compare VAR_RESULT, -1
goto_if_ne FallarborTown_ContestLobby_EventScript_1B7878
- compare RESULT, -1
+ compare VAR_RESULT, -1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7938
end
FallarborTown_ContestLobby_EventScript_1B7878:: @ 81B7878
msgbox FallarborTown_ContestLobby_Text_1B727C, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq FallarborTown_ContestLobby_EventScript_1B78A1
- compare RESULT, NO
+ compare VAR_RESULT, NO
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936
end
@@ -234,21 +234,21 @@ FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897
FallarborTown_ContestLobby_EventScript_1B78A1:: @ 81B78A1
call S_DoSaveDialog
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936
message FallarborTown_ContestLobby_Text_1B7304
waitmessage
special sub_8083614
waitstate
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7980
- compare RESULT, 2
+ compare VAR_RESULT, 2
goto_if_eq FallarborTown_ContestLobby_EventScript_1B794C
- compare RESULT, 3
+ compare VAR_RESULT, 3
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7959
- compare RESULT, 5
+ compare VAR_RESULT, 5
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7966
- compare RESULT, 6
+ compare VAR_RESULT, 6
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7973
end
@@ -268,7 +268,7 @@ FallarborTown_ContestLobby_EventScript_1B790F:: @ 81B790F
end
FallarborTown_ContestLobby_EventScript_1B791D:: @ 81B791D
- setvar VAR_SPECIAL_4, 0
+ setvar VAR_0x8004, 0
fadescreen 1
removeobject 240
removeobject 239
@@ -319,16 +319,16 @@ FallarborTown_ContestLobby_EventScript_1B7973:: @ 81B7973
FallarborTown_ContestLobby_EventScript_1B7980:: @ 81B7980
fadescreen 1
- specialvar RESULT, GetLinkPartnerNames
- copyvar VAR_SPECIAL_8, RESULT
- copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
+ specialvar VAR_RESULT, GetLinkPartnerNames
+ copyvar VAR_0x8008, VAR_RESULT
+ copyvar VAR_0x8004, VAR_0x8008
special SpawnBerryBlenderLinkPlayerSprites
goto FallarborTown_ContestLobby_EventScript_1B799A
end
FallarborTown_ContestLobby_EventScript_1B799A:: @ 81B799A
fadescreen 0
- switch VAR_SPECIAL_8
+ switch VAR_0x8008
case 2, FallarborTown_ContestLobby_EventScript_1B78F3
case 3, FallarborTown_ContestLobby_EventScript_1B7901
case 4, FallarborTown_ContestLobby_EventScript_1B790F
diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc
index d34b357ea..aad2e3237 100644
--- a/data/scripts/safari_zone.inc
+++ b/data/scripts/safari_zone.inc
@@ -14,7 +14,7 @@ EventScript_1C341B: @ 81C341B
gUnknown_081C342D:: @ 81C342D
lockall
msgbox UnknownString_81C34B2, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq EventScript_1C3443
releaseall
end
@@ -43,10 +43,10 @@ gUnknown_081C3459:: @ 81C3459
gUnknown_081C346A:: @ 81C346A
lockall
special SafariZoneGetPokeblockNameInFeeder
- compare RESULT, 0xFFFF
+ compare VAR_RESULT, 0xFFFF
goto_if_ne EventScript_1C34A9
msgbox UnknownString_81C354E, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq EventScript_1C348E
releaseall
end
@@ -55,7 +55,7 @@ EventScript_1C348E:
fadescreen 1
special OpenPokeblockCaseOnFeeder
waitstate
- compare RESULT, 0xFFFF
+ compare VAR_RESULT, 0xFFFF
goto_if_ne EventScript_1C34A0
end
diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc
index 49b8c5286..22f998d14 100644
--- a/data/scripts/secret_power_tm.inc
+++ b/data/scripts/secret_power_tm.inc
@@ -2,7 +2,7 @@ Route111_EventScript_1A3858:: @ 81A3858
lock
faceplayer
msgbox Route111_Text_1A3520, MSGBOX_YESNO
- compare RESULT, YES
+ compare VAR_RESULT, YES
goto_if_eq Route111_EventScript_1A3877
msgbox Route111_Text_1A37B5, 4
release
@@ -10,29 +10,29 @@ Route111_EventScript_1A3858:: @ 81A3858
Route111_EventScript_1A3877:: @ 81A3877
giveitem_std ITEM_TM43_SECRET_POWER
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq Route111_EventScript_1A38D9
msgbox Route111_Text_1A35C5, 4
closemessage
setflag FLAG_RECEIVED_SECRET_POWER
clearflag FLAG_HIDE_TM_SALESMAN_SLATEPORT
- compare FACING, 3
+ compare VAR_FACING, 3
call_if_eq Route111_EventScript_1A38C3
- compare FACING, 4
+ compare VAR_FACING, 4
call_if_eq Route111_EventScript_1A38C3
- compare FACING, 2
+ compare VAR_FACING, 2
call_if_eq Route111_EventScript_1A38CE
- removeobject LAST_TALKED
+ removeobject VAR_LAST_TALKED
release
end
Route111_EventScript_1A38C3:: @ 81A38C3
- applymovement LAST_TALKED, Route111_Movement_1A38E3
+ applymovement VAR_LAST_TALKED, Route111_Movement_1A38E3
waitmovement 0
return
Route111_EventScript_1A38CE:: @ 81A38CE
- applymovement LAST_TALKED, Route111_Movement_1A38EF
+ applymovement VAR_LAST_TALKED, Route111_Movement_1A38EF
waitmovement 0
return
diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc
index 5a84a1b48..486e5d68c 100644
--- a/data/scripts/tv.inc
+++ b/data/scripts/tv.inc
@@ -2,29 +2,29 @@ Event_TV:: @ 81A6E72
lockall
incrementgamestat GAME_STAT_WATCHED_TV
special ResetTVShowState
- specialvar RESULT, CheckForBigMovieOrEmergencyNewsOnTV
- compare RESULT, 2
+ specialvar VAR_RESULT, CheckForBigMovieOrEmergencyNewsOnTV
+ compare VAR_RESULT, 2
goto_if_eq EventScript_1A6F01
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A6F0B
goto_if_unset FLAG_SYS_TV_START, EventScript_1A6EF1
goto_if_set FLAG_SYS_TV_WATCH, EventScript_1A6EF1
- specialvar RESULT, IsTVShowInSearchOfTrainersAiring
- compare RESULT, 1
+ specialvar VAR_RESULT, IsTVShowInSearchOfTrainersAiring
+ compare VAR_RESULT, 1
goto_if_eq EventScript_1A6F66
goto EventScript_1A6F50
end
EventScript_1A6EBB:
- specialvar VAR_SPECIAL_4, special_0x44
- compare VAR_SPECIAL_4, 255
+ specialvar VAR_0x8004, special_0x44
+ compare VAR_0x8004, 255
goto_if_eq EventScript_1A6F3F
- specialvar RESULT, GetNonMassOutbreakActiveTVShow
- compare RESULT, 255
+ specialvar VAR_RESULT, GetNonMassOutbreakActiveTVShow
+ compare VAR_RESULT, 255
goto_if_eq EventScript_1A6F3F
- copyvar VAR_SPECIAL_4, RESULT
- specialvar RESULT, GetTVShowType
- compare RESULT, 0
+ copyvar VAR_0x8004, VAR_RESULT
+ specialvar VAR_RESULT, GetTVShowType
+ compare VAR_RESULT, 0
goto_if_ne EventScript_1A6F21
end
@@ -57,7 +57,7 @@ EventScript_1A6F21:
special DoTVShow
waitmessage
waitbuttonpress
- compare RESULT, 1
+ compare VAR_RESULT, 1
goto_if_ne EventScript_1A6F21
goto EventScript_1A6F37
end
@@ -76,7 +76,7 @@ EventScript_1A6F3F:
EventScript_1A6F50:
special DoPokeNews
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_1A6EBB
waitmessage
waitbuttonpress
@@ -87,7 +87,7 @@ EventScript_1A6F66:
special DoTVShowInSearchOfTrainers
waitmessage
waitbuttonpress
- compare RESULT, 0
+ compare VAR_RESULT, 0
goto_if_eq EventScript_1A6F66
goto EventScript_1A6F37
end
diff --git a/graphics-de/unused/old_charmap.bin b/graphics/debug/debug_battle_charmap_en.bin
index 716a93f2d..716a93f2d 100644
--- a/graphics-de/unused/old_charmap.bin
+++ b/graphics/debug/debug_battle_charmap_en.bin
Binary files differ
diff --git a/graphics-de/unused/old_charmap.png b/graphics/debug/debug_battle_charmap_en.png
index 72ceffbf9..72ceffbf9 100644
--- a/graphics-de/unused/old_charmap.png
+++ b/graphics/debug/debug_battle_charmap_en.png
Binary files differ
diff --git a/graphics/unused/old_charmap.bin b/graphics/debug/debug_battle_charmap_jp.bin
index aa15ea36e..aa15ea36e 100644
--- a/graphics/unused/old_charmap.bin
+++ b/graphics/debug/debug_battle_charmap_jp.bin
Binary files differ
diff --git a/graphics/unused/old_charmap.png b/graphics/debug/debug_battle_charmap_jp.png
index b5ea6e803..b5ea6e803 100644
--- a/graphics/unused/old_charmap.png
+++ b/graphics/debug/debug_battle_charmap_jp.png
Binary files differ
diff --git a/include/battle.h b/include/battle.h
index 510db80f6..59eee8407 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -69,10 +69,6 @@
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
-// physical/special types
-#define TYPE_IS_PHYSICAL(type) ((type) < TYPE_MYSTERY)
-#define TYPE_IS_SPECIAL(type) ((type) > TYPE_MYSTERY)
-
struct DisableStruct
{
/*0x00*/ u32 transformedMonPersonality;
@@ -97,12 +93,12 @@ struct DisableStruct
/*0x13*/ u8 tauntTimer1:4;
/*0x13*/ u8 tauntTimer2:4;
/*0x14*/ u8 bankPreventingEscape;
- /*0x15*/ u8 bankWithSureHit;
+ /*0x15*/ u8 battlerWithSureHit;
/*0x16*/ u8 isFirstTurn;
/*0x17*/ u8 unk17;
/*0x18*/ u8 truantCounter : 1;
/*0x18*/ u8 unk18_a : 3;
- /*0x18*/ u8 unk18_b : 4;
+ /*0x18*/ u8 mimickedMoves : 4;
/*0x19*/ u8 rechargeCounter;
/*0x1A*/ u8 unk1A[2];
};
@@ -240,7 +236,7 @@ struct BattleResults
u8 unk2; // 0x2
u8 unk3; // 0x3
u8 unk4; // 0x4
- u8 unk5_0:1; // 0x5
+ u8 playerMonWasDamaged:1; // 0x5
u8 unk5_1:1; // 0x5
u16 poke1Species; // 0x6
u8 pokeString1[10]; // 0x8
@@ -297,20 +293,20 @@ struct BattleStruct /* 0x2000000 */
/*0x15DDF*/ u8 unk15DDF;
/*0x15DE0*/ u8 filler15DE0[0x220];
/*0x16000*/ u8 turnEffectsTracker;
- /*0x16001*/ u8 turnEffectsBank;
+ /*0x16001*/ u8 turnEffectsBattlerId;
/*0x16002*/ u8 animTurn;
/*0x16003*/ u8 scriptingActive;
/*0x16004*/ u8 wrappedMove[8];
/*0x1600C*/ u8 cmd49StateTracker;
/*0x1600D*/ u8 unk1600D;
- /*0x1600E*/ u8 turncountersTracker;
+ /*0x1600E*/ u8 turnCountersTracker;
/*0x1600F*/ u8 getexpStateTracker;
/*0x16010*/ u8 moveTarget[4];
/*0x16014*/ u8 unk16014;
/*0x16015*/ u8 unk16015;
/*0x16016*/ u8 unk16016;
/*0x16017*/ u8 unk16017;
- /*0x16018*/ u8 expGetterID;
+ /*0x16018*/ u8 expGetterMonId;
/*0x16019*/ u8 unk16019;
/*0x1601A*/ u8 atk5A_StateTracker; //also atk5B, statetracker
/*0x1601B*/ u8 wildVictorySong;
@@ -361,7 +357,7 @@ struct BattleStruct /* 0x2000000 */
/*0x1609F*/ u8 unk1609F;
/*0x160A0*/ u8 stringMoveType;
/*0x160A1*/ u8 animTargetsHit;
- /*0x160A2*/ u8 expGetterBank;
+ /*0x160A2*/ u8 expGetterBattlerId;
/*0x160A3*/ u8 unk160A3;
/*0x160A4*/ u8 animArg1;
/*0x160A5*/ u8 animArg2;
@@ -458,8 +454,8 @@ struct BattleStruct /* 0x2000000 */
/*0x1610D*/ u8 unk1610D;
/*0x1610E*/ u8 unk1610E;
/*0x1610F*/ u8 unk1610F;
- /*0x16110*/ u8 sub80170DC_Tracker;
- /*0x16111*/ u8 sub80170DC_Bank;
+ /*0x16110*/ u8 wishPerishSongState;
+ /*0x16111*/ u8 wishPerishSongBattlerId;
/*0x16112*/ u8 unk16112;
/*0x16113*/ u8 unk16113;
/*0x16114*/ u8 unk16114;
@@ -634,17 +630,6 @@ void BtlController_EmitBattleAnimation(u8 a, u8 b, u16 c); //0x34
void BtlController_EmitResetActionMoveSelection(u8 a, u8 b); //0x36
void BtlController_EmitCmd55(u8 a, u8 b); //0x37
-#define REQUEST_ALL_BATTLE 0x0
-#define REQUEST_SPECIES_BATTLE 0x1
-#define REQUEST_HELDITEM_BATTLE 0x2
-#define REQUEST_MOVES_PP_BATTLE 0x3
-#define REQUEST_PPMOVE1_BATTLE 0x9
-#define REQUEST_PPMOVE2_BATTLE 0xA
-#define REQUEST_PPMOVE3_BATTLE 0xB
-#define REQUEST_PPMOVE4_BATTLE 0xC
-#define REQUEST_STATUS_BATTLE 0x28
-#define REQUEST_HP_BATTLE 0x2A
-
void MarkBattlerForControllerExec(u8 bank);
extern u8 gBattleTextBuff1[];
@@ -730,7 +715,7 @@ void debug_sub_8010800(void);
// asm/battle_3.o
u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check);
-u8 UpdateTurnCounters(void);
+u8 DoFieldEndTurnEffects(void);
u8 TurnBasedEffects(void);
u8 HandleFaintedMonActions();
u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 move);
@@ -740,7 +725,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget);
// asm/battle_4.o
void AI_CalcDmg(u8, u8);
u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def);
-u8 BankGetTurnOrder(u8 bank);
+u8 GetBattlerTurnOrderNum(u8 bank);
// asm/battle_5.o
void nullsub_91(void);
diff --git a/include/battle_controllers.h b/include/battle_controllers.h
new file mode 100644
index 000000000..5dae99ecd
--- /dev/null
+++ b/include/battle_controllers.h
@@ -0,0 +1,196 @@
+#ifndef GUARD_BATTLE_CONTROLLERS_H
+#define GUARD_BATTLE_CONTROLLERS_H
+
+enum
+{
+ REQUEST_ALL_BATTLE,
+ REQUEST_SPECIES_BATTLE,
+ REQUEST_HELDITEM_BATTLE,
+ REQUEST_MOVES_PP_BATTLE,
+ REQUEST_MOVE1_BATTLE,
+ REQUEST_MOVE2_BATTLE,
+ REQUEST_MOVE3_BATTLE,
+ REQUEST_MOVE4_BATTLE,
+ REQUEST_PP_DATA_BATTLE,
+ REQUEST_PPMOVE1_BATTLE,
+ REQUEST_PPMOVE2_BATTLE,
+ REQUEST_PPMOVE3_BATTLE,
+ REQUEST_PPMOVE4_BATTLE,
+ REQUEST_UNUSED_13_BATTLE,
+ REQUEST_UNUSED_14_BATTLE,
+ REQUEST_UNUSED_15_BATTLE,
+ REQUEST_UNUSED_16_BATTLE,
+ REQUEST_OTID_BATTLE,
+ REQUEST_EXP_BATTLE,
+ REQUEST_HP_EV_BATTLE,
+ REQUEST_ATK_EV_BATTLE,
+ REQUEST_DEF_EV_BATTLE,
+ REQUEST_SPEED_EV_BATTLE,
+ REQUEST_SPATK_EV_BATTLE,
+ REQUEST_SPDEF_EV_BATTLE,
+ REQUEST_FRIENDSHIP_BATTLE,
+ REQUEST_POKERUS_BATTLE,
+ REQUEST_MET_LOCATION_BATTLE,
+ REQUEST_MET_LEVEL_BATTLE,
+ REQUEST_MET_GAME_BATTLE,
+ REQUEST_POKEBALL_BATTLE,
+ REQUEST_ALL_IVS_BATTLE,
+ REQUEST_HP_IV_BATTLE,
+ REQUEST_ATK_IV_BATTLE,
+ REQUEST_DEF_IV_BATTLE,
+ REQUEST_SPEED_IV_BATTLE,
+ REQUEST_SPATK_IV_BATTLE,
+ REQUEST_SPDEF_IV_BATTLE,
+ REQUEST_PERSONALITY_BATTLE,
+ REQUEST_CHECKSUM_BATTLE,
+ REQUEST_STATUS_BATTLE,
+ REQUEST_LEVEL_BATTLE,
+ REQUEST_HP_BATTLE,
+ REQUEST_MAX_HP_BATTLE,
+ REQUEST_ATK_BATTLE,
+ REQUEST_DEF_BATTLE,
+ REQUEST_SPEED_BATTLE,
+ REQUEST_SPATK_BATTLE,
+ REQUEST_SPDEF_BATTLE,
+ REQUEST_COOL_BATTLE,
+ REQUEST_BEAUTY_BATTLE,
+ REQUEST_CUTE_BATTLE,
+ REQUEST_SMART_BATTLE,
+ REQUEST_TOUGH_BATTLE,
+ REQUEST_SHEEN_BATTLE,
+ REQUEST_COOL_RIBBON_BATTLE,
+ REQUEST_BEAUTY_RIBBON_BATTLE,
+ REQUEST_CUTE_RIBBON_BATTLE,
+ REQUEST_SMART_RIBBON_BATTLE,
+ REQUEST_TOUGH_RIBBON_BATTLE,
+};
+
+enum
+{
+ CONTROLLER_GETMONDATA,
+ CONTROLLER_GETRAWMONDATA,
+ CONTROLLER_SETMONDATA,
+ CONTROLLER_SETRAWMONDATA,
+ CONTROLLER_LOADMONSPRITE,
+ CONTROLLER_SWITCHINANIM,
+ CONTROLLER_RETURNMONTOBALL,
+ CONTROLLER_DRAWTRAINERPIC,
+ CONTROLLER_TRAINERSLIDE,
+ CONTROLLER_TRAINERSLIDEBACK,
+ CONTROLLER_FAINTANIMATION,
+ CONTROLLER_PALETTEFADE,
+ CONTROLLER_SUCCESSBALLTHROWANIM,
+ CONTROLLER_BALLTHROWANIM,
+ CONTROLLER_PAUSE,
+ CONTROLLER_MOVEANIMATION,
+ CONTROLLER_PRINTSTRING,
+ CONTROLLER_PRINTSTRINGPLAYERONLY,
+ CONTROLLER_CHOOSEACTION,
+ CONTROLLER_UNKNOWNYESNOBOX,
+ CONTROLLER_CHOOSEMOVE,
+ CONTROLLER_OPENBAG,
+ CONTROLLER_CHOOSEPOKEMON,
+ CONTROLLER_23,
+ CONTROLLER_HEALTHBARUPDATE,
+ CONTROLLER_EXPUPDATE,
+ CONTROLLER_STATUSICONUPDATE,
+ CONTROLLER_STATUSANIMATION,
+ CONTROLLER_STATUSXOR,
+ CONTROLLER_DATATRANSFER,
+ CONTROLLER_DMA3TRANSFER,
+ CONTROLLER_31,
+ CONTROLLER_32,
+ CONTROLLER_TWORETURNVALUES,
+ CONTROLLER_CHOSENMONRETURNVALUE,
+ CONTROLLER_ONERETURNVALUE,
+ CONTROLLER_ONERETURNVALUE_DUPLICATE,
+ CONTROLLER_37,
+ CONTROLLER_38,
+ CONTROLLER_39,
+ CONTROLLER_40,
+ CONTROLLER_HITANIMATION,
+ CONTROLLER_42,
+ CONTROLLER_EFFECTIVENESSSOUND,
+ CONTROLLER_PLAYFANFAREORBGM,
+ CONTROLLER_FAINTINGCRY,
+ CONTROLLER_INTROSLIDE,
+ CONTROLLER_INTROTRAINERBALLTHROW,
+ CONTROLLER_DRAWPARTYSTATUSSUMMARY,
+ CONTROLLER_HIDEPARTYSTATUSSUMMARY,
+ CONTROLLER_ENDBOUNCE,
+ CONTROLLER_SPRITEINVISIBILITY,
+ CONTROLLER_BATTLEANIMATION,
+ CONTROLLER_LINKSTANDBYMSG,
+ CONTROLLER_RESETACTIONMOVESELECTION,
+ CONTROLLER_55,
+ /*new controllers should go here*/
+ CONTROLLER_TERMINATOR_NOP,
+ CONTROLLER_CMDS_COUNT
+};
+
+struct HpAndStatus
+{
+ u16 hp;
+ u32 status;
+};
+
+struct DisableStruct;
+
+// emitters
+void HandleLinkBattleSetup(void);
+void SetUpBattleVarsAndBirchPoochyena();
+void sub_800B950(void);
+void InitLinkBtlControllers(void);
+void PrepareBufferDataTransferLink(u8 a, u16, u8 *c);
+void sub_800C35C(void);
+void BtlController_EmitGetMonData(u8 a, u8 b, u8 c);
+void BtlController_EmitGetRawMonData(u8 a, u8 b, u8 c);
+void BtlController_EmitLoadMonSprite(u8 a);
+void BtlController_EmitSwitchInAnim(u8, u8, u8);
+void BtlController_EmitReturnMonToBall(u8 a, u8 b);
+void BtlController_EmitDrawTrainerPic(u8 a);
+void BtlController_EmitTrainerSlide(u8 a);
+void BtlController_EmitTrainerSlideBack(u8 a);
+void BtlController_EmitFaintAnimation(u8 a);
+void BtlController_EmitPaletteFade(u8 a);
+void BtlController_EmitSuccessBallThrowAnim(u8 a);
+void BtlController_EmitBallThrowAnim(u8 a, u8 b);
+void BtlController_EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, struct DisableStruct *g);
+void BtlController_EmitPrintString(u8 a, u16 b);
+void BtlController_EmitPrintSelectionString(u8 a, u16 stringID);
+void BtlController_EmitChooseAction(u8 a, u8 b, u16 c);
+void BtlController_EmitChooseMove(u8 a, u8 b, u8 c, u8 *d);
+void BtlController_EmitChooseItem(u8 a, u8 *b);
+void BtlController_EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e);
+void BtlController_EmitCmd23(u8 a);
+void BtlController_EmitHealthBarUpdate(u8 a, u16 b);
+void BtlController_EmitExpUpdate(u8 a, u8 b, u16 c);
+void BtlController_EmitStatusIconUpdate(u8 a, u32 b, u32 c);
+void BtlController_EmitStatusAnimation(u8 a, u8 b, u32 c);
+void BtlController_EmitStatusXor(u8 a, u8 b);
+void BtlController_EmitDataTransfer(u8, u16, u8 *);
+void BtlController_EmitTwoReturnValues(u8 a, u8 b, u16 c);
+void BtlController_EmitChosenMonReturnValue(u8 a, u8 b, u8 *c);
+void BtlController_EmitOneReturnValue(u8 a, u16 b);
+void BtlController_EmitOneReturnValue_Duplicate(u8 a, u16 b);
+void BtlController_EmitCmd37(u8 a);
+void BtlController_EmitCmd38(u8 a, u8 b);
+void BtlController_EmitCmd39(u8 a);
+void BtlController_EmitCmd40(u8 a);
+void BtlController_EmitHitAnimation(u8 a);
+void BtlController_EmitCmd42(u8 a);
+void BtlController_EmitPlaySE(u8 a, u16 b);
+void BtlController_EmitPlayFanfareOrBGM(u8 a, u16 b);
+void BtlController_EmitFaintingCry(u8 a);
+void BtlController_EmitIntroSlide(u8 a, u8 b);
+void BtlController_EmitIntroTrainerBallThrow(u8 a);
+void BtlController_EmitDrawPartyStatusSummary(u8 a, struct HpAndStatus *hpAndStatus, u8 c); //0x30
+void BtlController_EmitHidePartyStatusSummary(u8 a);
+void BtlController_EmitEndBounceEffect(u8 a);
+void BtlController_EmitSpriteInvisibility(u8 a, u8 b);
+void BtlController_EmitBattleAnimation(u8 a, u8 b, u16 c);
+void BtlController_EmitLinkStandbyMsg(u8 a, u8 b);
+void BtlController_EmitResetActionMoveSelection(u8 a, u8 b);
+void BtlController_EmitCmd55(u8 a, u8 b);
+
+#endif // GUARD_BATTLE_CONTROLLERS_H \ No newline at end of file
diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h
index 030844ec3..36f54c6a8 100644
--- a/include/battle_script_commands.h
+++ b/include/battle_script_commands.h
@@ -52,7 +52,7 @@
void AI_CalcDmg(u8 bankAtk, u8 bankDef);
u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef);
u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility);
-u8 BankGetTurnOrder(u8 bank);
+u8 GetBattlerTurnOrderNum(u8 bank);
void SetMoveEffect(bool8 primary, u8 certain);
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
void BattleCreateYesNoCursorAt(u8 cursorPosition);
diff --git a/include/battle_util.h b/include/battle_util.h
index 3d178b487..385490438 100644
--- a/include/battle_util.h
+++ b/include/battle_util.h
@@ -1,7 +1,7 @@
#ifndef GUARD_BATTLE_UTIL_H
#define GUARD_BATTLE_UTIL_H
-#define BS_GET_TARGET 0
+#define BS_TARGET 0
#define BS_GET_ATTACKER 1
#define BS_GET_EFFECT_BANK 2
#define BS_GET_SCRIPTING_BANK 10
@@ -15,7 +15,7 @@
#define MOVE_LIMITATION_DISABLED (1 << 2)
#define MOVE_LIMITATION_TORMENTED (1 << 3)
#define MOVE_LIMITATION_TAUNT (1 << 4)
-#define MOVE_LIMITATION_IMPRISON (1 << 5)
+#define MOVE_LIMITATION_IMPRISON (1 << 5)
#define ABILITYEFFECT_ON_SWITCHIN 0x0
#define ABILITYEFFECT_ENDTURN 0x1
@@ -47,6 +47,9 @@
#define ITEMEFFECT_MOVE_END 0x3
#define ITEMEFFECT_KINGSROCK_SHELLBELL 0x4
+#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
+#define WEATHER_HAS_EFFECT2 ((!ABILITY_ON_FIELD2(ABILITY_CLOUD_NINE) && !ABILITY_ON_FIELD2(ABILITY_AIR_LOCK)))
+
void TryClearRageStatuses(void);
void BattleScriptPush(const u8* BS_ptr);
void PressurePPLoseOnUsingImprision(u8 bankAtk);
diff --git a/include/config.h b/include/config.h
index 796da359c..0046c3878 100644
--- a/include/config.h
+++ b/include/config.h
@@ -55,6 +55,16 @@
#define UNITS_METRIC
#endif
+// An option to use translations/encoding fixes for the Debug menus.
+// Selected by default for custom English debug roms.
+#ifndef DEBUG_TRANSLATE
+#if ENGLISH && DEBUG
+#define DEBUG_TRANSLATE 1
+#else
+#define DEBUG_TRANSLATE 0
+#endif
+#endif
+
// Fixed in Emerald.
// #define BUGFIX_SETMONIVS
diff --git a/include/constants/abilities.h b/include/constants/abilities.h
index 4e2c4056c..4ad54c86f 100644
--- a/include/constants/abilities.h
+++ b/include/constants/abilities.h
@@ -80,4 +80,6 @@
#define ABILITY_CACOPHONY 76
#define ABILITY_AIR_LOCK 77
+#define ABILITIES_COUNT 78
+
#endif // GUARD_CONSTANTS_ABILITIES_H
diff --git a/include/constants/battle.h b/include/constants/battle.h
index c33e0abb4..5aa1772d1 100644
--- a/include/constants/battle.h
+++ b/include/constants/battle.h
@@ -1,5 +1,5 @@
-#ifndef GUARD_CONSTANTS_BATTLE_CONSTANTS_H
-#define GUARD_CONSTANTS_BATTLE_CONSTANTS_H
+#ifndef GUARD_CONSTANTS_BATTLE_H
+#define GUARD_CONSTANTS_BATTLE_H
/*
* A battler may be in one of four positions on the field. The first bit determines
@@ -43,6 +43,7 @@
#define BIT_SIDE 1
#define BIT_FLANK 2
+// Battle Type Flags
#define BATTLE_TYPE_DOUBLE 0x0001
#define BATTLE_TYPE_LINK 0x0002
#define BATTLE_TYPE_WILD 0x0004
@@ -63,67 +64,68 @@
#define SECRET_BASE_OPPONENT 0x400
#define LINK_BATTLE_OPPONENT 0x800
-#define BATTLE_WON 0x1
-#define BATTLE_LOST 0x2
-#define BATTLE_DREW 0x3
-#define BATTLE_RAN 0x4
-#define BATTLE_PLAYER_TELEPORTED 0x5
-#define BATTLE_POKE_FLED 0x6
-#define BATTLE_CAUGHT 0x7
-#define BATTLE_OUT_OF_BALLS 0x8
-#define BATTLE_OPPONENT_TELEPORTED 0xA
-
-#define OUTCOME_LINK_BATTLE_RUN 0x80
+// Battle Outcome defines
+#define B_OUTCOME_WON 0x1
+#define B_OUTCOME_LOST 0x2
+#define B_OUTCOME_DREW 0x3
+#define B_OUTCOME_RAN 0x4
+#define B_OUTCOME_PLAYER_TELEPORTED 0x5
+#define B_OUTCOME_MON_FLED 0x6
+#define B_OUTCOME_CAUGHT 0x7
+#define B_OUTCOME_NO_SAFARI_BALLS 0x8
+#define B_OUTCOME_FORFEITED 0x9
+#define B_OUTCOME_MON_TELEPORTED 0xA
+#define B_OUTCOME_LINK_BATTLE_RAN 0x80
// Non-volatile status conditions
// These persist remain outside of battle and after switching out
-#define STATUS1_NONE 0x0
-#define STATUS_SLEEP 0x7
-#define STATUS_POISON 0x8
-#define STATUS_BURN 0x10
-#define STATUS_FREEZE 0x20
-#define STATUS_PARALYSIS 0x40
-#define STATUS_TOXIC_POISON 0x80
-#define STATUS_TOXIC_COUNTER 0xF00
-#define STATUS_PSN_ANY ((STATUS_POISON | STATUS_TOXIC_POISON))
-#define STATUS_ANY ((STATUS_SLEEP | STATUS_POISON | STATUS_BURN | STATUS_FREEZE | STATUS_PARALYSIS | STATUS_TOXIC_POISON))
+#define STATUS1_NONE 0x0
+#define STATUS1_SLEEP 0x7
+#define STATUS1_POISON 0x8
+#define STATUS1_BURN 0x10
+#define STATUS1_FREEZE 0x20
+#define STATUS1_PARALYSIS 0x40
+#define STATUS1_TOXIC_POISON 0x80
+#define STATUS1_TOXIC_COUNTER 0xF00
+#define STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON)
+#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON)
// Volatile status ailments
// These are removed after exiting the battle or switching out
-#define STATUS2_CONFUSION 0x00000007
-#define STATUS2_FLINCHED 0x00000008
-#define STATUS2_UPROAR 0x00000070
-#define STATUS2_BIDE 0x00000300 //two bits 0x100 0x200
-#define STATUS2_LOCK_CONFUSE 0x00000C00
-#define STATUS2_MULTIPLETURNS 0x00001000
-#define STATUS2_WRAPPED 0x0000E000
-#define STATUS2_INFATUATION 0x000F0000
+#define STATUS2_CONFUSION 0x00000007
+#define STATUS2_FLINCHED 0x00000008
+#define STATUS2_UPROAR 0x00000070
+#define STATUS2_BIDE 0x00000300 // two bits 0x100, 0x200
+#define STATUS2_LOCK_CONFUSE 0x00000C00
+#define STATUS2_MULTIPLETURNS 0x00001000
+#define STATUS2_WRAPPED 0x0000E000
+#define STATUS2_INFATUATION 0x000F0000 // 4 bits, one for every battler
#define STATUS2_INFATUATED_WITH(battler) (gBitTable[battler] << 16)
-#define STATUS2_FOCUS_ENERGY 0x00100000
-#define STATUS2_TRANSFORMED 0x00200000
-#define STATUS2_RECHARGE 0x00400000
-#define STATUS2_RAGE 0x00800000
-#define STATUS2_SUBSTITUTE 0x01000000
-#define STATUS2_DESTINY_BOND 0x02000000
-#define STATUS2_ESCAPE_PREVENTION 0x04000000
-#define STATUS2_NIGHTMARE 0x08000000
-#define STATUS2_CURSED 0x10000000
-#define STATUS2_FORESIGHT 0x20000000
-#define STATUS2_DEFENSE_CURL 0x40000000
-#define STATUS2_TORMENT 0x80000000
+#define STATUS2_FOCUS_ENERGY 0x00100000
+#define STATUS2_TRANSFORMED 0x00200000
+#define STATUS2_RECHARGE 0x00400000
+#define STATUS2_RAGE 0x00800000
+#define STATUS2_SUBSTITUTE 0x01000000
+#define STATUS2_DESTINY_BOND 0x02000000
+#define STATUS2_ESCAPE_PREVENTION 0x04000000
+#define STATUS2_NIGHTMARE 0x08000000
+#define STATUS2_CURSED 0x10000000
+#define STATUS2_FORESIGHT 0x20000000
+#define STATUS2_DEFENSE_CURL 0x40000000
+#define STATUS2_TORMENT 0x80000000
// Seems like per-battler statuses. Not quite sure how to categorize these
-#define STATUS3_LEECHSEED_BANK 0x3
+#define STATUS3_LEECHSEED_BATTLER 0x3
#define STATUS3_LEECHSEED 0x4
-#define STATUS3_ALWAYS_HITS 0x18 //two bits
+#define STATUS3_ALWAYS_HITS 0x18 // two bits
#define STATUS3_PERISH_SONG 0x20
#define STATUS3_ON_AIR 0x40
#define STATUS3_UNDERGROUND 0x80
#define STATUS3_MINIMIZED 0x100
#define STATUS3_ROOTED 0x400
#define STATUS3_CHARGED_UP 0x200
-#define STATUS3_YAWN 0x1800 //two bits
-#define STATUS3_IMPRISIONED 0x2000
+#define STATUS3_YAWN 0x1800 // two bits
+#define STATUS3_IMPRISONED_OTHERS 0x2000
#define STATUS3_GRUDGE 0x4000
#define STATUS3_CANT_SCORE_A_CRIT 0x8000
#define STATUS3_MUDSPORT 0x10000
@@ -131,7 +133,7 @@
#define STATUS3_UNDERWATER 0x40000
#define STATUS3_INTIMIDATE_POKES 0x80000
#define STATUS3_TRACE 0x100000
-#define STATUS3_SEMI_INVULNERABLE ((STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER))
+#define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER)
// Not really sure what a "hitmarker" is.
#define HITMARKER_x10 0x00000010
@@ -142,7 +144,7 @@
#define HITMARKER_NO_ATTACKSTRING 0x00000200
#define HITMARKER_ATTACKSTRING_PRINTED 0x00000400
#define HITMARKER_NO_PPDEDUCT 0x00000800
-#define HITMARKER_PURSUIT_TRAP 0x00001000
+#define HITMARKER_SWAP_ATTACKER_TARGET 0x00001000
#define HITMARKER_IGNORE_SAFEGUARD 0x00002000
#define HITMARKER_SYNCHRONISE_EFFECT 0x00004000
#define HITMARKER_RUN 0x00008000
@@ -157,9 +159,9 @@
#define HITMARKER_GRUDGE 0x01000000
#define HITMARKER_OBEYS 0x02000000
#define HITMARKER_x4000000 0x04000000
-#define HITMARKER_x8000000 0x08000000
-#define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C))
-#define HITMARKER_UNK(bank) ((0x10000000 << bank))
+#define HITMARKER_CHARGING 0x08000000
+#define HITMARKER_FAINTED(battler) (gBitTable[battler] << 0x1C)
+#define HITMARKER_UNK(battler) (0x10000000 << battler)
// Per-side statuses that affect an entire party
#define SIDE_STATUS_REFLECT (1 << 0)
@@ -235,7 +237,7 @@
#define MOVE_EFFECT_RAPIDSPIN 0x23
#define MOVE_EFFECT_REMOVE_PARALYSIS 0x24
#define MOVE_EFFECT_ATK_DEF_DOWN 0x25
-#define MOVE_EFFECT_RECOIL_33_PARALYSIS 0x26
+#define MOVE_EFFECT_RECOIL_33 0x26
#define MOVE_EFFECT_ATK_PLUS_2 0x27
#define MOVE_EFFECT_DEF_PLUS_2 0x28
#define MOVE_EFFECT_SPD_PLUS_2 0x29
@@ -322,9 +324,7 @@
#define ABILITYEFFECT_COUNT_ON_FIELD 0x12
#define ABILITYEFFECT_CHECK_ON_FIELD 0x13
-#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0)))
-
-#define BS_GET_TARGET 0
+#define BS_TARGET 0
#define BS_GET_ATTACKER 1
#define BS_GET_EFFECT_BANK 2
#define BS_GET_gBank1 3
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index 0995d5309..f126d222a 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -191,12 +191,12 @@
#define METATILE_MauvilleGym_PoleBottom_Off 0x243
// gTileset_MossdeepGym
-#define METATILE_MossdeepGym_Obelisk_Top 0x204
-#define METATILE_MossdeepGym_Obelisk_Base 0x20C
-#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D
-#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205
-#define METATILE_MossdeepGym_Empty0 0x238
-#define METATILE_MossdeepGym_Empty1 0x239
+#define METATILE_MossdeepGym_RedArrow_Right 0x204
+#define METATILE_MossdeepGym_RedArrow_Left 0x20C
+#define METATILE_MossdeepGym_RedArrow_Up 0x20D
+#define METATILE_MossdeepGym_RedArrow_Down 0x205
+#define METATILE_MossdeepGym_Switch_Up 0x238
+#define METATILE_MossdeepGym_Switch_Down 0x239
// gTileset_Building
#define METATILE_Building_TV_Off 0x002
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
new file mode 100644
index 000000000..8e7c01eb5
--- /dev/null
+++ b/include/constants/pokemon.h
@@ -0,0 +1,144 @@
+#ifndef GUARD_CONSTANTS_POKEMON_H
+#define GUARD_CONSTANTS_POKEMON_H
+
+#define MON_DATA_PERSONALITY 0
+#define MON_DATA_OT_ID 1
+#define MON_DATA_NICKNAME 2
+#define MON_DATA_LANGUAGE 3
+#define MON_DATA_SANITY_BIT1 4
+#define MON_DATA_SANITY_BIT2 5
+#define MON_DATA_SANITY_BIT3 6
+#define MON_DATA_OT_NAME 7
+#define MON_DATA_MARKINGS 8
+#define MON_DATA_CHECKSUM 9
+#define MON_DATA_10 10
+#define MON_DATA_SPECIES 11
+#define MON_DATA_HELD_ITEM 12
+#define MON_DATA_MOVE1 13
+#define MON_DATA_MOVE2 14
+#define MON_DATA_MOVE3 15
+#define MON_DATA_MOVE4 16
+#define MON_DATA_PP1 17
+#define MON_DATA_PP2 18
+#define MON_DATA_PP3 19
+#define MON_DATA_PP4 20
+#define MON_DATA_PP_BONUSES 21
+#define MON_DATA_COOL 22
+#define MON_DATA_BEAUTY 23
+#define MON_DATA_CUTE 24
+#define MON_DATA_EXP 25
+#define MON_DATA_HP_EV 26
+#define MON_DATA_ATK_EV 27
+#define MON_DATA_DEF_EV 28
+#define MON_DATA_SPEED_EV 29
+#define MON_DATA_SPATK_EV 30
+#define MON_DATA_SPDEF_EV 31
+#define MON_DATA_FRIENDSHIP 32
+#define MON_DATA_SMART 33
+#define MON_DATA_POKERUS 34
+#define MON_DATA_MET_LOCATION 35
+#define MON_DATA_MET_LEVEL 36
+#define MON_DATA_MET_GAME 37
+#define MON_DATA_POKEBALL 38
+#define MON_DATA_HP_IV 39
+#define MON_DATA_ATK_IV 40
+#define MON_DATA_DEF_IV 41
+#define MON_DATA_SPEED_IV 42
+#define MON_DATA_SPATK_IV 43
+#define MON_DATA_SPDEF_IV 44
+#define MON_DATA_IS_EGG 45
+#define MON_DATA_ALT_ABILITY 46
+#define MON_DATA_TOUGH 47
+#define MON_DATA_SHEEN 48
+#define MON_DATA_OT_GENDER 49
+#define MON_DATA_COOL_RIBBON 50
+#define MON_DATA_BEAUTY_RIBBON 51
+#define MON_DATA_CUTE_RIBBON 52
+#define MON_DATA_SMART_RIBBON 53
+#define MON_DATA_TOUGH_RIBBON 54
+#define MON_DATA_STATUS 55
+#define MON_DATA_LEVEL 56
+#define MON_DATA_HP 57
+#define MON_DATA_MAX_HP 58
+#define MON_DATA_ATK 59
+#define MON_DATA_DEF 60
+#define MON_DATA_SPEED 61
+#define MON_DATA_SPATK 62
+#define MON_DATA_SPDEF 63
+#define MON_DATA_MAIL 64
+#define MON_DATA_SPECIES2 65
+#define MON_DATA_IVS 66
+#define MON_DATA_CHAMPION_RIBBON 67
+#define MON_DATA_WINNING_RIBBON 68
+#define MON_DATA_VICTORY_RIBBON 69
+#define MON_DATA_ARTIST_RIBBON 70
+#define MON_DATA_EFFORT_RIBBON 71
+#define MON_DATA_GIFT_RIBBON_1 72
+#define MON_DATA_GIFT_RIBBON_2 73
+#define MON_DATA_GIFT_RIBBON_3 74
+#define MON_DATA_GIFT_RIBBON_4 75
+#define MON_DATA_GIFT_RIBBON_5 76
+#define MON_DATA_GIFT_RIBBON_6 77
+#define MON_DATA_GIFT_RIBBON_7 78
+#define MON_DATA_FATEFUL_ENCOUNTER 79
+#define MON_DATA_KNOWN_MOVES 80
+#define MON_DATA_RIBBON_COUNT 81
+#define MON_DATA_RIBBONS 82
+#define MON_DATA_83 83
+#define MON_DATA_ATK2 84
+#define MON_DATA_DEF2 85
+#define MON_DATA_SPEED2 86
+#define MON_DATA_SPATK2 87
+#define MON_DATA_SPDEF2 88
+
+#define MIN_LEVEL 1
+#define MAX_LEVEL 100
+
+#define MON_MALE 0x00
+#define MON_FEMALE 0xFE
+#define MON_GENDERLESS 0xFF
+
+#define TYPE_NORMAL 0x00
+#define TYPE_FIGHTING 0x01
+#define TYPE_FLYING 0x02
+#define TYPE_POISON 0x03
+#define TYPE_GROUND 0x04
+#define TYPE_ROCK 0x05
+#define TYPE_BUG 0x06
+#define TYPE_GHOST 0x07
+#define TYPE_STEEL 0x08
+#define TYPE_MYSTERY 0x09
+#define TYPE_FIRE 0x0a
+#define TYPE_WATER 0x0b
+#define TYPE_GRASS 0x0c
+#define TYPE_ELECTRIC 0x0d
+#define TYPE_PSYCHIC 0x0e
+#define TYPE_ICE 0x0f
+#define TYPE_DRAGON 0x10
+#define TYPE_DARK 0x11
+#define NUMBER_OF_MON_TYPES 0x12
+
+#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
+#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
+#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
+#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
+#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
+#define FRIENDSHIP_EVENT_WALKING 0x5
+#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
+#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
+#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
+
+#define STATUS_PRIMARY_NONE 0x0
+#define STATUS_PRIMARY_POISON 0x1
+#define STATUS_PRIMARY_PARALYSIS 0x2
+#define STATUS_PRIMARY_SLEEP 0x3
+#define STATUS_PRIMARY_FREEZE 0x4
+#define STATUS_PRIMARY_BURN 0x5
+#define STATUS_PRIMARY_POKERUS 0x6
+#define STATUS_PRIMARY_FAINTED 0x7
+
+#define MAX_TOTAL_EVS 510
+#define NUM_STATS 6
+#define UNOWN_FORM_COUNT 28
+
+#endif // GUARD_CONSTANTS_POKEMON_H
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 856aba069..de62e4e8a 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -172,25 +172,26 @@
#define VAR_STEVENS_HOUSE_STATE 0x40C6
#define VAR_OLDALE_STATE 0x40C7
+#define SPECIAL_VARS_START 0x8000
// special vars
// They are commonly used as parameters to commands, or return values from commands.
-#define VAR_SPECIAL_0 0x8000
-#define VAR_SPECIAL_1 0x8001
-#define VAR_SPECIAL_2 0x8002
-#define VAR_SPECIAL_3 0x8003
-#define VAR_SPECIAL_4 0x8004
-#define VAR_SPECIAL_5 0x8005
-#define VAR_SPECIAL_6 0x8006
-#define VAR_SPECIAL_7 0x8007
-#define VAR_SPECIAL_8 0x8008
-#define VAR_SPECIAL_9 0x8009
-#define VAR_SPECIAL_A 0x800A
-#define VAR_SPECIAL_B 0x800B
-#define FACING 0x800C
-#define RESULT 0x800D
-#define ITEM_ID 0x800E
-#define LAST_TALKED 0x800F
-#define CONTEST_RANK 0x8010
-#define CONTEST_CATEGORY 0x8011
+#define VAR_0x8000 0x8000
+#define VAR_0x8001 0x8001
+#define VAR_0x8002 0x8002
+#define VAR_0x8003 0x8003
+#define VAR_0x8004 0x8004
+#define VAR_0x8005 0x8005
+#define VAR_0x8006 0x8006
+#define VAR_0x8007 0x8007
+#define VAR_0x8008 0x8008
+#define VAR_0x8009 0x8009
+#define VAR_0x800A 0x800A
+#define VAR_0x800B 0x800B
+#define VAR_FACING 0x800C
+#define VAR_RESULT 0x800D
+#define VAR_ITEM_ID 0x800E
+#define VAR_LAST_TALKED 0x800F
+#define VAR_CONTEST_RANK 0x8010
+#define VAR_CONTEST_CATEGORY 0x8011
#endif // GUARD_CONSTANTS_VARS_H
diff --git a/include/global.h b/include/global.h
index 1ccc92bb1..b9df3adff 100644
--- a/include/global.h
+++ b/include/global.h
@@ -20,6 +20,20 @@
#define INCBIN_S32 INCBIN
#endif
+// For debug menu translations.
+// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_TRANSLATE,
+// or "こんにちは" if not.
+// The KANA macro will wrap Japanese text with encoding markers to
+// prevent mojibake while they are being translated.
+
+#if DEBUG_TRANSLATE
+#define DTR(japanese, english) _(english)
+#define KANA(txt) _("{JPN}" txt "{ENG}")
+#else
+#define DTR(japanese, english) _(japanese)
+#define KANA(txt) _(txt)
+#endif
+
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
diff --git a/include/macros/event.inc b/include/macros/event.inc
index 8b2d587c9..7250ec5ca 100644
--- a/include/macros/event.inc
+++ b/include/macros/event.inc
@@ -1449,11 +1449,11 @@
.endm
.macro switch var
- copyvar VAR_SPECIAL_0, \var
+ copyvar VAR_0x8000, \var
.endm
.macro case condition, dest
- compare_var_to_value VAR_SPECIAL_0, \condition
+ compare_var_to_value VAR_0x8000, \condition
goto_if_eq \dest
.endm
@@ -1469,12 +1469,12 @@
NO = 0
.macro giveitem_std item, amount=1, function=0
- setorcopyvar VAR_SPECIAL_0, \item
- setorcopyvar VAR_SPECIAL_1, \amount
+ setorcopyvar VAR_0x8000, \item
+ setorcopyvar VAR_0x8001, \amount
callstd \function
.endm
.macro givedecoration_std decoration
- setorcopyvar VAR_SPECIAL_0, \decoration
+ setorcopyvar VAR_0x8000, \decoration
callstd 7
.endm
diff --git a/include/overworld.h b/include/overworld.h
index 5d9d474ea..0ab281734 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -127,7 +127,7 @@ void CB2_ReturnToFieldLink(void);
// sub_805465C
void c2_exit_to_overworld_1_sub_8080DEC(void);
// sub_80546B8
-void c2_exit_to_overworld_1_continue_scripts_restart_music(void);
+void CB2_ReturnToFieldContinueScriptPlayMapMusic(void);
void sub_80546F0(void);
// sub_805470C
void CB2_ContinueSavedGame(void);
diff --git a/include/pokemon.h b/include/pokemon.h
index 67816b8f0..df2d42522 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -1,147 +1,9 @@
#ifndef GUARD_POKEMON_H
#define GUARD_POKEMON_H
+#include "constants/pokemon.h"
#include "sprite.h"
-#define MON_DATA_PERSONALITY 0
-#define MON_DATA_OT_ID 1
-#define MON_DATA_NICKNAME 2
-#define MON_DATA_LANGUAGE 3
-#define MON_DATA_SANITY_BIT1 4
-#define MON_DATA_SANITY_BIT2 5
-#define MON_DATA_SANITY_BIT3 6
-#define MON_DATA_OT_NAME 7
-#define MON_DATA_MARKINGS 8
-#define MON_DATA_CHECKSUM 9
-#define MON_DATA_10 10
-#define MON_DATA_SPECIES 11
-#define MON_DATA_HELD_ITEM 12
-#define MON_DATA_MOVE1 13
-#define MON_DATA_MOVE2 14
-#define MON_DATA_MOVE3 15
-#define MON_DATA_MOVE4 16
-#define MON_DATA_PP1 17
-#define MON_DATA_PP2 18
-#define MON_DATA_PP3 19
-#define MON_DATA_PP4 20
-#define MON_DATA_PP_BONUSES 21
-#define MON_DATA_COOL 22
-#define MON_DATA_BEAUTY 23
-#define MON_DATA_CUTE 24
-#define MON_DATA_EXP 25
-#define MON_DATA_HP_EV 26
-#define MON_DATA_ATK_EV 27
-#define MON_DATA_DEF_EV 28
-#define MON_DATA_SPEED_EV 29
-#define MON_DATA_SPATK_EV 30
-#define MON_DATA_SPDEF_EV 31
-#define MON_DATA_FRIENDSHIP 32
-#define MON_DATA_SMART 33
-#define MON_DATA_POKERUS 34
-#define MON_DATA_MET_LOCATION 35
-#define MON_DATA_MET_LEVEL 36
-#define MON_DATA_MET_GAME 37
-#define MON_DATA_POKEBALL 38
-#define MON_DATA_HP_IV 39
-#define MON_DATA_ATK_IV 40
-#define MON_DATA_DEF_IV 41
-#define MON_DATA_SPEED_IV 42
-#define MON_DATA_SPATK_IV 43
-#define MON_DATA_SPDEF_IV 44
-#define MON_DATA_IS_EGG 45
-#define MON_DATA_ALT_ABILITY 46
-#define MON_DATA_TOUGH 47
-#define MON_DATA_SHEEN 48
-#define MON_DATA_OT_GENDER 49
-#define MON_DATA_COOL_RIBBON 50
-#define MON_DATA_BEAUTY_RIBBON 51
-#define MON_DATA_CUTE_RIBBON 52
-#define MON_DATA_SMART_RIBBON 53
-#define MON_DATA_TOUGH_RIBBON 54
-#define MON_DATA_STATUS 55
-#define MON_DATA_LEVEL 56
-#define MON_DATA_HP 57
-#define MON_DATA_MAX_HP 58
-#define MON_DATA_ATK 59
-#define MON_DATA_DEF 60
-#define MON_DATA_SPEED 61
-#define MON_DATA_SPATK 62
-#define MON_DATA_SPDEF 63
-#define MON_DATA_MAIL 64
-#define MON_DATA_SPECIES2 65
-#define MON_DATA_IVS 66
-#define MON_DATA_CHAMPION_RIBBON 67
-#define MON_DATA_WINNING_RIBBON 68
-#define MON_DATA_VICTORY_RIBBON 69
-#define MON_DATA_ARTIST_RIBBON 70
-#define MON_DATA_EFFORT_RIBBON 71
-#define MON_DATA_GIFT_RIBBON_1 72
-#define MON_DATA_GIFT_RIBBON_2 73
-#define MON_DATA_GIFT_RIBBON_3 74
-#define MON_DATA_GIFT_RIBBON_4 75
-#define MON_DATA_GIFT_RIBBON_5 76
-#define MON_DATA_GIFT_RIBBON_6 77
-#define MON_DATA_GIFT_RIBBON_7 78
-#define MON_DATA_FATEFUL_ENCOUNTER 79
-#define MON_DATA_KNOWN_MOVES 80
-#define MON_DATA_RIBBON_COUNT 81
-#define MON_DATA_RIBBONS 82
-#define MON_DATA_83 83
-#define MON_DATA_ATK2 84
-#define MON_DATA_DEF2 85
-#define MON_DATA_SPEED2 86
-#define MON_DATA_SPATK2 87
-#define MON_DATA_SPDEF2 88
-
-#define MAX_LEVEL 100
-
-#define MON_MALE 0x00
-#define MON_FEMALE 0xFE
-#define MON_GENDERLESS 0xFF
-
-#define TYPE_NORMAL 0x00
-#define TYPE_FIGHTING 0x01
-#define TYPE_FLYING 0x02
-#define TYPE_POISON 0x03
-#define TYPE_GROUND 0x04
-#define TYPE_ROCK 0x05
-#define TYPE_BUG 0x06
-#define TYPE_GHOST 0x07
-#define TYPE_STEEL 0x08
-#define TYPE_MYSTERY 0x09
-#define TYPE_FIRE 0x0a
-#define TYPE_WATER 0x0b
-#define TYPE_GRASS 0x0c
-#define TYPE_ELECTRIC 0x0d
-#define TYPE_PSYCHIC 0x0e
-#define TYPE_ICE 0x0f
-#define TYPE_DRAGON 0x10
-#define TYPE_DARK 0x11
-#define NUMBER_OF_MON_TYPES 0x12
-
-#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
-#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
-#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
-#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
-#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
-#define FRIENDSHIP_EVENT_WALKING 0x5
-#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
-#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
-#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
-
-#define STATUS_PRIMARY_NONE 0x0
-#define STATUS_PRIMARY_POISON 0x1
-#define STATUS_PRIMARY_PARALYSIS 0x2
-#define STATUS_PRIMARY_SLEEP 0x3
-#define STATUS_PRIMARY_FREEZE 0x4
-#define STATUS_PRIMARY_BURN 0x5
-#define STATUS_PRIMARY_POKERUS 0x6
-#define STATUS_PRIMARY_FAINTED 0x7
-
-#define MAX_TOTAL_EVS 510
-#define NUM_STATS 6
-#define UNOWN_FORM_COUNT 28
-
enum {
EGG_GROUP_NONE,
EGG_GROUP_MONSTER,
diff --git a/include/rom3.h b/include/rom3.h
deleted file mode 100644
index 2b889c78b..000000000
--- a/include/rom3.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef GUARD_ROM3_H
-#define GUARD_ROM3_H
-
-struct HpAndStatus
-{
- u16 hp;
- u32 status;
-};
-
-struct DisableStruct;
-
-void sub_800B858(void);
-void SetUpBattleVarsAndBirchPoochyena();
-void sub_800B950(void);
-void sub_800B9A8(void);
-void sub_800BA78(void);
-void sub_800BD54(void);
-void CreateTasksForSendRecvLinkBuffers(void);
-void PrepareBufferDataTransferLink(u8 a, u16, u8 *c);
-void Task_HandleSendLinkBuffersData(u8);
-void sub_800C35C(void);
-void Task_HandleCopyReceivedLinkBuffersData(u8);
-void BtlController_EmitGetMonData(u8 a, u8 b, u8 c);
-void BtlController_EmitGetRawMonData(u8 a, u8 b, u8 c);
-void BtlController_EmitLoadMonSprite(u8 a);
-void BtlController_EmitSwitchInAnim(u8, u8, u8);
-void BtlController_EmitReturnMonToBall(u8 a, u8 b);
-void BtlController_EmitDrawTrainerPic(u8 a);
-void BtlController_EmitTrainerSlide(u8 a);
-void BtlController_EmitTrainerSlideBack(u8 a);
-void BtlController_EmitFaintAnimation(u8 a);
-void BtlController_EmitPaletteFade(u8 a);
-void BtlController_EmitSuccessBallThrowAnim(u8 a);
-void BtlController_EmitBallThrowAnim(u8 a, u8 b);
-void BtlController_EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, struct DisableStruct *g);
-void BtlController_EmitPrintString(u8 a, u16 b);
-void BtlController_EmitPrintSelectionString(u8 a, u16 stringID);
-void BtlController_EmitChooseAction(u8 a, u8 b, u16 c);
-void BtlController_EmitChooseMove(u8 a, u8 b, u8 c, u8 *d);
-void BtlController_EmitChooseItem(u8 a, u8 *b);
-void BtlController_EmitChoosePokemon(u8 a, u8 b, u8 c, u8 d, u8 *e);
-void BtlController_EmitCmd23(u8 a);
-void BtlController_EmitHealthBarUpdate(u8 a, u16 b);
-void BtlController_EmitExpUpdate(u8 a, u8 b, u16 c);
-void BtlController_EmitStatusIconUpdate(u8 a, u32 b, u32 c);
-void BtlController_EmitStatusAnimation(u8 a, u8 b, u32 c);
-void BtlController_EmitStatusXor(u8 a, u8 b);
-void BtlController_EmitDataTransfer(u8, u16, u8 *);
-void BtlController_EmitTwoReturnValues(u8 a, u8 b, u16 c);
-void BtlController_EmitChosenMonReturnValue(u8 a, u8 b, u8 *c);
-void BtlController_EmitOneReturnValue(u8 a, u16 b);
-void BtlController_EmitOneReturnValue_Duplicate(u8 a, u16 b);
-void BtlController_EmitCmd37(u8 a);
-void BtlController_EmitCmd38(u8 a, u8 b);
-void BtlController_EmitCmd39(u8 a);
-void BtlController_EmitCmd40(u8 a);
-void BtlController_EmitHitAnimation(u8 a);
-void BtlController_EmitCmd42(u8 a);
-void BtlController_EmitPlaySE(u8 a, u16 b);
-void BtlController_EmitPlayFanfareOrBGM(u8 a, u16 b);
-void BtlController_EmitFaintingCry(u8 a);
-void BtlController_EmitIntroSlide(u8 a, u8 b);
-void BtlController_EmitIntroTrainerBallThrow(u8 a);
-void BtlController_EmitDrawPartyStatusSummary(u8 a, struct HpAndStatus *hpAndStatus, u8 c); //0x30
-void BtlController_EmitHidePartyStatusSummary(u8 a);
-void BtlController_EmitEndBounceEffect(u8 a);
-void BtlController_EmitSpriteInvisibility(u8 a, u8 b);
-void BtlController_EmitBattleAnimation(u8 a, u8 b, u16 c);
-void BtlController_EmitLinkStandbyMsg(u8 a, u8 b);
-void BtlController_EmitResetActionMoveSelection(u8 a, u8 b);
-void BtlController_EmitCmd55(u8 a, u8 b);
-
-#endif // GUARD_ROM3_H
diff --git a/ld_script.txt b/ld_script.txt
index dc550cc63..f6782bcde 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -47,7 +47,7 @@ SECTIONS {
src/link.o(.text);
src/rtc.o(.text);
src/main_menu.o(.text);
- src/rom3.o(.text);
+ src/battle_controllers.o(.text);
src/decompress.o(.text);
asm/decompress.o(.text);
src/battle_bg.o(.text);
@@ -475,7 +475,7 @@ SECTIONS {
src/link.o(.rodata*);
src/rtc.o(.rodata*);
src/main_menu.o(.rodata*);
- src/rom3.o(.rodata*);
+ src/battle_controllers.o(.rodata*);
data/mon_attrs.o(.rodata*);
src/battle/battle_1.o(.rodata*);
src/battle_bg.o(.rodata*);
diff --git a/src/battle/anim/fight.c b/src/battle/anim/fight.c
index 8d045c42d..450844453 100644
--- a/src/battle/anim/fight.c
+++ b/src/battle/anim/fight.c
@@ -12,7 +12,7 @@ extern u8 gBattlerAttacker;
extern u8 gBattleAnimAttacker;
extern u8 gBattleAnimTarget;
extern u8 gBattlerSpriteIds[];
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u16 gBattle_BG1_X;
extern u16 gBattle_BG1_Y;
extern u16 gBattle_BG2_X;
@@ -516,7 +516,7 @@ void sub_80D90F4(struct Sprite *sprite)
if (Random() & 1)
y *= -1;
- if ((gBanksBySide[bank] & 1) == 0)
+ if ((gBattlerPositions[bank] & 1) == 0)
y += 0xFFF0;
sprite->pos1.x += x;
diff --git a/src/battle/anim/flying.c b/src/battle/anim/flying.c
index 1f36c933a..407c9a08f 100644
--- a/src/battle/anim/flying.c
+++ b/src/battle/anim/flying.c
@@ -12,7 +12,7 @@ extern u8 gBattleAnimAttacker;
extern u8 gBattleAnimTarget;
extern u8 gAnimVisualTaskCount;
extern struct OamMatrix gOamMatrices[];
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern const struct SpriteTemplate gBattleAnimSpriteTemplate_83DB538;
void sub_80785E4(struct Sprite *sprite);
@@ -1899,7 +1899,7 @@ void sub_80DAD84(struct Sprite * sprite)
if (gMain.inBattle)
{
- if (gBanksBySide[gBattleAnimTarget] & 1)
+ if (gBattlerPositions[gBattleAnimTarget] & 1)
{
sprite->data[7] = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[3];
}
diff --git a/src/battle/anim/ice.c b/src/battle/anim/ice.c
index 4002ceec1..e41057d72 100644
--- a/src/battle/anim/ice.c
+++ b/src/battle/anim/ice.c
@@ -14,7 +14,7 @@ extern s16 gBattleAnimArgs[];
extern u8 gBattleAnimAttacker;
extern u8 gBattleAnimTarget;
extern u8 gAnimVisualTaskCount;
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u8 gBattlerSpriteIds[];
extern u16 gBattle_BG1_X;
@@ -1419,12 +1419,12 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite)
if (GetBattlerSpriteCoord(gBattleAnimAttacker, 2) < GetBattlerSpriteCoord(gBattleAnimTarget, 2))
sprite->data[7] = 0x8000;
- if (!(gBanksBySide[gBattleAnimTarget] & 1))
+ if (!(gBattlerPositions[gBattleAnimTarget] & 1))
{
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
- if ((sprite->data[7] & 0x8000) && !(gBanksBySide[gBattleAnimAttacker] & 1))
+ if ((sprite->data[7] & 0x8000) && !(gBattlerPositions[gBattleAnimAttacker] & 1))
sprite->subpriority = gSprites[GetAnimBattlerSpriteId(1)].subpriority + 1;
sprite->data[6] = 1;
@@ -1490,7 +1490,7 @@ static void sub_80D8874(struct Sprite *sprite)
sprite->data[3] = sprite->pos1.y;
sprite->data[4] = sprite->pos1.y + 29;
sprite->data[7]++;
- if (gMain.inBattle && gBanksBySide[gBattleAnimTarget] & 1)
+ if (gMain.inBattle && gBattlerPositions[gBattleAnimTarget] & 1)
sprite->data[5] = 204;
else
sprite->data[5] = value2;
@@ -1535,7 +1535,7 @@ static void sub_80D8874(struct Sprite *sprite)
sprite->data[1] = sprite->pos1.x += sprite->pos2.x;
sprite->data[3] = sprite->pos1.y += sprite->pos2.y;
sprite->data[4] = sprite->pos1.y + 4;
- if (gMain.inBattle && gBanksBySide[gBattleAnimTarget] & 1)
+ if (gMain.inBattle && gBattlerPositions[gBattleAnimTarget] & 1)
sprite->data[2] = 0x100;
else
sprite->data[2] = -0x10;
@@ -1646,7 +1646,7 @@ NAKED static void sub_80D8874(struct Sprite *sprite)
"\tands r0, r1\n"
"\tcmp r0, 0\n"
"\tbeq _080D8938\n"
- "\tldr r1, _080D8934 @ =gBanksBySide\n"
+ "\tldr r1, _080D8934 @ =gBattlerPositions\n"
"\tldrb r0, [r6]\n"
"\tadds r0, r1\n"
"\tldrb r1, [r0]\n"
@@ -1661,7 +1661,7 @@ NAKED static void sub_80D8874(struct Sprite *sprite)
"_080D8928: .4byte gBattleAnimTarget\n"
"_080D892C: .4byte gMain\n"
"_080D8930: .4byte 0x0000043d\n"
- "_080D8934: .4byte gBanksBySide\n"
+ "_080D8934: .4byte gBattlerPositions\n"
"_080D8938:\n"
"\tstrh r5, [r4, 0x38]\n"
"_080D893A:\n"
@@ -1806,7 +1806,7 @@ NAKED static void sub_80D8874(struct Sprite *sprite)
"\tands r0, r1\n"
"\tcmp r0, 0\n"
"\tbeq _080D8A78\n"
- "\tldr r1, _080D8A70 @ =gBanksBySide\n"
+ "\tldr r1, _080D8A70 @ =gBattlerPositions\n"
"\tldr r0, _080D8A74 @ =gBattleAnimTarget\n"
"\tldrb r0, [r0]\n"
"\tadds r0, r1\n"
@@ -1821,7 +1821,7 @@ NAKED static void sub_80D8874(struct Sprite *sprite)
"\t.align 2, 0\n"
"_080D8A68: .4byte gMain\n"
"_080D8A6C: .4byte 0x0000043d\n"
- "_080D8A70: .4byte gBanksBySide\n"
+ "_080D8A70: .4byte gBattlerPositions\n"
"_080D8A74: .4byte gBattleAnimTarget\n"
"_080D8A78:\n"
"\tldr r0, _080D8A90 @ =0x0000fff0\n"
diff --git a/src/battle/anim/sonic.c b/src/battle/anim/sonic.c
index 9cdda992f..cef255eda 100644
--- a/src/battle/anim/sonic.c
+++ b/src/battle/anim/sonic.c
@@ -9,7 +9,7 @@
extern s16 gBattleAnimArgs[];
extern u8 gBattleAnimAttacker;
extern u8 gBattleAnimTarget;
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u16 gBattleTypeFlags;
extern void sub_80D4CA4(struct Sprite *sprite);
@@ -296,7 +296,7 @@ void sub_80CFB04(u8 taskId)
}
else
{
- if ((gBanksBySide[gBattleAnimTarget] & 1) == 0)
+ if ((gBattlerPositions[gBattleAnimTarget] & 1) == 0)
{
gTasks[taskId].data[4] = 1;
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index 0c8b8fb1b..405776db6 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -26,9 +26,9 @@ extern u8 gBattlerTarget;
extern u8 gAbsentBattlerFlags;
extern u8 gMoveResultFlags;
extern u16 gDynamicBasePower;
-extern u16 gLastUsedMove[MAX_BATTLERS_COUNT];
+extern u16 gLastMoves[MAX_BATTLERS_COUNT];
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
-extern u16 gSideAffecting[2];
+extern u16 gSideStatuses[2];
extern struct BattlePokemon gBattleMons[MAX_BATTLERS_COUNT];
extern u8 gCritMultiplier;
extern u16 gTrainerBattleOpponent;
@@ -448,7 +448,7 @@ void sub_810745C(void)
{
if (AI_BATTLE_HISTORY->usedMoves[gBattlerTarget >> 1][i] == 0)
{
- AI_BATTLE_HISTORY->usedMoves[gBattlerTarget >> 1][i] = gLastUsedMove[gBattlerTarget];
+ AI_BATTLE_HISTORY->usedMoves[gBattlerTarget >> 1][i] = gLastMoves[gBattlerTarget];
return;
}
}
@@ -468,7 +468,7 @@ void RecordAbilityBattle(u8 a, u8 b)
AI_BATTLE_HISTORY->abilities[GetBattlerPosition(a) & 1] = b;
}
-void RecordItemBattle(u8 a, u8 b)
+void RecordItemEffectBattle(u8 a, u8 b)
{
if (GetBattlerSide(a) == 0)
AI_BATTLE_HISTORY->itemEffects[GetBattlerPosition(a) & 1] = b;
@@ -697,7 +697,7 @@ static void BattleAICmd_if_status4(void)
arg1 = GetBattlerPosition(index) & 1;
arg2 = T1_READ_32(gAIScriptPtr + 2);
- if ((gSideAffecting[arg1] & arg2) != 0)
+ if ((gSideStatuses[arg1] & arg2) != 0)
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -716,7 +716,7 @@ static void BattleAICmd_if_not_status4(void)
arg1 = GetBattlerPosition(index) & 1;
arg2 = T1_READ_32(gAIScriptPtr + 2);
- if ((gSideAffecting[arg1] & arg2) == 0)
+ if ((gSideStatuses[arg1] & arg2) == 0)
gAIScriptPtr = T1_READ_PTR(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -1256,9 +1256,9 @@ _081083D0: .4byte gAIScriptPtr\n\
static void BattleAICmd_get_move(void)
{
if (gAIScriptPtr[1] == USER)
- AI_THINKING_STRUCT->funcResult = gLastUsedMove[gBattlerAttacker];
+ AI_THINKING_STRUCT->funcResult = gLastMoves[gBattlerAttacker];
else
- AI_THINKING_STRUCT->funcResult = gLastUsedMove[gBattlerTarget];
+ AI_THINKING_STRUCT->funcResult = gLastMoves[gBattlerTarget];
gAIScriptPtr += 2;
}
diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c
index 9da56a220..b4b2841e0 100644
--- a/src/battle_ai_switch_items.c
+++ b/src/battle_ai_switch_items.c
@@ -1,13 +1,13 @@
#include "global.h"
#include "battle.h"
#include "battle_ai_switch_items.h"
+#include "battle_controllers.h"
#include "battle_script_commands.h"
#include "data2.h"
#include "ewram.h"
#include "pokemon.h"
#include "random.h"
#include "rom_8077ABC.h"
-#include "rom3.h"
#include "util.h"
#include "constants/abilities.h"
#include "constants/items.h"
@@ -386,7 +386,7 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
static bool8 ShouldSwitchIfNaturalCure(void)
{
- if (!(gBattleMons[gActiveBattler].status1 & STATUS_SLEEP))
+ if (!(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP))
return FALSE;
if (gBattleMons[gActiveBattler].ability != ABILITY_NATURAL_CURE)
return FALSE;
@@ -936,27 +936,27 @@ static bool8 ShouldUseItem(void)
break;
case AI_ITEM_CURE_CONDITION:
ewram160DA(gActiveBattler) = 0;
- if (itemEffects[3] & 0x20 && gBattleMons[gActiveBattler].status1 & STATUS_SLEEP)
+ if (itemEffects[3] & 0x20 && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
{
ewram160DA(gActiveBattler) |= 0x20;
shouldUse = TRUE;
}
- if (itemEffects[3] & 0x10 && (gBattleMons[gActiveBattler].status1 & STATUS_POISON || gBattleMons[gActiveBattler].status1 & STATUS_TOXIC_POISON))
+ if (itemEffects[3] & 0x10 && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON))
{
ewram160DA(gActiveBattler) |= 0x10;
shouldUse = TRUE;
}
- if (itemEffects[3] & 0x8 && gBattleMons[gActiveBattler].status1 & STATUS_BURN)
+ if (itemEffects[3] & 0x8 && gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
{
ewram160DA(gActiveBattler) |= 0x8;
shouldUse = TRUE;
}
- if (itemEffects[3] & 0x4 && gBattleMons[gActiveBattler].status1 & STATUS_FREEZE)
+ if (itemEffects[3] & 0x4 && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE)
{
ewram160DA(gActiveBattler) |= 0x4;
shouldUse = TRUE;
}
- if (itemEffects[3] & 0x2 && gBattleMons[gActiveBattler].status1 & STATUS_PARALYSIS)
+ if (itemEffects[3] & 0x2 && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS)
{
ewram160DA(gActiveBattler) |= 0x2;
shouldUse = TRUE;
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c
index 8a53aca75..445c6eac5 100644
--- a/src/battle_controller_link_opponent.c
+++ b/src/battle_controller_link_opponent.c
@@ -2,6 +2,7 @@
#include "battle.h"
#include "battle_anim.h"
#include "battle_anim_special.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "data2.h"
#include "link.h"
@@ -9,7 +10,6 @@
#include "main.h"
#include "palette.h"
#include "rom_8077ABC.h"
-#include "rom3.h"
#include "constants/songs.h"
#include "sound.h"
#include "sprite.h"
diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c
index ae9e6353d..acc35e2d2 100644
--- a/src/battle_controller_link_partner.c
+++ b/src/battle_controller_link_partner.c
@@ -2,6 +2,7 @@
#include "battle.h"
#include "battle_anim.h"
#include "battle_anim_special.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "data2.h"
#include "battle_811DA74.h"
@@ -12,7 +13,6 @@
#include "palette.h"
#include "pokeball.h"
#include "pokemon.h"
-#include "rom3.h"
#include "rom_8077ABC.h"
#include "sound.h"
#include "constants/songs.h"
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c
index 429a9ec26..9fe69811e 100644
--- a/src/battle_controller_opponent.c
+++ b/src/battle_controller_opponent.c
@@ -3,6 +3,7 @@
#include "battle_ai_script_commands.h"
#include "battle_ai_switch_items.h"
#include "battle_anim.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "data2.h"
#include "battle_811DA74.h"
@@ -15,7 +16,6 @@
#include "pokeball.h"
#include "pokemon.h"
#include "random.h"
-#include "rom3.h"
#include "rom_8077ABC.h"
#include "sound.h"
#include "constants/songs.h"
diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c
index e1c632f37..9a48f4e16 100644
--- a/src/battle_controller_player.c
+++ b/src/battle_controller_player.c
@@ -3,6 +3,7 @@
#include "battle.h"
#include "battle_anim.h"
#include "battle_anim_special.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "battle_message.h"
#include "item.h"
@@ -14,7 +15,6 @@
#include "constants/moves.h"
#include "palette.h"
#include "pokemon.h"
-#include "rom3.h"
#include "constants/songs.h"
#include "sound.h"
#include "string_util.h"
@@ -818,10 +818,10 @@ void sub_802CA60(void)
r9->unkC[gMoveSelectionCursor[gActiveBattler]] = r9->unkC[gUnknown_03004344];
r9->unkC[gUnknown_03004344] = i;
- if (gDisableStructs[gActiveBattler].unk18_b & gBitTable[gMoveSelectionCursor[gActiveBattler]])
+ if (gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[gMoveSelectionCursor[gActiveBattler]])
{
- gDisableStructs[gActiveBattler].unk18_b &= ~gBitTable[gMoveSelectionCursor[gActiveBattler]];
- gDisableStructs[gActiveBattler].unk18_b |= gBitTable[gUnknown_03004344];
+ gDisableStructs[gActiveBattler].mimickedMoves &= ~gBitTable[gMoveSelectionCursor[gActiveBattler]];
+ gDisableStructs[gActiveBattler].mimickedMoves |= gBitTable[gUnknown_03004344];
}
sub_802E1B0();
diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c
index bc4695ddc..c015cb4cf 100644
--- a/src/battle_controller_safari.c
+++ b/src/battle_controller_safari.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "battle_anim_81258BC.h"
#include "battle.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "battle_message.h"
#include "data2.h"
@@ -8,7 +9,6 @@
#include "main.h"
#include "menu_cursor.h"
#include "palette.h"
-#include "rom3.h"
#include "constants/songs.h"
#include "sound.h"
#include "text.h"
diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c
index eb1486738..50ede7c7d 100644
--- a/src/battle_controller_wally.c
+++ b/src/battle_controller_wally.c
@@ -2,6 +2,7 @@
#include "battle.h"
#include "battle_anim.h"
#include "battle_anim_special.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "battle_message.h"
#include "data2.h"
@@ -10,7 +11,6 @@
#include "menu_cursor.h"
#include "palette.h"
#include "pokemon.h"
-#include "rom3.h"
#include "constants/songs.h"
#include "sound.h"
#include "sprite.h"
@@ -58,7 +58,6 @@ extern u8 gUnknown_0300434C[];
extern const u8 BattleText_WallyMenu[];
extern const u8 BattleText_MenuOptions[];
-// TODO: include rom3.h when my other PR gets merged
extern void BtlController_EmitTwoReturnValues(u8, u8, u16);
extern void BtlController_EmitOneReturnValue(u8, u16);
diff --git a/src/rom3.c b/src/battle_controllers.c
index c4a6ffec0..02cb59cc4 100644
--- a/src/rom3.c
+++ b/src/battle_controllers.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
+#include "battle_controllers.h"
#include "battle_811DA74.h"
#include "battle_ai_script_commands.h"
#include "battle_anim.h"
@@ -10,7 +11,6 @@
#include "constants/items.h"
#include "link.h"
#include "pokemon.h"
-#include "rom3.h"
#include "rom_8094928.h"
#include "constants/species.h"
#include "task.h"
@@ -18,6 +18,7 @@
#include "battle_message.h"
#include "data2.h"
#include "ewram.h"
+#include "constants/abilities.h"
extern u16 gBattleTypeFlags;
extern u16 gBattleWeather;
@@ -34,7 +35,7 @@ extern u8 gActiveBattler;
extern u32 gBattleControllerExecFlags;
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[];
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u16 gCurrentMove;
extern u16 gChosenMove;
extern u16 gLastUsedItem;
@@ -57,7 +58,14 @@ extern void (*gBattlerControllerFuncs[])(void);
u8 gBattleBuffersTransferData[0x170];
-void sub_800B858(void)
+// this file's funcionts
+static void CreateTasksForSendRecvLinkBuffers(void);
+static void InitSinglePlayerBtlControllers(void);
+static void SetBattlePartyIds(void);
+static void Task_HandleSendLinkBuffersData(u8 taskId);
+static void Task_HandleCopyReceivedLinkBuffersData(u8 taskId);
+
+void HandleLinkBattleSetup(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
@@ -76,14 +84,16 @@ void SetUpBattleVarsAndBirchPoochyena(void)
s32 i;
gBattleMainFunc = nullsub_41;
- for (i = 0; i < 4; i++)
+
+ for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
gBattlerControllerFuncs[i] = nullsub_91;
- gBanksBySide[i] = 0xFF;
+ gBattlerPositions[i] = 0xFF;
gActionSelectionCursor[i] = 0;
gMoveSelectionCursor[i] = 0;
}
- sub_800B858();
+
+ HandleLinkBattleSetup();
gBattleControllerExecFlags = 0;
ClearBattleAnimationVars();
ClearBattleMonForms();
@@ -114,10 +124,12 @@ void sub_800B950(void)
s32 i;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
- sub_800BA78();
+ InitLinkBtlControllers();
else
- sub_800B9A8();
- sub_800BD54();
+ InitSinglePlayerBtlControllers();
+
+ SetBattlePartyIds();
+
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
for (i = 0; i < gBattlersCount; i++)
@@ -125,7 +137,7 @@ void sub_800B950(void)
}
}
-void sub_800B9A8(void)
+static void InitSinglePlayerBtlControllers(void)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
{
@@ -136,27 +148,27 @@ void sub_800B9A8(void)
gBattlerControllerFuncs[0] = SetBankFuncToWallyBufferRunCommand;
else
gBattlerControllerFuncs[0] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[0] = 0;
+ gBattlerPositions[0] = 0;
gBattlerControllerFuncs[1] = SetBankFuncToOpponentBufferRunCommand;
- gBanksBySide[1] = 1;
+ gBattlerPositions[1] = 1;
gBattlersCount = 2;
}
else
{
gBattleMainFunc = sub_8010800;
gBattlerControllerFuncs[0] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[0] = 0;
+ gBattlerPositions[0] = 0;
gBattlerControllerFuncs[1] = SetBankFuncToOpponentBufferRunCommand;
- gBanksBySide[1] = 1;
+ gBattlerPositions[1] = 1;
gBattlerControllerFuncs[2] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[2] = 2;
+ gBattlerPositions[2] = 2;
gBattlerControllerFuncs[3] = SetBankFuncToOpponentBufferRunCommand;
- gBanksBySide[3] = 3;
+ gBattlerPositions[3] = 3;
gBattlersCount = 4;
}
}
-void sub_800BA78(void)
+void InitLinkBtlControllers(void)
{
u8 multiplayerId;
int i;
@@ -167,17 +179,17 @@ void sub_800BA78(void)
{
gBattleMainFunc = sub_8010800;
gBattlerControllerFuncs[0] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[0] = 0;
+ gBattlerPositions[0] = 0;
gBattlerControllerFuncs[1] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[1] = 1;
+ gBattlerPositions[1] = 1;
gBattlersCount = 2;
}
else
{
gBattlerControllerFuncs[1] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[1] = 0;
+ gBattlerPositions[1] = 0;
gBattlerControllerFuncs[0] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[0] = 1;
+ gBattlerPositions[0] = 1;
gBattlersCount = 2;
}
return;
@@ -188,25 +200,25 @@ void sub_800BA78(void)
{
gBattleMainFunc = sub_8010800;
gBattlerControllerFuncs[0] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[0] = 0;
+ gBattlerPositions[0] = 0;
gBattlerControllerFuncs[1] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[1] = 1;
+ gBattlerPositions[1] = 1;
gBattlerControllerFuncs[2] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[2] = 2;
+ gBattlerPositions[2] = 2;
gBattlerControllerFuncs[3] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[3] = 3;
+ gBattlerPositions[3] = 3;
gBattlersCount = 4;
}
else
{
gBattlerControllerFuncs[1] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[1] = 0;
+ gBattlerPositions[1] = 0;
gBattlerControllerFuncs[0] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[0] = 1;
+ gBattlerPositions[0] = 1;
gBattlerControllerFuncs[3] = SetBankFuncToPlayerBufferRunCommand;
- gBanksBySide[3] = 2;
+ gBattlerPositions[3] = 2;
gBattlerControllerFuncs[2] = SetBankFuncToLinkOpponentBufferRunCommand;
- gBanksBySide[2] = 3;
+ gBattlerPositions[2] = 3;
gBattlersCount = 4;
}
@@ -236,12 +248,12 @@ void sub_800BA78(void)
{
case 0:
case 3:
- gBanksBySide[gLinkPlayers[i].id] = 0;
+ gBattlerPositions[gLinkPlayers[i].id] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
- gBanksBySide[gLinkPlayers[i].id] = 2;
+ gBattlerPositions[gLinkPlayers[i].id] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
@@ -256,12 +268,12 @@ void sub_800BA78(void)
{
case 0:
case 3:
- gBanksBySide[gLinkPlayers[i].id] = 0;
+ gBattlerPositions[gLinkPlayers[i].id] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
- gBanksBySide[gLinkPlayers[i].id] = 2;
+ gBattlerPositions[gLinkPlayers[i].id] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
@@ -273,12 +285,12 @@ void sub_800BA78(void)
{
case 0:
case 3:
- gBanksBySide[gLinkPlayers[i].id] = 1;
+ gBattlerPositions[gLinkPlayers[i].id] = 1;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
- gBanksBySide[gLinkPlayers[i].id] = 3;
+ gBattlerPositions[gLinkPlayers[i].id] = 3;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
@@ -288,23 +300,22 @@ void sub_800BA78(void)
gBattlersCount = 4;
}
-void sub_800BD54(void)
+static void SetBattlePartyIds(void)
{
- int i;
- int j;
+ s32 i, j;
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
for (i = 0; i < gBattlersCount; i++)
{
- for (j = 0; j < 6; j++)
+ for (j = 0; j < PARTY_SIZE; j++)
{
if (i < 2)
{
- if (!(gBanksBySide[i] & 1))
+ if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
- && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != 0
+ && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) == 0)
{
@@ -315,7 +326,7 @@ void sub_800BD54(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
- && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != 0
+ && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) == 0)
{
@@ -326,10 +337,10 @@ void sub_800BD54(void)
}
else
{
- if (!(gBanksBySide[i] & 1))
+ if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
- && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != 0 //Probably a typo by Game Freak. The rest use SPECIES2
+ && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) == 0
&& gBattlerPartyIndexes[i - 2] != j)
@@ -341,7 +352,7 @@ void sub_800BD54(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
- && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != 0
+ && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) == 0
&& gBattlerPartyIndexes[i - 2] != j)
@@ -356,17 +367,17 @@ void sub_800BD54(void)
}
}
-void PrepareBufferDataTransfer(u8 a, u8 *data, u16 size)
+static void PrepareBufferDataTransfer(u8 bufferId, u8 *data, u16 size)
{
- int i;
+ s32 i;
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
- PrepareBufferDataTransferLink(a, size, data);
+ PrepareBufferDataTransferLink(bufferId, size, data);
}
else
{
- switch (a)
+ switch (bufferId)
{
case 0:
for (i = 0; i < size; i++)
@@ -386,7 +397,7 @@ void PrepareBufferDataTransfer(u8 a, u8 *data, u16 size)
}
}
-void CreateTasksForSendRecvLinkBuffers(void)
+static void CreateTasksForSendRecvLinkBuffers(void)
{
sLinkSendTaskId = CreateTask(Task_HandleSendLinkBuffersData, 0);
gTasks[sLinkSendTaskId].data[11] = 0;
@@ -538,10 +549,10 @@ void sub_800C35C(void)
}
}
-void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
+static void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
{
- u16 r7;
- u8 r4;
+ u16 blockSize;
+ u8 battlerId;
u8 r2;
if (gTasks[taskId].data[15] != gTasks[taskId].data[14])
@@ -552,15 +563,15 @@ void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
gTasks[taskId].data[12] = 0;
gTasks[taskId].data[15] = 0;
}
- r4 = ewram15000arr(1, gTasks[taskId].data[15]);
- r7 = ewram15000arr(4, gTasks[taskId].data[15]) | (ewram15000arr(5, gTasks[taskId].data[15]) << 8);
+ battlerId = ewram15000arr(1, gTasks[taskId].data[15]);
+ blockSize = ewram15000arr(4, gTasks[taskId].data[15]) | (ewram15000arr(5, gTasks[taskId].data[15]) << 8);
switch (ewram15000arr(0, gTasks[taskId].data[15]))
{
case 0:
- if (gBattleControllerExecFlags & gBitTable[r4])
+ if (gBattleControllerExecFlags & gBitTable[battlerId])
return;
- memcpy(gBattleBufferA[r4], &ewram15000arr(8, gTasks[taskId].data[15]), r7);
- sub_80155A4(r4);
+ memcpy(gBattleBufferA[battlerId], &ewram15000arr(8, gTasks[taskId].data[15]), blockSize);
+ sub_80155A4(battlerId);
if (!(gBattleTypeFlags & BATTLE_TYPE_WILD))
{
gBattlerAttacker = ewram15000arr(2, gTasks[taskId].data[15]);
@@ -570,172 +581,172 @@ void Task_HandleCopyReceivedLinkBuffersData(u8 taskId)
}
break;
case 1:
- memcpy(gBattleBufferB[r4], &ewram15000arr(8, gTasks[taskId].data[15]), r7);
+ memcpy(gBattleBufferB[battlerId], &ewram15000arr(8, gTasks[taskId].data[15]), blockSize);
break;
case 2:
r2 = ewram15000arr(8, gTasks[taskId].data[15]);
- gBattleControllerExecFlags &= ~(gBitTable[r4] << (r2 * 4));
+ gBattleControllerExecFlags &= ~(gBitTable[battlerId] << (r2 * 4));
break;
}
- gTasks[taskId].data[15] = gTasks[taskId].data[15] + r7 + 8;
+ gTasks[taskId].data[15] = gTasks[taskId].data[15] + blockSize + 8;
}
}
-void BtlController_EmitGetMonData(u8 bufferId, u8 b, u8 c)
+void BtlController_EmitGetMonData(u8 bufferId, u8 requestId, u8 monToCheck)
{
- gBattleBuffersTransferData[0] = 0;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[0] = CONTROLLER_GETMONDATA;
+ gBattleBuffersTransferData[1] = requestId;
+ gBattleBuffersTransferData[2] = monToCheck;
gBattleBuffersTransferData[3] = 0;
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitGetRawMonData(u8 bufferId, u8 b, u8 c)
+void BtlController_EmitGetRawMonData(u8 bufferId, u8 monId, u8 bytes)
{
- gBattleBuffersTransferData[0] = 1;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[0] = CONTROLLER_GETRAWMONDATA;
+ gBattleBuffersTransferData[1] = monId;
+ gBattleBuffersTransferData[2] = bytes;
gBattleBuffersTransferData[3] = 0;
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitSetMonData(u8 bufferId, u8 b, u8 c, u8 d, void *e)
+void BtlController_EmitSetMonData(u8 bufferId, u8 requestId, u8 monToCheck, u8 bytes, void *data)
{
- int i;
+ s32 i;
- gBattleBuffersTransferData[0] = 2;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = c;
- for (i = 0; i < d; i++)
- gBattleBuffersTransferData[3 + i] = *(u8*)(e++);
- PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, d + 3);
+ gBattleBuffersTransferData[0] = CONTROLLER_SETMONDATA;
+ gBattleBuffersTransferData[1] = requestId;
+ gBattleBuffersTransferData[2] = monToCheck;
+ for (i = 0; i < bytes; i++)
+ gBattleBuffersTransferData[3 + i] = *(u8*)(data++);
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 3 + bytes);
}
-void BtlController_EmitSetRawMonData(u8 bufferId, u8 b, u8 c, u8 *d)
+void BtlController_EmitSetRawMonData(u8 bufferId, u8 monId, u8 bytes, void *data)
{
- int i;
+ s32 i;
- gBattleBuffersTransferData[0] = 3;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = c;
- for (i = 0; i < c; i++)
- gBattleBuffersTransferData[3 + i] = *(d++);
- PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, c + 3);
+ gBattleBuffersTransferData[0] = CONTROLLER_SETRAWMONDATA;
+ gBattleBuffersTransferData[1] = monId;
+ gBattleBuffersTransferData[2] = bytes;
+ for (i = 0; i < bytes; i++)
+ gBattleBuffersTransferData[3 + i] = *(u8*)(data++);
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, bytes + 3);
}
void BtlController_EmitLoadMonSprite(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 4;
- gBattleBuffersTransferData[1] = 4;
- gBattleBuffersTransferData[2] = 4;
- gBattleBuffersTransferData[3] = 4;
+ gBattleBuffersTransferData[0] = CONTROLLER_LOADMONSPRITE;
+ gBattleBuffersTransferData[1] = CONTROLLER_LOADMONSPRITE;
+ gBattleBuffersTransferData[2] = CONTROLLER_LOADMONSPRITE;
+ gBattleBuffersTransferData[3] = CONTROLLER_LOADMONSPRITE;
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitSwitchInAnim(u8 bufferId, u8 b, u8 c)
+void BtlController_EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit)
{
- gBattleBuffersTransferData[0] = 5;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = c;
+ gBattleBuffersTransferData[0] = CONTROLLER_SWITCHINANIM;
+ gBattleBuffersTransferData[1] = partyId;
+ gBattleBuffersTransferData[2] = dontClearSubstituteBit;
gBattleBuffersTransferData[3] = 5;
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitReturnMonToBall(u8 bufferId, u8 b)
+void BtlController_EmitReturnMonToBall(u8 bufferId, u8 arg1)
{
- gBattleBuffersTransferData[0] = 6;
- gBattleBuffersTransferData[1] = b;
+ gBattleBuffersTransferData[0] = CONTROLLER_RETURNMONTOBALL;
+ gBattleBuffersTransferData[1] = arg1;
PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 2);
}
-void BtlController_EmitDrawTrainerPic(u8 a)
+void BtlController_EmitDrawTrainerPic(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 7;
- gBattleBuffersTransferData[1] = 7;
- gBattleBuffersTransferData[2] = 7;
- gBattleBuffersTransferData[3] = 7;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_DRAWTRAINERPIC;
+ gBattleBuffersTransferData[1] = CONTROLLER_DRAWTRAINERPIC;
+ gBattleBuffersTransferData[2] = CONTROLLER_DRAWTRAINERPIC;
+ gBattleBuffersTransferData[3] = CONTROLLER_DRAWTRAINERPIC;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitTrainerSlide(u8 a)
+void BtlController_EmitTrainerSlide(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 8;
- gBattleBuffersTransferData[1] = 8;
- gBattleBuffersTransferData[2] = 8;
- gBattleBuffersTransferData[3] = 8;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_TRAINERSLIDE;
+ gBattleBuffersTransferData[1] = CONTROLLER_TRAINERSLIDE;
+ gBattleBuffersTransferData[2] = CONTROLLER_TRAINERSLIDE;
+ gBattleBuffersTransferData[3] = CONTROLLER_TRAINERSLIDE;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitTrainerSlideBack(u8 a)
+void BtlController_EmitTrainerSlideBack(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 9;
- gBattleBuffersTransferData[1] = 9;
- gBattleBuffersTransferData[2] = 9;
- gBattleBuffersTransferData[3] = 9;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_TRAINERSLIDEBACK;
+ gBattleBuffersTransferData[1] = CONTROLLER_TRAINERSLIDEBACK;
+ gBattleBuffersTransferData[2] = CONTROLLER_TRAINERSLIDEBACK;
+ gBattleBuffersTransferData[3] = CONTROLLER_TRAINERSLIDEBACK;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitFaintAnimation(u8 a)
+void BtlController_EmitFaintAnimation(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 10;
- gBattleBuffersTransferData[1] = 10;
- gBattleBuffersTransferData[2] = 10;
- gBattleBuffersTransferData[3] = 10;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_FAINTANIMATION;
+ gBattleBuffersTransferData[1] = CONTROLLER_FAINTANIMATION;
+ gBattleBuffersTransferData[2] = CONTROLLER_FAINTANIMATION;
+ gBattleBuffersTransferData[3] = CONTROLLER_FAINTANIMATION;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitPaletteFade(u8 a)
+void BtlController_EmitPaletteFade(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 11;
- gBattleBuffersTransferData[1] = 11;
- gBattleBuffersTransferData[2] = 11;
- gBattleBuffersTransferData[3] = 11;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_PALETTEFADE;
+ gBattleBuffersTransferData[1] = CONTROLLER_PALETTEFADE;
+ gBattleBuffersTransferData[2] = CONTROLLER_PALETTEFADE;
+ gBattleBuffersTransferData[3] = CONTROLLER_PALETTEFADE;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitSuccessBallThrowAnim(u8 a)
+void BtlController_EmitSuccessBallThrowAnim(u8 bufferId)
{
- gBattleBuffersTransferData[0] = 12;
- gBattleBuffersTransferData[1] = 12;
- gBattleBuffersTransferData[2] = 12;
- gBattleBuffersTransferData[3] = 12;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 4);
+ gBattleBuffersTransferData[0] = CONTROLLER_SUCCESSBALLTHROWANIM;
+ gBattleBuffersTransferData[1] = CONTROLLER_SUCCESSBALLTHROWANIM;
+ gBattleBuffersTransferData[2] = CONTROLLER_SUCCESSBALLTHROWANIM;
+ gBattleBuffersTransferData[3] = CONTROLLER_SUCCESSBALLTHROWANIM;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 4);
}
-void BtlController_EmitBallThrowAnim(u8 a, u8 b)
+void BtlController_EmitBallThrowAnim(u8 bufferId, u8 caseId)
{
- gBattleBuffersTransferData[0] = 13;
- gBattleBuffersTransferData[1] = b;
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 2);
+ gBattleBuffersTransferData[0] = CONTROLLER_BALLTHROWANIM;
+ gBattleBuffersTransferData[1] = caseId;
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 2);
}
-void BtlController_EmitPause(u8 a, u8 b, u8 *c)
+void BtlController_EmitPause(u8 bufferId, u8 toWait, void *data)
{
- int i;
-
- gBattleBuffersTransferData[0] = 14;
- gBattleBuffersTransferData[1] = b;
- for (i = 0; i < b * 3; i++)
- gBattleBuffersTransferData[2 + i] = *(c++);
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, b * 3 + 2);
-}
+ s32 i;
-void BtlController_EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, struct DisableStruct *g)
-{
- gBattleBuffersTransferData[0] = 15;
- gBattleBuffersTransferData[1] = b;
- gBattleBuffersTransferData[2] = (b & 0xFF00) >> 8;
- gBattleBuffersTransferData[3] = c;
- gBattleBuffersTransferData[4] = d;
- gBattleBuffersTransferData[5] = (d & 0xFF00) >> 8;
- gBattleBuffersTransferData[6] = e;
- gBattleBuffersTransferData[7] = (e & 0x0000FF00) >> 8;
- gBattleBuffersTransferData[8] = (e & 0x00FF0000) >> 16;
- gBattleBuffersTransferData[9] = (e & 0xFF000000) >> 24;
- gBattleBuffersTransferData[10] = f;
+ gBattleBuffersTransferData[0] = CONTROLLER_PAUSE;
+ gBattleBuffersTransferData[1] = toWait;
+ for (i = 0; i < toWait * 3; i++)
+ gBattleBuffersTransferData[2 + i] = *(u8*)(data++);
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, toWait * 3 + 2);
+}
+
+void BtlController_EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct *disableStructPtr)
+{
+ gBattleBuffersTransferData[0] = CONTROLLER_MOVEANIMATION;
+ gBattleBuffersTransferData[1] = move;
+ gBattleBuffersTransferData[2] = (move & 0xFF00) >> 8;
+ gBattleBuffersTransferData[3] = turnOfMove;
+ gBattleBuffersTransferData[4] = movePower;
+ gBattleBuffersTransferData[5] = (movePower & 0xFF00) >> 8;
+ gBattleBuffersTransferData[6] = dmg;
+ gBattleBuffersTransferData[7] = (dmg & 0x0000FF00) >> 8;
+ gBattleBuffersTransferData[8] = (dmg & 0x00FF0000) >> 16;
+ gBattleBuffersTransferData[9] = (dmg & 0xFF000000) >> 24;
+ gBattleBuffersTransferData[10] = friendship;
gBattleBuffersTransferData[11] = gMultiHitCounter;
- if (AbilityBattleEffects(14, 0, 13, 0, 0) == 0 && AbilityBattleEffects(14, 0, 0x4D, 0, 0) == 0)
+ if (WEATHER_HAS_EFFECT2)
{
gBattleBuffersTransferData[12] = gBattleWeather;
gBattleBuffersTransferData[13] = (gBattleWeather & 0xFF00) >> 8;
@@ -747,8 +758,8 @@ void BtlController_EmitMoveAnimation(u8 a, u16 b, u8 c, u16 d, s32 e, u8 f, stru
}
gBattleBuffersTransferData[14] = 0;
gBattleBuffersTransferData[15] = 0;
- memcpy(&gBattleBuffersTransferData[16], g, sizeof(*g));
- PrepareBufferDataTransfer(a, gBattleBuffersTransferData, 0x2C);
+ memcpy(&gBattleBuffersTransferData[16], disableStructPtr, sizeof(struct DisableStruct));
+ PrepareBufferDataTransfer(bufferId, gBattleBuffersTransferData, 16 + sizeof(struct DisableStruct));
}
void BtlController_EmitPrintString(u8 a, u16 stringID)
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index 10989231f..a2a48dd38 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -27,7 +27,7 @@ extern u8 gBattleBufferA[][0x200];
extern u8 gActiveBattler;
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[];
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u8 gBattlerSpriteIds[];
extern u16 gUnknown_02024DE8;
extern u8 gDoingBattleAnim;
@@ -464,7 +464,7 @@ void unref_sub_8031BA0(void)
count = 4;
}
for (i = 0; i < count; i++)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[i]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[i]]);
}
bool8 sub_8031C30(u8 a)
@@ -490,9 +490,9 @@ bool8 sub_8031C30(u8 a)
else if (a == 3)
LoadCompressedObjectPic(&gUnknown_0820A484);
else if (a == 4)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[0]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[0]]);
else if (a == 5)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[1]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[1]]);
else
retVal = TRUE;
}
@@ -507,13 +507,13 @@ bool8 sub_8031C30(u8 a)
else if (a == 5)
LoadCompressedObjectPic(&gUnknown_0820A49C[1]);
else if (a == 6)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[0]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[0]]);
else if (a == 7)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[1]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[1]]);
else if (a == 8)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[2]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[2]]);
else if (a == 9)
- LoadCompressedObjectPic(&gUnknown_0820A4B4[gBanksBySide[3]]);
+ LoadCompressedObjectPic(&gUnknown_0820A4B4[gBattlerPositions[3]]);
else
retVal = TRUE;
}
@@ -564,7 +564,7 @@ u8 battle_load_something(u8 *pState, u8 *b)
break;
case 4:
sub_8043F44(*b);
- if (gBanksBySide[*b] <= 1)
+ if (gBattlerPositions[*b] <= 1)
nullsub_11(gHealthboxSpriteIds[*b], 0);
else
nullsub_11(gHealthboxSpriteIds[*b], 1);
diff --git a/src/battle_interface.c b/src/battle_interface.c
index 5ec42bb4b..052910d35 100644
--- a/src/battle_interface.c
+++ b/src/battle_interface.c
@@ -423,7 +423,7 @@ u8 *const gUnknown_0820A904[10] =
extern u8 gDisplayedStringBattle[];
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[];
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u8 gHealthboxSpriteIds[];
extern u16 gBattleTypeFlags;
@@ -834,7 +834,7 @@ u8 battle_make_oam_normal_battle(u8 a)
}
//_08043B50
- spriteId3 = CreateSpriteAtEnd(&gSpriteTemplates_820A56C[gBanksBySide[a]], 140, 60, 0);
+ spriteId3 = CreateSpriteAtEnd(&gSpriteTemplates_820A56C[gBattlerPositions[a]], 140, 60, 0);
sprite = &gSprites[spriteId3];
SetSubspriteTables(sprite, &gSubspriteTables_820A684[GetBattlerSide(a)]);
sprite->subspriteMode = 2;
diff --git a/src/battle_main.c b/src/battle_main.c
index 56eabd515..721aa7f9f 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -9,6 +9,7 @@
#include "gba/flash_internal.h"
#include "battle.h"
#include "battle_ai_script_commands.h"
+#include "battle_controllers.h"
#include "battle_interface.h"
#include "battle_message.h"
#include "battle_setup.h"
@@ -32,7 +33,6 @@
#include "pokemon.h"
#include "random.h"
#include "roamer.h"
-#include "rom3.h"
#include "rom_8077ABC.h"
#include "rom_8094928.h"
#include "safari_zone.h"
@@ -83,7 +83,7 @@ extern u32 gBattleControllerExecFlags;
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[];
extern u8 gCurrentActionFuncId;
-extern u8 gBanksByTurnOrder[];
+extern u8 gBattlerByTurnOrder[];
extern u8 gBattlerSpriteIds[];
extern u16 gCurrentMove; // This is mis-named. It is a species, not a move ID.
extern u8 gLastUsedAbility;
@@ -92,7 +92,7 @@ extern u8 gAbsentBattlerFlags;
extern u8 gMultiHitCounter;
extern u8 gActionForBanks[];
extern u16 gUnknown_02024C2C[];
-extern u16 gLastUsedMove[];
+extern u16 gLastMoves[];
extern u16 gLastLandedMoves[];
extern u16 gLastHitByType[];
extern u16 gUnknown_02024C4C[];
@@ -100,7 +100,7 @@ extern u16 gLockedMoves[];
extern u16 gChosenMovesByBanks[];
extern u32 gHitMarker;
extern u8 gUnknown_02024C70[];
-extern u16 gSideAffecting[];
+extern u16 gSideStatuses[];
extern u32 gStatuses3[];
//extern u8 gDisableStructs[][0x1C];
extern u16 gPauseCounterBattle;
@@ -208,7 +208,7 @@ void CB2_InitBattle(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
- sub_800B858();
+ HandleLinkBattleSetup();
SetMainCallback2(sub_800F104);
gBattleCommunication[0] = 0;
}
@@ -1402,9 +1402,9 @@ extern const u16 gUnknown_Debug_821F424[][5];
extern const u16 gUnknown_Debug_821F56C[][5];
extern const u32 gUnknown_Debug_821F798[][4];
-extern const u8 gUnusedOldCharmap_Gfx_lz[];
-extern const u8 gUnusedOldCharmap_Tilemap_lz[];
-extern const u8 gUnusedOldCharmap_Pal_lz[];
+extern const u8 gDebugBattleCharmap_Gfx_lz[];
+extern const u8 gDebugBattleCharmap_Tilemap_lz[];
+extern const u8 gDebugBattleCharmap_Pal_lz[];
void debug_sub_8010800(void)
{
@@ -1457,10 +1457,10 @@ void debug_sub_80108B8(void)
REG_BG1CNT = 0x4801;
REG_BLDCNT = 0;
REG_BLDY = 0;
- LZDecompressVram(gUnusedOldCharmap_Gfx_lz, (void *)VRAM);
- LZDecompressWram(gUnusedOldCharmap_Tilemap_lz, gSharedMem);
- LZDecompressVram(gUnusedOldCharmap_Pal_lz, (void *)PLTT);
- LZDecompressVram(gUnusedOldCharmap_Pal_lz, (void *)(PLTT + 0x1E0));
+ LZDecompressVram(gDebugBattleCharmap_Gfx_lz, (void *)VRAM);
+ LZDecompressWram(gDebugBattleCharmap_Tilemap_lz, gSharedMem);
+ LZDecompressVram(gDebugBattleCharmap_Pal_lz, (void *)PLTT);
+ LZDecompressVram(gDebugBattleCharmap_Pal_lz, (void *)(PLTT + 0x1E0));
m4aSoundVSyncOn();
SetVBlankCallback(debug_sub_8011D40);
SetMainCallback2(debug_sub_8010CAC);
@@ -2475,11 +2475,13 @@ void debug_nullsub_3(void)
extern const u32 gUnknown_Debug_821F680[][0x23];
+// Shows a cursor
void debug_sub_80125A0(void)
{
gSharedMem[gUnknown_Debug_821F680[gUnknown_Debug_03004360][gUnknown_Debug_030043A0 + gUnknown_Debug_030043A4 * 5]] = 0x6D;
}
+// Hides a cursor
void debug_sub_80125E4(void)
{
gSharedMem[gUnknown_Debug_821F680[gUnknown_Debug_03004360][gUnknown_Debug_030043A0 + gUnknown_Debug_030043A4 * 5]] = 0x81;
@@ -3329,7 +3331,7 @@ void sub_8010874(void)
MEMSET_ALT(&gDisableStructs[i], 0, 0x1C, j, r4);
gDisableStructs[i].isFirstTurn= 2;
gUnknown_02024C70[i] = 0;
- gLastUsedMove[i] = 0;
+ gLastMoves[i] = 0;
gLastLandedMoves[i] = 0;
gLastHitByType[i] = 0;
gUnknown_02024C4C[i] = 0;
@@ -3341,7 +3343,7 @@ void sub_8010874(void)
for (i = 0; i < 2; i++)
{
- gSideAffecting[i] = 0;
+ gSideStatuses[i] = 0;
MEMSET_ALT(&gSideTimers[i], 0, 12, j, r4);
}
@@ -3399,7 +3401,7 @@ void sub_8010874(void)
gBattleResults.unk2 = 0;
gBattleResults.unk3 = 0;
gBattleResults.unk4 = 0;
- gBattleResults.unk5_0 = 0;
+ gBattleResults.playerMonWasDamaged = 0;
gBattleResults.unk5_1 = 0;
gBattleResults.lastOpponentSpecies = 0;
gBattleResults.lastUsedMove = 0;
@@ -3433,23 +3435,23 @@ void SwitchInClearSetData(void)
{
if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].bankPreventingEscape == gActiveBattler)
gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION;
- if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].bankWithSureHit == gActiveBattler)
+ if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].battlerWithSureHit == gActiveBattler)
{
gStatuses3[i] &= ~STATUS3_ALWAYS_HITS;
- gDisableStructs[i].bankWithSureHit = 0;
+ gDisableStructs[i].battlerWithSureHit = 0;
}
}
}
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
{
gBattleMons[gActiveBattler].status2 &= (STATUS2_CONFUSION | STATUS2_FOCUS_ENERGY | STATUS2_SUBSTITUTE | STATUS2_ESCAPE_PREVENTION | STATUS2_CURSED);
- gStatuses3[gActiveBattler] &= (STATUS3_LEECHSEED_BANK | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT);
+ gStatuses3[gActiveBattler] &= (STATUS3_LEECHSEED_BATTLER | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT);
for (i = 0; i < gBattlersCount; i++)
{
if (GetBattlerSide(gActiveBattler) != GetBattlerSide(i)
&& (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0
- && (gDisableStructs[i].bankWithSureHit == gActiveBattler))
+ && (gDisableStructs[i].battlerWithSureHit == gActiveBattler))
{
gStatuses3[i] &= ~STATUS3_ALWAYS_HITS;
gStatuses3[i] |= 0x10;
@@ -3478,13 +3480,13 @@ void SwitchInClearSetData(void)
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
{
gDisableStructs[gActiveBattler].substituteHP = sp0.substituteHP;
- gDisableStructs[gActiveBattler].bankWithSureHit = sp0.bankWithSureHit;
+ gDisableStructs[gActiveBattler].battlerWithSureHit = sp0.battlerWithSureHit;
gDisableStructs[gActiveBattler].perishSongTimer1 = sp0.perishSongTimer1;
gDisableStructs[gActiveBattler].perishSongTimer2 = sp0.perishSongTimer2;
}
gDisableStructs[gActiveBattler].isFirstTurn= 2;
- gLastUsedMove[gActiveBattler] = 0;
+ gLastMoves[gActiveBattler] = 0;
gLastLandedMoves[gActiveBattler] = 0;
gLastHitByType[gActiveBattler] = 0;
gUnknown_02024C4C[gActiveBattler] = 0;
@@ -3548,7 +3550,7 @@ void UndoEffectsAfterFainting(void)
gProtectStructs[gActiveBattler].notFirstStrike = 0;
gDisableStructs[gActiveBattler].isFirstTurn= 2;
- gLastUsedMove[gActiveBattler] = 0;
+ gLastMoves[gActiveBattler] = 0;
gLastLandedMoves[gActiveBattler] = 0;
gLastHitByType[gActiveBattler] = 0;
gUnknown_02024C4C[gActiveBattler] = 0;
@@ -3885,12 +3887,12 @@ void BattleBeginFirstTurn(void)
if (ewram16058 == 0)
{
for (i = 0; i < gBattlersCount; i++)
- gBanksByTurnOrder[i] = i;
+ gBattlerByTurnOrder[i] = i;
for (i = 0; i < gBattlersCount - 1; i++)
{
for (j = i + 1; j < gBattlersCount; j++)
{
- if (GetWhoStrikesFirst(gBanksByTurnOrder[i], gBanksByTurnOrder[j], 1) != 0)
+ if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], 1) != 0)
SwapTurnOrder(i, j);
}
}
@@ -3902,7 +3904,7 @@ void BattleBeginFirstTurn(void)
}
while (ewram16058 < gBattlersCount)
{
- if (AbilityBattleEffects(0, gBanksByTurnOrder[ewram16058], 0, 0, 0) != 0)
+ if (AbilityBattleEffects(0, gBattlerByTurnOrder[ewram16058], 0, 0, 0) != 0)
r9++;
ewram16058++;
if (r9 != 0)
@@ -3914,7 +3916,7 @@ void BattleBeginFirstTurn(void)
return;
while (ewram160F9 < gBattlersCount)
{
- if (ItemBattleEffects(0, gBanksByTurnOrder[ewram160F9], 0) != 0)
+ if (ItemBattleEffects(0, gBattlerByTurnOrder[ewram160F9], 0) != 0)
r9++;
ewram160F9++;
if (r9 != 0)
@@ -3981,7 +3983,7 @@ void BattleTurnPassed(void)
TurnValuesCleanUp(1);
if (gBattleOutcome == 0)
{
- if (UpdateTurnCounters() != 0)
+ if (DoFieldEndTurnEffects() != 0)
return;
if (TurnBasedEffects() != 0)
return;
@@ -4482,9 +4484,9 @@ void SwapTurnOrder(u8 a, u8 b)
gActionsByTurnOrder[a] = gActionsByTurnOrder[b];
gActionsByTurnOrder[b] = temp;
- temp = gBanksByTurnOrder[a];
- gBanksByTurnOrder[a] = gBanksByTurnOrder[b];
- gBanksByTurnOrder[b] = temp;
+ temp = gBattlerByTurnOrder[a];
+ gBattlerByTurnOrder[a] = gBattlerByTurnOrder[b];
+ gBattlerByTurnOrder[b] = temp;
}
// Determines which of the two given mons will strike first in a battle.
@@ -4545,7 +4547,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreMovePriorities)
if (heldItemEffect == HOLD_EFFECT_MACHO_BRACE)
bank1AdjustedSpeed /= 2;
- if (gBattleMons[bank1].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank1].status1 & STATUS1_PARALYSIS)
bank1AdjustedSpeed /= 4;
if (heldItemEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (heldItemEffectParam * 0xFFFF) / 100)
@@ -4575,7 +4577,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreMovePriorities)
if (heldItemEffect == HOLD_EFFECT_MACHO_BRACE)
bank2AdjustedSpeed /= 2;
- if (gBattleMons[bank2].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank2].status1 & STATUS1_PARALYSIS)
bank2AdjustedSpeed /= 4;
if (heldItemEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (heldItemEffectParam * 0xFFFF) / 100)
@@ -4642,7 +4644,7 @@ void SetActionsAndBanksTurnOrder(void)
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
{
gActionsByTurnOrder[var] = gActionForBanks[gActiveBattler];
- gBanksByTurnOrder[var] = gActiveBattler;
+ gBattlerByTurnOrder[var] = gActiveBattler;
var++;
}
}
@@ -4671,14 +4673,14 @@ void SetActionsAndBanksTurnOrder(void)
if (var == 5)
{
gActionsByTurnOrder[0] = gActionForBanks[gActiveBattler];
- gBanksByTurnOrder[0] = gActiveBattler;
+ gBattlerByTurnOrder[0] = gActiveBattler;
var = 1;
for (i = 0; i < gBattlersCount; i++)
{
if (i != gActiveBattler)
{
gActionsByTurnOrder[var] = gActionForBanks[i];
- gBanksByTurnOrder[var] = i;
+ gBattlerByTurnOrder[var] = i;
var++;
}
}
@@ -4693,7 +4695,7 @@ void SetActionsAndBanksTurnOrder(void)
if (gActionForBanks[gActiveBattler] == B_ACTION_USE_ITEM || gActionForBanks[gActiveBattler] == B_ACTION_SWITCH)
{
gActionsByTurnOrder[var] = gActionForBanks[gActiveBattler];
- gBanksByTurnOrder[var] = gActiveBattler;
+ gBattlerByTurnOrder[var] = gActiveBattler;
var++;
}
}
@@ -4702,7 +4704,7 @@ void SetActionsAndBanksTurnOrder(void)
if (gActionForBanks[gActiveBattler] != B_ACTION_USE_ITEM && gActionForBanks[gActiveBattler] != B_ACTION_SWITCH)
{
gActionsByTurnOrder[var] = gActionForBanks[gActiveBattler];
- gBanksByTurnOrder[var] = gActiveBattler;
+ gBattlerByTurnOrder[var] = gActiveBattler;
var++;
}
}
@@ -4710,8 +4712,8 @@ void SetActionsAndBanksTurnOrder(void)
{
for (j = i + 1; j < gBattlersCount; j++)
{
- u8 bank1 = gBanksByTurnOrder[i];
- u8 bank2 = gBanksByTurnOrder[j];
+ u8 bank1 = gBattlerByTurnOrder[i];
+ u8 bank2 = gBattlerByTurnOrder[j];
if (gActionsByTurnOrder[i] != B_ACTION_USE_ITEM
&& gActionsByTurnOrder[j] != B_ACTION_USE_ITEM
&& gActionsByTurnOrder[i] != B_ACTION_SWITCH
@@ -4787,7 +4789,7 @@ void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
gActiveBattler = gBattlerAttacker = eFocusPunchBattler;
eFocusPunchBattler++;
if (gChosenMovesByBanks[gActiveBattler] == MOVE_FOCUS_PUNCH
- && !(gBattleMons[gActiveBattler].status1 & STATUS_SLEEP)
+ && !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
&& !(gProtectStructs[gActiveBattler].noValidMoves))
{
@@ -4846,7 +4848,7 @@ void HandleEndTurn_BattleWon(void)
gBattleTextBuff1[0] = gBattleOutcome;
gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
- gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
+ gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN);
}
else if (gBattleTypeFlags & (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_EREADER_TRAINER))
{
@@ -4896,7 +4898,7 @@ void HandleEndTurn_BattleLost(void)
gBattleTextBuff1[0] = gBattleOutcome;
gBattlerAttacker = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost;
- gBattleOutcome &= ~(OUTCOME_LINK_BATTLE_RUN);
+ gBattleOutcome &= ~(B_OUTCOME_LINK_BATTLE_RAN);
}
else
{
@@ -4983,7 +4985,7 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void)
if (!gPaletteFade.active)
{
ResetSpriteData();
- if (gLeveledUpInBattle == 0 || gBattleOutcome != BATTLE_WON)
+ if (gLeveledUpInBattle == 0 || gBattleOutcome != B_OUTCOME_WON)
{
gBattleMainFunc = ReturnFromBattleToOverworld;
return;
@@ -5049,7 +5051,7 @@ static void ReturnFromBattleToOverworld(void)
if (gBattleTypeFlags & BATTLE_TYPE_ROAMER)
{
UpdateRoamerHPStatus(&gEnemyParty[0]);
- if (gBattleOutcome == BATTLE_WON || gBattleOutcome == BATTLE_CAUGHT)
+ if (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)
SetRoamerInactive();
}
@@ -5083,7 +5085,7 @@ void HandleAction_UseMove(void)
u8 side;
u8 var = 4;
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
if (ewram160A6 & gBitTable[gBattlerAttacker])
{
@@ -5167,9 +5169,9 @@ void HandleAction_UseMove(void)
if (side != GetBattlerSide(gActiveBattler)
&& ewram16010arr(gBattlerAttacker) != gActiveBattler
&& gBattleMons[gActiveBattler].ability == ABILITY_LIGHTNING_ROD
- && BankGetTurnOrder(gActiveBattler) < var)
+ && GetBattlerTurnOrderNum(gActiveBattler) < var)
{
- var = BankGetTurnOrder(gActiveBattler);
+ var = GetBattlerTurnOrderNum(gActiveBattler);
}
}
if (var == 4)
@@ -5212,7 +5214,7 @@ void HandleAction_UseMove(void)
}
else
{
- gActiveBattler = gBanksByTurnOrder[var];
+ gActiveBattler = gBattlerByTurnOrder[var];
RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability);
gSpecialStatuses[gActiveBattler].lightningRodRedirected = 1;
gBattlerTarget = gActiveBattler;
@@ -5266,7 +5268,7 @@ void HandleAction_UseMove(void)
void HandleAction_Switch(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gActionSelectionCursor[gBattlerAttacker] = 0;
@@ -5284,7 +5286,7 @@ void HandleAction_Switch(void)
void HandleAction_UseItem(void)
{
- gBattlerAttacker = gBattlerTarget = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerTarget = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gDisableStructs[gBattlerAttacker].furyCutterCounter = 0;
@@ -5407,7 +5409,7 @@ bool8 TryRunFromBattle(u8 bank)
if (effect)
{
gCurrentTurnActionNumber = gBattlersCount;
- gBattleOutcome = BATTLE_RAN;
+ gBattleOutcome = B_OUTCOME_RAN;
}
return effect;
@@ -5415,7 +5417,7 @@ bool8 TryRunFromBattle(u8 bank)
void HandleAction_Run(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
@@ -5426,16 +5428,16 @@ void HandleAction_Run(void)
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
{
if (gActionForBanks[gActiveBattler] == B_ACTION_RUN)
- gBattleOutcome |= BATTLE_LOST;
+ gBattleOutcome |= B_OUTCOME_LOST;
}
else
{
if (gActionForBanks[gActiveBattler] == B_ACTION_RUN)
- gBattleOutcome |= BATTLE_WON;
+ gBattleOutcome |= B_OUTCOME_WON;
}
}
- gBattleOutcome |= OUTCOME_LINK_BATTLE_RUN;
+ gBattleOutcome |= B_OUTCOME_LINK_BATTLE_RAN;
}
else
{
@@ -5460,7 +5462,7 @@ void HandleAction_Run(void)
else
{
gCurrentTurnActionNumber = gBattlersCount;
- gBattleOutcome = BATTLE_POKE_FLED;
+ gBattleOutcome = B_OUTCOME_MON_FLED;
}
}
}
@@ -5468,7 +5470,7 @@ void HandleAction_Run(void)
void HandleAction_WatchesCarefully(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gBattlescriptCurrInstr = gBattlescriptsForSafariActions[0];
@@ -5477,7 +5479,7 @@ void HandleAction_WatchesCarefully(void)
void HandleAction_SafariZoneBallThrow(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gNumSafariBalls--;
@@ -5488,7 +5490,7 @@ void HandleAction_SafariZoneBallThrow(void)
void HandleAction_ThrowPokeblock(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
gBattleCommunication[MULTISTRING_CHOOSER] = gBattleBufferB[gBattlerAttacker][1] - 1;
@@ -5510,7 +5512,7 @@ void HandleAction_ThrowPokeblock(void)
void HandleAction_GoNear(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
@@ -5537,15 +5539,15 @@ void HandleAction_GoNear(void)
void HandleAction_SafriZoneRun(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
PlaySE(SE_NIGERU);
gCurrentTurnActionNumber = gBattlersCount;
- gBattleOutcome = BATTLE_RAN;
+ gBattleOutcome = B_OUTCOME_RAN;
}
void HandleAction_Action9(void)
{
- gBattlerAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber];
+ gBattlerAttacker = gBattlerByTurnOrder[gCurrentTurnActionNumber];
gBattle_BG0_X = 0;
gBattle_BG0_Y = 0;
@@ -5573,7 +5575,7 @@ void HandleAction_NothingIsFainted(void)
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR
| HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000
| HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT
- | HITMARKER_x8000000 | HITMARKER_x4000000);
+ | HITMARKER_CHARGING | HITMARKER_x4000000);
}
void HandleAction_ActionFinished(void)
@@ -5585,7 +5587,7 @@ void HandleAction_ActionFinished(void)
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR
| HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000
| HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT
- | HITMARKER_x8000000 | HITMARKER_x4000000);
+ | HITMARKER_CHARGING | HITMARKER_x4000000);
gBattleMoveDamage = 0;
ewram16002 = 0;
diff --git a/src/battle_message.c b/src/battle_message.c
index b218c2b8d..ce1e63edd 100644
--- a/src/battle_message.c
+++ b/src/battle_message.c
@@ -379,7 +379,7 @@ void BufferStringBattle(u16 stringID)
gBattleTextBuff1[0] &= ~(0x80);
if (GetBattlerSide(gActiveBattler) == 1 && gBattleTextBuff1[0] != 3)
gBattleTextBuff1[0] ^= 3;
- if (gBattleTextBuff1[0] == BATTLE_LOST || gBattleTextBuff1[0] == BATTLE_DREW)
+ if (gBattleTextBuff1[0] == B_OUTCOME_LOST || gBattleTextBuff1[0] == B_OUTCOME_DREW)
stringPtr = BattleText_GotAwaySafely;
else
{
@@ -397,13 +397,13 @@ void BufferStringBattle(u16 stringID)
{
switch (gBattleTextBuff1[0])
{
- case BATTLE_WON:
+ case B_OUTCOME_WON:
stringPtr = BattleText_PlayerDefeatedTrainers;
break;
- case BATTLE_LOST:
+ case B_OUTCOME_LOST:
stringPtr = BattleText_PlayerLostTrainers;
break;
- case BATTLE_DREW:
+ case B_OUTCOME_DREW:
stringPtr = BattleText_PlayerTiedTrainers;
break;
}
@@ -412,13 +412,13 @@ void BufferStringBattle(u16 stringID)
{
switch (gBattleTextBuff1[0])
{
- case BATTLE_WON:
+ case B_OUTCOME_WON:
stringPtr = BattleText_PlayerDefeatedTrainer;
break;
- case BATTLE_LOST:
+ case B_OUTCOME_LOST:
stringPtr = BattleText_PlayerLostTrainer;
break;
- case BATTLE_DREW:
+ case B_OUTCOME_DREW:
stringPtr = BattleText_PlayerTiedTrainer;
break;
}
diff --git a/src/battle_records.c b/src/battle_records.c
index d94d88032..e462e8992 100644
--- a/src/battle_records.c
+++ b/src/battle_records.c
@@ -21,12 +21,12 @@ extern u8 gBattleOutcome;
const struct DebugStruct1 gUnknown_Debug_4245CC[] =
{
{ 1, _("NUMBER1") },
- { 2, _("ナンバー2") },
- { 3, _("ナンバー3") },
- { 4, _("ナンバー4") },
- { 5, _("ナンバー5") },
- { 6, _("ナンバー6") },
- { 7, _("ナンバー7") },
+ { 2, DTR("ナンバー2", "NUMBER2") },
+ { 3, DTR("ナンバー3", "NUMBER3") },
+ { 4, DTR("ナンバー4", "NUMBER4") },
+ { 5, DTR("ナンバー5", "NUMBER5") },
+ { 6, DTR("ナンバー6", "NUMBER6") },
+ { 7, DTR("ナンバー7", "NUMBER7") },
};
const struct {u8 unk0; u8 unk1;} gUnknown_Debug_8424620[] =
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 577a8149a..32887efc1 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -12,7 +12,7 @@
#include "data2.h"
#include "constants/hold_effects.h"
#include "random.h"
-#include "rom3.h"
+#include "battle_controllers.h"
#include "constants/species.h"
#include "pokemon.h"
#include "text.h"
@@ -32,69 +32,6 @@
#define RET_VALUE_LEVELLED_UP 11
-enum
-{
- CONTROLLER_GETMONDATA,
- CONTROLLER_GETRAWMONDATA,
- CONTROLLER_SETMONDATA,
- CONTROLLER_SETRAWMONDATA,
- CONTROLLER_LOADMONSPRITE,
- CONTROLLER_SWITCHINANIM,
- CONTROLLER_RETURNMONTOBALL,
- CONTROLLER_DRAWTRAINERPIC,
- CONTROLLER_TRAINERSLIDE,
- CONTROLLER_TRAINERSLIDEBACK,
- CONTROLLER_FAINTANIMATION,
- CONTROLLER_PALETTEFADE,
- CONTROLLER_SUCCESSBALLTHROWANIM,
- CONTROLLER_BALLTHROWANIM,
- CONTROLLER_PAUSE,
- CONTROLLER_MOVEANIMATION,
- CONTROLLER_PRINTSTRING,
- CONTROLLER_PRINTSTRINGPLAYERONLY,
- CONTROLLER_CHOOSEACTION,
- CONTROLLER_UNKNOWNYESNOBOX,
- CONTROLLER_CHOOSEMOVE,
- CONTROLLER_OPENBAG,
- CONTROLLER_CHOOSEPOKEMON,
- CONTROLLER_23,
- CONTROLLER_HEALTHBARUPDATE,
- CONTROLLER_EXPUPDATE,
- CONTROLLER_STATUSICONUPDATE,
- CONTROLLER_STATUSANIMATION,
- CONTROLLER_STATUSXOR,
- CONTROLLER_DATATRANSFER,
- CONTROLLER_DMA3TRANSFER,
- CONTROLLER_31,
- CONTROLLER_32,
- CONTROLLER_TWORETURNVALUES,
- CONTROLLER_CHOSENMONRETURNVALUE,
- CONTROLLER_ONERETURNVALUE,
- CONTROLLER_ONERETURNVALUE_DUPLICATE,
- CONTROLLER_37,
- CONTROLLER_38,
- CONTROLLER_39,
- CONTROLLER_40,
- CONTROLLER_HITANIMATION,
- CONTROLLER_42,
- CONTROLLER_EFFECTIVENESSSOUND,
- CONTROLLER_PLAYFANFAREORBGM,
- CONTROLLER_FAINTINGCRY,
- CONTROLLER_INTROSLIDE,
- CONTROLLER_INTROTRAINERBALLTHROW,
- CONTROLLER_DRAWPARTYSTATUSSUMMARY,
- CONTROLLER_49,
- CONTROLLER_50,
- CONTROLLER_SPRITEINVISIBILITY,
- CONTROLLER_BATTLEANIMATION,
- CONTROLLER_LINKSTANDBYMSG,
- CONTROLLER_RESETACTIONMOVESELECTION,
- CONTROLLER_55,
- /*new controllers should go here*/
- CONTROLLER_TERMINATOR_NOP,
- CONTROLLER_CMDS_COUNT
-};
-
//extern needed variables
extern u8 gUnknown_02023A14_50;
extern u8 gCritMultiplier;
@@ -108,7 +45,7 @@ extern u8 gActiveBattler;
extern u32 gBattleControllerExecFlags;
extern u8 gBattlersCount;
extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT];
-extern u8 gBanksByTurnOrder[MAX_BATTLERS_COUNT];
+extern u8 gBattlerByTurnOrder[MAX_BATTLERS_COUNT];
extern u8 gActionsByTurnOrder[MAX_BATTLERS_COUNT];
extern u16 gCurrentMove;
extern u8 gLastUsedAbility;
@@ -117,10 +54,10 @@ extern u8 gPotentialItemEffectBattler;
extern u8 gEffectBattler;
extern u8 gAbsentBattlerFlags;
extern u8 gMultiHitCounter;
-extern u16 gLastUsedMove[4];
+extern u16 gLastMoves[4];
extern u16 gLockedMoves[4];
extern u16 gChosenMovesByBanks[4];
-extern u16 gSideAffecting[2];
+extern u16 gSideStatuses[2];
extern u16 gPauseCounterBattle;
extern u16 gPaydayMoney;
extern u16 gRandomTurnNumber;
@@ -144,7 +81,7 @@ extern u16 gLastUsedItem;
extern u16 gBattleMovePower;
extern s32 gHpDealt;
extern s32 gTakenDmg[MAX_BATTLERS_COUNT];
-extern u8 gTakenDmgBanks[MAX_BATTLERS_COUNT];
+extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
extern const u16 gMissStringIds[];
extern u8 gSentPokesToOpponent[2];
extern u8 gBank1;
@@ -188,13 +125,13 @@ void CancelMultiTurnMoves(u8 bank);
void BattleScriptPush(const u8* BS_ptr);
void BattleScriptPushCursor(void);
void RecordAbilityBattle(u8 bank, u8 ability);
-void RecordItemBattle(u8 bank, u8 holdEffect);
+void RecordItemEffectBattle(u8 bank, u8 holdEffect);
static bool8 IsTwoTurnsMove(u16 move);
static void TrySetDestinyBondToHappen(void);
static void CheckWonderGuardAndLevitate(void);
u8 GetBattlerPosition(u8 bank);
u8 GetBattlerSide(u8 bank);
-u8 GetBattleBank(u8 bankValue);
+u8 GetBattlerForBattleScript(u8 bankValue);
s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 a4, u16 powerOverride, u8 typeOverride, u8 bank_atk, u8 bank_def);
static u8 AttacksThisTurn(u8 bank, u16 move); //Note: returns 1 if it's a charging turn, otherwise 2
void UndoEffectsAfterFainting(void);
@@ -294,7 +231,7 @@ extern u8 BattleScript_PrintPayDayMoneyString[]; //bs payday money give
extern u8 BattleScript_FaintAttacker[];
extern u8 BattleScript_FaintTarget[];
extern u8 BattleScript_DestinyBondTakesLife[];
-extern u8 BattleScript_SelectingImprisionedMoveInPalace[];
+extern u8 BattleScript_GrudgeTakesPp[];
// read via orr
#define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24)
@@ -306,7 +243,7 @@ extern u8 BattleScript_SelectingImprisionedMoveInPalace[];
#define BS2ScriptRead16(ptr) ((ptr)[0] + ((ptr)[1] << 8))
#define BS2ScriptReadPtr(ptr) ((void *)BS2ScriptRead32(ptr))
-#define TARGET_PROTECT_AFFECTED ((gProtectStructs[gBattlerTarget].protected && gBattleMoves[gCurrentMove].flags & F_AFFECTED_BY_PROTECT))
+#define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected && gBattleMoves[gCurrentMove].flags & F_AFFECTED_BY_PROTECT))
//array entries for battle communication
#define MOVE_EFFECT_BYTE 0x3
@@ -315,9 +252,9 @@ extern u8 BattleScript_SelectingImprisionedMoveInPalace[];
#define TARGET_SELECTED 0x0
#define TARGET_DEPENDS 0x1
-#define TARGET_BOTH 0x8
-#define TARGET_FOES_AND_ALLY 0x20
-#define TARGET_OPPONENTS_FIELD 0x40
+#define MOVE_TARGET_BOTH 0x8
+#define MOVE_TARGET_FOES_AND_ALLY 0x20
+#define MOVE_TARGET_OPPONENTS_FIELD 0x40
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
@@ -444,11 +381,11 @@ static void atk5A_yesnoboxlearnmove(void);
static void atk5B_yesnoboxstoplearningmove(void);
static void atk5C_hitanimation(void);
static void atk5D_getmoneyreward(void);
-static void atk5E_8025A70(void);
-static void atk5F_8025B24(void);
+static void atk5E(void);
+static void atk5F_swapattackerwithtarget(void);
static void atk60_incrementgamestat(void);
static void atk61_drawpartystatussummary(void);
-static void atk62_08025C6C(void);
+static void atk62_hidepartystatussummary(void);
static void atk63_jumptorandomattack(void);
static void atk64_statusanimation(void);
static void atk65_status2animation(void);
@@ -570,10 +507,10 @@ static void atkD7_setyawn(void);
static void atkD8_setdamagetohealthdifference(void);
static void atkD9_scaledamagebyhealthratio(void);
static void atkDA_tryswapabilities(void);
-static void atkDB_tryimprision(void);
+static void atkDB_tryimprison(void);
static void atkDC_trysetgrudge(void);
static void atkDD_weightdamagecalculation(void);
-static void atkDE_asistattackselect(void);
+static void atkDE_assistattackselect(void);
static void atkDF_trysetmagiccoat(void);
static void atkE0_trysetsnatch(void);
static void atkE1_trygetintimidatetarget(void);
@@ -588,7 +525,7 @@ static void atkE9_setweatherballtype(void);
static void atkEA_tryrecycleitem(void);
static void atkEB_settypetoterrain(void);
static void atkEC_pursuitrelated(void);
-static void atkED_snatchsetbanks(void);
+static void atkEF_snatchsetbattlers(void);
static void atkEE_removelightscreenreflect(void);
void atkEF_handleballthrow(void);
static void atkF0_givecaughtmon(void);
@@ -696,11 +633,11 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atk5B_yesnoboxstoplearningmove,
atk5C_hitanimation,
atk5D_getmoneyreward,
- atk5E_8025A70,
- atk5F_8025B24,
+ atk5E,
+ atk5F_swapattackerwithtarget,
atk60_incrementgamestat,
atk61_drawpartystatussummary,
- atk62_08025C6C,
+ atk62_hidepartystatussummary,
atk63_jumptorandomattack,
atk64_statusanimation,
atk65_status2animation,
@@ -821,10 +758,10 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atkD8_setdamagetohealthdifference,
atkD9_scaledamagebyhealthratio,
atkDA_tryswapabilities,
- atkDB_tryimprision,
+ atkDB_tryimprison,
atkDC_trysetgrudge,
atkDD_weightdamagecalculation,
- atkDE_asistattackselect,
+ atkDE_assistattackselect,
atkDF_trysetmagiccoat,
atkE0_trysetsnatch,
atkE1_trygetintimidatetarget,
@@ -839,7 +776,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atkEA_tryrecycleitem,
atkEB_settypetoterrain,
atkEC_pursuitrelated,
- atkED_snatchsetbanks,
+ atkEF_snatchsetbattlers,
atkEE_removelightscreenreflect,
atkEF_handleballthrow,
atkF0_givecaughtmon,
@@ -881,12 +818,12 @@ static const u16 sCriticalHitChance[] = {16, 8, 4, 3, 2};
static const u32 sStatusFlagsForMoveEffects[] =
{
0x00000000,
- STATUS_SLEEP,
- STATUS_POISON,
- STATUS_BURN,
- STATUS_FREEZE,
- STATUS_PARALYSIS,
- STATUS_TOXIC_POISON,
+ STATUS1_SLEEP,
+ STATUS1_POISON,
+ STATUS1_BURN,
+ STATUS1_FREEZE,
+ STATUS1_PARALYSIS,
+ STATUS1_TOXIC_POISON,
STATUS2_CONFUSION,
STATUS2_FLINCHED,
0x00000000,
@@ -1001,26 +938,26 @@ static const u16 sProtectSuccessRates[] = {0xFFFF, 0x7FFF, 0x3FFF, 0x1FFF};
static const u16 sMovesForbiddenToCopy[] =
{
- MOVE_METRONOME,
- MOVE_STRUGGLE,
- MOVE_SKETCH,
- MOVE_MIMIC,
- MIMIC_FORBIDDEN_END,
- MOVE_COUNTER,
- MOVE_MIRROR_COAT,
- MOVE_PROTECT,
- MOVE_DETECT,
- MOVE_ENDURE,
- MOVE_DESTINY_BOND,
- MOVE_SLEEP_TALK,
- MOVE_THIEF,
- MOVE_FOLLOW_ME,
- MOVE_SNATCH,
- MOVE_HELPING_HAND,
- MOVE_COVET,
- MOVE_TRICK,
- MOVE_FOCUS_PUNCH,
- METRONOME_FORBIDDEN_END
+ MOVE_METRONOME,
+ MOVE_STRUGGLE,
+ MOVE_SKETCH,
+ MOVE_MIMIC,
+ MIMIC_FORBIDDEN_END,
+ MOVE_COUNTER,
+ MOVE_MIRROR_COAT,
+ MOVE_PROTECT,
+ MOVE_DETECT,
+ MOVE_ENDURE,
+ MOVE_DESTINY_BOND,
+ MOVE_SLEEP_TALK,
+ MOVE_THIEF,
+ MOVE_FOLLOW_ME,
+ MOVE_SNATCH,
+ MOVE_HELPING_HAND,
+ MOVE_COVET,
+ MOVE_TRICK,
+ MOVE_FOCUS_PUNCH,
+ METRONOME_FORBIDDEN_END
};
static const u8 sFlailHpScaleToPowerTable[] = //reversal+flail HP thresholds to power
@@ -1111,7 +1048,7 @@ static void atk00_attackcanceler(void)
return;
if (AbilityBattleEffects(ABILITYEFFECT_MOVES_BLOCK, gBattlerTarget, 0, 0, 0))
return;
- if (!gBattleMons[gBattlerAttacker].pp[gCurrMovePos] && gCurrentMove != MOVE_STRUGGLE && !(gHitMarker & 0x800200)
+ if (!gBattleMons[gBattlerAttacker].pp[gCurrMovePos] && gCurrentMove != MOVE_STRUGGLE && !(gHitMarker & (HITMARKER_x800000 | HITMARKER_NO_ATTACKSTRING))
&& !(gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS))
{
gBattlescriptCurrInstr = BattleScript_NoPPForMove;
@@ -1150,11 +1087,11 @@ static void atk00_attackcanceler(void)
for (i = 0; i < gBattlersCount; i++)
{
- if ((gProtectStructs[gBanksByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & F_AFFECTED_BY_SNATCH)
+ if ((gProtectStructs[gBattlerByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & F_AFFECTED_BY_SNATCH)
{
- PressurePPLose(gBattlerAttacker, gBanksByTurnOrder[i], MOVE_SNATCH);
- gProtectStructs[gBanksByTurnOrder[i]].stealMove = 0;
- gBattleStruct->scriptingActive = gBanksByTurnOrder[i];
+ PressurePPLose(gBattlerAttacker, gBattlerByTurnOrder[i], MOVE_SNATCH);
+ gProtectStructs[gBattlerByTurnOrder[i]].stealMove = 0;
+ gBattleStruct->scriptingActive = gBattlerByTurnOrder[i];
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_SnatchedMove;
return;
@@ -1169,8 +1106,8 @@ static void atk00_attackcanceler(void)
gBattlescriptCurrInstr = BattleScript_TookAttack;
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
}
- else if (TARGET_PROTECT_AFFECTED
- && (gCurrentMove != MOVE_CURSE || (gBattleMons[gBattlerAttacker].type1 == TYPE_GHOST || gBattleMons[gBattlerAttacker].type2 == TYPE_GHOST))
+ else if (DEFENDER_IS_PROTECTED
+ && (gCurrentMove != MOVE_CURSE || IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_GHOST))
&& ((!IsTwoTurnsMove(gCurrentMove) || (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS))))
{
CancelMultiTurnMoves(gBattlerAttacker);
@@ -1206,7 +1143,7 @@ static void JumpIfMoveFailed(u8 adder, u16 move)
static void atk40_jumpifaffectedbyprotect(void)
{
- if (TARGET_PROTECT_AFFECTED)
+ if (DEFENDER_IS_PROTECTED)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
JumpIfMoveFailed(5, 0);
@@ -1221,7 +1158,7 @@ static void atk40_jumpifaffectedbyprotect(void)
static bool8 JumpIfMoveAffectedByProtect(u16 move)
{
bool8 affected = FALSE;
- if (TARGET_PROTECT_AFFECTED)
+ if (DEFENDER_IS_PROTECTED)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
JumpIfMoveFailed(7, move);
@@ -1233,7 +1170,7 @@ static bool8 JumpIfMoveAffectedByProtect(u16 move)
static bool8 AccuracyCalcHelper(u16 move)
{
- if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBattlerTarget].bankWithSureHit == gBattlerAttacker)
+ if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBattlerTarget].battlerWithSureHit == gBattlerAttacker)
{
JumpIfMoveFailed(7, move);
return TRUE;
@@ -1282,7 +1219,7 @@ static void atk01_accuracycheck(void)
if (move == 0xFFFE || move == 0xFFFF)
{
- if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && move == 0xFFFF && gDisableStructs[gBattlerTarget].bankWithSureHit == gBattlerAttacker)
+ if (gStatuses3[gBattlerTarget] & STATUS3_ALWAYS_HITS && move == 0xFFFF && gDisableStructs[gBattlerTarget].battlerWithSureHit == gBattlerAttacker)
gBattlescriptCurrInstr += 7;
else if (gStatuses3[gBattlerTarget] & (STATUS3_ON_AIR | STATUS3_UNDERGROUND | STATUS3_UNDERWATER))
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
@@ -1391,11 +1328,11 @@ static void atk03_ppreduce(void)
{
switch (gBattleMoves[gCurrentMove].target)
{
- case TARGET_FOES_AND_ALLY:
+ case MOVE_TARGET_FOES_AND_ALLY:
ppToDeduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_ON_FIELD, gBattlerAttacker, ABILITY_PRESSURE, 0, 0);
break;
- case TARGET_BOTH:
- case TARGET_OPPONENTS_FIELD:
+ case MOVE_TARGET_BOTH:
+ case MOVE_TARGET_OPPONENTS_FIELD:
ppToDeduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIZE, gBattlerAttacker, ABILITY_PRESSURE, 0, 0);
break;
default:
@@ -1415,7 +1352,7 @@ static void atk03_ppreduce(void)
gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 0;
if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED)
- && !((gDisableStructs[gBattlerAttacker].unk18_b) & gBitTable[gCurrMovePos]))
+ && !((gDisableStructs[gBattlerAttacker].mimickedMoves) & gBitTable[gCurrMovePos]))
{
gActiveBattler = gBattlerAttacker;
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBattlerAttacker].pp[gCurrMovePos]);
@@ -1450,8 +1387,8 @@ static void atk04_critcalc(void)
+ 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY)
+ 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD);
- if (critChance > 4)
- critChance = 4;
+ if (critChance >= ARRAY_COUNT(sCriticalHitChance))
+ critChance = ARRAY_COUNT(sCriticalHitChance) - 1;
if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR)
&& !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT)
@@ -1466,9 +1403,9 @@ static void atk04_critcalc(void)
static void atk05_damagecalc(void)
{
- u16 side_hword = gSideAffecting[GetBattlerPosition(gBattlerTarget) & 1];
+ u16 sideStatus = gSideStatuses[GET_BATTLER_SIDE(gBattlerTarget)];
gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove,
- side_hword, gDynamicBasePower,
+ sideStatus, gDynamicBasePower,
gBattleStruct->dynamicMoveType, gBattlerAttacker, gBattlerTarget);
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleStruct->dmgMultiplier;
@@ -1480,18 +1417,18 @@ static void atk05_damagecalc(void)
gBattlescriptCurrInstr++;
}
-void AI_CalcDmg(u8 BankAtk, u8 BankDef)
+void AI_CalcDmg(u8 attacker, u8 defender)
{
- u16 side_hword = gSideAffecting[GetBattlerPosition(BankDef) & 1];
- gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[BankAtk], &gBattleMons[BankDef], gCurrentMove,
- side_hword, gDynamicBasePower,
- gBattleStruct->dynamicMoveType, BankAtk, BankDef);
+ u16 sideStatus = gSideStatuses[GET_BATTLER_SIDE(defender)];
+ gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[attacker], &gBattleMons[defender], gCurrentMove,
+ sideStatus, gDynamicBasePower,
+ gBattleStruct->dynamicMoveType, attacker, defender);
gDynamicBasePower = 0;
gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleStruct->dmgMultiplier;
- if (gStatuses3[BankAtk] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
+ if (gStatuses3[attacker] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC)
gBattleMoveDamage *= 2;
- if (gProtectStructs[BankAtk].helpingHand)
+ if (gProtectStructs[attacker].helpingHand)
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
}
@@ -1503,12 +1440,12 @@ static void ModulateDmgByType(u8 multiplier)
switch (multiplier)
{
- case 0: //no effect
+ case TYPE_MUL_NO_EFFECT:
gMoveResultFlags |= MOVE_RESULT_DOESNT_AFFECT_FOE;
gMoveResultFlags &= ~MOVE_RESULT_NOT_VERY_EFFECTIVE;
gMoveResultFlags &= ~MOVE_RESULT_SUPER_EFFECTIVE;
break;
- case 5: //not very effecting
+ case TYPE_MUL_NOT_EFFECTIVE:
if (gBattleMoves[gCurrentMove].power && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
if (gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE)
@@ -1517,7 +1454,7 @@ static void ModulateDmgByType(u8 multiplier)
gMoveResultFlags |= MOVE_RESULT_NOT_VERY_EFFECTIVE;
}
break;
- case 20: //super effective
+ case TYPE_MUL_SUPER_EFFECTIVE:
if (gBattleMoves[gCurrentMove].power && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
if (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE)
@@ -1532,28 +1469,28 @@ static void ModulateDmgByType(u8 multiplier)
static void atk06_typecalc(void)
{
int i = 0;
- u8 move_type;
+ u8 moveType;
if (gCurrentMove != MOVE_STRUGGLE)
{
if (gBattleStruct->dynamicMoveType)
- move_type = gBattleStruct->dynamicMoveType & 0x3F;
+ moveType = gBattleStruct->dynamicMoveType & 0x3F;
else
- move_type = gBattleMoves[gCurrentMove].type;
+ moveType = gBattleMoves[gCurrentMove].type;
//check stab
- if (gBattleMons[gBattlerAttacker].type1 == move_type || gBattleMons[gBattlerAttacker].type2 == move_type)
+ if (gBattleMons[gBattlerAttacker].type1 == moveType || gBattleMons[gBattlerAttacker].type2 == moveType)
{
gBattleMoveDamage = gBattleMoveDamage * 15;
gBattleMoveDamage = gBattleMoveDamage / 10;
}
- if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND)
+ if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND)
{
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
gLastLandedMoves[gBattlerTarget] = 0;
gLastHitByType[gBattlerTarget] = 0;
- gBattleCommunication[6] = move_type;
+ gBattleCommunication[6] = moveType;
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
}
else
@@ -1568,7 +1505,7 @@ static void atk06_typecalc(void)
continue;
}
- else if (gTypeEffectiveness[i] == move_type)
+ else if (gTypeEffectiveness[i] == moveType)
{
//check type1
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type1)
@@ -1601,24 +1538,21 @@ static void atk06_typecalc(void)
static void CheckWonderGuardAndLevitate(void)
{
u8 flags = 0;
- int i = 0;
- u8 move_type;
+ s32 i = 0;
+ u8 moveType;
if (gCurrentMove == MOVE_STRUGGLE || !gBattleMoves[gCurrentMove].power)
return;
- if (gBattleStruct->dynamicMoveType)
- move_type = gBattleStruct->dynamicMoveType & 0x3F;
- else
- move_type = gBattleMoves[gCurrentMove].type;
+ GET_MOVE_TYPE(gCurrentMove, moveType);
- if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND)
+ if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND)
{
- RecordAbilitySetField6(ABILITY_LEVITATE, move_type);
+ RecordAbilitySetField6(ABILITY_LEVITATE, moveType);
return;
}
- while (gTypeEffectiveness[i]!= TYPE_ENDTABLE)
+ while (gTypeEffectiveness[i] != TYPE_ENDTABLE)
{
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
{
@@ -1628,9 +1562,9 @@ static void CheckWonderGuardAndLevitate(void)
continue;
}
- if (gTypeEffectiveness[i] == move_type)
+ if (gTypeEffectiveness[i] == moveType)
{
- //check no effect
+ // check no effect
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type1 && gTypeEffectiveness[i + 2] == 0)
{
gMoveResultFlags |= MOVE_RESULT_DOESNT_AFFECT_FOE;
@@ -1644,7 +1578,7 @@ static void CheckWonderGuardAndLevitate(void)
gProtectStructs[gBattlerAttacker].targetNotAffected = 1;
}
- //check super effective
+ // check super effective
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type1 && gTypeEffectiveness[i + 2] == 20)
flags |= 1;
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type2
@@ -1652,7 +1586,7 @@ static void CheckWonderGuardAndLevitate(void)
&& gTypeEffectiveness[i + 2] == 20)
flags |= 1;
- //check not very effective
+ // check not very effective
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type1 && gTypeEffectiveness[i + 2] == 5)
flags |= 2;
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type2
@@ -1672,7 +1606,7 @@ static void CheckWonderGuardAndLevitate(void)
}
}
-static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) //a literal copy of the ModulateDmgbyType1 with different args...
+static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) // same as ModulateDmgByType except different arguments
{
gBattleMoveDamage = gBattleMoveDamage * multiplier / 10;
if (gBattleMoveDamage == 0 && multiplier != 0)
@@ -1680,12 +1614,12 @@ static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) //a literal c
switch (multiplier)
{
- case 0: //no effect
+ case TYPE_MUL_NO_EFFECT:
*flags |= MOVE_RESULT_DOESNT_AFFECT_FOE;
*flags &= ~MOVE_RESULT_NOT_VERY_EFFECTIVE;
*flags &= ~MOVE_RESULT_SUPER_EFFECTIVE;
break;
- case 5: //not very effecting
+ case TYPE_MUL_NOT_EFFECTIVE:
if (gBattleMoves[move].power && !(*flags & MOVE_RESULT_NO_EFFECT))
{
if (*flags & MOVE_RESULT_SUPER_EFFECTIVE)
@@ -1694,7 +1628,7 @@ static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) //a literal c
*flags |= MOVE_RESULT_NOT_VERY_EFFECTIVE;
}
break;
- case 20: //super effective
+ case TYPE_MUL_SUPER_EFFECTIVE:
if (gBattleMoves[move].power && !(*flags & MOVE_RESULT_NO_EFFECT))
{
if (*flags & MOVE_RESULT_NOT_VERY_EFFECTIVE)
@@ -1706,25 +1640,25 @@ static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) //a literal c
}
}
-u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def)
+u8 TypeCalc(u16 move, u8 attacker, u8 defender)
{
- int i = 0;
+ s32 i = 0;
u8 flags = 0;
- u8 move_type;
+ u8 moveType;
if (move == MOVE_STRUGGLE)
return 0;
- move_type = gBattleMoves[move].type;
+ moveType = gBattleMoves[move].type;
- //check stab
- if (gBattleMons[bank_atk].type1 == move_type || gBattleMons[bank_atk].type2 == move_type)
+ // check stab
+ if (IS_BATTLER_OF_TYPE(attacker, moveType))
{
gBattleMoveDamage = gBattleMoveDamage * 15;
gBattleMoveDamage = gBattleMoveDamage / 10;
}
- if (gBattleMons[bank_def].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND)
+ if (gBattleMons[defender].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND)
{
flags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
}
@@ -1734,28 +1668,28 @@ u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def)
{
if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
{
- if (gBattleMons[bank_def].status2 & STATUS2_FORESIGHT)
+ if (gBattleMons[defender].status2 & STATUS2_FORESIGHT)
break;
i += 3;
continue;
}
- else if (gTypeEffectiveness[i] == move_type)
+ else if (gTypeEffectiveness[i] == moveType)
{
- //check type1
- if (gTypeEffectiveness[i + 1] == gBattleMons[bank_def].type1)
+ // check type1
+ if (gTypeEffectiveness[i + 1] == gBattleMons[defender].type1)
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
- //check type2
- if (gTypeEffectiveness[i + 1] == gBattleMons[bank_def].type2 &&
- gBattleMons[gBattlerTarget /* what the christ */].type1 != gBattleMons[bank_def].type2)
+ // check type2
+ if (gTypeEffectiveness[i + 1] == gBattleMons[defender].type2 &&
+ gBattleMons[gBattlerTarget /* what the christ */].type1 != gBattleMons[defender].type2)
ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
}
i += 3;
}
}
- if (gBattleMons[bank_def].ability == ABILITY_WONDER_GUARD && !(flags & MOVE_RESULT_MISSED) &&
- AttacksThisTurn(bank_atk, move) == 2 &&
+ if (gBattleMons[defender].ability == ABILITY_WONDER_GUARD && !(flags & MOVE_RESULT_MISSED) &&
+ AttacksThisTurn(attacker, move) == 2 &&
(!(flags & MOVE_RESULT_SUPER_EFFECTIVE) || ((flags & (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE)) == (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE))) &&
gBattleMoves[move].power)
{
@@ -1764,41 +1698,43 @@ u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def)
return flags;
}
-u8 AI_TypeCalc(u16 move, u16 species, u8 ability)
+u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility)
{
int i = 0;
u8 flags = 0;
- u8 type1 = gBaseStats[species].type1, type2 = gBaseStats[species].type2, move_type;
+ u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2, moveType;
if (move == MOVE_STRUGGLE)
return 0;
- move_type = gBattleMoves[move].type;
+ moveType = gBattleMoves[move].type;
- if (ability == ABILITY_LEVITATE && move_type == TYPE_GROUND)
+ if (targetAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
+ {
flags = MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE;
+ }
else
{
- while (gTypeEffectiveness[i]!= TYPE_ENDTABLE)
+ while (TYPE_EFFECT_ATK_TYPE(i) != TYPE_ENDTABLE)
{
- if (gTypeEffectiveness[i] == TYPE_FORESIGHT)
+ if (TYPE_EFFECT_ATK_TYPE(i) == TYPE_FORESIGHT)
{
i += 3;
continue;
}
- if (gTypeEffectiveness[i] == move_type)
+ if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
{
- //check type1
- if (gTypeEffectiveness[i + 1] == type1)
- ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
- //check type2
- if (gTypeEffectiveness[i + 1] == type2 && gBattleMons[gBattlerTarget].type1 != type2) //gf you morons, you should check if (type1 != type2)...
- ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags);
+ // check type1
+ if (TYPE_EFFECT_DEF_TYPE(i) == type1)
+ ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
+ // check type2
+ if (TYPE_EFFECT_DEF_TYPE(i) == type2 && gBattleMons[gBattlerTarget].type1 != type2) //gf you morons, you should check if (type1 != type2)...
+ ModulateDmgByType2(TYPE_EFFECT_MULTIPLIER(i), move, &flags);
}
i += 3;
}
}
- if (ability == ABILITY_WONDER_GUARD
+ if (targetAbility == ABILITY_WONDER_GUARD
&& (!(flags & MOVE_RESULT_SUPER_EFFECTIVE) || ((flags & (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE)) == (MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE)))
&& gBattleMoves[move].power)
flags |= MOVE_RESULT_DOESNT_AFFECT_FOE;
@@ -1827,23 +1763,26 @@ void Unused_ApplyRandomDmgMultiplier(void)
static void atk07_adjustnormaldamage(void)
{
- u8 hold_effect, quality;
+ u8 holdEffect, param;
+
ApplyRandomDmgMultiplier();
+
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
{
- hold_effect = gEnigmaBerries[gBattlerTarget].holdEffect, quality = gEnigmaBerries[gBattlerTarget].holdEffectParam;
+ holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
+ param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
}
else
{
- hold_effect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
- quality = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
+ holdEffect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
+ param = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
}
gPotentialItemEffectBattler = gBattlerTarget;
- if (hold_effect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality)
+ if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param)
{
- RecordItemBattle(gBattlerTarget, hold_effect);
+ RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
@@ -1860,9 +1799,8 @@ static void atk07_adjustnormaldamage(void)
if (gProtectStructs[gBattlerTarget].endured)
{
gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
- goto END;
}
- if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ else if (gSpecialStatuses[gBattlerTarget].focusBanded)
{
gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
gLastUsedItem = gBattleMons[gBattlerTarget].item;
@@ -1872,33 +1810,34 @@ static void atk07_adjustnormaldamage(void)
gBattlescriptCurrInstr++;
}
-static void atk08_adjustnormaldamage2(void) //literally the same as 0x7 except it doesn't check for false swipe move effect...
+static void atk08_adjustnormaldamage2(void) // The same as 0x7 except it doesn't check for false swipe move effect.
{
- u8 hold_effect, quality;
+ u8 holdEffect, param;
+
ApplyRandomDmgMultiplier();
+
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
{
- hold_effect = gEnigmaBerries[gBattlerTarget].holdEffect, quality = gEnigmaBerries[gBattlerTarget].holdEffectParam;
+ holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
+ param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
}
else
{
- hold_effect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
- quality = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
+ holdEffect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
+ param = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
}
gPotentialItemEffectBattler = gBattlerTarget;
- if (hold_effect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality)
+ if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param)
{
- RecordItemBattle(gBattlerTarget, hold_effect);
+ RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
goto END;
- if (!gProtectStructs[gBattlerTarget].endured
- && !gSpecialStatuses[gBattlerTarget].focusBanded)
+ if (!gProtectStructs[gBattlerTarget].endured && !gSpecialStatuses[gBattlerTarget].focusBanded)
goto END;
-
if (gBattleMons[gBattlerTarget].hp > gBattleMoveDamage)
goto END;
@@ -1907,9 +1846,8 @@ static void atk08_adjustnormaldamage2(void) //literally the same as 0x7 except i
if (gProtectStructs[gBattlerTarget].endured)
{
gMoveResultFlags |= MOVE_RESULT_FOE_ENDURED;
- goto END;
}
- if (gSpecialStatuses[gBattlerTarget].focusBanded)
+ else if (gSpecialStatuses[gBattlerTarget].focusBanded)
{
gMoveResultFlags |= MOVE_RESULT_FOE_HUNG_ON;
gLastUsedItem = gBattleMons[gBattlerTarget].item;
@@ -1928,12 +1866,12 @@ static void atk09_attackanimation(void)
{
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_Pausex20;
- gBattleStruct->animTurn += 1;
- gBattleStruct->animTargetsHit += 1;
+ gBattleStruct->animTurn++;
+ gBattleStruct->animTargetsHit++;
}
else
{
- if ((gBattleMoves[gCurrentMove].target & TARGET_BOTH || gBattleMoves[gCurrentMove].target & TARGET_FOES_AND_ALLY || gBattleMoves[gCurrentMove].target & TARGET_DEPENDS) && gBattleStruct->animTargetsHit)
+ if ((gBattleMoves[gCurrentMove].target & MOVE_TARGET_BOTH || gBattleMoves[gCurrentMove].target & MOVE_TARGET_FOES_AND_ALLY || gBattleMoves[gCurrentMove].target & TARGET_DEPENDS) && gBattleStruct->animTargetsHit)
{
gBattlescriptCurrInstr++;
return;
@@ -1969,7 +1907,7 @@ static void atk0B_healthbarupdate(void)
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
if (gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBattler].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE))
{
@@ -1996,7 +1934,7 @@ static void atk0B_healthbarupdate(void)
MarkBattlerForControllerExec(gActiveBattler);
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleMoveDamage > 0)
- gBattleResults.unk5_0 = 1;
+ gBattleResults.playerMonWasDamaged = TRUE;
}
}
@@ -2019,7 +1957,7 @@ static void atk0C_datahpupdate(void)
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
if (gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBattler].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE))
{
if (gDisableStructs[gActiveBattler].substituteHP >= gBattleMoveDamage)
@@ -2064,10 +2002,10 @@ static void atk0C_datahpupdate(void)
else
{
gTakenDmg[gActiveBattler] += gBattleMoveDamage;
- if (gBattlescriptCurrInstr[1] == BS_GET_TARGET)
- gTakenDmgBanks[gActiveBattler] = gBattlerAttacker;
+ if (gBattlescriptCurrInstr[1] == BS_TARGET)
+ gTakenDmgByBattler[gActiveBattler] = gBattlerAttacker;
else
- gTakenDmgBanks[gActiveBattler] = gBattlerTarget;
+ gTakenDmgByBattler[gActiveBattler] = gBattlerTarget;
}
if (gBattleMons[gActiveBattler].hp > gBattleMoveDamage)
@@ -2084,11 +2022,11 @@ static void atk0C_datahpupdate(void)
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000))
gSpecialStatuses[gActiveBattler].dmg = gHpDealt;
- if (TYPE_IS_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
+ if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
{
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt;
- if (gBattlescriptCurrInstr[1] == BS_GET_TARGET)
+ if (gBattlescriptCurrInstr[1] == BS_TARGET)
{
gProtectStructs[gActiveBattler].physicalBattlerId = gBattlerAttacker;
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerAttacker;
@@ -2099,11 +2037,11 @@ static void atk0C_datahpupdate(void)
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget;
}
}
- else if (!TYPE_IS_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000))
+ else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000))
{
gProtectStructs[gActiveBattler].specialDmg = gHpDealt;
gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt;
- if (gBattlescriptCurrInstr[1] == BS_GET_TARGET)
+ if (gBattlescriptCurrInstr[1] == BS_TARGET)
{
gProtectStructs[gActiveBattler].specialBattlerId = gBattlerAttacker;
gSpecialStatuses[gActiveBattler].specialBattlerId = gBattlerAttacker;
@@ -2122,7 +2060,7 @@ static void atk0C_datahpupdate(void)
}
else
{
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
if (gSpecialStatuses[gActiveBattler].dmg == 0)
gSpecialStatuses[gActiveBattler].dmg = 0xFFFF;
}
@@ -2150,19 +2088,19 @@ static void atk0E_effectivenesssound(void)
gActiveBattler = gBattlerTarget;
if (!(gMoveResultFlags & MOVE_RESULT_MISSED))
{
- u8 flag = ~MOVE_RESULT_MISSED;
- switch (gMoveResultFlags & flag)
+ switch (gMoveResultFlags & (u8)(~(MOVE_RESULT_MISSED)))
{
case MOVE_RESULT_SUPER_EFFECTIVE:
- BtlController_EmitPlaySE(0, 14);
+ BtlController_EmitPlaySE(0, SE_KOUKA_H);
MarkBattlerForControllerExec(gActiveBattler);
break;
case MOVE_RESULT_NOT_VERY_EFFECTIVE:
- BtlController_EmitPlaySE(0, 12);
+ BtlController_EmitPlaySE(0, SE_KOUKA_L);
MarkBattlerForControllerExec(gActiveBattler);
break;
case MOVE_RESULT_DOESNT_AFFECT_FOE:
case MOVE_RESULT_FAILED:
+ // no sound
break;
case MOVE_RESULT_FOE_ENDURED:
case MOVE_RESULT_ONE_HIT_KO:
@@ -2170,17 +2108,17 @@ static void atk0E_effectivenesssound(void)
default:
if (gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE)
{
- BtlController_EmitPlaySE(0, 14);
+ BtlController_EmitPlaySE(0, SE_KOUKA_H);
MarkBattlerForControllerExec(gActiveBattler);
}
else if (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE)
{
- BtlController_EmitPlaySE(0, 12);
+ BtlController_EmitPlaySE(0, SE_KOUKA_L);
MarkBattlerForControllerExec(gActiveBattler);
}
else if (!(gMoveResultFlags & (MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED)))
{
- BtlController_EmitPlaySE(0, 13);
+ BtlController_EmitPlaySE(0, SE_KOUKA_M);
MarkBattlerForControllerExec(gActiveBattler);
}
break;
@@ -2292,8 +2230,10 @@ static void atk10_printstring(void)
static void atk11_printselectionstring(void)
{
gActiveBattler = gBattlerAttacker;
+
BtlController_EmitPrintSelectionString(0, T2_READ_16(gBattlescriptCurrInstr + 1));
MarkBattlerForControllerExec(gActiveBattler);
+
gBattlescriptCurrInstr += 3;
gBattleCommunication[MSG_DISPLAY] = 1;
}
@@ -2308,8 +2248,8 @@ static void atk12_waitmessage(void)
}
else
{
- u16 to_wait = T2_READ_16(gBattlescriptCurrInstr + 1);
- if (++gPauseCounterBattle >= to_wait)
+ u16 toWait = T2_READ_16(gBattlescriptCurrInstr + 1);
+ if (++gPauseCounterBattle >= toWait)
{
gPauseCounterBattle = 0;
gBattlescriptCurrInstr += 3;
@@ -2345,12 +2285,12 @@ static void atk14_printselectionstringfromtable(void)
}
}
-u8 BankGetTurnOrder(u8 bank)
+u8 GetBattlerTurnOrderNum(u8 battlerId)
{
int i;
for (i = 0; i < gBattlersCount; i++)
{
- if (gBanksByTurnOrder[i] == bank)
+ if (gBattlerByTurnOrder[i] == battlerId)
break;
}
return i;
@@ -2383,7 +2323,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
!primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 9)
{gBattlescriptCurrInstr++; return;}
- if (gSideAffecting[GetBattlerPosition(gEffectBattler) & 1] & SIDE_STATUS_SAFEGUARD && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) &&
+ if (gSideStatuses[GetBattlerPosition(gEffectBattler) & 1] & SIDE_STATUS_SAFEGUARD && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) &&
!primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 7)
{gBattlescriptCurrInstr++; return;}
@@ -2398,7 +2338,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
{
switch (sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]])
{
- case STATUS_SLEEP:
+ case STATUS1_SLEEP:
//check active uproar
if (gBattleMons[gEffectBattler].ability != ABILITY_SOUNDPROOF)
{
@@ -2414,7 +2354,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
CancelMultiTurnMoves(gEffectBattler);
StatusChanged = 1;
break;
- case STATUS_POISON:
+ case STATUS1_POISON:
if (gBattleMons[gEffectBattler].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80))
{
gLastUsedAbility = ABILITY_IMMUNITY;
@@ -2448,7 +2388,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
StatusChanged = 1;
break;
- case STATUS_BURN:
+ case STATUS1_BURN:
if (gBattleMons[gEffectBattler].ability == ABILITY_WATER_VEIL && (primary == 1 || certain == 0x80))
{
gLastUsedAbility = ABILITY_WATER_VEIL;
@@ -2479,7 +2419,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
if (gBattleMons[gEffectBattler].status1 == 0) {break;}
StatusChanged = 1;
break;
- case STATUS_FREEZE:
+ case STATUS1_FREEZE:
if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY) {NoSunCanFreeze = 0;}
if (gBattleMons[gEffectBattler].type1 == TYPE_ICE) {break;}
if (gBattleMons[gEffectBattler].type2 == TYPE_ICE) {break;}
@@ -2490,7 +2430,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
CancelMultiTurnMoves(gEffectBattler);
StatusChanged = 1;
break;
- case STATUS_PARALYSIS:
+ case STATUS1_PARALYSIS:
if (gBattleMons[gEffectBattler].ability == ABILITY_LIMBER)
{
if ((primary == 1 || certain == 0x80))
@@ -2514,7 +2454,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
if (gBattleMons[gEffectBattler].status1) {break;}
StatusChanged = 1;
break;
- case STATUS_TOXIC_POISON:
+ case STATUS1_TOXIC_POISON:
if (gBattleMons[gEffectBattler].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80))
{
gLastUsedAbility = ABILITY_IMMUNITY;
@@ -2557,7 +2497,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
if (StatusChanged == 1)
{
BattleScriptPush(gBattlescriptCurrInstr + 1);
- if (sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS_SLEEP)
+ if (sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS1_SLEEP)
gBattleMons[gEffectBattler].status1 |= ((Random() & 3) + 2);
else
gBattleMons[gEffectBattler].status1 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]];
@@ -2615,7 +2555,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
}
else
{
- if (BankGetTurnOrder(gEffectBattler) > gCurrentTurnActionNumber)
+ if (GetBattlerTurnOrderNum(gEffectBattler) > gCurrentTurnActionNumber)
gBattleMons[gEffectBattler].status2 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]];
gBattlescriptCurrInstr++; return;
}
@@ -2781,9 +2721,9 @@ void SetMoveEffect(bool8 primary, u8 certainArg)
gBattlescriptCurrInstr = BattleScript_RapidSpinAway;
return;
case 36: //paralysis removal
- if (gBattleMons[gBattlerTarget].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[gBattlerTarget].status1 & STATUS1_PARALYSIS)
{
- gBattleMons[gBattlerTarget].status1 &= ~(STATUS_PARALYSIS);
+ gBattleMons[gBattlerTarget].status1 &= ~(STATUS1_PARALYSIS);
gActiveBattler = gBattlerTarget;
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBattlerTarget].status1);
MarkBattlerForControllerExec(gActiveBattler);
@@ -2929,7 +2869,7 @@ _0801E48A:\n\
mov r1, r8\n\
ldrb r0, [r1]\n\
bl GetBattlerPosition\n\
- ldr r2, _0801E554 @ =gSideAffecting\n\
+ ldr r2, _0801E554 @ =gSideStatuses\n\
movs r1, 0x1\n\
ands r1, r0\n\
lsls r1, 1\n\
@@ -3023,7 +2963,7 @@ _0801E544: .4byte gBattlerAttacker\n\
_0801E548: .4byte 0x00016003\n\
_0801E54C: .4byte gBattleMons\n\
_0801E550: .4byte gHitMarker\n\
-_0801E554: .4byte gSideAffecting\n\
+_0801E554: .4byte gSideStatuses\n\
_0801E558: .4byte gBattleCommunication\n\
_0801E55C: .4byte sStatusFlagsForMoveEffects\n\
_0801E560:\n\
@@ -3957,7 +3897,7 @@ _0801ED10: .4byte gBattlescriptCurrInstr\n\
_0801ED14: .4byte BattleScript_FlinchPrevention\n\
_0801ED18:\n\
adds r0, r2, 0\n\
- bl BankGetTurnOrder\n\
+ bl GetBattlerTurnOrderNum\n\
ldr r1, _0801ED54 @ =gCurrentTurnActionNumber\n\
lsls r0, 24\n\
lsrs r0, 24\n\
@@ -5017,27 +4957,31 @@ _0801F610: .4byte BattleScript_SAtkDown2\n\
static void atk15_seteffectwithchance(void)
{
- u32 PercentChance;
+ u32 percentChance;
if (gBattleMons[gBattlerAttacker].ability == ABILITY_SERENE_GRACE)
- PercentChance = gBattleMoves[gCurrentMove].secondaryEffectChance * 2;
+ percentChance = gBattleMoves[gCurrentMove].secondaryEffectChance * 2;
else
- PercentChance = gBattleMoves[gCurrentMove].secondaryEffectChance;
+ percentChance = gBattleMoves[gCurrentMove].secondaryEffectChance;
if (DEBUG && (gUnknown_02023A14_50 & 4)
- && !(gBattleCommunication[MOVE_EFFECT_BYTE] & 0x80) && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
+ && !(gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_CERTAIN)
+ && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
SetMoveEffect(0, 0);
}
- else if ((gBattleCommunication[MOVE_EFFECT_BYTE] & 0x80) && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
+ else if ((gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_CERTAIN)
+ && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
- gBattleCommunication[MOVE_EFFECT_BYTE] &= 0x7F;
- SetMoveEffect(0, 0x80);
+ gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_CERTAIN);
+ SetMoveEffect(0, MOVE_EFFECT_CERTAIN);
}
- else if (Random() % 100 <= PercentChance && gBattleCommunication[MOVE_EFFECT_BYTE] != 0 && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
+ else if (Random() % 100 <= percentChance // Random() % 100 < percentChance in Emerald
+ && gBattleCommunication[MOVE_EFFECT_BYTE]
+ && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
{
- if (PercentChance >= 100)
- SetMoveEffect(0, 0x80);
+ if (percentChance >= 100)
+ SetMoveEffect(0, MOVE_EFFECT_CERTAIN);
else
SetMoveEffect(0, 0);
}
@@ -5062,8 +5006,9 @@ static void atk17_seteffectsecondary(void)
static void atk18_clearstatusfromeffect(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
- if (gBattleCommunication[MOVE_EFFECT_BYTE] <= 6)
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
+
+ if (gBattleCommunication[MOVE_EFFECT_BYTE] <= MOVE_EFFECT_TOXIC)
gBattleMons[gActiveBattler].status1 &= (~sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]);
else
gBattleMons[gActiveBattler].status2 &= (~sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]);
@@ -5075,18 +5020,18 @@ static void atk18_clearstatusfromeffect(void)
static void atk19_tryfaintmon(void)
{
- u8 *r4;
+ const u8 *BS_ptr;
if (gBattlescriptCurrInstr[2] != 0)
{
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
if (gHitMarker & HITMARKER_FAINTED(gActiveBattler))
{
- r4 = T1_READ_PTR(gBattlescriptCurrInstr + 3);
+ BS_ptr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
BattleScriptPop();
- gBattlescriptCurrInstr = r4;
- gSideAffecting[GetBattlerSide(gActiveBattler)] &= ~SIDE_STATUS_SPIKES_DAMAGED;
+ gBattlescriptCurrInstr = BS_ptr;
+ gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED);
}
else
{
@@ -5095,41 +5040,41 @@ static void atk19_tryfaintmon(void)
}
else
{
- u8 bank;
+ u8 battlerId;
if (gBattlescriptCurrInstr[1] == 1)
{
gActiveBattler = gBattlerAttacker;
- bank = gBattlerTarget;
- r4 = BattleScript_FaintAttacker;
+ battlerId = gBattlerTarget;
+ BS_ptr = BattleScript_FaintAttacker;
}
else
{
gActiveBattler = gBattlerTarget;
- bank = gBattlerAttacker;
- r4 = BattleScript_FaintTarget;
+ battlerId = gBattlerAttacker;
+ BS_ptr = BattleScript_FaintTarget;
}
if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler])
&& gBattleMons[gActiveBattler].hp == 0)
{
- ewram160ACarr2(0, bank) = 0;
- ewram160ACarr2(1, bank) = 0;
- ewram16100arr2(0, bank) = 0;
- ewram16100arr2(1, bank) = 0;
- ewram16100arr2(2, bank) = 0;
- ewram16100arr2(3, bank) = 0;
+ ewram160ACarr2(0, battlerId) = 0;
+ ewram160ACarr2(1, battlerId) = 0;
+ ewram16100arr2(0, battlerId) = 0;
+ ewram16100arr2(1, battlerId) = 0;
+ ewram16100arr2(2, battlerId) = 0;
+ ewram16100arr2(3, battlerId) = 0;
gHitMarker |= HITMARKER_FAINTED(gActiveBattler);
BattleScriptPush(gBattlescriptCurrInstr + 7);
- gBattlescriptCurrInstr = r4;
- if (GetBattlerSide(gActiveBattler) == 0)
+ gBattlescriptCurrInstr = BS_ptr;
+ if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
{
gHitMarker |= HITMARKER_x400000;
if (gBattleResults.playerFaintCounter < 0xFF)
gBattleResults.playerFaintCounter++;
- if (gBattleMons[bank].level > gBattleMons[gActiveBattler].level)
+ if (gBattleMons[battlerId].level > gBattleMons[gActiveBattler].level)
{
- if (gBattleMons[bank].level - gBattleMons[gActiveBattler].level > 29)
+ if (gBattleMons[battlerId].level - gBattleMons[gActiveBattler].level > 29)
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], FRIENDSHIP_EVENT_FAINT_LARGE);
else
AdjustFriendship(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], FRIENDSHIP_EVENT_FAINT_SMALL);
@@ -5144,7 +5089,7 @@ static void atk19_tryfaintmon(void)
if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBattlerAttacker].hp != 0)
{
BattleScriptPush(gBattlescriptCurrInstr);
- gBattleMoveDamage = gBattleMons[bank].hp;
+ gBattleMoveDamage = gBattleMons[battlerId].hp;
gBattlescriptCurrInstr = BattleScript_DestinyBondTakesLife;
}
if ((gStatuses3[gBattlerTarget] & STATUS3_GRUDGE)
@@ -5157,7 +5102,7 @@ static void atk19_tryfaintmon(void)
gBattleMons[gBattlerAttacker].pp[moveIndex] = 0;
BattleScriptPush(gBattlescriptCurrInstr);
- gBattlescriptCurrInstr = BattleScript_SelectingImprisionedMoveInPalace;
+ gBattlescriptCurrInstr = BattleScript_GrudgeTakesPp;
gActiveBattler = gBattlerAttacker;
BtlController_EmitSetMonData(0, moveIndex + 9, 0, 1, &gBattleMons[gActiveBattler].pp[moveIndex]);
MarkBattlerForControllerExec(gActiveBattler);
@@ -5180,7 +5125,7 @@ static void atk1A_dofaintanimation(void)
{
if (gBattleControllerExecFlags == 0)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
BtlController_EmitFaintAnimation(0);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -5192,7 +5137,7 @@ static void atk1B_cleareffectsonfaint(void)
//Clears things like attraction or trapping to other banks
if (gBattleControllerExecFlags == 0)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
gBattleMons[gActiveBattler].status1 = 0;
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 0x4, &gBattleMons[gActiveBattler].status1);
MarkBattlerForControllerExec(gActiveBattler);
@@ -5203,7 +5148,7 @@ static void atk1B_cleareffectsonfaint(void)
static void atk1C_jumpifstatus(void)
{
- u8 bank = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ u8 bank = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
void* jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 6);
if (gBattleMons[bank].status1 & flags && gBattleMons[bank].hp)
@@ -5214,10 +5159,10 @@ static void atk1C_jumpifstatus(void)
static void atk1D_jumpifstatus2(void)
{
- u8 bank = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ u8 battlerId = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
void* jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 6);
- if (gBattleMons[bank].status2 & flags && gBattleMons[bank].hp)
+ if (gBattleMons[battlerId].status2 & flags && gBattleMons[battlerId].hp)
gBattlescriptCurrInstr = jump_loc;
else
gBattlescriptCurrInstr += 10;
@@ -5225,44 +5170,44 @@ static void atk1D_jumpifstatus2(void)
static void atk1E_jumpifability(void)
{
- u8 bank;
- u8 ability = T2_READ_8(gBattlescriptCurrInstr + 2);
- void* jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 3);
+ u8 battlerId;
+ u8 ability = gBattlescriptCurrInstr[2];
+ void* jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3);
if (T2_READ_8(gBattlescriptCurrInstr + 1) == 8)
{
- bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_BANK_SIDE, gBattlerAttacker, ability, 0, 0);
- if (bank)
+ battlerId = AbilityBattleEffects(ABILITYEFFECT_CHECK_BANK_SIDE, gBattlerAttacker, ability, 0, 0);
+ if (battlerId)
{
gLastUsedAbility = ability;
- gBattlescriptCurrInstr = jump_loc;
- RecordAbilityBattle(bank -1, gLastUsedAbility);
- ewram160F8 = bank - 1;
+ gBattlescriptCurrInstr = jumpPtr;
+ RecordAbilityBattle(battlerId -1, gLastUsedAbility);
+ ewram160F8 = battlerId - 1;
}
else
gBattlescriptCurrInstr += 7;
}
else if (T2_READ_8(gBattlescriptCurrInstr + 1) == 9)
{
- bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gBattlerAttacker, ability, 0, 0);
- if (bank)
+ battlerId = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gBattlerAttacker, ability, 0, 0);
+ if (battlerId)
{
gLastUsedAbility = ability;
- gBattlescriptCurrInstr = jump_loc;
- RecordAbilityBattle(bank - 1, gLastUsedAbility);
- ewram160F8 = bank - 1;
+ gBattlescriptCurrInstr = jumpPtr;
+ RecordAbilityBattle(battlerId - 1, gLastUsedAbility);
+ ewram160F8 = battlerId - 1;
}
else
gBattlescriptCurrInstr += 7;
}
else
{
- bank = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
- if (gBattleMons[bank].ability == ability)
+ battlerId = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
+ if (gBattleMons[battlerId].ability == ability)
{
gLastUsedAbility = ability;
- gBattlescriptCurrInstr = jump_loc;
- RecordAbilityBattle(bank, gLastUsedAbility);
- ewram160F8 = bank;
+ gBattlescriptCurrInstr = jumpPtr;
+ RecordAbilityBattle(battlerId, gLastUsedAbility);
+ ewram160F8 = battlerId;
}
else
gBattlescriptCurrInstr += 7;
@@ -5282,7 +5227,7 @@ static void atk1F_jumpifsideaffecting(void)
flags = T2_READ_16(gBattlescriptCurrInstr + 2);
jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 4);
- if (gSideAffecting[side] & flags)
+ if (gSideStatuses[side] & flags)
gBattlescriptCurrInstr = jump_loc;
else
gBattlescriptCurrInstr += 8;
@@ -5291,8 +5236,8 @@ static void atk1F_jumpifsideaffecting(void)
static void atk20_jumpifstat(void)
{
u8 ret = 0;
- u8 bank = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
- u8 value = gBattleMons[bank].statStages[T2_READ_8(gBattlescriptCurrInstr + 3)];
+ u8 battlerId = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
+ u8 value = gBattleMons[battlerId].statStages[T2_READ_8(gBattlescriptCurrInstr + 3)];
switch (T2_READ_8(gBattlescriptCurrInstr + 2))
{
case CMP_EQUAL:
@@ -5331,7 +5276,7 @@ static void atk21_jumpifstatus3condition(void)
u32 flags;
void* jump_loc;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
flags = T2_READ_32(gBattlescriptCurrInstr + 2);
jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 7);
if (T2_READ_8(gBattlescriptCurrInstr + 6))
@@ -5350,13 +5295,13 @@ static void atk21_jumpifstatus3condition(void)
}
}
-static void atk22_jumpiftype(void) //u8 bank, u8 type, *ptr
+static void atk22_jumpiftype(void) //u8 battlerId, u8 type, *ptr
{
- u8 bank = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ u8 battlerId = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
u8 type = T2_READ_8(gBattlescriptCurrInstr + 2);
void* jump_loc = T2_READ_PTR(gBattlescriptCurrInstr + 3);
- if (gBattleMons[bank].type1 == type || gBattleMons[bank].type2 == type)
+ if (gBattleMons[battlerId].type1 == type || gBattleMons[battlerId].type2 == type)
gBattlescriptCurrInstr = jump_loc;
else
gBattlescriptCurrInstr += 7;
@@ -5372,7 +5317,7 @@ static void atk23_getexp(void)
s32 viaExpShare = 0;
u16* exp = &gBattleStruct->exp;
- gBank1 = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gBank1 = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
sentIn = gSentPokesToOpponent[(gBank1 & 2) >> 1];
switch (gBattleStruct->getexpStateTracker)
@@ -5436,14 +5381,14 @@ static void atk23_getexp(void)
}
gBattleStruct->getexpStateTracker++;
- gBattleStruct->expGetterID = 0;
+ gBattleStruct->expGetterMonId = 0;
gBattleStruct->sentInPokes = sentIn;
}
// fall through
case 2: // set exp value to the poke in expgetter_id and print message
if (gBattleControllerExecFlags == 0)
{
- item = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_HELD_ITEM);
+ item = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HELD_ITEM);
if (item == ITEM_ENIGMA_BERRY)
holdEffect = gSaveBlock1.enigmaBerry.holdEffect;
@@ -5456,7 +5401,7 @@ static void atk23_getexp(void)
gBattleStruct->getexpStateTracker = 5;
gBattleMoveDamage = 0; // used for exp
}
- else if (GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_LEVEL) == 100)
+ else if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL) == 100)
{
gBattleStruct->sentInPokes >>= 1;
gBattleStruct->getexpStateTracker = 5;
@@ -5468,11 +5413,11 @@ static void atk23_getexp(void)
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) && gBattleMons[0].hp && !gBattleStruct->wildVictorySong)
{
BattleStopLowHpSound();
- PlayBGM(0x161);
+ PlayBGM(MUS_KACHI2);
gBattleStruct->wildVictorySong++;
}
- if (GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_HP))
+ if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP))
{
if (gBattleStruct->sentInPokes & 1)
gBattleMoveDamage = *exp;
@@ -5486,7 +5431,7 @@ static void atk23_getexp(void)
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
gBattleMoveDamage = (gBattleMoveDamage * 150) / 100;
- if (IsTradedMon(&gPlayerParty[gBattleStruct->expGetterID]))
+ if (IsTradedMon(&gPlayerParty[gBattleStruct->expGetterMonId]))
{
gBattleMoveDamage = (gBattleMoveDamage * 150) / 100;
i = 0x14A;
@@ -5499,28 +5444,28 @@ static void atk23_getexp(void)
// get exp getter bank
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
- if (!(gBattlerPartyIndexes[2] != gBattleStruct->expGetterID) && !(gAbsentBattlerFlags & gBitTable[2]))
- gBattleStruct->expGetterBank = 2;
+ if (!(gBattlerPartyIndexes[2] != gBattleStruct->expGetterMonId) && !(gAbsentBattlerFlags & gBitTable[2]))
+ gBattleStruct->expGetterBattlerId = 2;
else
{
if (!(gAbsentBattlerFlags & gBitTable[0]))
- gBattleStruct->expGetterBank = 0;
+ gBattleStruct->expGetterBattlerId = 0;
else
- gBattleStruct->expGetterBank = 2;
+ gBattleStruct->expGetterBattlerId = 2;
}
}
else
- gBattleStruct->expGetterBank = 0;
+ gBattleStruct->expGetterBattlerId = 0;
- PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattleStruct->expGetterBank, gBattleStruct->expGetterID)
+ PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattleStruct->expGetterBattlerId, gBattleStruct->expGetterMonId)
// buffer 'gained' or 'gained a boosted'
PREPARE_STRING_BUFFER(gBattleTextBuff2, i)
PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff3, 5, gBattleMoveDamage)
- PrepareStringBattle(STRINGID_PKMNGAINEDEXP, gBattleStruct->expGetterBank);
- MonGainEVs(&gPlayerParty[gBattleStruct->expGetterID], gBattleMons[gBank1].species);
+ PrepareStringBattle(STRINGID_PKMNGAINEDEXP, gBattleStruct->expGetterBattlerId);
+ MonGainEVs(&gPlayerParty[gBattleStruct->expGetterMonId], gBattleMons[gBank1].species);
}
gBattleStruct->sentInPokes >>= 1;
gBattleStruct->getexpStateTracker++;
@@ -5530,19 +5475,19 @@ static void atk23_getexp(void)
case 3: // Set stats and give exp
if (gBattleControllerExecFlags == 0)
{
- gBattleBufferB[gBattleStruct->expGetterBank][0] = 0;
- if (GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_HP) && GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_LEVEL) != 100)
+ gBattleBufferB[gBattleStruct->expGetterBattlerId][0] = 0;
+ if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP) && GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL) != 100)
{
- gBattleResources_statsBeforeLvlUp->hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_MAX_HP);
- gBattleResources_statsBeforeLvlUp->atk = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_ATK);
- gBattleResources_statsBeforeLvlUp->def = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_DEF);
- gBattleResources_statsBeforeLvlUp->spd = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPEED);
- gBattleResources_statsBeforeLvlUp->spAtk = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPATK);
- gBattleResources_statsBeforeLvlUp->spDef = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPDEF);
+ gBattleResources_statsBeforeLvlUp->hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_MAX_HP);
+ gBattleResources_statsBeforeLvlUp->atk = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_ATK);
+ gBattleResources_statsBeforeLvlUp->def = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_DEF);
+ gBattleResources_statsBeforeLvlUp->spd = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED);
+ gBattleResources_statsBeforeLvlUp->spAtk = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPATK);
+ gBattleResources_statsBeforeLvlUp->spDef = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPDEF);
- gActiveBattler = gBattleStruct->expGetterBank;
+ gActiveBattler = gBattleStruct->expGetterBattlerId;
- BtlController_EmitExpUpdate(0, gBattleStruct->expGetterID, gBattleMoveDamage);
+ BtlController_EmitExpUpdate(0, gBattleStruct->expGetterMonId, gBattleMoveDamage);
MarkBattlerForControllerExec(gActiveBattler);
}
gBattleStruct->getexpStateTracker++;
@@ -5551,49 +5496,49 @@ static void atk23_getexp(void)
case 4: // lvl up if necessary
if (gBattleControllerExecFlags == 0)
{
- gActiveBattler = gBattleStruct->expGetterBank;
+ gActiveBattler = gBattleStruct->expGetterBattlerId;
if (gBattleBufferB[gActiveBattler][0] == CONTROLLER_TWORETURNVALUES
&& gBattleBufferB[gActiveBattler][1] == RET_VALUE_LEVELLED_UP)
{
- if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterID)
+ if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterMonId)
HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler);
- PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBattler, gBattleStruct->expGetterID)
+ PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBattler, gBattleStruct->expGetterMonId)
- PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff2, 3, GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_LEVEL))
+ PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff2, 3, GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL))
BattleScriptPushCursor();
- gLeveledUpInBattle |= gBitTable[gBattleStruct->expGetterID];
+ gLeveledUpInBattle |= gBitTable[gBattleStruct->expGetterMonId];
gBattlescriptCurrInstr = BattleScript_LevelUp;
gBattleMoveDamage = (gBattleBufferB[gActiveBattler][2] | (gBattleBufferB[gActiveBattler][3] << 8));
- AdjustFriendship(&gPlayerParty[gBattleStruct->expGetterID], FRIENDSHIP_EVENT_GROW_LEVEL);
+ AdjustFriendship(&gPlayerParty[gBattleStruct->expGetterMonId], FRIENDSHIP_EVENT_GROW_LEVEL);
// update battle mon structure after level up
- if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterID && gBattleMons[0].hp)
+ if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId && gBattleMons[0].hp)
{
- gBattleMons[0].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_LEVEL);
- gBattleMons[0].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_HP);
- gBattleMons[0].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_MAX_HP);
- gBattleMons[0].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_ATK);
- gBattleMons[0].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_DEF);
+ gBattleMons[0].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL);
+ gBattleMons[0].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP);
+ gBattleMons[0].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_MAX_HP);
+ gBattleMons[0].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_ATK);
+ gBattleMons[0].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_DEF);
// Why is this duplicated?
- gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPEED);
- gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPEED);
- gBattleMons[0].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPATK);
- gBattleMons[0].spDefense = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPDEF);
+ gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED);
+ gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED);
+ gBattleMons[0].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPATK);
+ gBattleMons[0].spDefense = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPDEF);
}
// What is else if?
- if (gBattlerPartyIndexes[2] == gBattleStruct->expGetterID && gBattleMons[2].hp && (gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
+ if (gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId && gBattleMons[2].hp && (gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
{
- gBattleMons[2].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_LEVEL);
- gBattleMons[2].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_HP);
- gBattleMons[2].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_MAX_HP);
- gBattleMons[2].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_ATK);
- gBattleMons[2].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_DEF);
+ gBattleMons[2].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_LEVEL);
+ gBattleMons[2].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP);
+ gBattleMons[2].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_MAX_HP);
+ gBattleMons[2].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_ATK);
+ gBattleMons[2].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_DEF);
// Duplicated again, but this time there's no Sp Defense
- gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPEED);
- gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPEED);
- gBattleMons[2].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_SPATK);
+ gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED);
+ gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPEED);
+ gBattleMons[2].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_SPATK);
}
}
else
@@ -5608,8 +5553,8 @@ static void atk23_getexp(void)
gBattleStruct->getexpStateTracker = 3;
else
{
- gBattleStruct->expGetterID++;
- if (gBattleStruct->expGetterID <= 5)
+ gBattleStruct->expGetterMonId++;
+ if (gBattleStruct->expGetterMonId <= 5)
gBattleStruct->getexpStateTracker = 2; // loop again
else
gBattleStruct->getexpStateTracker = 6; // we're done
@@ -5641,7 +5586,7 @@ static void atk24(void)
}
if (HP_count == 0)
- gBattleOutcome |= BATTLE_LOST;
+ gBattleOutcome |= B_OUTCOME_LOST;
for (HP_count = 0, i = 0; i < 6; i++)
{
@@ -5650,7 +5595,7 @@ static void atk24(void)
}
if (!HP_count)
- gBattleOutcome |= BATTLE_WON;
+ gBattleOutcome |= B_OUTCOME_WON;
if (!gBattleOutcome && (gBattleTypeFlags & BATTLE_TYPE_LINK))
{
@@ -6271,7 +6216,7 @@ static void atk41_call(void)
static void atk42_jumpiftype2(void) //u8 bank, u8 type, *ptr
{
- u8 bank = GetBattleBank(T1_READ_8(gBattlescriptCurrInstr + 1));
+ u8 bank = GetBattlerForBattleScript(T1_READ_8(gBattlescriptCurrInstr + 1));
if (T1_READ_8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type1 || T1_READ_8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type2)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
@@ -6296,7 +6241,7 @@ static void atk45_playanimation(void)
{
const u16* argumentPtr;
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3);
if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE
@@ -6338,7 +6283,7 @@ static void atk46_playanimation2(void) // animation Id is stored in the first po
const u16* argumentPtr;
const u8* animationIdPtr;
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
animationIdPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2);
argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6);
@@ -6407,7 +6352,7 @@ static void atk48_playstatchangeanimation(void)
u32 stats_to_check;
u8 arg3;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
stats_to_check = T2_READ_8(gBattlescriptCurrInstr + 2);
arg3 = T2_READ_8(gBattlescriptCurrInstr + 3);
if (arg3 & 1)
@@ -6499,7 +6444,7 @@ push {r4-r7,lr}\n\
ldr r0, [r5]\n\
ldrb r0, [r0, 0x1]\n\
str r3, [sp]\n\
- bl GetBattleBank\n\
+ bl GetBattlerForBattleScript\n\
ldr r2, _08021674 @ =gActiveBattler\n\
strb r0, [r2]\n\
ldr r0, [r5]\n\
@@ -6815,12 +6760,12 @@ void atk49_moveend(void)
gBattleStruct->cmd49StateTracker++;
break;
case ATK49_DEFROST: // defrosting check
- if (gBattleMons[gBattlerTarget].status1 & STATUS_FREEZE
+ if (gBattleMons[gBattlerTarget].status1 & STATUS1_FREEZE
&& gBattleMons[gBattlerTarget].hp && gBattlerAttacker != gBattlerTarget
&& gSpecialStatuses[gBattlerTarget].specialDmg
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && moveType == TYPE_FIRE)
{
- gBattleMons[gBattlerTarget].status1 &= ~(STATUS_FREEZE);
+ gBattleMons[gBattlerTarget].status1 &= ~(STATUS1_FREEZE);
gActiveBattler = gBattlerTarget;
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBattlerTarget].status1);
MarkBattlerForControllerExec(gActiveBattler);
@@ -6939,12 +6884,12 @@ void atk49_moveend(void)
gBattleStruct->cmd49StateTracker++;
break;
case ATK49_UPDATE_LAST_MOVES:
- if (gHitMarker & HITMARKER_PURSUIT_TRAP)
+ if (gHitMarker & HITMARKER_SWAP_ATTACKER_TARGET)
{
gActiveBattler = gBattlerAttacker;
gBattlerAttacker = gBattlerTarget;
gBattlerTarget = gActiveBattler;
- gHitMarker &= ~(HITMARKER_PURSUIT_TRAP);
+ gHitMarker &= ~(HITMARKER_SWAP_ATTACKER_TARGET);
}
if (gBattleMoves[gChosenMove].effect != 0x7F || (gMoveResultFlags & 0x29))
@@ -6956,12 +6901,12 @@ void atk49_moveend(void)
{
if (gHitMarker & HITMARKER_OBEYS)
{
- gLastUsedMove[gBattlerAttacker] = gChosenMove;
+ gLastMoves[gBattlerAttacker] = gChosenMove;
gUnknown_02024C4C[gBattlerAttacker] = gCurrentMove;
}
else
{
- gLastUsedMove[gBattlerAttacker] = 0xFFFF;
+ gLastMoves[gBattlerAttacker] = 0xFFFF;
gUnknown_02024C4C[gBattlerAttacker] = 0xFFFF;
}
@@ -7053,14 +6998,14 @@ static void atk4A_typecalc2(void)
{
u8 flags = 0;
int i = 0;
- u8 move_type = gBattleMoves[gCurrentMove].type;
+ u8 moveType = gBattleMoves[gCurrentMove].type;
- if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND)
+ if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND)
{
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
gLastLandedMoves[gBattlerTarget] = 0;
- gBattleCommunication[6] = move_type;
+ gBattleCommunication[6] = moveType;
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
}
else
@@ -7073,7 +7018,7 @@ static void atk4A_typecalc2(void)
else {i += 3; continue;}
}
- if (gTypeEffectiveness[i] == move_type)
+ if (gTypeEffectiveness[i] == moveType)
{
//check type1
if (gTypeEffectiveness[i + 1] == gBattleMons[gBattlerTarget].type1)
@@ -7140,7 +7085,7 @@ static void atk4C_getswitchedmondata(void)
if (gBattleControllerExecFlags)
return;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
gBattlerPartyIndexes[gActiveBattler] = ewram16068arr(gActiveBattler);
@@ -7158,7 +7103,7 @@ static void atk4D_switchindataupdate(void)
if (gBattleControllerExecFlags)
return;
- gActiveBattler = GetBattleBank(gBattlescriptCurrInstr[1]);
+ gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
oldData = gBattleMons[gActiveBattler];
monData = (u8*)(&gBattleMons[gActiveBattler]);
@@ -7201,7 +7146,7 @@ static void atk4E_switchinanim(void)
if (gBattleControllerExecFlags)
return;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
if (GetBattlerSide(gActiveBattler) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER)))
{
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), 2);
@@ -7218,7 +7163,7 @@ static void atk4F_jumpifcantswitch(void)
register struct Pokemon *party;
u8 r7;
//0x80 byte is used as a way of telling the function whether to not check status2/status3
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1) & 0x7F);
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1) & 0x7F);
if (!(T2_READ_8(gBattlescriptCurrInstr + 1) & 0x80)
&& ((gBattleMons[gActiveBattler].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION))
|| (gStatuses3[gActiveBattler] & STATUS3_ROOTED)))
@@ -8170,7 +8115,7 @@ _08023170:\n\
_0802317C:\n\
movs r0, 0x7F\n\
ands r0, r2\n\
- bl GetBattleBank\n\
+ bl GetBattlerForBattleScript\n\
lsls r0, 24\n\
lsrs r7, r0, 24\n\
ldr r1, _080231A4 @ =gSpecialStatuses\n\
@@ -8366,7 +8311,7 @@ static void atk51_switchhandleorder(void)
if (gBattleControllerExecFlags)
return;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
switch (T2_READ_8(gBattlescriptCurrInstr + 2))
{
case 0:
@@ -8415,17 +8360,17 @@ static void atk52_switchineffects(void)
{
int i;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
sub_80157C4(gActiveBattler);
gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler));
gSpecialStatuses[gActiveBattler].flag40 = 0;
- if (!(gSideAffecting[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) && (gSideAffecting[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES)
+ if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES_DAMAGED) && (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SPIKES)
&& gBattleMons[gActiveBattler].type1 != TYPE_FLYING && gBattleMons[gActiveBattler].type2 != TYPE_FLYING && gBattleMons[gActiveBattler].ability != ABILITY_LEVITATE)
{
u8 spikesDmg;
- gSideAffecting[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED;
+ gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED;
spikesDmg = (5 - gSideTimers[GetBattlerSide(gActiveBattler)].spikesAmount) * 2;
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / (spikesDmg);
@@ -8451,11 +8396,11 @@ static void atk52_switchineffects(void)
if (AbilityBattleEffects(0, gActiveBattler, 0, 0, 0) == 0 && ItemBattleEffects(0, gActiveBattler, 0) == 0)
{
- gSideAffecting[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED);
+ gSideStatuses[GetBattlerSide(gActiveBattler)] &= ~(SIDE_STATUS_SPIKES_DAMAGED);
for (i = 0; i < gBattlersCount; i++)
{
- if (gBanksByTurnOrder[i] == gActiveBattler)
+ if (gBattlerByTurnOrder[i] == gActiveBattler)
gActionsByTurnOrder[i] = 0xC;
}
@@ -8512,7 +8457,7 @@ static void atk55_fanfare(void)
static void atk56_playfaintcry(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
BtlController_EmitFaintingCry(0);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -8528,7 +8473,7 @@ static void atk57(void)
static void atk58_returntoball(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
BtlController_EmitReturnMonToBall(0, 1);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -8539,9 +8484,9 @@ void atk59_handlelearnnewmove(void)
u8* loc1 = T1_READ_PTR(gBattlescriptCurrInstr + 1);
u8* loc2 = T1_READ_PTR(gBattlescriptCurrInstr + 5);
- u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterID], T2_READ_8(gBattlescriptCurrInstr + 9));
+ u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], T2_READ_8(gBattlescriptCurrInstr + 9));
while (ret == 0xFFFE)
- ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterID], 0);
+ ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], 0);
if (ret == 0)
{
@@ -8554,12 +8499,12 @@ void atk59_handlelearnnewmove(void)
else
{
gActiveBattler = GetBattlerAtPosition(0);
- if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterID && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
+ if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterMonId && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
GiveMoveToBattleMon(&gBattleMons[gActiveBattler], ret);
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) //what is else if
{
gActiveBattler = GetBattlerAtPosition(2);
- if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterID && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
+ if (gBattlerPartyIndexes[gActiveBattler] == gBattleStruct->expGetterMonId && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
GiveMoveToBattleMon(&gBattleMons[gActiveBattler], ret);
}
gBattlescriptCurrInstr = loc1;
@@ -8628,7 +8573,7 @@ static void atk5A_yesnoboxlearnmove(void)
case 2:
if (!gPaletteFade.active)
{
- ShowSelectMovePokemonSummaryScreen(gPlayerParty, gBattleStruct->expGetterID, gPlayerPartyCount - 1, ReshowBattleScreenAfterMenu, gMoveToLearn);
+ ShowSelectMovePokemonSummaryScreen(gPlayerParty, gBattleStruct->expGetterMonId, gPlayerPartyCount - 1, ReshowBattleScreenAfterMenu, gMoveToLearn);
gBattleStruct->atk5A_StateTracker++;
}
break;
@@ -8642,7 +8587,7 @@ static void atk5A_yesnoboxlearnmove(void)
}
else
{
- u16 move = GetMonData(&gPlayerParty[gBattleStruct->expGetterID], MON_DATA_MOVE1 + move_pos);
+ u16 move = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_MOVE1 + move_pos);
if (IsHMMove2(move))
{
PrepareStringBattle(0x13F, gActiveBattler);
@@ -8662,16 +8607,16 @@ static void atk5A_yesnoboxlearnmove(void)
ptr += 4;
}
ptr[0] = 0xFF;
- RemoveMonPPBonus(&gPlayerParty[gBattleStruct->expGetterID], move_pos);
- SetMonMoveSlot(&gPlayerParty[gBattleStruct->expGetterID], gMoveToLearn, move_pos);
- if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterID && !(gBattleMons[0].status2 & STATUS2_TRANSFORMED)
- && !(gDisableStructs[0].unk18_b & gBitTable[move_pos]))
+ RemoveMonPPBonus(&gPlayerParty[gBattleStruct->expGetterMonId], move_pos);
+ SetMonMoveSlot(&gPlayerParty[gBattleStruct->expGetterMonId], gMoveToLearn, move_pos);
+ if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId && !(gBattleMons[0].status2 & STATUS2_TRANSFORMED)
+ && !(gDisableStructs[0].mimickedMoves & gBitTable[move_pos]))
{
RemoveBattleMonPPBonus(&gBattleMons[0], move_pos);
SetBattleMonMoveSlot(&gBattleMons[0], gMoveToLearn, move_pos);
}
- if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattlerPartyIndexes[2] == gBattleStruct->expGetterID && !(gBattleMons[2].status2 & STATUS2_TRANSFORMED)
- && !(gDisableStructs[2].unk18_b & gBitTable[move_pos]))
+ if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId && !(gBattleMons[2].status2 & STATUS2_TRANSFORMED)
+ && !(gDisableStructs[2].mimickedMoves & gBitTable[move_pos]))
{
RemoveBattleMonPPBonus(&gBattleMons[2], move_pos);
SetBattleMonMoveSlot(&gBattleMons[2], gMoveToLearn, move_pos);
@@ -8738,7 +8683,7 @@ static void atk5B_yesnoboxstoplearningmove(void)
static void atk5C_hitanimation(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
gBattlescriptCurrInstr += 2;
else if (!(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE) || !(gBattleMons[gActiveBattler].status2 & STATUS2_SUBSTITUTE) || gDisableStructs[gActiveBattler].substituteHP == 0)
@@ -9076,9 +9021,9 @@ static void atk5D_getmoneyreward(void)
}
*/
-static void atk5E_8025A70(void)
+static void atk5E(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
switch (gBattleCommunication[0])
{
case 0:
@@ -9102,16 +9047,16 @@ static void atk5E_8025A70(void)
}
}
-static void atk5F_8025B24(void)
+static void atk5F_swapattackerwithtarget(void)
{
gActiveBattler = gBattlerAttacker;
gBattlerAttacker = gBattlerTarget;
gBattlerTarget = gActiveBattler;
//what is xor...
- if (gHitMarker & HITMARKER_PURSUIT_TRAP)
- gHitMarker &= ~(HITMARKER_PURSUIT_TRAP);
+ if (gHitMarker & HITMARKER_SWAP_ATTACKER_TARGET)
+ gHitMarker &= ~(HITMARKER_SWAP_ATTACKER_TARGET);
else
- gHitMarker |= HITMARKER_PURSUIT_TRAP;
+ gHitMarker |= HITMARKER_SWAP_ATTACKER_TARGET;
gBattlescriptCurrInstr++;
}
@@ -9132,7 +9077,7 @@ static void atk61_drawpartystatussummary(void)
if (gBattleControllerExecFlags)
return;
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
if (GetBattlerSide(gActiveBattler) == 0)
party = gPlayerParty;
else
@@ -9156,9 +9101,9 @@ static void atk61_drawpartystatussummary(void)
gBattlescriptCurrInstr += 2;
}
-static void atk62_08025C6C(void)
+static void atk62_hidepartystatussummary(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
BtlController_EmitHidePartyStatusSummary(0);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -9177,7 +9122,7 @@ static void atk64_statusanimation(void)
{
if (gBattleControllerExecFlags == 0)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS))
{
BtlController_EmitStatusAnimation(0, 0, gBattleMons[gActiveBattler].status1);
@@ -9192,7 +9137,7 @@ static void atk65_status2animation(void)
if (gBattleControllerExecFlags == 0)
{
u32 possible_to_anim;
- gActiveBattler = GetBattleBank(T1_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T1_READ_8(gBattlescriptCurrInstr + 1));
possible_to_anim = T1_READ_32(gBattlescriptCurrInstr + 2);
if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS))
{
@@ -9208,7 +9153,7 @@ static void atk66_chosenstatusanimation(void)
if (gBattleControllerExecFlags == 0)
{
u32 status;
- gActiveBattler = GetBattleBank(T1_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T1_READ_8(gBattlescriptCurrInstr + 1));
status = T1_READ_32(gBattlescriptCurrInstr + 3);
if (!(gStatuses3[gActiveBattler] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBattler].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS))
{
@@ -9273,20 +9218,20 @@ static void atk68_cancelallactions(void)
static void atk69_adjustsetdamage(void) //literally a copy of atk07 except theres no rand dmg modifier...
{
- u8 hold_effect, quality;
+ u8 holdEffect, param;
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
- hold_effect = gEnigmaBerries[gBattlerTarget].holdEffect, quality = gEnigmaBerries[gBattlerTarget].holdEffectParam;
+ holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect, param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
else
{
- hold_effect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
- quality = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
+ holdEffect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
+ param = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
}
gPotentialItemEffectBattler = gBattlerTarget;
- if (hold_effect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality)
+ if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param)
{
- RecordItemBattle(gBattlerTarget, hold_effect);
+ RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
@@ -9316,7 +9261,7 @@ static void atk69_adjustsetdamage(void) //literally a copy of atk07 except there
void atk6A_removeitem(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
USED_HELD_ITEMS(gActiveBattler) = gBattleMons[gActiveBattler].item;
gBattleMons[gActiveBattler].item = 0;
@@ -9778,7 +9723,7 @@ static void atk6E_setatktoplayer0(void)
static void atk6F_makevisible(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
BtlController_EmitSpriteInvisibility(0, 0);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -9786,7 +9731,7 @@ static void atk6F_makevisible(void)
static void atk70_recordlastability(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
gBattlescriptCurrInstr += 1; //buggy, should be += 2, one byte for command, one byte for argument...
}
@@ -9820,7 +9765,7 @@ static void atk73_hpthresholds(void)
s32 result;
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
opposing_bank = gActiveBattler ^ 1;
result = gBattleMons[opposing_bank].hp * 100 / gBattleMons[opposing_bank].maxHP;
@@ -9847,7 +9792,7 @@ static void atk74_hpthresholds2(void)
s32 result;
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
opposing_bank = gActiveBattler ^ 1;
hp_switchout = ewram160BCarr(GetBattlerSide(opposing_bank)); //gBattleStruct->HP_OnSwitchout[GetBattlerSide(opposing_bank)];
result = (hp_switchout - gBattleMons[opposing_bank].hp) * 100 / hp_switchout;
@@ -9874,7 +9819,7 @@ static void atk75_useitemonopponent(void)
static void atk76_various(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
switch (T2_READ_8(gBattlescriptCurrInstr + 2))
{
case 0:
@@ -9911,9 +9856,9 @@ static void atk76_various(void)
{
int i;
u16* choiced_move;
- if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterID)
+ if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId)
goto ACTIVE_0;
- if (gBattlerPartyIndexes[2] != gBattleStruct->expGetterID)
+ if (gBattlerPartyIndexes[2] != gBattleStruct->expGetterMonId)
break;
if (gBattlerPartyIndexes[0] == gBattlerPartyIndexes[2])
{
@@ -10123,14 +10068,14 @@ static void atk7D_setrain(void)
static void atk7E_setreflect(void)
{
- if (gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_REFLECT)
+ if (gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_REFLECT)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
}
else
{
- gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_REFLECT;
+ gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_REFLECT;
gSideTimers[GetBattlerPosition(gBattlerAttacker) & 1].reflectTimer = 5;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMons(1) == 2)
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
@@ -10193,7 +10138,7 @@ static void atk81_trysetrest(void)
gBattlescriptCurrInstr = fail_loc;
else
{
- if (gBattleMons[gBattlerTarget].status1 & ((u8)(~STATUS_SLEEP)))
+ if (gBattleMons[gBattlerTarget].status1 & ((u8)(~STATUS1_SLEEP)))
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
else
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
@@ -10293,7 +10238,7 @@ static void atk86_stockpiletobasedamage(void)
if (gBattleCommunication[6] != 1)
{
gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove,
- gSideAffecting[GetBattlerPosition(gBattlerTarget) & 1], 0,
+ gSideStatuses[GetBattlerPosition(gBattlerTarget) & 1], 0,
0, gBattlerAttacker, gBattlerTarget)
* gDisableStructs[gBattlerAttacker].stockpileCounter;
gBattleStruct->animTurn = gDisableStructs[gBattlerAttacker].stockpileCounter;
@@ -10688,7 +10633,7 @@ static void atk90_tryconversiontypechange(void)
//randomly changes user's type to one of its moves' type
u8 valid_moves = 0;
u8 checked_move;
- u8 move_type;
+ u8 moveType;
while (valid_moves < 4)
{
if (gBattleMons[gBattlerAttacker].moves[valid_moves] == 0)
@@ -10698,15 +10643,15 @@ static void atk90_tryconversiontypechange(void)
for (checked_move = 0; checked_move < valid_moves; checked_move++)
{
- move_type = gBattleMoves[gBattleMons[gBattlerAttacker].moves[checked_move]].type;
- if (move_type == TYPE_MYSTERY)
+ moveType = gBattleMoves[gBattleMons[gBattlerAttacker].moves[checked_move]].type;
+ if (moveType == TYPE_MYSTERY)
{
if (gBattleMons[gBattlerAttacker].type1 == TYPE_GHOST || gBattleMons[gBattlerAttacker].type2 == TYPE_GHOST)
- move_type = TYPE_GHOST;
+ moveType = TYPE_GHOST;
else
- move_type = TYPE_NORMAL;
+ moveType = TYPE_NORMAL;
}
- if (move_type != gBattleMons[gBattlerAttacker].type1 && move_type != gBattleMons[gBattlerAttacker].type2)
+ if (moveType != gBattleMons[gBattlerAttacker].type1 && moveType != gBattleMons[gBattlerAttacker].type2)
break;
}
@@ -10721,22 +10666,22 @@ static void atk90_tryconversiontypechange(void)
while ((checked_move = Random() & 3) >= valid_moves);
- move_type = gBattleMoves[gBattleMons[gBattlerAttacker].moves[checked_move]].type;
- if (move_type == TYPE_MYSTERY)
+ moveType = gBattleMoves[gBattleMons[gBattlerAttacker].moves[checked_move]].type;
+ if (moveType == TYPE_MYSTERY)
{
if (gBattleMons[gBattlerAttacker].type1 == TYPE_GHOST || gBattleMons[gBattlerAttacker].type2 == TYPE_GHOST)
- move_type = TYPE_GHOST;
+ moveType = TYPE_GHOST;
else
- move_type = TYPE_NORMAL;
+ moveType = TYPE_NORMAL;
}
- } while (move_type == gBattleMons[gBattlerAttacker].type1 || move_type == gBattleMons[gBattlerAttacker].type2);
+ } while (moveType == gBattleMons[gBattlerAttacker].type1 || moveType == gBattleMons[gBattlerAttacker].type2);
- gBattleMons[gBattlerAttacker].type1 = move_type;
- gBattleMons[gBattlerAttacker].type2 = move_type;
+ gBattleMons[gBattlerAttacker].type1 = moveType;
+ gBattleMons[gBattlerAttacker].type2 = moveType;
gBattleTextBuff1[0] = 0xFD;
gBattleTextBuff1[1] = 3;
- gBattleTextBuff1[2] = move_type;
+ gBattleTextBuff1[2] = moveType;
gBattleTextBuff1[3] = 0xFF;
gBattlescriptCurrInstr += 5;
@@ -10764,14 +10709,14 @@ static void atk91_givepaydaymoney(void)
static void atk92_setlightscreen(void)
{
- if (gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_LIGHTSCREEN)
+ if (gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_LIGHTSCREEN)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
}
else
{
- gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_LIGHTSCREEN;
+ gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_LIGHTSCREEN;
gSideTimers[GetBattlerPosition(gBattlerAttacker) & 1].lightscreenTimer = 5;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMons(1) == 2)
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
@@ -10785,18 +10730,18 @@ static void atk92_setlightscreen(void)
static void atk93_tryKO(void)
{
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
- hold_effect = gEnigmaBerries[gBattlerTarget].holdEffect, quality = gEnigmaBerries[gBattlerTarget].holdEffectParam;
+ holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect, param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
else
{
- hold_effect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
- quality = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
+ holdEffect = ItemId_GetHoldEffect(gBattleMons[gBattlerTarget].item);
+ param = ItemId_GetHoldEffectParam(gBattleMons[gBattlerTarget].item);
}
gPotentialItemEffectBattler = gBattlerTarget;
- if (hold_effect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality)
+ if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param)
{
- RecordItemBattle(gBattlerTarget, hold_effect);
+ RecordItemEffectBattle(gBattlerTarget, holdEffect);
gSpecialStatuses[gBattlerTarget].focusBanded = 1;
}
@@ -10819,7 +10764,7 @@ static void atk93_tryKO(void)
}
else
{
- if (gDisableStructs[gBattlerTarget].bankWithSureHit != gBattlerAttacker || gBattleMons[gBattlerAttacker].level < gBattleMons[gBattlerTarget].level)
+ if (gDisableStructs[gBattlerTarget].battlerWithSureHit != gBattlerAttacker || gBattleMons[gBattlerAttacker].level < gBattleMons[gBattlerTarget].level)
{
}
@@ -10896,7 +10841,7 @@ _08026BCE:\n\
bcs _08026C0C\n\
ldrb r0, [r5]\n\
movs r1, 0x27\n\
- bl RecordItemBattle\n\
+ bl RecordItemEffectBattle\n\
ldr r2, _08026C54 @ =gSpecialStatuses\n\
ldrb r1, [r5]\n\
lsls r0, r1, 2\n\
@@ -11303,7 +11248,7 @@ static void atk98_updatestatusicon(void)
if (T2_READ_8(gBattlescriptCurrInstr + 1) != 4)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
BtlController_EmitStatusIconUpdate(0, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2);
MarkBattlerForControllerExec(gActiveBattler);
gBattlescriptCurrInstr += 2;
@@ -11339,7 +11284,7 @@ static void atk99_setmist(void)
else
{
gSideTimers[GetBattlerPosition(gBattlerAttacker) & 1].mistTimer = 5;
- gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_MIST;
+ gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_MIST;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
}
gBattlescriptCurrInstr++;
@@ -11377,7 +11322,7 @@ static void atk9B_transformdataexecution(void)
gDisableStructs[gBattlerAttacker].disabledMove = 0;
gDisableStructs[gBattlerAttacker].disableTimer1 = 0;
gDisableStructs[gBattlerAttacker].transformedMonPersonality = gBattleMons[gBattlerTarget].personality;
- gDisableStructs[gBattlerAttacker].unk18_b = 0;
+ gDisableStructs[gBattlerAttacker].mimickedMoves = 0;
gBattleTextBuff1[0] = 0xFD;
gBattleTextBuff1[1] = 6;
@@ -11440,8 +11385,8 @@ static bool8 IsMoveUncopyable(u16 move)
static void atk9D_mimicattackcopy(void)
{
gChosenMove = 0xFFFF;
- if (IsMoveUncopyable(gLastUsedMove[gBattlerTarget]) || gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED
- || gLastUsedMove[gBattlerTarget] == 0 || gLastUsedMove[gBattlerTarget] == 0xFFFF)
+ if (IsMoveUncopyable(gLastMoves[gBattlerTarget]) || gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED
+ || gLastMoves[gBattlerTarget] == 0 || gLastMoves[gBattlerTarget] == 0xFFFF)
{
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
}
@@ -11450,24 +11395,24 @@ static void atk9D_mimicattackcopy(void)
int i;
for (i = 0; i < 4; i++)
{
- if (gBattleMons[gBattlerAttacker].moves[i] == gLastUsedMove[gBattlerTarget])
+ if (gBattleMons[gBattlerAttacker].moves[i] == gLastMoves[gBattlerTarget])
break;
}
if (i == 4)
{
- gBattleMons[gBattlerAttacker].moves[gCurrMovePos] = gLastUsedMove[gBattlerTarget];
- if (gBattleMoves[gLastUsedMove[gBattlerTarget]].pp < 5)
- gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = gBattleMoves[gLastUsedMove[gBattlerTarget]].pp;
+ gBattleMons[gBattlerAttacker].moves[gCurrMovePos] = gLastMoves[gBattlerTarget];
+ if (gBattleMoves[gLastMoves[gBattlerTarget]].pp < 5)
+ gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = gBattleMoves[gLastMoves[gBattlerTarget]].pp;
else
gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 5;
gBattleTextBuff1[0] = 0xFD;
gBattleTextBuff1[1] = 2;
- gBattleTextBuff1[2] = gLastUsedMove[gBattlerTarget];
- gBattleTextBuff1[3] = uBYTE1_16(gLastUsedMove[gBattlerTarget]);
+ gBattleTextBuff1[2] = gLastMoves[gBattlerTarget];
+ gBattleTextBuff1[3] = uBYTE1_16(gLastMoves[gBattlerTarget]);
gBattleTextBuff1[4] = 0xFF;
- gDisableStructs[gBattlerAttacker].unk18_b |= gBitTable[gCurrMovePos];
+ gDisableStructs[gBattlerAttacker].mimickedMoves |= gBitTable[gCurrMovePos];
gBattlescriptCurrInstr += 5;
}
else
@@ -11825,7 +11770,7 @@ static void atkA3_disablelastusedattack(void)
int i;
for (i = 0; i < 4; i++)
{
- if (gBattleMons[gBattlerTarget].moves[i] == gLastUsedMove[gBattlerTarget])
+ if (gBattleMons[gBattlerTarget].moves[i] == gLastMoves[gBattlerTarget])
break;
}
if (gDisableStructs[gBattlerTarget].disabledMove == 0 && i != 4 && gBattleMons[gBattlerTarget].pp[i] != 0)
@@ -11852,10 +11797,10 @@ static void atkA4_trysetencore(void)
int i;
for (i = 0; i < 4; i++)
{
- if (gBattleMons[gBattlerTarget].moves[i] == gLastUsedMove[gBattlerTarget])
+ if (gBattleMons[gBattlerTarget].moves[i] == gLastMoves[gBattlerTarget])
break;
}
- if (gLastUsedMove[gBattlerTarget] == MOVE_STRUGGLE || gLastUsedMove[gBattlerTarget] == MOVE_ENCORE || gLastUsedMove[gBattlerTarget] == MOVE_MIRROR_MOVE)
+ if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE || gLastMoves[gBattlerTarget] == MOVE_ENCORE || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE)
i = 4;
if (gDisableStructs[gBattlerTarget].encoredMove == 0 && i != 4 && gBattleMons[gBattlerTarget].pp[i] != 0)
{
@@ -12201,7 +12146,7 @@ static void atkA7_setalwayshitflag(void)
{
gStatuses3[gBattlerTarget] &= ~(STATUS3_ALWAYS_HITS);
gStatuses3[gBattlerTarget] |= 0x10;
- gDisableStructs[gBattlerTarget].bankWithSureHit = gBattlerAttacker;
+ gDisableStructs[gBattlerTarget].battlerWithSureHit = gBattlerAttacker;
gBattlescriptCurrInstr++;
}
@@ -12279,7 +12224,7 @@ static u8 AttacksThisTurn(u8 bank, u16 move) //Note: returns 1 if it's a chargin
effect = gBattleMoves[move].effect;
if (effect == EFFECT_SKULL_BASH || effect == EFFECT_RAZOR_WIND || effect == EFFECT_SKY_ATTACK || effect == EFFECT_SOLARBEAM || effect == EFFECT_FLY || effect == EFFECT_BIDE)
{
- if ((gHitMarker & HITMARKER_x8000000))
+ if ((gHitMarker & HITMARKER_CHARGING))
return 1;
}
return 2;
@@ -12350,12 +12295,12 @@ static void atkAC_remaininghptopower(void)
static void atkAD_tryspiteppreduce(void)
{
- if (gLastUsedMove[gBattlerTarget] != 0 && gLastUsedMove[gBattlerTarget] != 0xFFFF && !(gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE))
+ if (gLastMoves[gBattlerTarget] != 0 && gLastMoves[gBattlerTarget] != 0xFFFF && !(gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE))
{
int i;
for (i = 0; i < 4; i++)
{
- if (gLastUsedMove[gBattlerTarget] == gBattleMons[gBattlerTarget].moves[i])
+ if (gLastMoves[gBattlerTarget] == gBattleMons[gBattlerTarget].moves[i])
break;
}
if (i != 4 && gBattleMons[gBattlerTarget].pp[i] > 1)
@@ -12366,8 +12311,8 @@ static void atkAD_tryspiteppreduce(void)
gBattleTextBuff1[0] = 0xFD;
gBattleTextBuff1[1] = 2;
- gBattleTextBuff1[2] = gLastUsedMove[gBattlerTarget];
- gBattleTextBuff1[3] = gLastUsedMove[gBattlerTarget] >> 8;
+ gBattleTextBuff1[2] = gLastMoves[gBattlerTarget];
+ gBattleTextBuff1[3] = gLastMoves[gBattlerTarget] >> 8;
gBattleTextBuff1[4] = 0xFF;
ConvertIntToDecimalStringN(gBattleTextBuff2, lost_pp, 0, 1);
gBattleTextBuff2[0] = 0xFD;
@@ -12379,7 +12324,7 @@ static void atkAD_tryspiteppreduce(void)
gBattleMons[gBattlerTarget].pp[i] -= lost_pp;
gActiveBattler = gBattlerTarget;
- if (!(gDisableStructs[gActiveBattler].unk18_b & gBitTable[i])
+ if (!(gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[i])
&& !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED))
{
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBattler].pp[i]);
@@ -12497,7 +12442,7 @@ static void atkB0_trysetspikes(void)
}
else
{
- gSideAffecting[side] |= SIDE_STATUS_SPIKES;
+ gSideStatuses[side] |= SIDE_STATUS_SPIKES;
gSideTimers[side].spikesAmount++;
gBattlescriptCurrInstr += 5;
}
@@ -12631,14 +12576,14 @@ static void atkB7_presentdamagecalculation(void)
static void atkB8_setsafeguard(void)
{
- if (gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_SAFEGUARD)
+ if (gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] & SIDE_STATUS_SAFEGUARD)
{
gMoveResultFlags |= MOVE_RESULT_MISSED;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
}
else
{
- gSideAffecting[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_SAFEGUARD;
+ gSideStatuses[GetBattlerPosition(gBattlerAttacker) & 1] |= SIDE_STATUS_SAFEGUARD;
gSideTimers[GetBattlerPosition(gBattlerAttacker) & 1].safeguardTimer = 5;
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
}
@@ -12718,13 +12663,13 @@ static void atkBA_jumpifnopursuitswitchdmg(void)
gBattlerTarget = GetBattlerAtPosition(2);
}
- if (gActionForBanks[gBattlerTarget] == 0 && gBattlerAttacker == ewram16010arr(gBattlerTarget) && !(gBattleMons[gBattlerTarget].status1 & (STATUS_SLEEP | STATUS_FREEZE))
+ if (gActionForBanks[gBattlerTarget] == 0 && gBattlerAttacker == ewram16010arr(gBattlerTarget) && !(gBattleMons[gBattlerTarget].status1 & (STATUS1_SLEEP | STATUS1_FREEZE))
&& gBattleMons[gBattlerAttacker].hp && !gDisableStructs[gBattlerTarget].truantCounter && gChosenMovesByBanks[gBattlerTarget] == MOVE_PURSUIT)
{
int i;
for (i = 0; i < gBattlersCount; i++)
{
- if (gBanksByTurnOrder[i] == gBattlerTarget)
+ if (gBattlerByTurnOrder[i] == gBattlerTarget)
gActionsByTurnOrder[i] = 11;
}
gCurrentMove = MOVE_PURSUIT;
@@ -12799,13 +12744,13 @@ static void atkBE_rapidspinfree(void) //rapid spin
else if (gStatuses3[gBattlerAttacker] & STATUS3_LEECHSEED)
{
gStatuses3[gBattlerAttacker] &= ~(STATUS3_LEECHSEED);
- gStatuses3[gBattlerAttacker] &= ~(STATUS3_LEECHSEED_BANK);
+ gStatuses3[gBattlerAttacker] &= ~(STATUS3_LEECHSEED_BATTLER);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_LeechSeedFree;
}
- else if (gSideAffecting[GetBattlerSide(gBattlerAttacker)] & SIDE_STATUS_SPIKES)
+ else if (gSideStatuses[GetBattlerSide(gBattlerAttacker)] & SIDE_STATUS_SPIKES)
{
- gSideAffecting[GetBattlerSide(gBattlerAttacker)] &= ~(SIDE_STATUS_SPIKES);
+ gSideStatuses[GetBattlerSide(gBattlerAttacker)] &= ~(SIDE_STATUS_SPIKES);
gSideTimers[GetBattlerSide(gBattlerAttacker)].spikesAmount = 0;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_SpikesFree;
@@ -12892,7 +12837,7 @@ static void atkC3_trysetfutureattack(void)
gWishFutureKnock.futureSightAttacker[gBattlerTarget] = gBattlerAttacker;
gWishFutureKnock.futureSightCounter[gBattlerTarget] = 3;
gWishFutureKnock.futureSightDmg[gBattlerTarget] = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove,
- gSideAffecting[GetBattlerPosition(gBattlerTarget) & 1], 0,
+ gSideStatuses[GetBattlerPosition(gBattlerTarget) & 1], 0,
0, gBattlerAttacker, gBattlerTarget);
if (gProtectStructs[gBattlerAttacker].helpingHand)
@@ -13308,7 +13253,7 @@ static void atkCC_callterrainattack(void) //nature power
static void atkCD_cureifburnedparalysedorpoisoned(void) //refresh
{
- if (gBattleMons[gBattlerAttacker].status1 & (STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON))
+ if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON))
{
gBattleMons[gBattlerAttacker].status1 = 0;
gBattlescriptCurrInstr += 5;
@@ -13554,10 +13499,10 @@ static void atkDA_tryswapabilities(void)
}
}
-static void atkDB_tryimprision(void)
+static void atkDB_tryimprison(void)
{
u8 r8 = 0;
- if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISIONED))
+ if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISONED_OTHERS))
{
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
}
@@ -13583,7 +13528,7 @@ static void atkDB_tryimprision(void)
}
if (j != 4)
{
- gStatuses3[gBattlerAttacker] |= STATUS3_IMPRISIONED;
+ gStatuses3[gBattlerAttacker] |= STATUS3_IMPRISONED_OTHERS;
gBattlescriptCurrInstr += 5;
break;
}
@@ -13621,7 +13566,7 @@ static void atkDD_weightdamagecalculation(void)
}
#ifdef NONMATCHING
-static void atkDE_asistattackselect(void)
+static void atkDE_assistattackselect(void)
{
u32 chooseable_moves_no = 0;
struct Pokemon* party;
@@ -13676,7 +13621,7 @@ static void atkDE_asistattackselect(void)
#else
NAKED
-static void atkDE_asistattackselect(void)
+static void atkDE_assistattackselect(void)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
@@ -13914,7 +13859,7 @@ static void atkE1_trygetintimidatetarget(void)
static void atkE2_switchoutabilities(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
switch (gBattleMons[gActiveBattler].ability)
{
case ABILITY_NATURAL_CURE:
@@ -13928,7 +13873,7 @@ static void atkE2_switchoutabilities(void)
static void atkE3_jumpifhasnohp(void)
{
- gActiveBattler = GetBattleBank(T2_READ_8(gBattlescriptCurrInstr + 1));
+ gActiveBattler = GetBattlerForBattleScript(T2_READ_8(gBattlescriptCurrInstr + 1));
if (gBattleMons[gActiveBattler].hp == 0)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2);
else
@@ -14117,7 +14062,7 @@ static void atkEC_pursuitrelated(void)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
}
-static void atkED_snatchsetbanks(void)
+static void atkEF_snatchsetbattlers(void)
{
gEffectBattler = gBattlerAttacker;
if (gBattlerAttacker == gBattlerTarget)
@@ -14133,8 +14078,8 @@ static void atkEE_removelightscreenreflect(void) //brick break
u8 side = GetBattlerSide(gBattlerAttacker) ^ 1;
if (gSideTimers[side].reflectTimer || gSideTimers[side].lightscreenTimer)
{
- gSideAffecting[side] &= ~(SIDE_STATUS_REFLECT);
- gSideAffecting[side] &= ~(SIDE_STATUS_LIGHTSCREEN);
+ gSideStatuses[side] &= ~(SIDE_STATUS_REFLECT);
+ gSideStatuses[side] &= ~(SIDE_STATUS_LIGHTSCREEN);
gSideTimers[side].reflectTimer = 0;
gSideTimers[side].lightscreenTimer = 0;
gBattleStruct->animTurn = 1;
@@ -14223,9 +14168,9 @@ void atkEF_handleballthrow(void)
ball_multiplier = sBallCatchBonuses[gLastUsedItem - 2];
odds = (catch_rate * ball_multiplier / 10) * (gBattleMons[gBattlerTarget].maxHP * 3 - gBattleMons[gBattlerTarget].hp * 2) / (3 * gBattleMons[gBattlerTarget].maxHP);
- if (gBattleMons[gBattlerTarget].status1 & (STATUS_SLEEP | STATUS_FREEZE))
+ if (gBattleMons[gBattlerTarget].status1 & (STATUS1_SLEEP | STATUS1_FREEZE))
odds *= 2;
- if (gBattleMons[gBattlerTarget].status1 & (STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS /*| STATUS_TOXIC_POISON */)) //nice one gf
+ if (gBattleMons[gBattlerTarget].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS /*| STATUS1_TOXIC_POISON */)) //nice one gf
odds = (odds * 15) / 10;
if (gLastUsedItem != ITEM_SAFARI_BALL)
diff --git a/src/battle_setup.c b/src/battle_setup.c
index 2ad57e961..89064b97b 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -32,6 +32,7 @@
#include "constants/opponents.h"
#include "constants/songs.h"
#include "constants/species.h"
+#include "constants/items.h"
extern u16 gSpecialVar_Result;
@@ -558,7 +559,7 @@ void ScrSpecial_StartWallyTutorialBattle(void)
{
CreateMaleMon(&gEnemyParty[0], SPECIES_RALTS, 5);
ScriptContext2_Enable();
- gMain.savedCallback = c2_exit_to_overworld_1_continue_scripts_restart_music;
+ gMain.savedCallback = CB2_ReturnToFieldContinueScriptPlayMapMusic;
gBattleTypeFlags = BATTLE_TYPE_WALLY_TUTORIAL;
CreateBattleStartTask(B_TRANSITION_SLICE, 0);
}
@@ -640,7 +641,7 @@ void CB2_EndScriptedWildBattle(void)
if (IsPlayerDefeated(gBattleOutcome) == TRUE)
SetMainCallback2(CB2_WhiteOut);
else
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
s8 BattleSetup_GetTerrain(void)
@@ -871,7 +872,7 @@ static void CB2_GiveStarter(void)
*GetVarPointer(VAR_STARTER_MON) = gSpecialVar_Result;
starterPoke = GetStarterPokemon(gSpecialVar_Result);
- ScriptGiveMon(starterPoke, 5, 0, 0, 0, 0);
+ ScriptGiveMon(starterPoke, 5, ITEM_NONE, 0, 0, 0);
ResetTasks();
sub_80408BC();
SetMainCallback2(CB2_StartFirstBattle);
@@ -898,7 +899,7 @@ static void CB2_StartFirstBattle(void)
static void CB2_EndFirstBattle(void)
{
Overworld_ClearSavedMusic();
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
// why not just use the macros? maybe its because they didnt want to uncast const every time?
@@ -926,14 +927,14 @@ static bool32 IsPlayerDefeated(u32 battleOutcome)
{
switch (battleOutcome)
{
- case BATTLE_LOST:
- case BATTLE_DREW:
+ case B_OUTCOME_LOST:
+ case B_OUTCOME_DREW:
return TRUE;
- case BATTLE_WON:
- case BATTLE_RAN:
- case BATTLE_PLAYER_TELEPORTED:
- case BATTLE_POKE_FLED:
- case BATTLE_CAUGHT:
+ case B_OUTCOME_WON:
+ case B_OUTCOME_RAN:
+ case B_OUTCOME_PLAYER_TELEPORTED:
+ case B_OUTCOME_MON_FLED:
+ case B_OUTCOME_CAUGHT:
return FALSE;
default:
return FALSE;
@@ -1107,7 +1108,7 @@ void CB2_EndTrainerBattle(void)
{
if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT)
{
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
else if (IsPlayerDefeated(gBattleOutcome) == TRUE)
{
@@ -1115,7 +1116,7 @@ void CB2_EndTrainerBattle(void)
}
else
{
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
SetCurrentTrainerBattledFlag();
}
}
@@ -1124,7 +1125,7 @@ void CB2_EndTrainerEyeRematchBattle(void)
{
if (gTrainerBattleOpponent == SECRET_BASE_OPPONENT)
{
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
else if (IsPlayerDefeated(gBattleOutcome) == TRUE)
{
@@ -1132,7 +1133,7 @@ void CB2_EndTrainerEyeRematchBattle(void)
}
else
{
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
SetCurrentTrainerBattledFlag();
SetTrainerFlagsAfterTrainerEyeRematch();
}
diff --git a/src/battle_tower.c b/src/battle_tower.c
index 8449b7e42..a5b2df0a6 100644
--- a/src/battle_tower.c
+++ b/src/battle_tower.c
@@ -1282,7 +1282,7 @@ void sub_81354CC(void)
break;
}
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void sub_8135534(u8 taskId)
@@ -1805,9 +1805,9 @@ void PrintEReaderTrainerGreeting(void)
void PrintEReaderTrainerFarewellMessage(void)
{
- if (gBattleOutcome == BATTLE_DREW)
+ if (gBattleOutcome == B_OUTCOME_DREW)
gStringVar4[0] = EOS;
- else if (gBattleOutcome == BATTLE_WON)
+ else if (gBattleOutcome == B_OUTCOME_WON)
PrintBattleTowerTrainerMessage(gSaveBlock2.battleTower.ereaderTrainer.farewellPlayerWon);
else
PrintBattleTowerTrainerMessage(gSaveBlock2.battleTower.ereaderTrainer.farewellPlayerLost);
diff --git a/src/battle_util.c b/src/battle_util.c
index 1825d7a2c..b1260cd4e 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -1,6 +1,8 @@
#include "global.h"
#include "battle.h"
#include "battle_util.h"
+#include "battle_controllers.h"
+#include "battle_message.h"
#include "data2.h"
#include "event_data.h"
#include "ewram.h"
@@ -28,7 +30,7 @@ extern const u8* gBattlescriptCurrInstr;
extern u8 gActiveBattler;
extern u8 gBattleBufferB[4][0x200];
extern u8* gSelectionBattleScripts[4]; //battlescript location when you try to choose a move you're not allowed to
-extern u16 gLastUsedMove[4];
+extern u16 gLastMoves[4];
extern struct BattlePokemon gBattleMons[4];
extern struct BattleEnigmaBerry gEnigmaBerries[4];
extern u8 gPotentialItemEffectBattler;
@@ -40,8 +42,8 @@ extern u8 gBattlersCount;
extern u32 gStatuses3[4];
extern u8 gBattlerAttacker;
extern u8 gBattlerTarget;
-extern u8 gBanksByTurnOrder[4];
-extern u16 gSideAffecting[2];
+extern u8 gBattlerByTurnOrder[4];
+extern u16 gSideStatuses[2];
extern u16 gBattleWeather;
extern void (*gBattleMainFunc)(void);
extern u8 gAbsentBattlerFlags;
@@ -53,7 +55,7 @@ extern s32 gBattleMoveDamage;
extern u16 gBattlerPartyIndexes[4];
extern u16 gChosenMovesByBanks[4];
extern s32 gTakenDmg[4];
-extern u8 gTakenDmgBanks[4];
+extern u8 gTakenDmgByBattler[4];
extern u8 gMoveResultFlags;
extern u8 gLastUsedAbility;
extern u8 gBattleTextBuff2[];
@@ -89,7 +91,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget);
u8 sub_803FC34(u8 bank);
u16 sub_803FBFC(u8 a);
void RecordAbilityBattle(u8 bank, u8 ability);
-void RecordItemBattle(u8 bank, u8 holdEffect);
+void RecordItemEffectBattle(u8 bank, u8 holdEffect);
s8 GetPokeFlavourRelation(u32 pid, u8 flavor);
extern u8 BattleScript_MoveSelectionDisabledMove[];
@@ -207,12 +209,12 @@ extern u8 gUnknown_081D99A0[]; //disobedient, hits itself
#define MULTISTRING_CHOOSER 0x5
#define MSG_DISPLAY 0x7
-u8 GetBattleBank(u8 caseId)
+u8 GetBattlerForBattleScript(u8 caseId)
{
u8 ret = 0;
switch (caseId)
{
- case BS_GET_TARGET:
+ case BS_TARGET:
ret = gBattlerTarget;
break;
case BS_GET_ATTACKER:
@@ -257,7 +259,7 @@ void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move)
gBattleMons[bankAtk].pp[i]--;
if (!(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
- && !(gDisableStructs[bankAtk].unk18_b & gBitTable[i]))
+ && !(gDisableStructs[bankAtk].mimickedMoves & gBitTable[i]))
{
gActiveBattler = bankAtk;
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBattler].pp[i]);
@@ -291,7 +293,7 @@ void PressurePPLoseOnUsingImprision(u8 bankAtk)
if (imprisionPos != 4
&& !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
- && !(gDisableStructs[bankAtk].unk18_b & gBitTable[imprisionPos]))
+ && !(gDisableStructs[bankAtk].mimickedMoves & gBitTable[imprisionPos]))
{
gActiveBattler = bankAtk;
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisionPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisionPos]);
@@ -324,7 +326,7 @@ void PressurePPLoseOnUsingPerishSong(u8 bankAtk)
if (perishSongPos != 4
&& !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED)
- && !(gDisableStructs[bankAtk].unk18_b & gBitTable[perishSongPos]))
+ && !(gDisableStructs[bankAtk].mimickedMoves & gBitTable[perishSongPos]))
{
gActiveBattler = bankAtk;
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBattler].pp[perishSongPos]);
@@ -333,7 +335,7 @@ void PressurePPLoseOnUsingPerishSong(u8 bankAtk)
}
-void MarkAllBufferBanksForExecution(void) // unused
+void MarkAllBattlersForControllerExec(void) // unused
{
s32 i;
@@ -481,7 +483,7 @@ u8 TrySetCantSelectMoveBattleScript(void) //msg can't select a move
gSelectionBattleScripts[gActiveBattler] = BattleScript_MoveSelectionDisabledMove;
limitations++;
}
- if (move == gLastUsedMove[gActiveBattler] && move != MOVE_STRUGGLE && gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)
+ if (move == gLastMoves[gActiveBattler] && move != MOVE_STRUGGLE && gBattleMons[gActiveBattler].status2 & STATUS2_TORMENT)
{
CancelMultiTurnMoves(gActiveBattler);
gSelectionBattleScripts[gActiveBattler] = BattleScript_MoveSelectionTormented;
@@ -522,40 +524,36 @@ u8 TrySetCantSelectMoveBattleScript(void) //msg can't select a move
return limitations;
}
-#define MOVE_LIMITATION_ZEROMOVE (1 << 0)
-#define MOVE_LIMITATION_PP (1 << 1)
-#define MOVE_LIMITATION_DISABLED (1 << 2)
-#define MOVE_LIMITATION_TORMENTED (1 << 3)
-#define MOVE_LIMITATION_TAUNT (1 << 4)
-#define MOVE_LIMITATION_IMPRISION (1 << 5)
-
-u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check)
+u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
{
u8 holdEffect;
- u16* choicedMove = CHOICED_MOVE(bank);
+ u16* choicedMove = CHOICED_MOVE(battlerId);
s32 i;
- if (gBattleMons[bank].item == ITEM_ENIGMA_BERRY)
- holdEffect = gEnigmaBerries[bank].holdEffect;
+
+ if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
+ holdEffect = gEnigmaBerries[battlerId].holdEffect;
else
- holdEffect = ItemId_GetHoldEffect(gBattleMons[bank].item);
- gPotentialItemEffectBattler = bank;
- for (i = 0; i < 4; i++)
+ holdEffect = ItemId_GetHoldEffect(gBattleMons[battlerId].item);
+
+ gPotentialItemEffectBattler = battlerId;
+
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
- if (gBattleMons[bank].moves[i] == 0 && check & MOVE_LIMITATION_ZEROMOVE)
+ if (gBattleMons[battlerId].moves[i] == 0 && check & MOVE_LIMITATION_ZEROMOVE)
unusableMoves |= gBitTable[i];
- if (gBattleMons[bank].pp[i] == 0 && check & MOVE_LIMITATION_PP)
+ if (gBattleMons[battlerId].pp[i] == 0 && check & MOVE_LIMITATION_PP)
unusableMoves |= gBitTable[i];
- if (gBattleMons[bank].moves[i] == gDisableStructs[bank].disabledMove && check & MOVE_LIMITATION_DISABLED)
+ if (gBattleMons[battlerId].moves[i] == gDisableStructs[battlerId].disabledMove && check & MOVE_LIMITATION_DISABLED)
unusableMoves |= gBitTable[i];
- if (gBattleMons[bank].moves[i] == gLastUsedMove[bank] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[bank].status2 & STATUS2_TORMENT)
+ if (gBattleMons[battlerId].moves[i] == gLastMoves[battlerId] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[battlerId].status2 & STATUS2_TORMENT)
unusableMoves |= gBitTable[i];
- if (gDisableStructs[bank].tauntTimer1 && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[bank].moves[i]].power == 0)
+ if (gDisableStructs[battlerId].tauntTimer1 && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0)
unusableMoves |= gBitTable[i];
- if (IsImprisoned(bank, gBattleMons[bank].moves[i]) && check & MOVE_LIMITATION_IMPRISION)
+ if (IsImprisoned(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON)
unusableMoves |= gBitTable[i];
- if (gDisableStructs[bank].encoreTimer1 && gDisableStructs[bank].encoredMove != gBattleMons[bank].moves[i])
+ if (gDisableStructs[battlerId].encoreTimer1 && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i])
unusableMoves |= gBitTable[i];
- if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[bank].moves[i])
+ if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[battlerId].moves[i])
unusableMoves |= gBitTable[i];
}
return unusableMoves;
@@ -563,9 +561,9 @@ u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check)
bool8 AreAllMovesUnusable(void)
{
- u8 unusable;
- unusable = CheckMoveLimitations(gActiveBattler, 0, 0xFF);
- if (unusable == 0xF) //all moves are unusable
+ u8 unusable = CheckMoveLimitations(gActiveBattler, 0, 0xFF);
+
+ if (unusable == 0xF) // All moves are unusable.
{
gProtectStructs[gActiveBattler].noValidMoves = 1;
gSelectionBattleScripts[gActiveBattler] = BattleScript_NoMovesLeft;
@@ -575,33 +573,53 @@ bool8 AreAllMovesUnusable(void)
gBattleBufferB[gActiveBattler][3] = GetBattlerAtPosition(GetBattlerPosition(gActiveBattler) ^ 1);
}
else
+ {
gProtectStructs[gActiveBattler].noValidMoves = 0;
+ }
+
return (unusable == 0xF);
}
-u8 IsImprisoned(u8 bank, u16 move)
+u8 IsImprisoned(u8 battlerId, u16 move)
{
- u8 imprisionedMoves = 0;
- u8 bankSide = GetBattlerSide(bank);
s32 i;
+ u8 imprisonedMoves = 0;
+ u8 battlerSide = GetBattlerSide(battlerId);
+
for (i = 0; i < gBattlersCount; i++)
{
- if (bankSide != GetBattlerSide(i) && gStatuses3[i] & STATUS3_IMPRISIONED)
+ if (battlerSide != GetBattlerSide(i) && gStatuses3[i] & STATUS3_IMPRISONED_OTHERS)
{
s32 j;
- for (j = 0; j < 4; j++)
+ for (j = 0; j < MAX_MON_MOVES; j++)
{
if (move == gBattleMons[i].moves[j])
break;
}
- if (j < 4)
- imprisionedMoves++;
+ if (j < MAX_MON_MOVES)
+ imprisonedMoves++;
}
}
- return imprisionedMoves;
+
+ return imprisonedMoves;
}
-u8 UpdateTurnCounters(void)
+enum
+{
+ ENDTURN_ORDER,
+ ENDTURN_REFLECT,
+ ENDTURN_LIGHT_SCREEN,
+ ENDTURN_MIST,
+ ENDTURN_SAFEGUARD,
+ ENDTURN_WISH,
+ ENDTURN_RAIN,
+ ENDTURN_SANDSTORM,
+ ENDTURN_SUN,
+ ENDTURN_HAIL,
+ ENDTURN_FIELD_COUNT,
+};
+
+u8 DoFieldEndTurnEffects(void)
{
u8 effect = 0;
s32 i;
@@ -615,43 +633,39 @@ u8 UpdateTurnCounters(void)
do
{
- u8 sideBank;
+ u8 side;
- switch (gBattleStruct->turncountersTracker)
+ switch (gBattleStruct->turnCountersTracker)
{
- case 0:
+ case ENDTURN_ORDER:
for (i = 0; i < gBattlersCount; i++)
{
- gBanksByTurnOrder[i] = i;
+ gBattlerByTurnOrder[i] = i;
}
for (i = 0; i < gBattlersCount - 1; i++)
{
s32 j;
for (j = i + 1; j < gBattlersCount; j++)
{
- if (GetWhoStrikesFirst(gBanksByTurnOrder[i], gBanksByTurnOrder[j], 0))
+ if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], 0))
SwapTurnOrder(i, j);
}
}
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
gBattleStruct->turnSideTracker = 0;
- case 1:
+ // fall through
+ case ENDTURN_REFLECT:
while (gBattleStruct->turnSideTracker < 2)
{
- gActiveBattler = gBattlerAttacker = sideBank = gBattleStruct->turnSideTracker;
+ gActiveBattler = gBattlerAttacker = side = gBattleStruct->turnSideTracker;
- if (gSideAffecting[sideBank] & SIDE_STATUS_REFLECT)
+ if (gSideStatuses[side] & SIDE_STATUS_REFLECT)
{
- if (--gSideTimers[sideBank].reflectTimer == 0)
+ if (--gSideTimers[side].reflectTimer == 0)
{
-
- gSideAffecting[sideBank] &= ~SIDE_STATUS_REFLECT;
+ gSideStatuses[side] &= ~SIDE_STATUS_REFLECT;
BattleScriptExecute(BattleScript_SideStatusWoreOff);
- gBattleTextBuff1[0] = 0xFD;
- gBattleTextBuff1[1] = 2;
- gBattleTextBuff1[2] = MOVE_REFLECT;
- gBattleTextBuff1[3] = MOVE_REFLECT >> 8;
- gBattleTextBuff1[4] = EOS;
+ PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_REFLECT);
effect++;
}
}
@@ -661,26 +675,22 @@ u8 UpdateTurnCounters(void)
}
if (!effect)
{
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
gBattleStruct->turnSideTracker = 0;
}
break;
- case 2:
+ case ENDTURN_LIGHT_SCREEN:
while (gBattleStruct->turnSideTracker < 2)
{
- gActiveBattler = gBattlerAttacker = sideBank = gBattleStruct->turnSideTracker;
- if (gSideAffecting[sideBank] & SIDE_STATUS_LIGHTSCREEN)
+ gActiveBattler = gBattlerAttacker = side = gBattleStruct->turnSideTracker;
+ if (gSideStatuses[side] & SIDE_STATUS_LIGHTSCREEN)
{
- if (--gSideTimers[sideBank].lightscreenTimer == 0)
+ if (--gSideTimers[side].lightscreenTimer == 0)
{
- gSideAffecting[sideBank] &= ~SIDE_STATUS_LIGHTSCREEN;
+ gSideStatuses[side] &= ~SIDE_STATUS_LIGHTSCREEN;
BattleScriptExecute(BattleScript_SideStatusWoreOff);
- gBattleCommunication[MULTISTRING_CHOOSER] = sideBank;
- gBattleTextBuff1[0] = 0xFD;
- gBattleTextBuff1[1] = 2;
- gBattleTextBuff1[2] = MOVE_LIGHT_SCREEN;
- gBattleTextBuff1[3] = MOVE_LIGHT_SCREEN >> 8;
- gBattleTextBuff1[4] = EOS;
+ gBattleCommunication[MULTISTRING_CHOOSER] = side;
+ PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_LIGHT_SCREEN);
effect++;
}
}
@@ -690,24 +700,20 @@ u8 UpdateTurnCounters(void)
}
if (!effect)
{
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
gBattleStruct->turnSideTracker = 0;
}
break;
- case 3:
+ case ENDTURN_MIST:
while (gBattleStruct->turnSideTracker < 2)
{
- gActiveBattler = gBattlerAttacker = sideBank = gBattleStruct->turnSideTracker;
- if (gSideTimers[sideBank].mistTimer && --gSideTimers[sideBank].mistTimer == 0)
+ gActiveBattler = gBattlerAttacker = side = gBattleStruct->turnSideTracker;
+ if (gSideTimers[side].mistTimer && --gSideTimers[side].mistTimer == 0)
{
- gSideAffecting[sideBank] &= ~SIDE_STATUS_MIST;
+ gSideStatuses[side] &= ~SIDE_STATUS_MIST;
BattleScriptExecute(BattleScript_SideStatusWoreOff);
- gBattleCommunication[MULTISTRING_CHOOSER] = sideBank;
- gBattleTextBuff1[0] = 0xFD;
- gBattleTextBuff1[1] = 2;
- gBattleTextBuff1[2] = MOVE_MIST;
- gBattleTextBuff1[3] = MOVE_MIST >> 8;
- gBattleTextBuff1[4] = EOS;
+ gBattleCommunication[MULTISTRING_CHOOSER] = side;
+ PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_MIST);
effect++;
}
gBattleStruct->turnSideTracker++;
@@ -716,19 +722,19 @@ u8 UpdateTurnCounters(void)
}
if (!effect)
{
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
gBattleStruct->turnSideTracker = 0;
}
break;
- case 4:
+ case ENDTURN_SAFEGUARD:
while (gBattleStruct->turnSideTracker < 2)
{
- gActiveBattler = gBattlerAttacker = sideBank = gBattleStruct->turnSideTracker;
- if (gSideAffecting[sideBank] & SIDE_STATUS_SAFEGUARD)
+ gActiveBattler = gBattlerAttacker = side = gBattleStruct->turnSideTracker;
+ if (gSideStatuses[side] & SIDE_STATUS_SAFEGUARD)
{
- if (--gSideTimers[sideBank].safeguardTimer == 0)
+ if (--gSideTimers[side].safeguardTimer == 0)
{
- gSideAffecting[sideBank] &= ~SIDE_STATUS_SAFEGUARD;
+ gSideStatuses[side] &= ~SIDE_STATUS_SAFEGUARD;
BattleScriptExecute(BattleScript_SafeguardEnds);
effect++;
}
@@ -739,14 +745,14 @@ u8 UpdateTurnCounters(void)
}
if (!effect)
{
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
gBattleStruct->turnSideTracker = 0;
}
break;
- case 5:
+ case ENDTURN_WISH:
while (gBattleStruct->turnSideTracker < gBattlersCount)
{
- gActiveBattler = gBanksByTurnOrder[gBattleStruct->turnSideTracker];
+ gActiveBattler = gBattlerByTurnOrder[gBattleStruct->turnSideTracker];
if (gWishFutureKnock.wishCounter[gActiveBattler] && --gWishFutureKnock.wishCounter[gActiveBattler] == 0 && gBattleMons[gActiveBattler].hp)
{
gBattlerTarget = gActiveBattler;
@@ -759,10 +765,10 @@ u8 UpdateTurnCounters(void)
}
if (!effect)
{
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
}
break;
- case 6:
+ case ENDTURN_RAIN:
if (gBattleWeather & WEATHER_RAIN_ANY)
{
if (!(gBattleWeather & WEATHER_RAIN_PERMANENT))
@@ -779,15 +785,20 @@ u8 UpdateTurnCounters(void)
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
}
else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR)
+ {
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
+ }
else
+ {
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
+ }
+
BattleScriptExecute(BattleScript_RainContinuesOrEnds);
effect++;
}
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
break;
- case 7:
+ case ENDTURN_SANDSTORM:
if (gBattleWeather & WEATHER_SANDSTORM_ANY)
{
if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0)
@@ -796,16 +807,18 @@ u8 UpdateTurnCounters(void)
gBattlescriptCurrInstr = BattleScript_SandStormHailEnds;
}
else
+ {
gBattlescriptCurrInstr = BattleScript_DamagingWeatherContinues;
+ }
gBattleStruct->animArg1 = B_ANIM_SANDSTORM_CONTINUES;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
BattleScriptExecute(gBattlescriptCurrInstr);
effect++;
}
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
break;
- case 8:
+ case ENDTURN_SUN:
if (gBattleWeather & WEATHER_SUN_ANY)
{
if (!(gBattleWeather & WEATHER_SUN_PERMANENT) && --gWishFutureKnock.weatherDuration == 0)
@@ -814,14 +827,16 @@ u8 UpdateTurnCounters(void)
gBattlescriptCurrInstr = BattleScript_SunlightFaded;
}
else
+ {
gBattlescriptCurrInstr = BattleScript_SunlightContinues;
+ }
BattleScriptExecute(gBattlescriptCurrInstr);
effect++;
}
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
break;
- case 9:
+ case ENDTURN_HAIL:
if (gBattleWeather & WEATHER_HAIL)
{
if (--gWishFutureKnock.weatherDuration == 0)
@@ -830,16 +845,18 @@ u8 UpdateTurnCounters(void)
gBattlescriptCurrInstr = BattleScript_SandStormHailEnds;
}
else
+ {
gBattlescriptCurrInstr = BattleScript_DamagingWeatherContinues;
+ }
gBattleStruct->animArg1 = B_ANIM_HAIL_CONTINUES;
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
BattleScriptExecute(gBattlescriptCurrInstr);
effect++;
}
- gBattleStruct->turncountersTracker++;
+ gBattleStruct->turnCountersTracker++;
break;
- case 10:
+ case ENDTURN_FIELD_COUNT:
effect++;
break;
}
@@ -849,23 +866,47 @@ u8 UpdateTurnCounters(void)
#define TURNBASED_MAX_CASE 19
+enum
+{
+ ENDTURN_INGRAIN,
+ ENDTURN_ABILITIES,
+ ENDTURN_ITEMS1,
+ ENDTURN_LEECH_SEED,
+ ENDTURN_POISON,
+ ENDTURN_BAD_POISON,
+ ENDTURN_BURN,
+ ENDTURN_NIGHTMARES,
+ ENDTURN_CURSE,
+ ENDTURN_WRAP,
+ ENDTURN_UPROAR,
+ ENDTURN_THRASH,
+ ENDTURN_DISABLE,
+ ENDTURN_ENCORE,
+ ENDTURN_LOCK_ON,
+ ENDTURN_CHARGE,
+ ENDTURN_TAUNT,
+ ENDTURN_YAWN,
+ ENDTURN_ITEMS2,
+ ENDTURN_BATTLER_COUNT
+};
+
u8 TurnBasedEffects(void)
{
u8 effect = 0;
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
- while (gBattleStruct->turnEffectsBank < gBattlersCount && gBattleStruct->turnEffectsTracker <= TURNBASED_MAX_CASE)
+ while (gBattleStruct->turnEffectsBattlerId < gBattlersCount && gBattleStruct->turnEffectsTracker <= TURNBASED_MAX_CASE)
{
- gActiveBattler = gBattlerAttacker = gBanksByTurnOrder[gBattleStruct->turnEffectsBank];
+ gActiveBattler = gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->turnEffectsBattlerId];
if (gAbsentBattlerFlags & gBitTable[gActiveBattler])
{
- gBattleStruct->turnEffectsBank++;
+ gBattleStruct->turnEffectsBattlerId++;
}
else
{
switch (gBattleStruct->turnEffectsTracker)
{
- case 0: // ingrain
+ case ENDTURN_INGRAIN: // ingrain
if ((gStatuses3[gActiveBattler] & STATUS3_ROOTED)
&& gBattleMons[gActiveBattler].hp != gBattleMons[gActiveBattler].maxHP
&& gBattleMons[gActiveBattler].hp != 0)
@@ -879,25 +920,27 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 1: // end turn abilities
+ case ENDTURN_ABILITIES: // end turn abilities
if (AbilityBattleEffects(ABILITYEFFECT_ENDTURN, gActiveBattler, 0, 0, 0))
effect++;
gBattleStruct->turnEffectsTracker++;
break;
- case 2: // item effects
- if (ItemBattleEffects(1, gActiveBattler, 0))
+ case ENDTURN_ITEMS1: // item effects
+ if (ItemBattleEffects(1, gActiveBattler, FALSE))
effect++;
gBattleStruct->turnEffectsTracker++;
break;
- case 18: // item effects again
- if (ItemBattleEffects(1, gActiveBattler, 1))
+ case ENDTURN_ITEMS2: // item effects again
+ if (ItemBattleEffects(1, gActiveBattler, TRUE))
effect++;
gBattleStruct->turnEffectsTracker++;
break;
- case 3: // leech seed
- if (gStatuses3[gActiveBattler] & STATUS3_LEECHSEED && gBattleMons[gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BANK].hp != 0 && gBattleMons[gActiveBattler].hp != 0)
+ case ENDTURN_LEECH_SEED: // leech seed
+ if ((gStatuses3[gActiveBattler] & STATUS3_LEECHSEED)
+ && gBattleMons[gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER].hp != 0
+ && gBattleMons[gActiveBattler].hp != 0)
{
- gBattlerTarget = gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BANK; //funny how the 'target' is actually the bank that receives HP
+ gBattlerTarget = gStatuses3[gActiveBattler] & STATUS3_LEECHSEED_BATTLER; // Notice gBattlerTarget is actually the HP receiver.
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8;
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
@@ -908,8 +951,8 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 4: // poison
- if ((gBattleMons[gActiveBattler].status1 & STATUS_POISON) && gBattleMons[gActiveBattler].hp != 0)
+ case ENDTURN_POISON: // poison
+ if ((gBattleMons[gActiveBattler].status1 & STATUS1_POISON) && gBattleMons[gActiveBattler].hp != 0)
{
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8;
if (gBattleMoveDamage == 0)
@@ -919,13 +962,13 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 5: // toxic poison
- if ((gBattleMons[gActiveBattler].status1 & STATUS_TOXIC_POISON) && gBattleMons[gActiveBattler].hp != 0)
+ case ENDTURN_BAD_POISON: // toxic poison
+ if ((gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON) && gBattleMons[gActiveBattler].hp != 0)
{
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 16;
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
- if ((gBattleMons[gActiveBattler].status1 & 0xF00) != 0xF00) //not 16 turns
+ if ((gBattleMons[gActiveBattler].status1 & 0xF00) != 0xF00) // not 16 turns
gBattleMons[gActiveBattler].status1 += 0x100;
gBattleMoveDamage *= (gBattleMons[gActiveBattler].status1 & 0xF00) >> 8;
BattleScriptExecute(BattleScript_PoisonTurnDmg);
@@ -933,8 +976,8 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 6: // burn
- if ((gBattleMons[gActiveBattler].status1 & STATUS_BURN) && gBattleMons[gActiveBattler].hp != 0)
+ case ENDTURN_BURN: // burn
+ if ((gBattleMons[gActiveBattler].status1 & STATUS1_BURN) && gBattleMons[gActiveBattler].hp != 0)
{
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 8;
if (gBattleMoveDamage == 0)
@@ -944,7 +987,7 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 7: // spooky nightmares
+ case ENDTURN_NIGHTMARES: // spooky nightmares
if ((gBattleMons[gActiveBattler].status2 & STATUS2_NIGHTMARE) && gBattleMons[gActiveBattler].hp != 0)
{
// missing sleep check
@@ -956,7 +999,7 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 8: // curse
+ case ENDTURN_CURSE: // curse
if ((gBattleMons[gActiveBattler].status2 & STATUS2_CURSED) && gBattleMons[gActiveBattler].hp != 0)
{
gBattleMoveDamage = gBattleMons[gActiveBattler].maxHP / 4;
@@ -967,7 +1010,7 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 9: // wrap
+ case ENDTURN_WRAP: // wrap
if ((gBattleMons[gActiveBattler].status2 & STATUS2_WRAPPED) && gBattleMons[gActiveBattler].hp != 0)
{
gBattleMons[gActiveBattler].status2 -= 0x2000;
@@ -975,8 +1018,8 @@ u8 TurnBasedEffects(void)
{
gBattleStruct->animArg1 = ewram16004arr(0, gActiveBattler);
gBattleStruct->animArg2 = ewram16004arr(1, gActiveBattler);
- gBattleTextBuff1[0] = 0xFD;
- gBattleTextBuff1[1] = 2;
+ gBattleTextBuff1[0] = B_BUFF_PLACEHOLDER_BEGIN;
+ gBattleTextBuff1[1] = B_BUFF_MOVE;
gBattleTextBuff1[2] = ewram16004arr(0, gActiveBattler);
gBattleTextBuff1[3] = ewram16004arr(1, gActiveBattler);
gBattleTextBuff1[4] = EOS;
@@ -999,15 +1042,15 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 10: // uproar
+ case ENDTURN_UPROAR: // uproar
if (gBattleMons[gActiveBattler].status2 & STATUS2_UPROAR)
{
for (gBattlerAttacker = 0; gBattlerAttacker < gBattlersCount; gBattlerAttacker++)
{
- if ((gBattleMons[gBattlerAttacker].status1 & STATUS_SLEEP)
+ if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
&& gBattleMons[gBattlerAttacker].ability != ABILITY_SOUNDPROOF)
{
- gBattleMons[gBattlerAttacker].status1 &= ~(STATUS_SLEEP);
+ gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP);
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE);
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
BattleScriptExecute(BattleScript_MonWokeUpInUproar);
@@ -1048,7 +1091,7 @@ u8 TurnBasedEffects(void)
if (effect != 2)
gBattleStruct->turnEffectsTracker++;
break;
- case 11: // thrash
+ case ENDTURN_THRASH: // thrash
if (gBattleMons[gActiveBattler].status2 & STATUS2_LOCK_CONFUSE)
{
gBattleMons[gActiveBattler].status2 -= 0x400;
@@ -1070,11 +1113,11 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 12: // disable
+ case ENDTURN_DISABLE: // disable
if (gDisableStructs[gActiveBattler].disableTimer1 != 0)
{
- int i;
- for (i = 0; i < 4; i++)
+ s32 i;
+ for (i = 0; i < MAX_MON_MOVES; i++)
{
if (gDisableStructs[gActiveBattler].disabledMove == gBattleMons[gActiveBattler].moves[i])
break;
@@ -1093,7 +1136,7 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 13: // encore
+ case ENDTURN_ENCORE: // encore
if (gDisableStructs[gActiveBattler].encoreTimer1 != 0)
{
if (gBattleMons[gActiveBattler].moves[gDisableStructs[gActiveBattler].encoredMovePos] != gDisableStructs[gActiveBattler].encoredMove) // pokemon does not have the encored move anymore
@@ -1112,26 +1155,26 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 14: // lock-on decrement
+ case ENDTURN_LOCK_ON: // lock-on decrement
if (gStatuses3[gActiveBattler] & STATUS3_ALWAYS_HITS)
gStatuses3[gActiveBattler] -= 0x8;
gBattleStruct->turnEffectsTracker++;
break;
- case 15: // charge
+ case ENDTURN_CHARGE: // charge
if (gDisableStructs[gActiveBattler].chargeTimer1 && --gDisableStructs[gActiveBattler].chargeTimer1 == 0)
gStatuses3[gActiveBattler] &= ~STATUS3_CHARGED_UP;
gBattleStruct->turnEffectsTracker++;
break;
- case 16: // taunt
+ case ENDTURN_TAUNT: // taunt
if (gDisableStructs[gActiveBattler].tauntTimer1)
gDisableStructs[gActiveBattler].tauntTimer1--;
gBattleStruct->turnEffectsTracker++;
break;
- case 17: // yawn
+ case ENDTURN_YAWN: // yawn
if (gStatuses3[gActiveBattler] & STATUS3_YAWN)
{
gStatuses3[gActiveBattler] -= 0x800;
- if (!(gStatuses3[gActiveBattler] & STATUS3_YAWN) && !(gBattleMons[gActiveBattler].status1 & STATUS_ANY)
+ if (!(gStatuses3[gActiveBattler] & STATUS3_YAWN) && !(gBattleMons[gActiveBattler].status1 & STATUS1_ANY)
&& gBattleMons[gActiveBattler].ability != ABILITY_VITAL_SPIRIT
&& gBattleMons[gActiveBattler].ability != ABILITY_INSOMNIA && !UproarWakeUpCheck(gActiveBattler))
{
@@ -1146,9 +1189,9 @@ u8 TurnBasedEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
- case 19: // done
+ case ENDTURN_BATTLER_COUNT: // done
gBattleStruct->turnEffectsTracker = 0;
- gBattleStruct->turnEffectsBank++;
+ gBattleStruct->turnEffectsBattlerId++;
break;
}
if (effect != 0)
@@ -1162,17 +1205,20 @@ u8 TurnBasedEffects(void)
bool8 HandleWishPerishSongOnTurnEnd(void)
{
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
- switch (gBattleStruct->sub80170DC_Tracker)
+
+ switch (gBattleStruct->wishPerishSongState)
{
case 0: // future sight
- while (gBattleStruct->sub80170DC_Bank < gBattlersCount)
+ while (gBattleStruct->wishPerishSongBattlerId < gBattlersCount)
{
- gActiveBattler = gBattleStruct->sub80170DC_Bank;
+ gActiveBattler = gBattleStruct->wishPerishSongBattlerId;
if (gAbsentBattlerFlags & gBitTable[gActiveBattler])
- gBattleStruct->sub80170DC_Bank++;
+ {
+ gBattleStruct->wishPerishSongBattlerId++;
+ }
else
{
- gBattleStruct->sub80170DC_Bank++;
+ gBattleStruct->wishPerishSongBattlerId++;
if (gWishFutureKnock.futureSightCounter[gActiveBattler] && --gWishFutureKnock.futureSightCounter[gActiveBattler] == 0 && gBattleMons[gActiveBattler].hp)
{
if (gWishFutureKnock.futureSightMove[gActiveBattler] == MOVE_FUTURE_SIGHT)
@@ -1193,17 +1239,17 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
}
}
}
- gBattleStruct->sub80170DC_Tracker = 1;
- gBattleStruct->sub80170DC_Bank = 0;
+ gBattleStruct->wishPerishSongState = 1;
+ gBattleStruct->wishPerishSongBattlerId = 0;
case 1: // perish song
- while (gBattleStruct->sub80170DC_Bank < gBattlersCount)
+ while (gBattleStruct->wishPerishSongBattlerId < gBattlersCount)
{
- gActiveBattler = gBattlerAttacker = gBanksByTurnOrder[gBattleStruct->sub80170DC_Bank];
+ gActiveBattler = gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->wishPerishSongBattlerId];
if (gAbsentBattlerFlags & gBitTable[gActiveBattler])
- gBattleStruct->sub80170DC_Bank++;
+ gBattleStruct->wishPerishSongBattlerId++;
else
{
- gBattleStruct->sub80170DC_Bank++;
+ gBattleStruct->wishPerishSongBattlerId++;
if (gStatuses3[gActiveBattler] & STATUS3_PERISH_SONG)
{
gBattleTextBuff1[0] = 0xFD;
@@ -1333,11 +1379,11 @@ u8 AtkCanceller_UnableToUseMove(void)
gBattleStruct->atkCancellerTracker++;
break;
case 1: // check being asleep
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_SLEEP)
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
{
if (UproarWakeUpCheck(gBattlerAttacker))
{
- gBattleMons[gBattlerAttacker].status1 &= ~(STATUS_SLEEP);
+ gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP);
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE);
BattleScriptPushCursor();
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
@@ -1351,11 +1397,11 @@ u8 AtkCanceller_UnableToUseMove(void)
toSub = 2;
else
toSub = 1;
- if ((gBattleMons[gBattlerAttacker].status1 & STATUS_SLEEP) < toSub)
- gBattleMons[gBattlerAttacker].status1 &= ~(STATUS_SLEEP);
+ if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP) < toSub)
+ gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP);
else
gBattleMons[gBattlerAttacker].status1 -= toSub;
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_SLEEP)
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
{
if (gCurrentMove != MOVE_SNORE && gCurrentMove != MOVE_SLEEP_TALK)
{
@@ -1377,7 +1423,7 @@ u8 AtkCanceller_UnableToUseMove(void)
gBattleStruct->atkCancellerTracker++;
break;
case 2: // check being frozen
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_FREEZE)
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
{
if (Random() % 5)
{
@@ -1394,7 +1440,7 @@ u8 AtkCanceller_UnableToUseMove(void)
}
else // unfreeze
{
- gBattleMons[gBattlerAttacker].status1 &= ~(STATUS_FREEZE);
+ gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze;
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
@@ -1504,7 +1550,7 @@ u8 AtkCanceller_UnableToUseMove(void)
gBattleStruct->atkCancellerTracker++;
break;
case 10: // paralysis
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_PARALYSIS && (Random() % 4) == 0)
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS && (Random() % 4) == 0)
{
gProtectStructs[gBattlerAttacker].prlzImmobility = 1;
CancelMultiTurnMoves(gBattlerAttacker);
@@ -1545,7 +1591,7 @@ u8 AtkCanceller_UnableToUseMove(void)
{
gCurrentMove = MOVE_BIDE;
*bideDmg = gTakenDmg[gBattlerAttacker] * 2;
- gBattlerTarget = gTakenDmgBanks[gBattlerAttacker];
+ gBattlerTarget = gTakenDmgByBattler[gBattlerAttacker];
if (gAbsentBattlerFlags & gBitTable[gBattlerTarget])
gBattlerTarget = GetMoveTarget(MOVE_BIDE, 1);
gBattlescriptCurrInstr = BattleScript_BideAttack;
@@ -1558,11 +1604,11 @@ u8 AtkCanceller_UnableToUseMove(void)
gBattleStruct->atkCancellerTracker++;
break;
case 13: // move thawing
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_FREEZE)
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
{
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT)
{
- gBattleMons[gBattlerAttacker].status1 &= ~(STATUS_FREEZE);
+ gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze;
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
@@ -1873,17 +1919,17 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
}
break;
case ABILITY_SHED_SKIN:
- if ((gBattleMons[bank].status1 & STATUS_ANY) && (Random() % 3) == 0)
+ if ((gBattleMons[bank].status1 & STATUS1_ANY) && (Random() % 3) == 0)
{
- if (gBattleMons[bank].status1 & (STATUS_POISON | STATUS_TOXIC_POISON))
+ if (gBattleMons[bank].status1 & (STATUS1_POISON | STATUS1_TOXIC_POISON))
StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn);
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn);
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn);
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn);
gBattleMons[bank].status1 = 0;
// BUG: The nightmare status does not get cleared here. This was fixed in Emerald.
@@ -1955,7 +2001,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
}
break;
case ABILITY_FLASH_FIRE:
- if (moveType == TYPE_FIRE && !(gBattleMons[bank].status1 & STATUS_FREEZE))
+ if (moveType == TYPE_FIRE && !(gBattleMons[bank].status1 & STATUS1_FREEZE))
{
if (!(eFlashFireArr.arr[bank] & 1))
{
@@ -2232,7 +2278,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
switch (gBattleMons[bank].ability)
{
case ABILITY_IMMUNITY:
- if (gBattleMons[bank].status1 & (STATUS_POISON | STATUS_TOXIC_POISON | 0xF00)) // TODO: what is 0xF00?
+ if (gBattleMons[bank].status1 & (STATUS1_POISON | STATUS1_TOXIC_POISON | 0xF00)) // TODO: what is 0xF00?
{
StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn);
effect = 1;
@@ -2246,7 +2292,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
}
break;
case ABILITY_LIMBER:
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn);
effect = 1;
@@ -2254,7 +2300,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
break;
case ABILITY_INSOMNIA:
case ABILITY_VITAL_SPIRIT:
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
{
gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE);
StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn);
@@ -2262,14 +2308,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg)
}
break;
case ABILITY_WATER_VEIL:
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
effect = 1;
}
break;
case ABILITY_MAGMA_ARMOR:
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn);
effect = 1;
@@ -2751,7 +2797,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
gBattleMoveDamage *= -1;
BattleScriptExecute(BattleScript_ItemHealHP_End2);
effect = ITEM_HP_CHANGE;
- RecordItemBattle(bank, bankHoldEffect);
+ RecordItemEffectBattle(bank, bankHoldEffect);
}
break;
// nice copy/paste there gamefreak, making a function for confuse berries was too much eh?
@@ -2989,41 +3035,41 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
}
break;
case HOLD_EFFECT_CURE_PAR:
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
{
- gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS);
+ gBattleMons[bank].status1 &= ~(STATUS1_PARALYSIS);
BattleScriptExecute(BattleScript_BerryCurePrlzEnd2);
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_PSN:
- if (gBattleMons[bank].status1 & STATUS_PSN_ANY)
+ if (gBattleMons[bank].status1 & STATUS1_PSN_ANY)
{
- gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER);
+ gBattleMons[bank].status1 &= ~(STATUS1_PSN_ANY | STATUS1_TOXIC_COUNTER);
BattleScriptExecute(BattleScript_BerryCurePsnEnd2);
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_BRN:
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
{
- gBattleMons[bank].status1 &= ~(STATUS_BURN);
+ gBattleMons[bank].status1 &= ~(STATUS1_BURN);
BattleScriptExecute(BattleScript_BerryCureBrnEnd2);
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_FRZ:
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
{
- gBattleMons[bank].status1 &= ~(STATUS_FREEZE);
+ gBattleMons[bank].status1 &= ~(STATUS1_FREEZE);
BattleScriptExecute(BattleScript_BerryCureFrzEnd2);
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_SLP:
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
{
- gBattleMons[bank].status1 &= ~(STATUS_SLEEP);
+ gBattleMons[bank].status1 &= ~(STATUS1_SLEEP);
gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE);
BattleScriptExecute(BattleScript_BerryCureSlpEnd2);
effect = ITEM_STATUS_CHANGE;
@@ -3038,31 +3084,31 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
}
break;
case HOLD_EFFECT_CURE_STATUS:
- if (gBattleMons[bank].status1 & STATUS_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION)
+ if (gBattleMons[bank].status1 & STATUS1_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION)
{
i = 0;
- if (gBattleMons[bank].status1 & STATUS_PSN_ANY)
+ if (gBattleMons[bank].status1 & STATUS1_PSN_ANY)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn);
i++;
}
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
{
gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE);
StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn);
i++;
}
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn);
i++;
}
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
i++;
}
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn);
i++;
@@ -3105,7 +3151,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
MarkBattlerForControllerExec(gActiveBattler);
break;
case ITEM_PP_CHANGE:
- if (!(gBattleMons[bank].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[bank].unk18_b & gBitTable[i]))
+ if (!(gBattleMons[bank].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[bank].mimickedMoves & gBitTable[i]))
gBattleMons[bank].pp[i] = changedPP;
break;
}
@@ -3131,45 +3177,45 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
switch (bankHoldEffect)
{
case HOLD_EFFECT_CURE_PAR:
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
{
- gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS);
+ gBattleMons[bank].status1 &= ~(STATUS1_PARALYSIS);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryCureParRet;
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_PSN:
- if (gBattleMons[bank].status1 & STATUS_PSN_ANY)
+ if (gBattleMons[bank].status1 & STATUS1_PSN_ANY)
{
- gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER);
+ gBattleMons[bank].status1 &= ~(STATUS1_PSN_ANY | STATUS1_TOXIC_COUNTER);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryCurePsnRet;
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_BRN:
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
{
- gBattleMons[bank].status1 &= ~(STATUS_BURN);
+ gBattleMons[bank].status1 &= ~(STATUS1_BURN);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryCureBrnRet;
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_FRZ:
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
{
- gBattleMons[bank].status1 &= ~(STATUS_FREEZE);
+ gBattleMons[bank].status1 &= ~(STATUS1_FREEZE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryCureFrzRet;
effect = ITEM_STATUS_CHANGE;
}
break;
case HOLD_EFFECT_CURE_SLP:
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
{
- gBattleMons[bank].status1 &= ~(STATUS_SLEEP);
+ gBattleMons[bank].status1 &= ~(STATUS1_SLEEP);
gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryCureSlpRet;
@@ -3197,26 +3243,26 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn)
}
break;
case HOLD_EFFECT_CURE_STATUS:
- if (gBattleMons[bank].status1 & STATUS_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION)
+ if (gBattleMons[bank].status1 & STATUS1_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION)
{
- if (gBattleMons[bank].status1 & STATUS_PSN_ANY)
+ if (gBattleMons[bank].status1 & STATUS1_PSN_ANY)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn);
}
- if (gBattleMons[bank].status1 & STATUS_SLEEP)
+ if (gBattleMons[bank].status1 & STATUS1_SLEEP)
{
gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE);
StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn);
}
- if (gBattleMons[bank].status1 & STATUS_PARALYSIS)
+ if (gBattleMons[bank].status1 & STATUS1_PARALYSIS)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn);
}
- if (gBattleMons[bank].status1 & STATUS_BURN)
+ if (gBattleMons[bank].status1 & STATUS1_BURN)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn);
}
- if (gBattleMons[bank].status1 & STATUS_FREEZE)
+ if (gBattleMons[bank].status1 & STATUS1_FREEZE)
{
StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn);
}
@@ -3340,13 +3386,13 @@ void unref_sub_801B40C(void)
{
gSideTimers[GetBattlerPosition(bank) & 1].field3 = (bank) | ((bank + 2) << 4);
gSideTimers[GetBattlerPosition(bank) & 1].field4 = sCombinedMoves[i].newMove;
- gSideAffecting[GetBattlerPosition(bank) & 1] |= SIDE_STATUS_X4;
+ gSideStatuses[GetBattlerPosition(bank) & 1] |= SIDE_STATUS_X4;
}
if (sCombinedMoves[i].move1 == gChosenMovesByBanks[bank + 2] && sCombinedMoves[i].move2 == gChosenMovesByBanks[bank])
{
gSideTimers[GetBattlerPosition(bank) & 1].field3 = (bank + 2) | ((bank) << 4);
gSideTimers[GetBattlerPosition(bank) & 1].field4 = sCombinedMoves[i].newMove;
- gSideAffecting[GetBattlerPosition(bank) & 1] |= SIDE_STATUS_X4;
+ gSideStatuses[GetBattlerPosition(bank) & 1] |= SIDE_STATUS_X4;
}
bank++;
}
@@ -3477,7 +3523,7 @@ u8 IsMonDisobedient(void)
// is not obedient
if (gCurrentMove == MOVE_RAGE)
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_RAGE);
- if (gBattleMons[gBattlerAttacker].status1 & STATUS_SLEEP && (gCurrentMove == MOVE_SNORE || gCurrentMove == MOVE_SLEEP_TALK))
+ if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP && (gCurrentMove == MOVE_SNORE || gCurrentMove == MOVE_SLEEP_TALK))
{
gBattlescriptCurrInstr = gUnknown_081D995F;
return 1;
@@ -3515,7 +3561,7 @@ u8 IsMonDisobedient(void)
obedienceLevel = gBattleMons[gBattlerAttacker].level - obedienceLevel;
calc = (Random() & 255);
- if (calc < obedienceLevel && !(gBattleMons[gBattlerAttacker].status1 & STATUS_ANY) && gBattleMons[gBattlerAttacker].ability != ABILITY_VITAL_SPIRIT && gBattleMons[gBattlerAttacker].ability != ABILITY_INSOMNIA)
+ if (calc < obedienceLevel && !(gBattleMons[gBattlerAttacker].status1 & STATUS1_ANY) && gBattleMons[gBattlerAttacker].ability != ABILITY_VITAL_SPIRIT && gBattleMons[gBattlerAttacker].ability != ABILITY_INSOMNIA)
{
// try putting asleep
int i;
diff --git a/src/berry.c b/src/berry.c
index 162615086..ad0a31b28 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -1072,8 +1072,8 @@ extern const u8 gSpriteImage_UnusedCherry[];
extern const u16 gSpritePalette_UnusedCherry[];
extern u8 gUnknown_Debug_839B6CE[];
-static const u8 gUnknown_Debug_083F7F84[] = _("そとから きた きのみ");
-static const u8 gUnknown_Debug_083F7F90[] = _("ただいま かいはつちゅう");
+static const u8 gUnknown_Debug_083F7F84[] = DTR("そとから きた きのみ", "An exterior BERRY");
+static const u8 gUnknown_Debug_083F7F90[] = DTR("ただいま かいはつちゅう", "Currently under development");
void debug_sub_80C2C18(const u8 *name, u8 holdEffect, u8 holdEffectParam)
{
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 3ccc4ab5d..a0300ed1f 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -1258,7 +1258,7 @@ static void sub_804E9F8(void)
break;
case 102:
if (!gPaletteFade.active)
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
break;
}
RunTasks();
@@ -2480,7 +2480,7 @@ static void sub_8050E30(void)
break;
case 12:
if (gReceivedRemoteLinkPlayers == 0)
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
break;
}
@@ -2529,7 +2529,7 @@ static void sub_80510E8(void)
if (gBerryBlenderData->field_7C == 0)
SetMainCallback2(DoBerryBlending);
else
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
break;
}
@@ -3271,6 +3271,13 @@ void debug_sub_80524BC(void)
SetMainCallback2(sub_8052AF8);
}
+// Partially fixes the clipping on longer names.
+#if DEBUG_TRANSLATE && DEBUG
+# define BLENDER_DEBUG_BERRY_LEN 12
+#else
+# define BLENDER_DEBUG_BERRY_LEN 6
+#endif
+
static void BlenderDebug_PrintBerryData(void)
{
u8 text[128];
@@ -3294,8 +3301,8 @@ static void BlenderDebug_PrintBerryData(void)
else
{
CopyItemName(sBlenderDebug.berries[i] + 133, &text[0]);
- text[6] = CHAR_SPACE;
- text[7] = EOS;
+ text[BLENDER_DEBUG_BERRY_LEN] = CHAR_SPACE;
+ text[BLENDER_DEBUG_BERRY_LEN + 1] = EOS;
}
var = (i * 3) + 3;
Menu_PrintText(text, 2, var);
@@ -3318,7 +3325,7 @@ static void BlenderDebug_PrintBerryData(void)
ConvertIntToDecimalStringN(&text[15], gBerries[sBlenderDebug.berries[i]].smoothness, 2, 2);
text[17] = EOS;
- Menu_PrintText(text, 7, var);
+ Menu_PrintText(text, BLENDER_DEBUG_BERRY_LEN + 1, var);
}
if (sBlenderDebug.pokeblock.color != 0)
{
@@ -3343,7 +3350,7 @@ static void BlenderDebug_PrintBerryData(void)
ConvertIntToHexStringN(&text[15], sBlenderDebug.feel, 2, 2);
text[17] = EOS;
- Menu_PrintText(text, 7, 17);
+ Menu_PrintText(text, BLENDER_DEBUG_BERRY_LEN + 1, 17);
}
}
diff --git a/src/bike.c b/src/bike.c
index b1176997b..1f5d45418 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -20,6 +20,7 @@ extern u8 gUnknown_020297ED;
u8 debug_sub_805F2B0(u8);
#endif
+// this file's functions
static void MovePlayerOnMachBike(u8, u16, u16);
static u8 GetMachBikeTransition(u8 *);
static void MachBikeTransition_FaceDirection(u8);
@@ -61,6 +62,8 @@ static u8 CanBikeFaceDirOnMetatile(u8, u8);
static bool8 WillPlayerCollideWithCollision(u8, u8);
static void Bike_SetBikeStill(void);
+// const rom data
+
/*
A bike transition is a type of callback for the bike that actually
modifies the bicycle's direction or momentum or otherwise movement.
@@ -123,7 +126,7 @@ static const u8 sAcroBikeJumpTimerList[] = {4, 0};
// this is a list of history inputs to do in order to do the check to retrieve a jump direction for acro bike. it seems to be an extensible list, so its possible that Game Freak may have intended for the Acro Bike to have more complex tricks at some point. The final list only has the acro jump.
static const struct BikeHistoryInputInfo sAcroBikeTricksList[] =
{
- // the 0xF is a mask performed with each byte of the array in order to perform the check on only the last entry of the history list, otherwise the check wouldnt work as there can be 0xF0 as opposed to 0x0F.
+ // the 0xF is a mask performed with each byte of the array in order to perform the check on only the last entry of the history list, otherwise the check wouldn't work as there can be 0xF0 as opposed to 0x0F.
{DIR_SOUTH, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_SOUTH},
{DIR_NORTH, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_NORTH},
{DIR_WEST, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_WEST},
@@ -630,7 +633,7 @@ static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
return;
}
collision = get_some_collision(direction);
- //TODO: Try to get rid of this goto
+ // TODO: Try to get rid of this goto
if (collision == 0 || collision == 9)
{
goto derp;
@@ -647,7 +650,7 @@ static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
}
else
{
- derp:
+ derp:
PlayerMovingHoppingWheelie(direction);
}
}
@@ -755,7 +758,7 @@ static void AcroBikeTransition_WheelieRisingMoving(u8 direction)
static void AcroBikeTransition_WheelieLoweringMoving(u8 direction)
{
- u8 var;
+ u8 collision;
struct EventObject *playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
if (CanBikeFaceDirOnMetatile(direction, playerEventObj->currentMetatileBehavior) == 0)
@@ -763,12 +766,12 @@ static void AcroBikeTransition_WheelieLoweringMoving(u8 direction)
PlayerEndWheelie(playerEventObj->movementDirection);
return;
}
- var = get_some_collision(direction);
- if (var > 0 && var < 12)
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
{
- if (var == 6)
+ if (collision == 6)
PlayerJumpLedge(direction);
- else if (var < 5 || var > 8)
+ else if (collision < 5 || collision > 8)
PlayerEndWheelie(direction);
return;
}
diff --git a/src/cable_club.c b/src/cable_club.c
index b030d8cc2..28bf3b759 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -940,7 +940,7 @@ void unref_sub_8083BB0(void)
void sub_8083BDC(void)
{
- TrainerCard_ShowLinkCard(gSpecialVar_0x8006, c2_exit_to_overworld_1_continue_scripts_restart_music);
+ TrainerCard_ShowLinkCard(gSpecialVar_0x8006, CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
bool32 sub_8083BF4(u8 linkPlayerIndex)
diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c
index e4ae70c0b..760887834 100644
--- a/src/calculate_base_damage.c
+++ b/src/calculate_base_damage.c
@@ -153,7 +153,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (attackerHoldEffect == gHoldEffectToType[i][0]
&& type == gHoldEffectToType[i][1])
{
- if (TYPE_IS_PHYSICAL(type))
+ if (IS_TYPE_PHYSICAL(type))
attack = (attack * (attackerHoldEffectParam + 100)) / 100;
else
spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100;
@@ -204,7 +204,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION)
defense /= 2;
- if (TYPE_IS_PHYSICAL(type)) // type < TYPE_MYSTERY
+ if (IS_TYPE_PHYSICAL(type)) // type < TYPE_MYSTERY
{
if (gCritMultiplier == 2)
{
@@ -232,7 +232,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
damage = damage / damageHelper;
damage /= 50;
- if ((attacker->status1 & STATUS_BURN) && attacker->ability != ABILITY_GUTS)
+ if ((attacker->status1 & STATUS1_BURN) && attacker->ability != ABILITY_GUTS)
damage /= 2;
if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1)
@@ -254,7 +254,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (type == TYPE_MYSTERY)
damage = 0; // is ??? type. does 0 damage.
- if (TYPE_IS_SPECIAL(type)) // type > TYPE_MYSTERY
+ if (IS_TYPE_SPECIAL(type)) // type > TYPE_MYSTERY
{
if (gCritMultiplier == 2)
{
diff --git a/src/clock.c b/src/clock.c
index fceccdfcb..3bea39754 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -1,21 +1,20 @@
#include "global.h"
#include "clock.h"
-#include "berry.h"
-#include "dewford_trend.h"
#include "event_data.h"
+#include "rtc.h"
+#include "time_events.h"
#include "field_specials.h"
-#include "field_weather.h"
#include "lottery_corner.h"
+#include "dewford_trend.h"
+#include "tv.h"
+#include "field_weather.h"
+#include "berry.h"
#include "main.h"
#include "overworld.h"
-#include "rtc.h"
-#include "time_events.h"
-#include "tv.h"
#include "wallclock.h"
-static void UpdatePerDay(struct Time *time);
-static void UpdatePerMinute(struct Time *time);
-static void ReturnFromStartWallClock(void);
+static void UpdatePerDay(struct Time *localTime);
+static void UpdatePerMinute(struct Time *localTime);
void InitTimeBasedEvents(void)
{
@@ -35,50 +34,49 @@ void DoTimeBasedEvents(void)
}
}
-static void UpdatePerDay(struct Time *time)
+static void UpdatePerDay(struct Time *localTime)
{
u16 *varPtr = GetVarPointer(VAR_DAYS);
int days = *varPtr;
- u16 newDays;
+ u16 daysSince;
- if (days != time->days && days <= time->days)
+ if (days != localTime->days && days <= localTime->days)
{
- newDays = time->days - days;
+ daysSince = localTime->days - days;
ClearDailyFlags();
- UpdateDewfordTrendPerDay(newDays);
- UpdateTVShowsPerDay(newDays);
- UpdateWeatherPerDay(newDays);
- UpdatePartyPokerusTime(newDays);
- UpdateMirageRnd(newDays);
- UpdateBirchState(newDays);
- SetShoalItemFlag(newDays);
- SetRandomLotteryNumber(newDays);
- *varPtr = time->days;
+ UpdateDewfordTrendPerDay(daysSince);
+ UpdateTVShowsPerDay(daysSince);
+ UpdateWeatherPerDay(daysSince);
+ UpdatePartyPokerusTime(daysSince);
+ UpdateMirageRnd(daysSince);
+ UpdateBirchState(daysSince);
+ SetShoalItemFlag(daysSince);
+ SetRandomLotteryNumber(daysSince);
+ *varPtr = localTime->days;
}
}
-static void UpdatePerMinute(struct Time *time)
+static void UpdatePerMinute(struct Time *localTime)
{
- struct Time newTime;
- s32 minutesPassed;
-
- CalcTimeDifference(&newTime, &gSaveBlock2.lastBerryTreeUpdate, time);
- minutesPassed = 1440 * newTime.days + 60 * newTime.hours + newTime.minutes;
-
- if (minutesPassed == 0) // do not do the update for the first minute.
- return;
+ struct Time difference;
+ int minutes;
- if (minutesPassed > -1) // do not perform an update on invalid minutesPassed.
+ CalcTimeDifference(&difference, &gSaveBlock2.lastBerryTreeUpdate, localTime);
+ minutes = 24 * 60 * difference.days + 60 * difference.hours + difference.minutes;
+ if (minutes != 0)
{
- BerryTreeTimeUpdate(minutesPassed);
- gSaveBlock2.lastBerryTreeUpdate = *time;
+ if (minutes >= 0)
+ {
+ BerryTreeTimeUpdate(minutes);
+ gSaveBlock2.lastBerryTreeUpdate = *localTime;
+ }
}
}
static void ReturnFromStartWallClock(void)
{
InitTimeBasedEvents();
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void StartWallClock(void)
diff --git a/src/contest.c b/src/contest.c
index 54294fdfa..9fb17a86b 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -46,7 +46,7 @@ extern u8 gDisplayedStringBattle[];
extern u16 gBattleTypeFlags;
extern u8 gBattlerAttacker;
extern u8 gBattlerTarget;
-extern u8 gBanksBySide[];
+extern u8 gBattlerPositions[];
extern u8 gBattlerSpriteIds[];
extern struct Window gUnknown_03004210;
extern u32 gContestRngValue;
@@ -528,10 +528,10 @@ u8 sub_80AB70C(u8 *a)
CreateApplauseMeterSprite();
sub_80B0324();
sub_80B0518();
- gBanksBySide[0] = 0;
- gBanksBySide[1] = 1;
- gBanksBySide[2] = 3;
- gBanksBySide[3] = 2;
+ gBattlerPositions[0] = 0;
+ gBattlerPositions[1] = 1;
+ gBattlerPositions[2] = 3;
+ gBattlerPositions[3] = 2;
gBattleTypeFlags = 0;
gBattlerAttacker = 2;
gBattlerTarget = 3;
diff --git a/src/contest_link_80C2020.c b/src/contest_link_80C2020.c
index 8269f424b..f4203dd42 100644
--- a/src/contest_link_80C2020.c
+++ b/src/contest_link_80C2020.c
@@ -753,7 +753,7 @@ static void sub_80C2EA0(u8 taskId)
REG_BLDCNT = 0;
REG_BLDY = 0;
DestroyTask(taskId);
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
}
}
diff --git a/src/data/graphics.c b/src/data/graphics.c
index 20d8f91d0..9cb0a83d6 100644
--- a/src/data/graphics.c
+++ b/src/data/graphics.c
@@ -10,10 +10,18 @@ const u8 gMonBackPic_CircledQuestionMark[] = INCBIN_U8("graphics/pokemon/circled
const u16 gMonPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/normal.gbapal.lz");
const u16 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U16("graphics/pokemon/circled_question_mark/shiny.gbapal.lz");
-// japanese table and bunch of stuff
-const u8 gUnusedOldCharmap_Gfx_lz[] = INCBIN_U8("graphics/unused/old_charmap.4bpp.lz");
-const u8 gUnusedOldCharmap_Tilemap_lz[] = INCBIN_U8("graphics/unused/old_charmap.bin.lz");
-const u16 gUnusedOldCharmap_Pal_lz[] = INCBIN_U16("graphics/unused/old_charmap.gbapal.lz");
+// The test menu debug battle tileset. This uses the old Crystal charmap and
+// rendering method (it uses tiles instead of text).
+// Oddly, the English version is in Japanese and the German version is in English.
+#if DEBUG_TRANSLATE || GERMAN
+const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.4bpp.lz");
+const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.bin.lz");
+const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_en.gbapal.lz");
+#else
+const u8 gDebugBattleCharmap_Gfx_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.4bpp.lz");
+const u8 gDebugBattleCharmap_Tilemap_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.bin.lz");
+const u8 gDebugBattleCharmap_Pal_lz[] = INCBIN_U8("graphics/debug/debug_battle_charmap_jp.gbapal.lz");
+#endif
const u8 gSmokescreenImpactTiles[] = INCBIN_U8("graphics/battle_anims/sprites/smokescreen_impact.4bpp.lz");
const u16 gSmokescreenImpactPalette[] = INCBIN_U16("graphics/battle_anims/sprites/smokescreen_impact.gbapal.lz");
diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json
index 9adbc28de..46d6feea4 100644
--- a/src/data/wild_encounters.json
+++ b/src/data/wild_encounters.json
@@ -26,7 +26,12 @@
"type": "fishing_mons",
"encounter_rates": [
70, 30, 60, 20, 20, 40, 40, 15, 4, 1
- ]
+ ],
+ "groups": {
+ "old_rod": [0, 1],
+ "good_rod": [2, 3, 4],
+ "super_rod": [5, 6, 7, 8, 9]
+ }
}
],
"encounters": [
diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt
index de8396dd6..c6bbdd34e 100644
--- a/src/data/wild_encounters.json.txt
+++ b/src/data/wild_encounters.json.txt
@@ -3,14 +3,26 @@
## for wild_encounter_group in wild_encounter_groups
{% if wild_encounter_group.for_maps %}
## for wild_encounter_field in wild_encounter_group.fields
+{% if not existsIn(wild_encounter_field, "groups") %}
## for encounter_rate in wild_encounter_field.encounter_rates
-{% if trackVar(encounter_rate, 100) %}
+{% if loop.index == 0 %}
#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} {{ encounter_rate }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ subtract(loop.index, 1) }} + {{ encounter_rate }}{% endif %} {{ setVarInt(wild_encounter_field.type, loop.index) }}
## endfor
#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_TOTAL (ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ getVar(wild_encounter_field.type) }})
+{% else %}
+## for field_subgroup_key, field_subgroup_subarray in wild_encounter_field.groups
+## for field_subgroup_index in field_subgroup_subarray
+{% if loop.index == 0 %}
+#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ field_subgroup_index }} {{ at(wild_encounter_field.encounter_rates, field_subgroup_index) }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ field_subgroup_index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ getVar("previous_slot") }} + {{ at(wild_encounter_field.encounter_rates, field_subgroup_index) }}{% endif %}{{ setVarInt(concat(wild_encounter_field.type, field_subgroup_key), field_subgroup_index) }}{{ setVarInt("previous_slot", field_subgroup_index) }}
+## endfor
+#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_TOTAL (ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_{{ upper(field_subgroup_key) }}_SLOT_{{ getVar(concat(wild_encounter_field.type, field_subgroup_key)) }})
+## endfor
+{% endif %}
## endfor
{% endif %}
+
+
## for encounter in wild_encounter_group.encounters
{% if contains(encounter.base_label, "Sapphire") %}#ifdef SAPPHIRE
{% else if contains(encounter.base_label, "Ruby") %}#ifdef RUBY{% endif %}
diff --git a/src/debug/ereader_debug_menu.c b/src/debug/ereader_debug_menu.c
index aaffca383..74a5ff10c 100644
--- a/src/debug/ereader_debug_menu.c
+++ b/src/debug/ereader_debug_menu.c
@@ -10,7 +10,11 @@
#include "berry.h"
#include "mail_data.h"
+#if DEBUG
+const u8 Str_842E238[] = DTR("タマゴ", "EGG");
+#else
const u8 Str_842E238[] = _("タマゴ");
+#endif
#if DEBUG
@@ -131,7 +135,7 @@ extern u8 gUnknown_Debug_845DDB2[];
extern u8 gUnknown_Debug_845DDB2End[];
extern u8 gUnknown_Debug_845DDD6[];
-const u8 Str_842E23C[] = _("ガイブ");
+const u8 Str_842E23C[] = DTR("ガイブ", "EXTERNAL");
size_t debug_sub_813C5B4(u8 * dest)
{
@@ -286,7 +290,7 @@ extern u8 gUnknown_Debug_845E4EF[];
extern u8 gUnknown_Debug_845E4EFEnd[];
extern u8 gUnknown_Debug_845E506[];
-const u8 Str_842E253[] = _(" そら  カードイー");
+const u8 Str_842E253[] = DTR(" そら  カードイー", "eCARD TRAINER");
size_t debug_sub_813C93C(u8 * dest)
{
@@ -305,22 +309,22 @@ size_t debug_sub_813C93C(u8 * dest)
return size;
}
-const u8 Str_842E25E[] = _("ポケコッコ");
+const u8 Str_842E25E[] = KANA("ポケコッコ"); // TRN: kokko?
const u8 Str_842E264[] = _("ticket");
const u8 Str_842E26B[] = _("{PKMN}");
-const u8 Str_842E26E[] = _("wrong {PKMN}");
+const u8 Str_842E26E[] = _("wrong {PKMN}");
const u8 Str_842E277[] = _("ribbon");
const u8 Str_842E27E[] = _("DEX");
const u8 Str_842E282[] = _("message");
const u8 Str_842E28A[] = _("egg");
-const u8 Str_842E28E[] = _("RAM seed");
+const u8 Str_842E28E[] = _("RAM seed");
const u8 Str_842E297[] = _("trainer");
const u8 Str_842E29F[] = _("clock");
const u8 Str_842E2A5[] = _("item");
const u8 Str_842E2AA[] = _("goods");
const u8 Str_842E2B0[] = _("potion");
const u8 Str_842E2B7[] = _("ball");
-const u8 Str_842E2BC[] = _("cheri berry");
+const u8 Str_842E2BC[] = _("cheri berry");
const u8 Str_842E2C8[] = _("TM01");
const struct UnkDebugMenu3Items gUnknown_Debug_842E2D0[] = {
diff --git a/src/debug/matsuda_debug_menu.c b/src/debug/matsuda_debug_menu.c
index 1d2879661..27d2db66b 100644
--- a/src/debug/matsuda_debug_menu.c
+++ b/src/debug/matsuda_debug_menu.c
@@ -44,13 +44,13 @@ static void sub_80AA614(u8, u8);
static void sub_80AAD08(struct Sprite *, s8);
// unused
-const u8 gText_Unused83C9150[] = _("テストです"); // "test"
+const u8 gText_Unused83C9150[] = DTR("テストです", "Test");
const u8 gMatsudaDebugMenu_ActionContestText[] = _("Contest");
const u8 gMatsudaDebugMenu_ActionContestResultsText[] = _("Contest results");
// unused
-const u8 gMatsudaDebugMenu_ActionChangePerimeterText[] = _("パラメータへんこう"); // "Change parameter"
+const u8 gMatsudaDebugMenu_ActionChangeParameterText[] = DTR("パラメータへんこう", "Change parameter");
// unused
-const u8 gMatsudaDebugMenu_ActionChangeMoveText[] = _("わざ へんこう"); // "Change move"
+const u8 gMatsudaDebugMenu_ActionChangeMoveText[] = DTR("わざ へんこう", "Change move"); // "Change move"
const u8 gMatsudaDebugMenu_ActionContestCommText[] = _("Contest (comm.)");
const u8 gMatsudaDebugMenu_ActionCommTestText[] = _("Init comm. data");
const u8 gMatsudaDebugMenu_ActionSetHighScoreText[] = _("Set highest score");
@@ -387,8 +387,8 @@ static void (* const gUnknown_083C92E4[][2])(struct Sprite *, s8) =
};
static const u8 gMatsudaDebugMenu_StartText[] = _("{COLOR CYAN}{HIGHLIGHT RED}");
-static const u8 gMatsudaDebugMenu_StartJapText[] = _("かいし"); // because StartText is only called by StringCopy, this part appears to be unused.
-static const u8 gMatsudaDebugMenu_GoBackText[] = _("もどる");
+static const u8 gMatsudaDebugMenu_StartJapText[] = DTR("かいし", "START"); // because StartText is only called by StringCopy, this part appears to be unused.
+static const u8 gMatsudaDebugMenu_GoBackText[] = DTR("もどる", "BACK");
#ifdef GERMAN
static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP,");
@@ -396,12 +396,12 @@ static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP,");
static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP.");
#endif
-static const u8 MatsudaDebugMenuText_Cool[] = _("かっこよさ"); // cool
-static const u8 MatsudaDebugMenuText_Cute[] = _("かわいさ"); // cute
-static const u8 MatsudaDebugMenuText_Beauty[] = _("うつくしさ"); // beauty
-static const u8 MatsudaDebugMenuText_Smart[] = _("かしこさ"); // smart
-static const u8 MatsudaDebugMenuText_Tough[] = _("たくましさ"); // tough
-static const u8 MatsudaDebugMenuText_Sheen[] = _("けづや"); // sheen
+static const u8 MatsudaDebugMenuText_Cool[] = DTR("かっこよさ", "COOL");
+static const u8 MatsudaDebugMenuText_Cute[] = DTR("かわいさ", "CUTE");
+static const u8 MatsudaDebugMenuText_Beauty[] = DTR("うつくしさ", "BEAUTY");
+static const u8 MatsudaDebugMenuText_Smart[] = DTR("かしこさ", "SMART");
+static const u8 MatsudaDebugMenuText_Tough[] = DTR("たくましさ", "TOUGH");
+static const u8 MatsudaDebugMenuText_Sheen[] = DTR("けづや", "SHEEN");
static const u8 *const gMatsudaDebugMenuTextList1[] =
{
@@ -413,11 +413,11 @@ static const u8 *const gMatsudaDebugMenuTextList1[] =
MatsudaDebugMenuText_Sheen,
};
-static const u8 MatsudaDebugMenuText_CoolContest[] = _("かっこよさコンテスト");
-static const u8 MatsudaDebugMenuText_BeautyContest[] = _("うつくしさコンテスト");
-static const u8 MatsudaDebugMenuText_CuteContest[] = _("かわいさコンテスト ");
-static const u8 MatsudaDebugMenuText_SmartContest[] = _("かしこさコンテスト ");
-static const u8 MatsudaDebugMenuText_ToughContest[] = _("たくましさコンテスト");
+static const u8 MatsudaDebugMenuText_CoolContest[] = DTR("かっこよさコンテスト", "COOL CONTEST");
+static const u8 MatsudaDebugMenuText_BeautyContest[] = DTR("うつくしさコンテスト", "BEAUTY CONTEST");
+static const u8 MatsudaDebugMenuText_CuteContest[] = DTR("かわいさコンテスト ", "CUTE CONTEST");
+static const u8 MatsudaDebugMenuText_SmartContest[] = DTR("かしこさコンテスト ", "SMART CONTEST");
+static const u8 MatsudaDebugMenuText_ToughContest[] = DTR("たくましさコンテスト", "TOUGH CONTEST");
static const u8 *const gMatsudaDebugMenuTextList2[] =
{
@@ -428,10 +428,10 @@ static const u8 *const gMatsudaDebugMenuTextList2[] =
MatsudaDebugMenuText_ToughContest,
};
-static const u8 MatsudaDebugMenuText_Fallarbor[] = _("ハジツゲ/ノーマル"); // Fallarbor / Normal
-static const u8 MatsudaDebugMenuText_Verdanturf[] = _("シダケ/スーパー "); // Verdanturf / Super
-static const u8 MatsudaDebugMenuText_Slateport[] = _("カイナ/ハイパー "); // Slateport / Hyper
-static const u8 MatsudaDebugMenuText_Lilycove[] = _("ミナモ/マスター "); // Lilycove / Master
+static const u8 MatsudaDebugMenuText_Fallarbor[] = DTR("ハジツゲ/ノーマル", "FALLARBOR/NORMAL"); // Fallarbor / Normal
+static const u8 MatsudaDebugMenuText_Verdanturf[] = DTR("シダケ/スーパー ", "VERDANTURF/SUPER"); // Verdanturf / Super
+static const u8 MatsudaDebugMenuText_Slateport[] = DTR("カイナ/ハイパー ", "SLATEPORT/HYPER"); // Slateport / Hyper
+static const u8 MatsudaDebugMenuText_Lilycove[] = DTR("ミナモ/マスター ", "LILYCOVE/MASTER"); // Lilycove / Master
static const u8 *const gMatsudaDebugMenuTextList3[] =
{
diff --git a/src/debug/mori_debug_menu.c b/src/debug/mori_debug_menu.c
index 4f798ecb3..dfa2487a5 100644
--- a/src/debug/mori_debug_menu.c
+++ b/src/debug/mori_debug_menu.c
@@ -31,9 +31,9 @@ const u8 gUnknown_0839B22C[][3] =
};
const u8 gUnknown_0839B24A[] = _("ND");
-const u8 gUnknown_0839B24D[] = _("の こどもは\n"); // "'s child <topic-particle>"=
+const u8 gUnknown_0839B24D[] = DTR("の こどもは\n", "'s child is\n");
const u8 gUnknown_0839B255[] = _(" ");
-const u8 gUnknown_0839B257[] = _("ながいなまえぽけもん"); // "long name pokemon" (used as test name)
+const u8 gUnknown_0839B257[] = DTR("ながいなまえぽけもん", "LongName{PKMN}"); // "long name pokemon" (used as test name)
const u8 Text_39B262[] = _("Search a child");
const u8 Text_39B271[] = _("Egg");
const u8 Text_39B275[] = _("Egg (male)");
@@ -45,7 +45,7 @@ const u8 Text_39B2AF[] = _("Long name");
#ifdef GERMAN
const u8 Text_39B2B9[] = _("Delete {POKEBLOCK}");
#else
-const u8 Text_39B2B9[] = _("ポロックけす");
+const u8 Text_39B2B9[] = DTR("ポロックけす", "Delete {POKEBLOCK}");
#endif
const struct MenuAction gMoriDebugMenuActions[] =
diff --git a/src/debug/nakamura_debug_menu.c b/src/debug/nakamura_debug_menu.c
index e6af3c58d..32ac57dc2 100644
--- a/src/debug/nakamura_debug_menu.c
+++ b/src/debug/nakamura_debug_menu.c
@@ -50,7 +50,7 @@ static bool8 SetPokeblock(void);
static const u8 Str_843E36C[] = _("Berries");
static const u8 Str_843E374[] = _("Goods");
static const u8 Str_843E37A[] = _("{PKMN} list");
-static const u8 Str_843E382[] = _("トラップ");
+static const u8 Str_843E382[] = DTR("トラップ", "Trap");
static const u8 Str_843E387[] = _("Move your base");
static const u8 Str_843E396[] = _("Moving {PKMN}");
static const u8 Str_843E3A0[] = _("Fishing points");
@@ -874,10 +874,11 @@ static struct {
EWRAM_DATA u8 sNakaGenderTest_CursorPosition = 0;
static const u8 _843E5D1[] = {0x0F, 0x16, 0x19};
-static const u8 Str_843E5D4[] = _(
- "Aボタン {ESCAPE}\p"
- "  Bボタン ー\n"
- "START けってい");
+static const u8 Str_843E5D4[] = DTR(
+ "Aボタン {TALL_PLUS}  Bボタン ー\n"
+ "START けってい",
+ "A BUTTON {TALL_PLUS} B BUTTON {JPN}ー{ENG}\n"
+ "START CHOOSE");
void NakaGenderTest(void)
{
@@ -1916,14 +1917,14 @@ static bool8 SetPokeblock(void)
EWRAM_DATA u8 sEVTest_CursorPosition = 0;
-static const u8 Str_843E5F2[] = _("HP どりょくち");
-static const u8 Str_843E5FB[] = _("こうげき どりょくち");
-static const u8 Str_843E606[] = _("ぼうぎょ どりょくち");
-static const u8 Str_843E611[] = _("すばやさ どりょくち");
-static const u8 Str_843E61C[] = _("とくこう どりょくち");
-static const u8 Str_843E627[] = _("とくぼう どりょくち");
-static const u8 Str_843E632[] = _("なつきど");
-static const u8 Str_843E637[] = _("どりょくち ごうけい");
+static const u8 Str_843E5F2[] = DTR("HP どりょくち", "HP EVs");
+static const u8 Str_843E5FB[] = DTR("こうげき どりょくち", "ATK EVs");
+static const u8 Str_843E606[] = DTR("ぼうぎょ どりょくち", "DEF EVs");
+static const u8 Str_843E611[] = DTR("すばやさ どりょくち", "SPE EVs");
+static const u8 Str_843E61C[] = DTR("とくこう どりょくち", "SPA EVs");
+static const u8 Str_843E627[] = DTR("とくぼう どりょくち", "SPD EVs");
+static const u8 Str_843E632[] = DTR("なつきど", "FRIENDSHIP");
+static const u8 Str_843E637[] = DTR("どりょくち ごうけい", "EV TOTAL");
static void EVTest_Init(void)
{
@@ -2071,13 +2072,13 @@ EWRAM_DATA u16 sRngRight = 0;
EWRAM_DATA u16 sNumSamples = 0;
EWRAM_DATA u16 sRngMax = 0;
-static const u8 Str_843E642[] = _("ここから");
-static const u8 Str_843E647[] = _("ここまで");
-static const u8 Str_843E64C[] = _("かいすう");
-static const u8 Str_843E651[] = _("けっか");
-static const u8 Str_843E655[] = _("かい");
+static const u8 Str_843E642[] = DTR("ここから", "FROM");
+static const u8 Str_843E647[] = DTR("ここまで", "TO");
+static const u8 Str_843E64C[] = DTR("かいすう", "TIMES");
+static const u8 Str_843E651[] = DTR("けっか", "RESULT");
+static const u8 Str_843E655[] = DTR("かい", "×");
static const u8 Str_843E658[] = _("0");
-static const u8 Str_843E65A[] = _("はんい");
+static const u8 Str_843E65A[] = DTR("はんい", "RANGE");
static u16 EVTest_GetDiscreteUniformRandomSamples(void)
{
diff --git a/src/debug/nohara_debug_menu.c b/src/debug/nohara_debug_menu.c
index 349e5111f..d26d6038c 100644
--- a/src/debug/nohara_debug_menu.c
+++ b/src/debug/nohara_debug_menu.c
@@ -57,14 +57,14 @@ bool8 NoharaDebugMenu_LegendsFlagOn(void);
bool8 NoharaDebugMenu_AddNumWinningStreaks(void);
const u8 gUnknown_Debug_083C48C4[] = _("TV");
-const u8 gUnknown_Debug_083C48C7[] = _("Fan");
-const u8 gUnknown_Debug_083C48CB[] = _("Battle (vs Dad)");
-const u8 gUnknown_Debug_083C48DB[] = _("Dad after battle");
-const u8 gUnknown_Debug_083C48EC[] = _("SOOTOPOLIS CITY");
-const u8 gUnknown_Debug_083C48FC[] = _("Embark");
-const u8 gUnknown_Debug_083C4903[] = _("Yes 9999");
-const u8 gUnknown_Debug_083C490C[] = _("Legends flag ON");
-const u8 gUnknown_Debug_083C491C[] = _("Add num of winning streaks");
+const u8 gUnknown_Debug_083C48C7[] = DTR("Fan", "LILYCOVE TRAINER FAN CLUB");
+const u8 gUnknown_Debug_083C48CB[] = _("Battle (vs Dad)");
+const u8 gUnknown_Debug_083C48DB[] = _("Dad after battle");
+const u8 gUnknown_Debug_083C48EC[] = _("SOOTOPOLIS CITY");
+const u8 gUnknown_Debug_083C48FC[] = DTR("Embark", "Reset Mr. BRINEY");
+const u8 gUnknown_Debug_083C4903[] = _("Yes 9999");
+const u8 gUnknown_Debug_083C490C[] = _("Legends flag ON");
+const u8 gUnknown_Debug_083C491C[] = _("Add num of winning streaks");
const struct MenuAction gUnknown_Debug_083C4938[] = {
{gUnknown_Debug_083C48C4, NoharaDebugMenu_TV},
@@ -104,28 +104,30 @@ bool8 debug_sub_808F414(void)
}
}
-const u8 gUnknown_Debug_083C4980[] = _("Want to change data type{CLEAR_TO 143}Press Left\n"
- "to see secret type now?{CLEAR_TO 143}to switch");
+const u8 gUnknown_Debug_083C4980[] = _("Want to change data type{CLEAR_TO 143}Press Left\n"
+ "to see secret type now?{CLEAR_TO 143}to switch");
-const u8 gUnknown_Debug_083C49CA[] = _("Choose the TV data you wish to\n"
- "create to check a transmission。");
+const u8 gUnknown_Debug_083C49CA[] = _("Choose the TV data you wish to\n"
+ "create to check a transmission。");
-const u8 gUnknown_Debug_083C4A09[] = _("ほうそうの はっせいりつを セット\n"
- "してください ?ぶんの1に なります");
+const u8 gUnknown_Debug_083C4A09[] = DTR("ほうそうの はっせいりつを セット\n"
+ "してください ?ぶんの1に なります",
+ "Please set the transmission frequency\n"
+ "Part 1");
const u8 gUnknown_Debug_083C4A2E[] = _("SURVEY");
-const u8 gUnknown_Debug_083C4A35[] = _("RECENT HAPPENINGS");
-const u8 gUnknown_Debug_083C4A47[] = _("POKひMON FAN CLUB");
-const u8 gUnknown_Debug_083C4A58[] = _("ジム");
+const u8 gUnknown_Debug_083C4A35[] = _("RECENT HAPPENINGS");
+const u8 gUnknown_Debug_083C4A47[] = _("POKéMON FAN CLUB");
+const u8 gUnknown_Debug_083C4A58[] = DTR("ジム", "GYM");
const u8 gUnknown_Debug_083C4A5B[] = _("OUTBREAKS");
-const u8 gUnknown_Debug_083C4A65[] = _("NAME RATER");
+const u8 gUnknown_Debug_083C4A65[] = _("NAME RATER");
const u8 gUnknown_Debug_083C4A70[] = _("CONTEST");
const u8 gUnknown_Debug_083C4A78[] = _("INTRODUCTION");
const u8 gUnknown_Debug_083C4A85[] = _("SHOPPING");
const u8 gUnknown_Debug_083C4A8E[] = _("MISFORTUNE");
const u8 gUnknown_Debug_083C4A99[] = _("FISHING");
-const u8 gUnknown_Debug_083C4AA1[] = _("MEMORABLE DAY");
-const u8 gUnknown_Debug_083C4AAF[] = _("BRAVO TRAINER");
+const u8 gUnknown_Debug_083C4AA1[] = _("MEMORABLE DAY");
+const u8 gUnknown_Debug_083C4AAF[] = _("BRAVO TRAINER");
const u8 gUnknown_Debug_083C4ABD[] = {
TVSHOW_FAN_CLUB_LETTER,
@@ -159,8 +161,8 @@ const u8 *const gUnknown_Debug_083C4ACC[] = {
const u8 gDebugText_BigSale[] = _("BIG SALE");
-const u8 gUnknown_Debug_083C4B05[] = _("SERVICE DAY");
-const u8 gUnknown_Debug_083C4B11[] = _("CLEARーOUT SALE");
+const u8 gUnknown_Debug_083C4B05[] = _("SERVICE DAY");
+const u8 gUnknown_Debug_083C4B11[] = _("CLEAR-OUT SALE");
const u8 gUnknown_Debug_083C4B20[] = {1, 2, 3};
const u8 *const gUnknown_Debug_083C4B24[] = {
@@ -169,15 +171,15 @@ const u8 *const gUnknown_Debug_083C4B24[] = {
gUnknown_Debug_083C4B11
};
-const u8 gUnknown_Debug_083C4B30[] = _("Secret type");
+const u8 gUnknown_Debug_083C4B30[] = _("Secret type");
const u8 gUnknown_Debug_083C4B3C[] = _("Start");
-const u8 gUnknown_Debug_083C4B42[] = _("Create TV");
-const u8 gUnknown_Debug_083C4B4C[] = _("All clear");
-const u8 gUnknown_Debug_083C4B56[] = _("All seen");
-const u8 gUnknown_Debug_083C4B5F[] = _("Create CM");
-const u8 gUnknown_Debug_083C4B69[] = _("Not yet seen");
-const u8 gUnknown_Debug_083C4B76[] = _("Hit Table");
-const u8 gUnknown_Debug_083C4B80[] = _("Set full");
+const u8 gUnknown_Debug_083C4B42[] = _("Create TV");
+const u8 gUnknown_Debug_083C4B4C[] = _("All clear");
+const u8 gUnknown_Debug_083C4B56[] = _("All seen");
+const u8 gUnknown_Debug_083C4B5F[] = _("Create CM");
+const u8 gUnknown_Debug_083C4B69[] = _("Not yet seen");
+const u8 gUnknown_Debug_083C4B76[] = _("Hit Table");
+const u8 gUnknown_Debug_083C4B80[] = _("Set full");
// Normaly these would be struct MenuAction, but the prototype of
// member .func is not consistent.
@@ -754,15 +756,18 @@ bool8 debug_sub_80900AC(void)
CloseMenu();
return TRUE;
}
-
-const u8 gUnknown_Debug_083C4C77[] = _("1 スクル");
-const u8 gUnknown_Debug_083C4C7D[] = _("2 ミドル");
-const u8 gUnknown_Debug_083C4C83[] = _("3 オジヨ");
-const u8 gUnknown_Debug_083C4C89[] = _("4 ボーヤ");
-const u8 gUnknown_Debug_083C4C8F[] = _("5 ボーイ");
-const u8 gUnknown_Debug_083C4C95[] = _("6 ヤング");
-const u8 gUnknown_Debug_083C4C9B[] = _("7 ヲーカ");
-const u8 gUnknown_Debug_083C4CA1[] = _("8 オルド");
+// These represent the people in Lilycove Fan Club.
+// TRN: These translations are probably wrong but it is really hard to tell with
+// the abbreviations. They are mosly based on observation
+// The first one is selected by default when there are no fans.
+const u8 gUnknown_Debug_083C4C77[] = DTR("1 スクル", "1 LASS/NONE"); // school (girl)
+const u8 gUnknown_Debug_083C4C7D[] = DTR("2 ミドル", "2 MIDDLE AGE MAN"); // middle
+const u8 gUnknown_Debug_083C4C83[] = DTR("3 オジヨ", "3 DAUGHTER"); // おしょう (daughter)
+const u8 gUnknown_Debug_083C4C89[] = DTR("4 ボーヤ", "4 YOUNG BOY"); // 坊や (boy)
+const u8 gUnknown_Debug_083C4C8F[] = DTR("5 ボーイ", "5 BOY"); // boy
+const u8 gUnknown_Debug_083C4C95[] = DTR("6 ヤング", "6 YOUNG MAN"); // young
+const u8 gUnknown_Debug_083C4C9B[] = DTR("7 ヲーカ", "7 MOM"); // お母さん? (probably typo)
+const u8 gUnknown_Debug_083C4CA1[] = DTR("8 オルド", "8 OLD LADY"); // old
const u8 *const gUnknown_Debug_083C4CA8[] = {
gUnknown_Debug_083C4C77,
@@ -775,15 +780,15 @@ const u8 *const gUnknown_Debug_083C4CA8[] = {
gUnknown_Debug_083C4CA1
};
-const u8 gUnknown_Debug_083C4CC8[] = _("Start");
-const u8 gUnknown_Debug_083C4CCE[] = _("Increase");
-const u8 gUnknown_Debug_083C4CD7[] = _("Reduce");
+const u8 gUnknown_Debug_083C4CC8[] = _("Start"); // Starts the "Oh! I've heard of you' script"
+const u8 gUnknown_Debug_083C4CCE[] = _("Increase"); // Increases popularity
+const u8 gUnknown_Debug_083C4CD7[] = _("Reduce"); // reduces popularity
const u8 gUnknown_Debug_083C4CDE[] = _("Points");
-const u8 gUnknown_Debug_083C4CE5[] = _("Play time 6");
-const u8 gUnknown_Debug_083C4CF1[] = _("P ELITE FOUR");
-const u8 gUnknown_Debug_083C4CFE[] = _("P SECRET BASE");
-const u8 gUnknown_Debug_083C4D0C[] = _("P CONTEST");
-const u8 gUnknown_Debug_083C4D16[] = _("P BATTLE TOWER");
+const u8 gUnknown_Debug_083C4CE5[] = _("Play time 6");
+const u8 gUnknown_Debug_083C4CF1[] = _("P ELITE FOUR");
+const u8 gUnknown_Debug_083C4CFE[] = _("P SECRET BASE");
+const u8 gUnknown_Debug_083C4D0C[] = _("P CONTEST");
+const u8 gUnknown_Debug_083C4D16[] = _("P BATTLE TOWER");
const struct MenuAction gUnknown_Debug_083C4D28[] = {
{gUnknown_Debug_083C4CC8, debug_sub_80901E4},
diff --git a/src/debug/sound_check_menu.c b/src/debug/sound_check_menu.c
index 2760c3b0f..dec9b4371 100644
--- a/src/debug/sound_check_menu.c
+++ b/src/debug/sound_check_menu.c
@@ -156,10 +156,10 @@ void CB2_StartSoundCheckMenu(void)
void Task_InitSoundCheckMenu(u8 taskId)
{
- u8 soundcheckStr[] = _("サウンドチェック");
+ u8 soundcheckStr[] = DTR("サウンドチェック", "SOUND CHECK");
u8 bgmStr[] = _("BGM");
u8 seStr[] = _("SE ");
- u8 abDescStr[] = _("A‥さいせい B‥おわり");
+ u8 abDescStr[] = DTR("A‥さいせい B‥おわり", "A PLAY B STOP");
u8 upDownStr[] = _("L‥UP R‥DOWN");
u8 driverStr[] = _("R‥DRIVER-TEST");
@@ -399,8 +399,8 @@ void sub_80BA79C(const u8 *const string, u16 x, u16 y)
void Task_DrawDriverTestMenu(u8 taskId) // Task_DrawDriverTestMenu
{
- u8 bbackStr[] = _("Bぼたんで もどる");
- u8 aplayStr[] = _("Aぼたんで さいせい");
+ u8 bbackStr[] = DTR("Bぼたんで もどる", "B BUTTON: BACK");
+ u8 aplayStr[] = DTR("Aぼたんで さいせい", "A BUTTON: PLAY");
u8 voiceStr[] = _("VOICE‥‥‥‥");
u8 volumeStr[] = _("VOLUME‥‥‥");
u8 panpotStr[] = _("PANPOT‥‥‥");
@@ -410,9 +410,9 @@ void Task_DrawDriverTestMenu(u8 taskId) // Task_DrawDriverTestMenu
u8 progressStr[] = _("PROGRESS‥");
u8 chorusStr[] = _("CHORUS‥‥‥");
u8 priorityStr[] = _("PRIORITY‥");
- u8 playingStr[] = _("さいせいちゆう‥"); // 再生中 (playing)
- u8 reverseStr[] = _("はんてん‥‥‥‥"); // 反転 (reverse)
- u8 stereoStr[] = _("すてれお‥‥‥‥"); // stereo
+ u8 playingStr[] = DTR("さいせいちゆう‥", "PLAYING"); // 再生中 (playing)
+ u8 reverseStr[] = DTR("はんてん‥‥‥‥", "REVERSE"); // 反転 (reverse)
+ u8 stereoStr[] = DTR("すてれお‥‥‥‥", "STEREO"); // stereo
REG_DISPCNT = 0x3140;
Menu_DrawStdWindowFrame(0, 0, 29, 19);
@@ -680,7 +680,7 @@ void sub_80BAF84(u8 taskId)
{
u8 seStr[] = _("SE");
u8 panStr[] = _("PAN");
- u8 playingStr[] = _("さいせいちゆう‥");
+ u8 playingStr[] = DTR("さいせいちゆう‥", "PLAYING");
REG_DISPCNT = 0x3140;
Menu_DrawStdWindowFrame(0, 0, 29, 19);
diff --git a/src/debug/start_menu_debug.c b/src/debug/start_menu_debug.c
index 01f04b8d9..940f21ac7 100644
--- a/src/debug/start_menu_debug.c
+++ b/src/debug/start_menu_debug.c
@@ -174,8 +174,8 @@ const u8 Str_839B7D8[] = _("Transport");
const u8 Str_839B7E2[] = _("See portraits");
const u8 Str_839B7F0[] = _("Time records");
const u8 Str_839B7FD[] = _("Set time");
-const u8 Str_839B806[] = _("National オカDex");
-const u8 Str_839B815[] = _("Hoenn オカDex");
+const u8 Str_839B806[] = _("National {POKE}Dex");
+const u8 Str_839B815[] = _("Hoenn {POKE}Dex");
const u8 Str_839B821[] = _("Create {PKMN}");
const u8 Str_839B82B[] = _("See {PKMN} graphics");
const u8 Str_839B83B[] = _("See trainers");
@@ -272,49 +272,50 @@ const u8 gUnknown_Debug_839BB64[] =
const u8 gUnknown_Debug_0839BBA4[] = _("Debugging Version");
const u8 gUnknown_Debug_0839BBB6[] = _("{VERSION} Version");
const u8 gUnknown_Debug_0839BBC1[] = _("Normal RTC compatible");
-const u8 Str_839BBD7[] = _("か の じっけん");
-const u8 Str_839BBE0[] = _("じっけん2");
-const u8 Str_839BBE6[] = _("BGじっけん");
-const u8 Str_839BBED[] = _("Battle");
-const u8 Str_839BBF4[] = _("つうしん じっけん");
-const u8 Str_839BBFE[] = _("LINK Test2");
-const u8 Str_839BC09[] = _("フィールド はじめる");
-const u8 Str_839BC14[] = _("フィールド つづき");
-const u8 Str_839BC1E[] = _("Sound test");
-const u8 Str_839BC29[] = _("{POKEBLOCK} test");
-const u8 Str_839BC34[] = _("Crash backup data");
-const u8 Str_839BC46[] = _("e-Card test");
-const u8 Str_839BC52[] = _("こうかんデモ   ");
-const u8 Str_839BC5C[] = _("Time in game");
-const u8 Str_839BC69[] = _("フェスタ モード");
-const u8 Str_839BC72[] = _("Mimic e-Card");
-const u8 Str_839BC7F[] = _("RTC reset");
-const u8 Str_839BC89[] = _("Converter");
-
-const struct MenuAction gUnknown_Debug_839BC94[] =
-{
- { Str_839BBD7, DebugMenu_8076CBC },
- { Str_839BBE0, DebugMenu_8076CC0 },
- { Str_839BBE6, DebugMenu_8076CD4 },
- { Str_839BBED, DebugMenu_8076C6C },
- { Str_839BC29, DebugMenu_8076CD8 },
- { Str_839BBFE, DebugMenu_8076D28 },
- { Str_839BC1E, DebugMenu_8076D3C },
- { Str_839BC09, DebugMenu_8076C80 },
- { Str_839BC14, DebugMenu_8076C90 },
- { Str_839BC34, DebugMenu_8076D50 },
- { Str_839BC46, DebugMenu_8076CEC },
- { Str_839BC52, DebugMenu_8076D14 },
- { Str_839BC72, DebugMenu_8076D00 },
- { Str_839BC5C, DebugMenu_8076D5C },
- { Str_839BC7F, DebugMenu_8076E18 },
- { Str_839BC89, DebugMenu_8076EDC },
+
+const u8 gTestMenu_TestMenuHeaderText[] = DTR("か の じっけん", "TEST MENU"); // 科の実験 (Test section)
+const u8 gTestMenu_Test2Text[] = DTR("じっけん2", "Test2");
+const u8 gTestMenu_BGTestText[] = DTR("BGじっけん", "BG Test");
+const u8 gTestMenu_BattleText[] = _("Battle");
+const u8 gTestMenu_UnusedLinkTestText[] = DTR("つうしん じっけん", "LINK Test"); // unused
+const u8 gTestMenu_LinkTest2Text[] = _("LINK Test2");
+const u8 gTestMenu_FieldStartText[] = DTR("フィールド はじめる", "New game"); // "Field start"
+const u8 gTestMenu_FieldContinueText[] = DTR("フィールド つづき", "Continue game"); // "Field continue"
+const u8 gTestMenu_SoundTestText[] = _("Sound test");
+const u8 gTestMenu_PokeblockTestText[] = _("{POKEBLOCK} test");
+const u8 gTestMenu_CrashBackupDataText[] = _("Crash backup data");
+const u8 gTestMenu_eCardTestText[] = _("e-Card test");
+const u8 gTestMenu_TradeDemoText[] = DTR("こうかんデモ   ", "Trade demo");
+const u8 gTestMenu_TimeInGameText[] = _("Time in game");
+const u8 gTestMenu_UnusedFestaModeText[] = DTR("フェスタ モード", "Festa mode"); // unused
+const u8 gTestMenu_MimicECardText[] = _("Mimic e-Card");
+const u8 gTestMenu_RTCResetText[] = _("RTC reset");
+const u8 gTestMenu_ConverterText[] = _("Converter");
+
+const struct MenuAction gDebug_TestMenuItems[] =
+{
+ { gTestMenu_TestMenuHeaderText, DebugMenu_8076CBC }, // Disabled - nop header
+ { gTestMenu_Test2Text, DebugMenu_8076CC0 }, // Disabled - freezes game (likely went to tomohara menu
+ { gTestMenu_BGTestText, DebugMenu_8076CD4 }, // Disabled - nop
+ { gTestMenu_BattleText, DebugMenu_8076C6C },
+ { gTestMenu_PokeblockTestText, DebugMenu_8076CD8 },
+ { gTestMenu_LinkTest2Text, DebugMenu_8076D28 },
+ { gTestMenu_SoundTestText, DebugMenu_8076D3C },
+ { gTestMenu_FieldStartText, DebugMenu_8076C80 }, // Disabled - starts new game w/o intro with preset name
+ { gTestMenu_FieldContinueText, DebugMenu_8076C90 }, // Disabled - continues game
+ { gTestMenu_CrashBackupDataText, DebugMenu_8076D50 },
+ { gTestMenu_eCardTestText, DebugMenu_8076CEC },
+ { gTestMenu_TradeDemoText, DebugMenu_8076D14 }, // Disabled - starts a trade then crashes
+ { gTestMenu_MimicECardText, DebugMenu_8076D00 },
+ { gTestMenu_TimeInGameText, DebugMenu_8076D5C },
+ { gTestMenu_RTCResetText, DebugMenu_8076E18 },
+ { gTestMenu_ConverterText, DebugMenu_8076EDC },
};
// NOTE: When decompiling this file, I found out that having an extraneous extern
// in a C file can affect the generated asm. If this extern is commented out,
// debug_sub_8076BB4 will access the array differently and no longer match.
-//extern const struct MenuAction gUnknown_Debug_839BC94[];
+//extern const struct MenuAction gDebug_TestMenuItems[];
const u8 gMenuOrders_839BD14[][10] =
{
@@ -324,22 +325,34 @@ const u8 gMenuOrders_839BD14[][10] =
const u8 Str_839BD26[] = {2, 0, 0, 0}; // doesn't appear to be referenced
-const u8 Str_839BD2C[] = _("RTCを リセット します\n" // Reset RTC
- "Aで じっこう   Bでキャンセル");
-
-const u8 Str_839BD4C[] = _("RTCを リセット した!");
+const u8 Str_839BD2C[] = DTR("RTCを リセット します\n" // Reset RTC
+ "Aで じっこう   Bでキャンセル",
+ "Reset RTC?\n"
+ "A: START B: CANCEL");
-const u8 Str_839BD5A[] = _("セーブデータを コンバートします\n"
- "Aで けってい  Bで キャンセル");
+const u8 Str_839BD4C[] = DTR("RTCを リセット した!", "RTC reset successful!");
-const u8 Str_839BD7D[] = _("へんかんが しゅうりょう しました!");
+const u8 Str_839BD5A[] = DTR("セーブデータを コンバートします\n"
+ "Aで けってい  Bで キャンセル",
+ "Convert save data?\n"
+ "A: CONFIRM B: CANCEL");
+const u8 Str_839BD7D[] = DTR("へんかんが しゅうりょう しました!",
+ "Conversion finished!");
extern const u8 Str_839BD2C[];
extern const u8 Str_839BD4C[];
static u8 gUnknown_030006B8;
-UNUSED static const s32 * gUnknown_030006BC;
+
+struct DebugBuildDateInfo {
+ s32 max;
+ s32 digitMultiplier;
+ s32 numDigits;
+ s32 offset;
+};
+
+static const struct DebugBuildDateInfo *gDebugBuildDate;
static u8 gUnknown_030006C0;
static u8 gUnknown_030006C1;
static const u8 * gUnknown_030006C4;
@@ -354,7 +367,7 @@ void debug_sub_8076AC8(u8 a)
;
Menu_EraseWindowRect(16, 0, 29, 19);
Menu_DrawStdWindowFrame(16, 0, 29, r4 * 2 + 1);
- Menu_PrintItemsReordered(17, 1, r4, (struct MenuAction2 *)gUnknown_Debug_839BC94, gUnknown_030006C4);
+ Menu_PrintItemsReordered(17, 1, r4, (struct MenuAction2 *)gDebug_TestMenuItems, gUnknown_030006C4);
InitMenu(0, 17, 1, r4, 0, 12);
}
@@ -387,7 +400,7 @@ void debug_sub_8076BB4(u8 taskId)
switch (input)
{
default:
- gUnknown_Debug_839BC94[gUnknown_030006C4[cursorPos]].func();
+ gDebug_TestMenuItems[gUnknown_030006C4[cursorPos]].func();
break;
case -2:
if (gMain.newKeys & 0x20)
@@ -593,27 +606,28 @@ u8 DebugMenu_8076EDC(void)
return 0;
}
-const u8 Str_839BD90[] = _("ジュンイチ");
-const u8 Str_839BD96[] = _("ダイゴロウ");
-const u8 Str_839BD9C[] = _("テツジ");
-const u8 Str_839BDA0[] = _("バレンシア");
-const u8 Str_839BDA6[] = _("ハルコマチ");
-const u8 Str_839BDAC[] = _("RAYMOND");
-const u8 Str_839BDB4[] = _("TIFFANY");
-const u8 Str_839BDBC[] = _("くまxちえ");
+// A list of preset player names
+const u8 gTestMenuStr_Junichi[] = DTR("ジュンイチ", "JUNICHI");
+const u8 gTestMenuStr_Daigoro[] = DTR("ダイゴロウ", "DAIGORO");
+const u8 gTestMenuStr_Tetsuji[] = DTR("テツジ", "TETSUJI");
+const u8 gTestMenuStr_Valencia[] = DTR("バレンシア", "VALENCY"); // Valencia is too long
+const u8 gTestMenuStr_Harukomachi[] = DTR("ハルコマチ", "MAY"); // May town?
+const u8 gTestMenuStr_Raymond[] = _("RAYMOND");
+const u8 gTestMenuStr_Tiffany[] = _("TIFFANY");
+const u8 gTestMenuStr_KumaXChie[] = DTR("くまxちえ", "KUMA"); // Chie Kuma?
const struct {
const u8 * text;
u32 flags;
-} gUnknown_Debug_839BDC4[] = {
- {Str_839BD90, 0x0},
- {Str_839BD96, 0x0},
- {Str_839BDA0, 0x1},
- {Str_839BDA6, 0x1},
- {Str_839BDAC, 0x80},
- {Str_839BDB4, 0x81},
- {Str_839BD9C, 0x0},
- {Str_839BDBC, 0x1}
+} gTestMenu_FieldStartNames[] = {
+ {gTestMenuStr_Junichi, 0x0},
+ {gTestMenuStr_Daigoro, 0x0},
+ {gTestMenuStr_Valencia, 0x1},
+ {gTestMenuStr_Harukomachi, 0x1},
+ {gTestMenuStr_Raymond, 0x80},
+ {gTestMenuStr_Tiffany, 0x81},
+ {gTestMenuStr_Tetsuji, 0x0},
+ {gTestMenuStr_KumaXChie, 0x1}
};
void DebugMenu_8076EF4(void)
@@ -621,12 +635,12 @@ void DebugMenu_8076EF4(void)
u8 i;
Menu_DrawStdWindowFrame(0, 0, 11, 17);
- Menu_PrintItems(2, 1, ARRAY_COUNT(gUnknown_Debug_839BDC4), gUnknown_Debug_839BDC4);
- for (i = 0; i < ARRAY_COUNT(gUnknown_Debug_839BDC4); i++)
+ Menu_PrintItems(2, 1, ARRAY_COUNT(gTestMenu_FieldStartNames), gTestMenu_FieldStartNames);
+ for (i = 0; i < ARRAY_COUNT(gTestMenu_FieldStartNames); i++)
{
- sub_8071F60((gUnknown_Debug_839BDC4[i].flags & 1) == MALE ? CHAR_MALE : CHAR_FEMALE, 10, 2 * i + 1);
+ sub_8071F60((gTestMenu_FieldStartNames[i].flags & 1) == MALE ? CHAR_MALE : CHAR_FEMALE, 10, 2 * i + 1);
}
- InitMenu(0, 1, 1, ARRAY_COUNT(gUnknown_Debug_839BDC4), 0, 9);
+ InitMenu(0, 1, 1, ARRAY_COUNT(gTestMenu_FieldStartNames), 0, 9);
}
void DebugMenu_8076F60(u8 taskId)
@@ -645,9 +659,9 @@ void DebugMenu_8076F60(u8 taskId)
break;
default:
{
- u8 flags = gUnknown_Debug_839BDC4[cursorPos].flags;
+ u8 flags = gTestMenu_FieldStartNames[cursorPos].flags;
gSaveBlock2.playerGender = flags & 1;
- StringCopy(gSaveBlock2.playerName, gUnknown_Debug_839BDC4[cursorPos].text);
+ StringCopy(gSaveBlock2.playerName, gTestMenu_FieldStartNames[cursorPos].text);
if ((flags & 0x80) == 0)
debug_sub_8057508(FALSE);
else
@@ -869,7 +883,7 @@ const u8 Str_839BE0F[] = _("HP");
const u8 Str_839BE12[] = _("PAR");
const u8 Str_839BE16[] = _("SLP");
const u8 Str_839BE1A[] = _("PSN");
-const u8 Str_839BE1E[] = _("ウマイ");
+const u8 Str_839BE1E[] = KANA("ウマイ");
u8 DebugMenu_8077434(void)
{
@@ -1161,10 +1175,12 @@ u8 DebugMenu_8077954(void)
return TRUE;
}
-const u8 Str_839BE6B[] = _("さいせんかのうトレーナー:{STR_VAR_1}\n"
- "さいせんじょうたいトレーナー:{STR_VAR_2}");
-const u8 Str_839BE8D[] = _("いる");
-const u8 Str_839BE90[] = _("いない");
+const u8 Str_839BE6B[] = DTR("さいせんかのうトレーナー:{STR_VAR_1}\n"
+ "さいせんじょうたいトレーナー:{STR_VAR_2}",
+ "Rematchable TRAINERS: {STR_VAR_1}\n"
+ "TRAINERS in rematch state: {STR_VAR_2}");
+const u8 Str_839BE8D[] = DTR("いる", "ON");
+const u8 Str_839BE90[] = DTR("いない", "OFF");
bool8 DebugMenu_8077974(void)
{
@@ -1251,11 +1267,15 @@ bool8 DebugMenu_8077AE8(void)
return TRUE;
}
-const u8 Str_839BF0C[] = _("のこり {STR_VAR_1}ほ");
-const u8 Str_839BF14[] = _("{STR_VAR_1}\n"
- "のこり {STR_VAR_2}ほ");
-const u8 Str_839BF1F[] = _("めのまえには\n"
- "キューブが ありません!");
+const u8 Str_839BF0C[] = DTR("のこり {STR_VAR_1}ほ", "Remaining steps: {STR_VAR_1}");
+const u8 Str_839BF14[] = DTR("{STR_VAR_1}\n"
+ "のこり {STR_VAR_2}ほ",
+ "{STR_VAR_1}\n"
+ "Remaining steps: {STR_VAR_2}");
+const u8 Str_839BF1F[] = DTR("めのまえには\n"
+ "キューブが ありません!",
+ "There is no {POKEBLOCK}\n"
+ "in front of you!");
bool8 DebugMenu_8077B00(void)
{
@@ -1268,11 +1288,11 @@ bool8 DebugMenu_8077B00(void)
return FALSE;
}
-const u8 Str_839BF33[] = _("ほすうをのこり1にする");
-const u8 Str_839BF3F[] = _("ボールをのこり1にする");
-const u8 Str_839BF4B[] = _("キューブおきば");
-const u8 Str_839BF53[] = _("ボールをのこり30に");
-const u8 Str_839BF5E[] = _("ほすうをのこり500に");
+const u8 Str_839BF33[] = DTR("ほすうをのこり1にする", "One step remaining");
+const u8 Str_839BF3F[] = DTR("ボールをのこり1にする", "One BALL remaining");
+const u8 Str_839BF4B[] = DTR("キューブおきば", "{POKEBLOCK} FEEDER");
+const u8 Str_839BF53[] = DTR("ボールをのこり30に", "30 BALLS remaining");
+const u8 Str_839BF5E[] = DTR("ほすうをのこり500に", "500 steps remaining");
const struct MenuAction gUnknown_Debug_839BF6C[] = {
{Str_839BF4B, DebugMenu_8077B00},
@@ -1366,146 +1386,46 @@ u8 DebugMenu_8077C14(void)
return FALSE;
}
-const u8 Str_839BFDC[] = _(" じかん ふん びょう");
-const s32 gUnknown_Debug_839BFE8[] = {
- 99, 10, 2, 23,
- 99, 10, 2, 26
+const u8 Str_839BFDC[] = DTR(" じかん ふん びょう", " HOURS MINUTES SECONDS");
+
+static const struct DebugBuildDateInfo gDebugBuildDateInfo[] = {
+ { 99, 10, 2, 23 },
+ { 99, 10, 2, 26 }
};
-#ifdef NONMATCHING
-void DebugMenu_8077C3C(const char * a0, u8 * a1)
+// Parses the version code in a highly inefficient and unsafe way.
+void DebugMenu_ConvertBuildDate(const char *buildDateStr, u8 *out)
{
- // Register allocation swap
- // Intended: r7 = a1, r6 = gUnknown_030006BC[2]
- // Observed: r6 = a1, r7 = gUnknown_030006BC[2]
-
int i;
-
- gUnknown_030006BC = gUnknown_Debug_839BFE8;
- *a1++ = CHAR_SPACE;
- *a1++ = CHAR_SPACE;
-
- for (i = 0; i < 2; i++, gUnknown_030006BC += 4)
- {
- u32 r5 = 0;
- int r2;
- int r4;
- for (r2 = gUnknown_030006BC[1], r4 = 0; r4 < gUnknown_030006BC[2]; r4++, r2 /= 10)
- r5 += (a0[gUnknown_030006BC[3] + r4] - '0') * r2;
- if (gUnknown_030006BC[0] < r5)
- r5 = gUnknown_030006BC[0];
- a1 = ConvertIntToDecimalStringN(a1, r5, STR_CONV_MODE_LEADING_ZEROS, gUnknown_030006BC[2]);
- }
- a1[0] = a0[29] - 'A' + CHAR_A;
- if (a1[0] > 0xf6)
- a1[0] = 0xf6;
- a1[1] = EOS;
-}
-#else
-NAKED void DebugMenu_8077C3C(const char * a0, u8 * a1)
-{
- asm("\tpush\t{r4, r5, r6, r7, lr}\n"
- "\tmov\tr7, sl\n"
- "\tmov\tr6, r9\n"
- "\tmov\tr5, r8\n"
- "\tpush\t{r5, r6, r7}\n"
- "\tadd\tsp, sp, #0xfffffffc\n"
- "\tmov\tsl, r0\n"
- "\tadd\tr7, r1, #0\n"
- "\tldr\tr0, ._271 @ gUnknown_030006BC\n"
- "\tldr\tr1, ._271 + 4 @ gUnknown_Debug_839BFE8\n"
- "\tstr\tr1, [r0]\n"
- "\tmov\tr1, #0x0\n"
- "\tstrb\tr1, [r7]\n"
- "\tadd\tr7, r7, #0x1\n"
- "\tstrb\tr1, [r7]\n"
- "\tadd\tr7, r7, #0x1\n"
- "\tmov\tr3, #0x0\n"
- "\tmov\tr8, r0\n"
- "._269:\n"
- "\tmov\tr5, #0x0\n"
- "\tldr\tr1, ._271 @ gUnknown_030006BC\n"
- "\tldr\tr0, [r1]\n"
- "\tldr\tr2, [r0, #0x4]\n"
- "\tmov\tr4, #0x0\n"
- "\tldr\tr1, [r0, #0x8]\n"
- "\tadd\tr3, r3, #0x1\n"
- "\tmov\tr9, r3\n"
- "\tcmp\tr5, r1\n"
- "\tbge\t._266\t@cond_branch\n"
- "\tadd\tr3, r0, #0\n"
- "\tadd\tr6, r1, #0\n"
- "._267:\n"
- "\tldr\tr0, [r3, #0xc]\n"
- "\tadd\tr0, r0, r4\n"
- "\tadd r0, r0, sl\n"
- "\tldrb\tr0, [r0]\n"
- "\tsub\tr0, r0, #0x30\n"
- "\tmul\tr0, r0, r2\n"
- "\tadd\tr5, r5, r0\n"
- "\tadd\tr4, r4, #0x1\n"
- "\tadd\tr0, r2, #0\n"
- "\tmov\tr1, #0xa\n"
- "\tstr\tr3, [sp]\n"
- "\tbl\t__divsi3\n"
- "\tadd\tr2, r0, #0\n"
- "\tldr\tr3, [sp]\n"
- "\tcmp\tr4, r6\n"
- "\tblt\t._267\t@cond_branch\n"
- "._266:\n"
- "\tmov\tr0, r8\n"
- "\tldr\tr1, [r0]\n"
- "\tldr\tr0, [r1]\n"
- "\tcmp\tr0, r5\n"
- "\tbcs\t._268\t@cond_branch\n"
- "\tadd\tr5, r0, #0\n"
- "._268:\n"
- "\tldrb\tr3, [r1, #0x8]\n"
- "\tadd\tr0, r7, #0\n"
- "\tadd\tr1, r5, #0\n"
- "\tmov\tr2, #0x2\n"
- "\tbl\tConvertIntToDecimalStringN\n"
- "\tadd\tr7, r0, #0\n"
- "\tmov\tr3, r9\n"
- "\tmov\tr1, r8\n"
- "\tldr\tr0, [r1]\n"
- "\tadd\tr0, r0, #0x10\n"
- "\tstr\tr0, [r1]\n"
- "\tcmp\tr3, #0x1\n"
- "\tble\t._269\t@cond_branch\n"
- "\tmov\tr1, sl\n"
- "\tldrb\tr0, [r1, #0x1d]\n"
- "\tadd\tr0, r0, #0x7a\n"
- "\tstrb\tr0, [r7]\n"
- "\tlsl\tr0, r0, #0x18\n"
- "\tlsr\tr0, r0, #0x18\n"
- "\tcmp\tr0, #0xf6\n"
- "\tbls\t._270\t@cond_branch\n"
- "\tmov\tr0, #0xf6\n"
- "\tstrb\tr0, [r7]\n"
- "._270:\n"
- "\tmov\tr0, #0xff\n"
- "\tstrb\tr0, [r7, #0x1]\n"
- "\tadd\tsp, sp, #0x4\n"
- "\tpop\t{r3, r4, r5}\n"
- "\tmov\tr8, r3\n"
- "\tmov\tr9, r4\n"
- "\tmov\tsl, r5\n"
- "\tpop\t{r4, r5, r6, r7}\n"
- "\tpop\t{r0}\n"
- "\tbx\tr0\n"
- "._272:\n"
- "\t.align\t2, 0\n"
- "._271:\n"
- "\t.word\tgUnknown_030006BC \n"
- "\t.word\tgUnknown_Debug_839BFE8\n");
+ // Prevents register allocation swap
+ // Intended: r7 = out, r6 = gDebugBuildDate->numDigits
+ // Observed: r6 = out, r7 = gDebugBuildDate->numDigits
+ ++out; --out;
+
+ gDebugBuildDate = gDebugBuildDateInfo;
+ *out++ = CHAR_SPACE;
+ *out++ = CHAR_SPACE;
+ for (i = 0; i < 2; i++, gDebugBuildDate++)
+ {
+ int j;
+ int mul;
+ u32 date = 0;
+ for (mul = gDebugBuildDate->digitMultiplier, j = 0; j < gDebugBuildDate->numDigits; j++, mul /= 10)
+ date += (buildDateStr[gDebugBuildDate->offset + j] - '0') * mul;
+ if (gDebugBuildDate->max < date)
+ date = gDebugBuildDate->max;
+ out = ConvertIntToDecimalStringN(out, date, STR_CONV_MODE_LEADING_ZEROS, gDebugBuildDate->numDigits);
+ }
+ out[0] = buildDateStr[29] - 'A' + CHAR_A;
+ if (out[0] > 0xf6) // prevent special characters
+ out[0] = 0xf6;
+ out[1] = EOS;
}
-#endif
void debug_sub_8077CF4(u8 x, u8 y)
{
- DebugMenu_8077C3C(BuildDateTime, gStringVar4);
+ DebugMenu_ConvertBuildDate(BuildDateTime, gStringVar4);
Menu_PrintText(gStringVar4, x, y);
}
@@ -1636,7 +1556,7 @@ void DebugMenu_8077F40(u8 taskId)
task->func = DebugMenu_8077F7C;
}
-const u8 Str_839C014[] = _("How many?");
+const u8 Str_839C014[] = _("How many?");
void DebugMenu_8077F7C(u8 taskId)
{
@@ -1685,13 +1605,19 @@ void DebugMenu_807806C(u8 taskId)
DebugMenu_8077048();
}
-const u8 Str_839C01E[] = _("にがおえ ばんごう\n"
- "ポケモンナンバー\n"
- "ポケモンめい\n"
- "ブリーダーめい\n"
- "しゅるい\n"
- "こせいらんすう");
-const u8 Str_839C04D[] = _("データなし");
+const u8 Str_839C01E[] = DTR("にがおえ ばんごう\n"
+ "ポケモンナンバー\n"
+ "ポケモンめい\n"
+ "ブリーダーめい\n"
+ "しゅるい\n"
+ "こせいらんすう",
+ "PORTRAIT No.\n"
+ "POKéMON No.\n"
+ "POKéMON Name\n"
+ "BREEDER Name\n" // TRN ?
+ "TYPE\n"
+ "Personality");
+const u8 Str_839C04D[] = DTR("データなし", "No data");
void DebugMenu_807808C(u32 a0)
{
@@ -1932,60 +1858,61 @@ u8 DebugMenu_OpenMysteryEvent(void)
const u8 Str_839C07C[] = _("{STR_VAR_1}:{STR_VAR_2}\n"
"{STR_VAR_3}");
-const u8 Str_839C085[] = _("みしよう データ");
+const u8 Str_839C085[] = DTR("みしよう データ", "Unused data");
const u8 Str_839C08E[] = _("Confirmation");
const u8 Str_839C09B[] = _("Max-1 set");
const u8 Str_839C0A5[] = _("Zero clear");
-const u8 Str_839C0B0[] = _("レポート");
-const u8 Str_839C0B5[] = _("クリア じかん");
-const u8 Str_839C0BD[] = _("りゅうこう さくせい");
-const u8 Str_839C0C8[] = _("きのみを うえたかいすう");
-const u8 Str_839C0D5[] = _("じてんしゃこうかん");
-const u8 Str_839C0DF[] = _("ほすう");
-const u8 Str_839C0E3[] = _("インタビュー");
-const u8 Str_839C0EA[] = _("バトル");
-const u8 Str_839C0EE[] = _("やせいバトル");
-const u8 Str_839C0F5[] = _("トレーナーバトル");
-const u8 Str_839C0FE[] = _("でんどういり");
-const u8 Str_839C105[] = _("ポケモンほかく");
-const u8 Str_839C10D[] = _("つった かいすう");
-const u8 Str_839C116[] = _("タマゴかえった");
-const u8 Str_839C11E[] = _("しんかした");
-const u8 Str_839C124[] = _("ポケセン かいふく");
-const u8 Str_839C12E[] = _("じたく かいふく");
-const u8 Str_839C137[] = _("サファリ りよう");
-const u8 Str_839C140[] = _("ひでん:いあいぎり");
-const u8 Str_839C14A[] = _("ひでん:いわくだき");
-const u8 Str_839C154[] = _("きち ひっこし");
-const u8 Str_839C15C[] = _("つうしんこうかん");
-const u8 Str_839C165[] = _("つうしんたいせん");
-const u8 Str_839C16E[] = _("つうしん かち");
-const u8 Str_839C176[] = _("つうしん まけ");
-const u8 Str_839C17E[] = _("つうしん ひきわけ");
-const u8 Str_839C188[] = _("わざ:はねる");
-const u8 Str_839C18F[] = _("わざ:わるあがき");
-const u8 Str_839C198[] = _("スロットおおあたりかいすう");
-const u8 Str_839C1A6[] = _("ルーレット れんしょう");
-const u8 Str_839C1B2[] = _("バトルタワー");
-const u8 Str_839C1B9[] = _("バトルタワーかち");
-const u8 Str_839C1C2[] = _("バトルタワーれんしょう");
-const u8 Str_839C1CE[] = _("ポロックさくせい");
-const u8 Str_839C1D7[] = _("つうしんでポロックつくった");
-const u8 Str_839C1E5[] = _("つうしんコンテストかち");
-const u8 Str_839C1F1[] = _("CPUコンテストさんか");
-const u8 Str_839C1FD[] = _("CPUコンテストかち");
-const u8 Str_839C208[] = _("かいもの");
-const u8 Str_839C20D[] = _("ダウジングマシン");
-const u8 Str_839C216[] = _("あめふり");
-const u8 Str_839C21B[] = _("ずかんをみた");
-const u8 Str_839C222[] = _("リボン もらった");
-const u8 Str_839C22B[] = _("だんさ とびおり");
-const u8 Str_839C234[] = _("TVを みた");
-const u8 Str_839C23B[] = _("とけいを みた");
-const u8 Str_839C243[] = _("くじが あたった");
-const u8 Str_839C24C[] = _("ポケモンあずけた");
-const u8 Str_839C255[] = _("ロープウェイりよう");
-const u8 Str_839C25F[] = _("おんせん はいった");
+const u8 Str_839C0B0[] = DTR("レポート", "SAVES");
+const u8 Str_839C0B5[] = DTR("クリア じかん", "Clear time");
+const u8 Str_839C0BD[] = DTR("りゅうこう さくせい", "TRENDS created");
+const u8 Str_839C0C8[] = DTR("きのみを うえたかいすう", "BERRIES planted");
+const u8 Str_839C0D5[] = DTR("じてんしゃこうかん", "BIKE swaps");
+const u8 Str_839C0DF[] = DTR("ほすう", "Steps");
+const u8 Str_839C0E3[] = DTR("インタビュー", "INTERVIEWS");
+const u8 Str_839C0EA[] = DTR("バトル", "BATTLES");
+const u8 Str_839C0EE[] = DTR("やせいバトル", "Wild BATTLES");
+const u8 Str_839C0F5[] = DTR("トレーナーバトル", "TRAINER BATTLES");
+const u8 Str_839C0FE[] = DTR("でんどういり", "HALL of FAME times");
+const u8 Str_839C105[] = DTR("ポケモンほかく", "POKéMON caught");
+const u8 Str_839C10D[] = DTR("つった かいすう", "Times fished");
+const u8 Str_839C116[] = DTR("タマゴかえった", "EGGS hatched");
+const u8 Str_839C11E[] = DTR("しんかした", "Evolutions");
+const u8 Str_839C124[] = DTR("ポケセン かいふく", "{PKMN} Center heals");
+const u8 Str_839C12E[] = DTR("じたく かいふく", "Home heals");
+const u8 Str_839C137[] = DTR("サファリ りよう", "SAFARI times");
+const u8 Str_839C140[] = DTR("ひでん:いあいぎり", "HM: CUT");
+const u8 Str_839C14A[] = DTR("ひでん:いわくだき", "HM: ROCK SMASH");
+const u8 Str_839C154[] = DTR("きち ひっこし", "BASE relocations");
+const u8 Str_839C15C[] = DTR("つうしんこうかん", "LINK TRADES");
+const u8 Str_839C165[] = DTR("つうしんたいせん", "LINK BATTLES");
+const u8 Str_839C16E[] = DTR("つうしん かち", "LINK WINS");
+const u8 Str_839C176[] = DTR("つうしん まけ", "LINK LOSSES");
+const u8 Str_839C17E[] = DTR("つうしん ひきわけ", "LINK TIES");
+// Idiot counter?
+const u8 Str_839C188[] = DTR("わざ:はねる", "Move: SPLASH");
+const u8 Str_839C18F[] = DTR("わざ:わるあがき", "Move: STRUGGLE");
+const u8 Str_839C198[] = DTR("スロットおおあたりかいすう", "SLOTS jackpots");
+const u8 Str_839C1A6[] = DTR("ルーレット れんしょう", "ROULETTE streak");
+const u8 Str_839C1B2[] = DTR("バトルタワー", "BATTLE TOWER");
+const u8 Str_839C1B9[] = DTR("バトルタワーかち", "BATTLE TOWER wins");
+const u8 Str_839C1C2[] = DTR("バトルタワーれんしょう", "BATTLE TOWER streak");
+const u8 Str_839C1CE[] = DTR("ポロックさくせい", "{POKEBLOCK}s created");
+const u8 Str_839C1D7[] = DTR("つうしんでポロックつくった", "LINK {POKEBLOCK}s made");
+const u8 Str_839C1E5[] = DTR("つうしんコンテストかち", "LINK CONTEST wins");
+const u8 Str_839C1F1[] = DTR("CPUコンテストさんか", "CPU CONTEST entries");
+const u8 Str_839C1FD[] = DTR("CPUコンテストかち", "CPU CONTEST wins");
+const u8 Str_839C208[] = DTR("かいもの", "Shopping");
+const u8 Str_839C20D[] = DTR("ダウジングマシン", "ITEMFINDER");
+const u8 Str_839C216[] = DTR("あめふり", "Rained");
+const u8 Str_839C21B[] = DTR("ずかんをみた", "POKéDEX reads");
+const u8 Str_839C222[] = DTR("リボン もらった", "RIBBONS awarded");
+const u8 Str_839C22B[] = DTR("だんさ とびおり", "Ledge hops");
+const u8 Str_839C234[] = DTR("TVを みた", "Watched TV");
+const u8 Str_839C23B[] = DTR("とけいを みた", "Checked CLOCK");
+const u8 Str_839C243[] = DTR("くじが あたった", "LOTTERY wins");
+const u8 Str_839C24C[] = DTR("ポケモンあずけた", "POKéMON DAYCARE uses");
+const u8 Str_839C255[] = DTR("ロープウェイりよう", "CABLE CAR uses");
+const u8 Str_839C25F[] = DTR("おんせん はいった", "HOT SPRING uses");
const struct {
u32 maxVal;
@@ -2248,7 +2175,7 @@ u8 DebugMenu_OpenBerryInfo(void)
return TRUE;
}
-const u8 Str_839C42E[] = _("レベル  ステージ");
+const u8 Str_839C42E[] = DTR("レベル  ステージ", "TOWER level stage");
void DebugMenu_8078950(void)
{
@@ -2337,7 +2264,7 @@ u8 DebugMenu_BattleTowerStages(void)
return TRUE;
}
-const u8 Str_839C438[] = _("ポロック グループ{STR_VAR_1}");
+const u8 Str_839C438[] = DTR("ポロック グループ{STR_VAR_1}", "{POKEBLOCK} GROUP{STR_VAR_1}");
void DebugMenu_8078B70(u16 value)
{
@@ -2473,10 +2400,10 @@ bool8 DebugMenu_8078CA8(void)
return FALSE;
}
-const u8 Str_839C5CC[] =_("かきこみ せいこう");
-const u8 Str_839C5D6[] =_("よみこみせいこう");
-const u8 Str_839C5DF[] =_("かきこみ しっぱい");
-const u8 Str_839C5E9[] =_("よみこみ しっぱい");
+const u8 Str_839C5CC[] = DTR("かきこみ せいこう", "Write successful");
+const u8 Str_839C5D6[] = DTR("よみこみせいこう", "Read successful");
+const u8 Str_839C5DF[] = DTR("かきこみ しっぱい", "Writing failed");
+const u8 Str_839C5E9[] = DTR("よみこみ しっぱい", "Reading failed");
bool8 DebugMenu_8078CE4(void)
{
diff --git a/src/debug/taya_debug_window.c b/src/debug/taya_debug_window.c
index 68ccc6f9d..aa3c1d993 100644
--- a/src/debug/taya_debug_window.c
+++ b/src/debug/taya_debug_window.c
@@ -65,7 +65,7 @@ const u8 gUnknown_Debug_083C4E85[] = _("MAIL");
const u8 gUnknown_Debug_083C4E8A[] = _("MAIL salutation");
const u8 gUnknown_Debug_083C4E9A[] = _("BARD's song");
const u8 gUnknown_Debug_083C4EA6[] = _("Interview");
-const u8 gUnknown_Debug_083C4EB0[] = _("InterviewシBTス");
+const u8 gUnknown_Debug_083C4EB0[] = _("Interview(BT)");
const struct {
const u8 * text;
@@ -88,10 +88,10 @@ const u8 gUnknown_Debug_083C4F0E[] = _("BARD");
const u8 gUnknown_Debug_083C4F13[] = _("HIPSTER");
const u8 gUnknown_Debug_083C4F1B[] = _("RECYCLE");
const u8 gUnknown_Debug_083C4F23[] = _("STORYTELLER");
-const u8 gUnknown_Debug_083C4F2F[] = _("GIDDY GUY");
-const u8 gUnknown_Debug_083C4F39[] = _("Flag OFF");
-const u8 gUnknown_Debug_083C4F42[] = _("21 letters");
-const u8 gUnknown_Debug_083C4F4D[] = _("ナウくなる");
+const u8 gUnknown_Debug_083C4F2F[] = _("GIDDY GUY");
+const u8 gUnknown_Debug_083C4F39[] = _("Flag OFF");
+const u8 gUnknown_Debug_083C4F42[] = _("21 letters");
+const u8 gUnknown_Debug_083C4F4D[] = DTR("ナウくなる", "BECOME HIP");
const struct {
const u8 * text;
@@ -107,18 +107,18 @@ const struct {
{gUnknown_Debug_083C4F4D}
};
-const u8 gUnknown_Debug_083C4F94[] = _("しょうしょうおまちください!");
+const u8 gUnknown_Debug_083C4F94[] = DTR("しょうしょうおまちください!", "Please wait!");
const u8 gUnknown_Debug_083C4FA3[] = _("Weather");
-const u8 gUnknown_Debug_083C4FAB[] = _("LANETTE'S PC");
+const u8 gUnknown_Debug_083C4FAB[] = _("LANETTE'S PC");
const u8 gUnknown_Debug_083C4FB8[] = _("SimpleText");
const u8 gUnknown_Debug_083C4FC3[] = _("Old man");
const u8 gUnknown_Debug_083C4FCB[] = _("Trend");
-const u8 gUnknown_Debug_083C4FD1[] = _("Trend R");
-const u8 gUnknown_Debug_083C4FD9[] = _("Town flag");
-const u8 gUnknown_Debug_083C4FE3[] = _("Award a ribbon");
+const u8 gUnknown_Debug_083C4FD1[] = _("Trend R");
+const u8 gUnknown_Debug_083C4FD9[] = _("Town flag");
+const u8 gUnknown_Debug_083C4FE3[] = _("Award a ribbon");
const u8 gUnknown_Debug_083C4FF2[] = _("{PKMN}LOTTERY");
const u8 gUnknown_Debug_083C4FFC[] = _("Trainer");
-const u8 gUnknown_Debug_083C5004[] = _("POKéNAV D");
+const u8 gUnknown_Debug_083C5004[] = _("POKéNAV D");
const struct MenuAction gUnknown_Debug_083C5010[] = {
{gUnknown_Debug_083C4FA3, debug_sub_808560C},
@@ -195,7 +195,7 @@ const struct {
}
};
-const u8 gUnknown_Debug_083C517C[] = _("Select Ribbon");
+const u8 gUnknown_Debug_083C517C[] = _("Select Ribbon");
bool8 TayaDebugMenu_Trend(void)
{
diff --git a/src/debug/tomomichi_debug_menu.c b/src/debug/tomomichi_debug_menu.c
index daaca570c..c9804c638 100644
--- a/src/debug/tomomichi_debug_menu.c
+++ b/src/debug/tomomichi_debug_menu.c
@@ -16,6 +16,8 @@
#include "contest_painting.h"
#include "sound.h"
+// TRN: If anyone wants to translate the dummy options, they are welcome to :P
+
static u16 sPicTest_Species;
static u32 sPicTest_OTID;
static u32 sPicTest_Personality;
@@ -295,19 +297,19 @@ static const struct MenuAction sMenuActions_TrickRelated[] = {
{sString_TrickRelated_TrickMaster, TrickRelated_TrickMaster_InitSubmenu}
};
-static const u8 sString_Event1[] = _("パート1");
-static const u8 sString_Event2[] = _("パート2");
+static const u8 sString_Event1[] = DTR("パート1", "PART 1");
+static const u8 sString_Event2[] = DTR("パート2", "PART 2");
static const struct MenuAction sMenuActions_ControlEvents[] = {
{sString_Event1, ControlEvents_InitSubmenu1},
{sString_Event2, ControlEvents_InitSubmenu2}
};
-static const u8 sString_EventFlag[] = _("イベントFLAG");
-static const u8 sString_VanishFlag[] = _("バニシュFLAG");
-static const u8 sString_TrainerFlag[] = _("トレーナーFLAG");
+static const u8 sString_EventFlag[] = DTR("イベントFLAG", "EVENT FLAG");
+static const u8 sString_VanishFlag[] = DTR("バニシュFLAG", "VANISH FLAG");
+static const u8 sString_TrainerFlag[] = DTR("トレーナーFLAG", "TRAINER FLAG");
static const u8 sString_SysFlag[] = _("SYSFLAG");
-static const u8 sString_BallVanishFlag[] = _("BALLバニシュFLAG");
+static const u8 sString_BallVanishFlag[] = DTR("BALLバニシュFLAG", "VANISH FLAG");
static const u8 sString_FH[] = _("FH");
static const u8 sString_FH_OBJ[] = _("FH-OBJ");
@@ -326,7 +328,7 @@ static const u8 sString_SysWork[] = _("SYSWORK");
static const u8 sString_LocalWork[] = _("LOCALWORK");
static const u8 sString_ObjWork[] = _("OBJWORK");
static const u8 sString_AnsWork[] = _("ANSWORK");
-static const u8 sString_SaveWorkPart2[] = _("SAVEWORK パート2");
+static const u8 sString_SaveWorkPart2[] = DTR("SAVEWORK パート2", "SAVEWORK PART 2");
static const struct MenuAction sMenuActions_ControlWorks[] = {
{sString_SaveWork, ControlWorks_SaveWork_InitSubmenu},
@@ -337,15 +339,15 @@ static const struct MenuAction sMenuActions_ControlWorks[] = {
{sString_SaveWorkPart2, ControlWorks_SaveWorkPart2_InitSubmenu}
};
-static const u8 sString_Clear_go[] = _("クリアご");
-static const u8 sString_Coin_kounyuuka[] = _("コインこうにゅうかのう");
-static const u8 sString_Oldale_supporter_set[] = _("コトキサポーターセット");
-static const u8 sString_New_Mauville_open[] = _("ニューキンセツOPEN");
-static const u8 sString_Renrakusen_ni_noreru[] = _("れんらくせんにのれる");
-static const u8 sString_Egg_tsuika[] = _("タマゴついか");
-static const u8 sString_Item_ippai[] = _("アイテムいっぱい");
-static const u8 sString_Gezzu_ippai[] = _("グッズいっぱい");
-static const u8 sString_Coin_ippai[] = _("COINいっぱい");
+static const u8 sString_Clear_go[] = DTR("クリアご", "POSTGAME");
+static const u8 sString_Coin_kounyuuka[] = DTR("コインこうにゅうかのう", ",Get COIN CASE");
+static const u8 sString_Oldale_supporter_set[] = DTR("コトキサポーターセット", "OLDALE POST RIVAL");
+static const u8 sString_New_Mauville_open[] = DTR("ニューキンセツOPEN", "Open NEW MAUVILLE");
+static const u8 sString_Renrakusen_ni_noreru[] = DTR("れんらくせんにのれる", "Get S.S. TICKET");
+static const u8 sString_Egg_tsuika[] = DTR("タマゴついか", "Get KYOGRE EGG");
+static const u8 sString_Item_ippai[] = DTR("アイテムいっぱい", "Max Items");
+static const u8 sString_Gezzu_ippai[] = DTR("グッズいっぱい", "Max Decorations");
+static const u8 sString_Coin_ippai[] = DTR("COINいっぱい", "Max COINS");
static const struct MenuAction sMenuActions_ControlEvents_Events1[] = {
{sString_Clear_go, CallScript_DoHallOfFame},
@@ -359,12 +361,13 @@ static const struct MenuAction sMenuActions_ControlEvents_Events1[] = {
{sString_Coin_ippai, CallScript_GiveAllCoins}
};
-static const u8 sString_SootpolisGymOpen[] = _("ムロジムOPEN");
-static const u8 sString_MoneyTo0[] = _("おかねを0へ");
-static const u8 sString_BarboachFull[] = _("ドジョッチ FULL");
-static const u8 sString_ShroomishFull[] = _("キノココ FULL");
-static const u8 sString_BarboachEgg[] = _("ドジョッチ タマゴ");
-static const u8 sString_ShroomishEgg[] = _("キノココ タマゴ");
+// Note: JP text says Dewford Gym for some reason.
+static const u8 sString_SootpolisGymOpen[] = DTR("ムロジムOPEN", "Open SOOTOPOLIS GYM");
+static const u8 sString_MoneyTo0[] = DTR("おかねを0へ", "Set money to 0");
+static const u8 sString_BarboachFull[] = DTR("ドジョッチ FULL", "Full BARBOACH PARTY");
+static const u8 sString_ShroomishFull[] = DTR("キノココ FULL", "Full SHROOMISH PARTY");
+static const u8 sString_BarboachEgg[] = DTR("ドジョッチ タマゴ", "Get BARBOACH EGG");
+static const u8 sString_ShroomishEgg[] = DTR("キノココ タマゴ", "Get SHROOMISH EGG");
static const struct MenuAction sMenuActions_ControlEvents_Events2[] = {
{sString_SootpolisGymOpen, CallScript_OpenSootopolisGym},
@@ -375,7 +378,7 @@ static const struct MenuAction sMenuActions_ControlEvents_Events2[] = {
{sString_ShroomishEgg, CallScript_GiveShroomishEgg}
};
-static const u8 sString_Answork_Mikansei[] = _("ANSWORK みかんせい");
+static const u8 sString_Answork_Mikansei[] = DTR("ANSWORK みかんせい", "ANSWORK Incomplete");
static const struct MenuAction sMenuActions_ControlEvents_AnsWork[] = {
{sString_Answork_Mikansei, DummyMenuAction}
@@ -499,15 +502,15 @@ static const u16 gUnknown_Debug_083C12D2[][9] = {
{0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}
};
-static const u8 gUnknown_Debug_083C12F6[] = _("BATCH");
-static const u8 gUnknown_Debug_083C12FC[] = _("タウンとうちゃく");
-static const u8 gUnknown_Debug_083C1305[] = _("シティとうちゃく");
+static const u8 gUnknown_Debug_083C12F6[] = DTR("BATCH", "BADGE");
+static const u8 gUnknown_Debug_083C12FC[] = DTR("タウンとうちゃく", "Towns arrived");
+static const u8 gUnknown_Debug_083C1305[] = DTR("シティとうちゃく", "Cities arrived");
static const u8 gUnknown_Debug_083C130E[] = _("GET");
-static const u8 gUnknown_Debug_083C1312[] = _("そのた1");
-static const u8 gUnknown_Debug_083C1317[] = _("そのた2");
-static const u8 gUnknown_Debug_083C131C[] = _("そのた3");
-static const u8 gUnknown_Debug_083C1321[] = _("そのた4");
-static const u8 gUnknown_Debug_083C1326[] = _("そのた とうちゃく");
+static const u8 gUnknown_Debug_083C1312[] = DTR("そのた1", "Other 1");
+static const u8 gUnknown_Debug_083C1317[] = DTR("そのた2", "Other 2");
+static const u8 gUnknown_Debug_083C131C[] = DTR("そのた3", "Other 3");
+static const u8 gUnknown_Debug_083C1321[] = DTR("そのた4", "Other 4");
+static const u8 gUnknown_Debug_083C1326[] = DTR("そのた とうちゃく", "Others arrived");
static const struct MenuAction gUnknown_Debug_083C1330[] = {
{gUnknown_Debug_083C12F6, debug_sub_808CFA4},
@@ -717,7 +720,7 @@ static const u16 gUnknown_Debug_083C19C6[][9] = {
{FLAG_LANDMARK_SEAFLOOR_CAVERN, FLAG_LANDMARK_BATTLE_TOWER, FLAG_LANDMARK_SOUTHERN_ISLAND, FLAG_SYS_POKEMON_LEAGUE_FLY, FLAG_LANDMARK_SKY_PILLAR}
};
-static const u8 gDebug_0x83C1A68[] = _("FVーBALL パート1");
+static const u8 gDebug_0x83C1A68[] = DTR("FVーBALL パート1", "FV-BALL PART 1");
static const struct MenuAction gUnknown_Debug_083C1A78[] = {
{gDebug_0x83C1A68, debug_sub_808D8D8}
@@ -737,9 +740,9 @@ static const u16 gUnknown_Debug_083C1AAE[][9] = {
{FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS_2, FLAG_ITEM_MOSSDEEP_STEVENS_HOUSE_1}
};
-static const u8 gUnknown_Debug_083C1AC0[] = _("ジムリーダー");
-static const u8 gUnknown_Debug_083C1AC7[] = _("してんのう");
-static const u8 gUnknown_Debug_083C1ACD[] = _("みつる/Champロード");
+static const u8 gUnknown_Debug_083C1AC0[] = DTR("ジムリーダー", "GYM LEADER");
+static const u8 gUnknown_Debug_083C1AC7[] = DTR("してんのう", "ELITE FOUR");
+static const u8 gUnknown_Debug_083C1ACD[] = DTR("みつる/Champロード", "WALLY/VICTORY ROAD");
static const struct MenuAction gUnknown_Debug_083C1ADC[] = {
{gUnknown_Debug_083C1AC0, debug_sub_808CD08},
@@ -792,14 +795,14 @@ static const u16 gUnknown_Debug_083C1C38[][9] = {
{0x04E1}
};
-static const u8 gUnknown_Debug_083C1C6E[] = _("120/119ばんどうろカクレオン");
-static const u8 gUnknown_Debug_083C1C80[] = _("そのた1 / SUPPORTM/W");
-static const u8 gUnknown_Debug_083C1C92[] = _("ODAMAKI/FIGHTER1");
-static const u8 gUnknown_Debug_083C1CA3[] = _("MITSURU/TENKI");
-static const u8 gUnknown_Debug_083C1CB1[] = _("そのた2 /DAIGO");
+static const u8 gUnknown_Debug_083C1C6E[] = DTR("120/119ばんどうろカクレオン", "ROUTE 120/119 KECLEON");
+static const u8 gUnknown_Debug_083C1C80[] = DTR("そのた1 / SUPPORTM/W", "Other 1/SUPPORT/M/W");
+static const u8 gUnknown_Debug_083C1C92[] = DTR("ODAMAKI/FIGHTER1", "BIRCH/FIGHTER1");
+static const u8 gUnknown_Debug_083C1CA3[] = DTR("MITSURU/TENKI", "WALLY/WEATHER");
+static const u8 gUnknown_Debug_083C1CB1[] = DTR("そのた2 /DAIGO", "Other 2/STEVEN");
static const u8 gUnknown_Debug_083C1CBD[] = _("POKE/POKEMON");
static const u8 gUnknown_Debug_083C1CCA[] = _("MAMA/SUPPORT02");
-static const u8 gUnknown_Debug_083C1CD9[] = _("HAGI");
+static const u8 gUnknown_Debug_083C1CD9[] = DTR("HAGI", "Mr. BRINEY");
static const u8 gUnknown_Debug_083C1CDE[] = _("SUPPORT01");
static const struct MenuAction gUnknown_Debug_083C1CE8[] = {
@@ -1020,15 +1023,16 @@ static const u16 gUnknown_Debug_083C271A[][9] = {
{FLAG_HIDE_RIVAL_BIRCH_LAB, FLAG_HIDE_RIVAL_CHAMPIONS_ROOM, FLAG_HIDE_RIVAL_RUSTBORO, FLAG_HIDE_RIVAL_LILYCOVE_MART, FLAG_HIDE_RIVAL_ROUTE103, FLAG_HIDE_RIVAL_ROUTE110, FLAG_HIDE_RIVAL_ROUTE119, FLAG_HIDE_RIVAL_LAVARIDGE_1, FLAG_HIDE_RIVAL_OLDALE_TOWN}
};
-static const u8 gUnknown_Debug_083C27BC[] = _("FEひでんわざ/デボンかんれん");
-static const u8 gUnknown_Debug_083C27CC[] = _("FEだいじなアイテムPART1");
-static const u8 gUnknown_Debug_083C27DC[] = _("そのた1");
-static const u8 gUnknown_Debug_083C27E1[] = _("MITSURU/DOOR");
-static const u8 gUnknown_Debug_083C27EE[] = _("カラクリやしき10のやじるし/GYM07");
-static const u8 gUnknown_Debug_083C2803[] = _("SUPPORT/そのた4");
-static const u8 gUnknown_Debug_083C2810[] = _("DAISUKI/そのた5");
-static const u8 gUnknown_Debug_083C281D[] = _("そのた2");
-static const u8 gUnknown_Debug_083C2822[] = _("そのた6");
+static const u8 gUnknown_Debug_083C27BC[] = DTR("FEひでんわざ/デボンかんれん", "Field HMs/DEVON-related");
+static const u8 gUnknown_Debug_083C27CC[] = DTR("FEだいじなアイテムPART1", "Field Key Items Part 1");
+static const u8 gUnknown_Debug_083C27DC[] = DTR("そのた1", "Other 1");
+static const u8 gUnknown_Debug_083C27E1[] = DTR("MITSURU/DOOR", "WALLY/Door");
+static const u8 gUnknown_Debug_083C27EE[] = DTR("カラクリやしき10のやじるし/GYM07",
+ "TRICK HOUSE 10 Arrows/GYM 7");
+static const u8 gUnknown_Debug_083C2803[] = DTR("SUPPORT/そのた4", "Support/Other 4");
+static const u8 gUnknown_Debug_083C2810[] = DTR("DAISUKI/そのた5", "FAN CLUB/Other 5");
+static const u8 gUnknown_Debug_083C281D[] = DTR("そのた2", "Other 2");
+static const u8 gUnknown_Debug_083C2822[] = DTR("そのた6", "Other 6");
static const struct MenuAction gUnknown_Debug_083C2828[] = {
{gUnknown_Debug_083C27BC, debug_sub_808C3B0},
@@ -1254,11 +1258,11 @@ static const u16 gUnknown_Debug_83C31E6[][9] = {
{FLAG_BIRCH_AIDE_MET, FLAG_DECLINED_BIKE, FLAG_RECEIVED_SECRET_POWER}
};
-static const u8 gUnknown_Debug_083C3288[] = _("CYCLEかんれん");
-static const u8 gUnknown_Debug_083C3292[] = _("おおきさくらべ");
-static const u8 gUnknown_Debug_083C329A[] = _("カウンタ");
-static const u8 gUnknown_Debug_083C329F[] = _("そのた1");
-static const u8 gUnknown_Debug_083C32A4[] = _("そのた2");
+static const u8 gUnknown_Debug_083C3288[] = DTR("CYCLEかんれん", "CYCLE-related");
+static const u8 gUnknown_Debug_083C3292[] = DTR("おおきさくらべ", "Size comparison");
+static const u8 gUnknown_Debug_083C329A[] = DTR("カウンタ", "Counter");
+static const u8 gUnknown_Debug_083C329F[] = DTR("そのた1", "Other 1");
+static const u8 gUnknown_Debug_083C32A4[] = DTR("そのた2", "Other 2");
static const struct MenuAction gUnknown_Debug_083C32AC[] = {
{gUnknown_Debug_083C3288, debug_sub_808E400},
@@ -1404,11 +1408,11 @@ static const u16 gUnknown_Debug_083C371E[][9] = {
};
static const u8 gUnknown_Debug_083C3742[] = _("SP");
-static const u8 gUnknown_Debug_083C3745[] = _("ルーム R110 PART1/カラクリ");
-static const u8 gUnknown_Debug_083C3759[] = _("ルーム R110 PART2");
-static const u8 gUnknown_Debug_083C3768[] = _("ルーム ロード");
-static const u8 gUnknown_Debug_083C3770[] = _("ソノタ1");
-static const u8 gUnknown_Debug_083C3775[] = _("ソノタ2");
+static const u8 gUnknown_Debug_083C3745[] = DTR("ルーム R110 PART1/カラクリ", "Room R110 Part 1/TRICK");
+static const u8 gUnknown_Debug_083C3759[] = DTR("ルーム R110 PART2", "Room R110 Part 2");
+static const u8 gUnknown_Debug_083C3768[] = DTR("ルーム ロード", "Room road"); // TRN
+static const u8 gUnknown_Debug_083C3770[] = DTR("ソノタ1", "Other 1");
+static const u8 gUnknown_Debug_083C3775[] = DTR("ソノタ2", "Other 2");
static const struct MenuAction sMenuActions_ControlWorks_SaveWorkPart2[] = {
{gUnknown_Debug_083C3742, ControlWorks_SaveWorkPart2_SP_InitSubsubmenu},
@@ -1561,15 +1565,15 @@ static const u16 sControlWorks_SaveWork_ItemArrays[][9] = {
{VAR_WEATHER_INSTITUTE_STATE, VAR_SLATEPORT_FAN_CLUB_STATE, 0x40BB, VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, VAR_GAME_CORNER_STATE, VAR_WHICH_FOSSIL_REVIVED}
};
-static const u8 sString_Town[] = _("タウン");
-static const u8 sString_City[] = _("シティ");
-static const u8 sString_Route_101_to_109[] = _("ロード101ー109");
-static const u8 sString_Route_110_to_118[] = _("ロード110ー118");
-static const u8 sString_Route_119_to_127[] = _("ロード119ー127");
-static const u8 sString_Route_128_to_134[] = _("ロード128ー134");
-static const u8 sString_Room_Town[] = _("ルーム タウン");
-static const u8 sString_Room_City[] = _("ルーム シティ");
-static const u8 sString_Dungeon_nai[] = _("ダンジョンない");
+static const u8 sString_Town[] = DTR("タウン", "TOWN");
+static const u8 sString_City[] = DTR("シティ", "CITY");
+static const u8 sString_Route_101_to_109[] = DTR("ロード101ー109", "ROUTE 101-109");
+static const u8 sString_Route_110_to_118[] = DTR("ロード110ー118", "ROUTE 110-118");
+static const u8 sString_Route_119_to_127[] = DTR("ロード119ー127", "ROUTE 119-127");
+static const u8 sString_Route_128_to_134[] = DTR("ロード128ー134", "ROUTE 128-134");
+static const u8 sString_Room_Town[] = DTR("ルーム タウン", "Room Town"); // TRN
+static const u8 sString_Room_City[] = DTR("ルーム シティ", "Room City");
+static const u8 sString_Dungeon_nai[] = DTR("ダンジョンない", "DUNGEON");
static const struct MenuAction sMenuAction_ControlWorks_SaveWork[] = {
{sString_Town, ControlWorks_SaveWork_Town_InitSubsubmenu},
@@ -1858,13 +1862,13 @@ static const struct MenuAction gUnknown_Debug_083C47F0[] = {
{gUnknown_Debug_083C47E9, DummyMenuAction}
};
-static const u8 gUnknown_Debug_083C4830[] = _("Trick Master");
+static const u8 gUnknown_Debug_083C4830[] = _("Trick Master");
-static const u8 gUnknown_Debug_083C483D[] = _("Hidden MASTER");
-static const u8 gUnknown_Debug_083C484B[] = _("Inside the HOUSE");
-static const u8 gUnknown_Debug_083C485C[] = _("Pass a reward");
-static const u8 gUnknown_Debug_083C486A[] = _("Rig a trick");
-static const u8 gUnknown_Debug_083C4876[] = _("MASTER is gone");
+static const u8 gUnknown_Debug_083C483D[] = _("Hidden MASTER");
+static const u8 gUnknown_Debug_083C484B[] = _("Inside the HOUSE");
+static const u8 gUnknown_Debug_083C485C[] = _("Pass a reward");
+static const u8 gUnknown_Debug_083C486A[] = _("Rig a trick");
+static const u8 gUnknown_Debug_083C4876[] = _("MASTER is gone");
static const struct MenuAction gUnknown_Debug_083C4888[] = {
{gUnknown_Debug_083C483D, DummyMenuAction},
@@ -1885,7 +1889,7 @@ bool8 InitTomomichiDebugWindow(void)
static void debug_sub_808B868(void)
{
- c2_exit_to_overworld_1_continue_scripts_restart_music();
+ CB2_ReturnToFieldContinueScriptPlayMapMusic();
}
static bool8 InitDebugWindow(void)
diff --git a/src/debug/watanabe_debug_menu.c b/src/debug/watanabe_debug_menu.c
index 2e3b684d9..c055781fb 100644
--- a/src/debug/watanabe_debug_menu.c
+++ b/src/debug/watanabe_debug_menu.c
@@ -400,16 +400,16 @@ void InitSizeComparison(void)
gTasks[taskId].data[0] = 0xfc;
}
-const u8 gUnknown_Debug_083F7FDA[] = _("ひりつ");
-const u8 gUnknown_Debug_083F7FDE[] = _("たかさ");
-const u8 gUnknown_Debug_083F7FE2[] = _("Lキー▶しゅくしょう");
-const u8 gUnknown_Debug_083F7FED[] = _("Rキー▶かくだい");
-const u8 gUnknown_Debug_083F7FF6[] = _("Uキー▶うえ いどう");
-const u8 gUnknown_Debug_083F8001[] = _("Dキー▶した いどう");
-const u8 gUnknown_Debug_083F800C[] = _("Aボタン▶そうさきりかえ");
-const u8 gUnknown_Debug_083F8019[] = _("Bボタン▶やめる");
-const u8 gUnknown_Debug_083F8022[] = _("スタート:");
-const u8 gUnknown_Debug_083F8028[] = _(":セレクト");
+const u8 gUnknown_Debug_083F7FDA[] = DTR("ひりつ", "SCALE");
+const u8 gUnknown_Debug_083F7FDE[] = DTR("たかさ", "HEIGHT");
+const u8 gUnknown_Debug_083F7FE2[] = DTR("Lキー▶しゅくしょう", "{LEFT_ARROW}: SHRINK");
+const u8 gUnknown_Debug_083F7FED[] = DTR("Rキー▶かくだい", "{RIGHT_ARROW}: ENLARGE");
+const u8 gUnknown_Debug_083F7FF6[] = DTR("Uキー▶うえ いどう", "{UP_ARROW}: MOVE UP");
+const u8 gUnknown_Debug_083F8001[] = DTR("Dキー▶した いどう", "{DOWN_ARROW}: MOVE DOWN");
+const u8 gUnknown_Debug_083F800C[] = DTR("Aボタン▶そうさきりかえ", "A: SWITCH CONTROL");
+const u8 gUnknown_Debug_083F8019[] = DTR("Bボタン▶やめる", "B: QUIT");
+const u8 gUnknown_Debug_083F8022[] = DTR("スタート:", "START:");
+const u8 gUnknown_Debug_083F8028[] = DTR(":セレクト", ":SELECT");
#ifdef NONMATCHING
void debug_80C3A50(u8 taskId)
@@ -1003,11 +1003,13 @@ void debug_80C41A8(void)
CreateTask(debug_80C47BC, 0);
}
-const u8 gUnknown_Debug_083F802E[] = _("やせいたいせん");
-const u8 gUnknown_Debug_083F8036[] = _("1VS1たいせん");
-const u8 gUnknown_Debug_083F803F[] = _("2VS2たいせん");
-const u8 gUnknown_Debug_083F8048[] = _("{COLOR BLUE}1VS1つうしんたいせん");
-const u8 gUnknown_Debug_083F8058[] = _("{COLOR BLUE}2VS2つうしんたいせん");
+const u8 gUnknown_Debug_083F802E[] = DTR("やせいたいせん", "Wild BATTLE");
+const u8 gUnknown_Debug_083F8036[] = DTR("1VS1たいせん", "1v1 BATTLE");
+const u8 gUnknown_Debug_083F803F[] = DTR("2VS2たいせん", "2v2 BATTLE");
+const u8 gUnknown_Debug_083F8048[] = DTR("{COLOR BLUE}1VS1つうしんたいせん",
+ "{COLOR BLUE}LINK 1v1 BATTLE");
+const u8 gUnknown_Debug_083F8058[] = DTR("{COLOR BLUE}2VS2つうしんたいせん",
+ "{COLOR BLUE}LINK 2v2 BATTLE");
const struct WatanabeDebugMenuItem gUnknown_Debug_083F8068[] = {
{gUnknown_Debug_083F802E, {.type1 = {0x00, 0x01}}},
@@ -1017,16 +1019,16 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F8068[] = {
{gUnknown_Debug_083F8058, {.type1 = {0x0B, 0x02}}}
};
-const u8 gUnknown_Debug_083F8090[] = _("きほんタイプ");
-const u8 gUnknown_Debug_083F8097[] = _("AIタイプ2");
-const u8 gUnknown_Debug_083F809E[] = _("AIタイプ3");
-const u8 gUnknown_Debug_083F80A5[] = _("AIタイプ4");
-const u8 gUnknown_Debug_083F80AC[] = _("AIタイプ5");
-const u8 gUnknown_Debug_083F80B3[] = _("AIタイプ6");
-const u8 gUnknown_Debug_083F80BA[] = _("AIタイプ7");
-const u8 gUnknown_Debug_083F80C1[] = _("AIタイプ8");
-const u8 gUnknown_Debug_083F80C8[] = _("AIタイプ9");
-const u8 gUnknown_Debug_083F80CF[] = _("AIタイプ10");
+const u8 gUnknown_Debug_083F8090[] = DTR("きほんタイプ", "Base type");
+const u8 gUnknown_Debug_083F8097[] = DTR("AIタイプ2", "AI type 2");
+const u8 gUnknown_Debug_083F809E[] = DTR("AIタイプ3", "AI type 3");
+const u8 gUnknown_Debug_083F80A5[] = DTR("AIタイプ4", "AI type 4");
+const u8 gUnknown_Debug_083F80AC[] = DTR("AIタイプ5", "AI type 5");
+const u8 gUnknown_Debug_083F80B3[] = DTR("AIタイプ6", "AI type 6");
+const u8 gUnknown_Debug_083F80BA[] = DTR("AIタイプ7", "AI type 7");
+const u8 gUnknown_Debug_083F80C1[] = DTR("AIタイプ8", "AI type 8");
+const u8 gUnknown_Debug_083F80C8[] = DTR("AIタイプ9", "AI type 9");
+const u8 gUnknown_Debug_083F80CF[] = DTR("AIタイプ10", "AI type 10");
const struct WatanabeDebugMenuItem gUnknown_Debug_083F80D8[] = {
{gUnknown_Debug_083F8090, {.type2 = 0x1}},
@@ -1041,15 +1043,15 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F80D8[] = {
{gUnknown_Debug_083F80CF, {.type2 = 0x200}}
};
-const u8 gUnknown_Debug_083F8128[] = _("くさ");
-const u8 gUnknown_Debug_083F812B[] = _("ながい くさ");
-const u8 gUnknown_Debug_083F8132[] = _("すな");
-const u8 gUnknown_Debug_083F8135[] = _("みず");
-const u8 gUnknown_Debug_083F8138[] = _("うみ");
-const u8 gUnknown_Debug_083F813B[] = _("いけ");
-const u8 gUnknown_Debug_083F813E[] = _("いわ");
-const u8 gUnknown_Debug_083F8141[] = _("どうくつ");
-const u8 gUnknown_Debug_083F8146[] = _("そのた");
+const u8 gUnknown_Debug_083F8128[] = DTR("くさ", "GRASS");
+const u8 gUnknown_Debug_083F812B[] = DTR("ながい くさ", "TALL GRASS");
+const u8 gUnknown_Debug_083F8132[] = DTR("すな", "SAND");
+const u8 gUnknown_Debug_083F8135[] = DTR("みず", "WATER");
+const u8 gUnknown_Debug_083F8138[] = DTR("うみ", "SEA");
+const u8 gUnknown_Debug_083F813B[] = DTR("いけ", "POND");
+const u8 gUnknown_Debug_083F813E[] = DTR("いわ", "ROCKY");
+const u8 gUnknown_Debug_083F8141[] = DTR("どうくつ", "CAVE");
+const u8 gUnknown_Debug_083F8146[] = DTR("そのた", "OTHER");
const struct WatanabeDebugMenuItem gUnknown_Debug_083F814C[] = {
{gUnknown_Debug_083F8128, {.type3 = 0x0}},
@@ -1105,8 +1107,8 @@ void debug_80C4214(UNUSED u8 a0)
void debug_80C42B8(u8 taskId)
{
- u8 sp00[] = _("ポケモンを えらんでね");
- u8 sp0c[] = _("{COLOR RED}START:つぎへ");
+ u8 sp00[] = DTR("ポケモンを えらんでね", "Choose POKéMON");
+ u8 sp0c[] = DTR("{COLOR RED}START:つぎへ", "{COLOR RED}START: NEXT");
Menu_DrawStdWindowFrame(0, 16, 29, 19);
Menu_PrintText(sp00, 1, 17);
@@ -1218,7 +1220,7 @@ void debug_80C4550(u8 taskId)
void debug_80C4694(void)
{
u8 i;
- u8 sp00[] = _("{COLOR RED}じぶんの ポケモン");
+ u8 sp00[] = DTR("{COLOR RED}じぶんの ポケモン", "{COLOR RED}Enemy's POKéMON");
u8 sp10[POKEMON_NAME_LENGTH + 1];
Menu_DrawStdWindowFrame(0, 0, 14, 15);
@@ -1233,7 +1235,7 @@ void debug_80C4694(void)
void debug_80C4704(void)
{
u8 i;
- u8 sp00[] = _("{COLOR RED}あいての ポケモン");
+ u8 sp00[] = DTR("{COLOR RED}あいての ポケモン", "{COLOR RED}Your POKéMON");
u8 sp10[POKEMON_NAME_LENGTH + 1];
Menu_DrawStdWindowFrame(15, 0, 29, 15);
@@ -1256,10 +1258,10 @@ bool8 debug_80C4774(void)
void debug_80C47BC(u8 taskId)
{
u8 i;
- u8 sp00[] = _("たいせんモードを えらんでね");
- u8 sp10[] = _("{COLOR RED}START:つぎへ");
- u8 sp20[] = _("{COLOR RED}バトルモード せんたく");
- u8 sp30[] = _("{COLOR RED}トレーナーAI せんたく");
+ u8 sp00[] = DTR("たいせんモードを えらんでね", "Choose a battle mode");
+ u8 sp10[] = DTR("{COLOR RED}START:つぎへ", "{COLOR RED}START: NEXT");
+ u8 sp20[] = DTR("{COLOR RED}バトルモード せんたく", "{COLOR RED}Battle mode:");
+ u8 sp30[] = DTR("{COLOR RED}トレーナーAI せんたく", "{COLOR RED}TRAINER AI mode:");
Menu_DrawStdWindowFrame(0, 16, 29, 19);
Menu_PrintText(sp00, 1, 17);
@@ -1424,9 +1426,9 @@ void debug_80C4C44(u8 a0)
void debug_80C4D14(u8 taskId)
{
- u8 sp00[] = _("たいせんモードを えらんでね");
- u8 sp10[] = _("{COLOR RED}START:かいし");
- u8 sp20[] = _("{COLOR RED}バトルちけい せんたく");
+ u8 sp00[] = DTR("たいせんモードを えらんでね", "Choose a battle mode");
+ u8 sp10[] = DTR("{COLOR RED}START:かいし", "{COLOR RED}START: BEGIN");
+ u8 sp20[] = DTR("{COLOR RED}バトルちけい せんたく", "{COLOR RED}Battle terrain:");
Menu_DrawStdWindowFrame(0, 16, 29, 19);
Menu_PrintText(sp00, 1, 17);
@@ -1499,11 +1501,11 @@ void debug_80C4F00(u8 a0)
void debug_80C4F48(u8 taskId)
{
- u8 sp00[] = _("じぶんの せいべつを えらんでね");
- u8 sp14[] = _("{COLOR RED}START:つぎへ");
- u8 sp24[] = _("{COLOR RED}せいべつ せんたく");
- u8 sp34[] = _("おとこ");
- u8 sp38[] = _("おんな");
+ u8 sp00[] = DTR("じぶんの せいべつを えらんでね", "Choose a gender");
+ u8 sp14[] = DTR("{COLOR RED}START:つぎへ", "{COLOR RED}START: NEXT");
+ u8 sp24[] = DTR("{COLOR RED}せいべつ せんたく", "{COLOR RED}Gender:");
+ u8 sp34[] = DTR("おとこ", "BOY");
+ u8 sp38[] = DTR("おんな", "GIRL");
Menu_DrawStdWindowFrame(0, 16, 29, 19);
Menu_PrintText(sp00, 1, 17);
@@ -1732,7 +1734,7 @@ const u8 gUnknown_Debug_083F851C[] = _("{COLOR RED}DEF ");
const u8 gUnknown_Debug_083F8524[] = _("{COLOR RED}SPEED");
const u8 gUnknown_Debug_083F852D[] = _("{COLOR RED}SP。ATK");
const u8 gUnknown_Debug_083F8537[] = _("{COLOR RED}SP。DEF");
-const u8 gUnknown_Debug_083F8541[] = _("なし");
+const u8 gUnknown_Debug_083F8541[] = DTR("なし", "without");
const u8 gUnknown_Debug_083F8544[] = _("♂");
const u8 gUnknown_Debug_083F8546[] = _("♀");
const u8 gUnknown_Debug_083F8548[] = _("ー");
@@ -1828,11 +1830,11 @@ const struct WatanabeDebugMenuItem gUnknown_Debug_083F86E8[] = {
{gUnknown_Debug_083F86E0, {.type3 = 0x80}}
};
-const u8 gUnknown_Debug_083F8720[] = _("PKMNワLIST");
-const u8 gUnknown_Debug_083F872A[] = _("PKMNワBOX");
+const u8 gUnknown_Debug_083F8720[] = _("PKMN{RIGHT_ARROW}LIST");
+const u8 gUnknown_Debug_083F872A[] = _("PKMN{RIGHT_ARROW}BOX");
void InitCreatePokemon(void)
{
- u8 sp04[] = _("Create POKひMON   LR:Shift  START:Add");
+ u8 sp04[] = _("Create POKéMON LR:Shift START:Add");
debug_80C35DC();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
@@ -2193,7 +2195,7 @@ void debug_80C5EF4(void)
void debug_80C5FFC(void)
{
u32 ivs;
- u8 sp10[] = _("たまご");
+ u8 sp10[] = DTR("たまご", "EGG");
u8 sp14[] = _("DebugーG");
u8 one;
u16 ff;
@@ -2600,12 +2602,12 @@ const u16 gUnknown_Debug_083F8790[] = {
0x0002
};
-const u8 gUnknown_Debug_083F87D0[] = _("{COLOR RED}L{ESCAPE}ロ");
-const u8 gUnknown_Debug_083F87D8[] = _("{COLOR RED}{ESCAPE}ワR");
-const u8 gUnknown_Debug_083F87E0[] = _("かいはつナンバー");
-const u8 gUnknown_Debug_083F87E9[] = _("グラフィックナンバー");
-const u8 gUnknown_Debug_083F87F4[] = _("{COLOR RED}A:カラーせってい");
-const u8 gUnknown_Debug_083F8801[] = _("{COLOR RED}A:けってい B:キャンセル");
+const u8 gUnknown_Debug_083F87D0[] = _("{COLOR RED}L{ESCAPE}{LEFT_ARROW}");
+const u8 gUnknown_Debug_083F87D8[] = _("{COLOR RED}{ESCAPE}{RIGHT_ARROW}R");
+const u8 gUnknown_Debug_083F87E0[] = DTR("かいはつナンバー", "Devel No.");
+const u8 gUnknown_Debug_083F87E9[] = DTR("グラフィックナンバー", "Graphic No.");
+const u8 gUnknown_Debug_083F87F4[] = DTR("{COLOR RED}A:カラーせってい", "{COLOR RED}A: SET COLOR");
+const u8 gUnknown_Debug_083F8801[] = DTR("{COLOR RED}A:けってい B:キャンセル", "{COLOR RED}A: CONFIRM B: CANCEL");
const u8 gUnknown_Debug_083F8813[] = _(":");
void debug_80C6B00(u8 taskId)
{
diff --git a/src/event_data.c b/src/event_data.c
index bfa9ff821..7c508f02b 100644
--- a/src/event_data.c
+++ b/src/event_data.c
@@ -114,9 +114,9 @@ u16 *GetVarPointer(u16 id)
{
if (id < VARS_START)
return NULL;
- if (id < 0x8000)
+ if (id < SPECIAL_VARS_START)
return &gSaveBlock1.vars[id - VARS_START];
- return gSpecialVars[id - 0x8000];
+ return gSpecialVars[id - SPECIAL_VARS_START];
}
u16 VarGet(u16 id)
diff --git a/src/field_specials.c b/src/field_specials.c
index c23a8c44c..5e0315e73 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -769,7 +769,7 @@ u8 GetLeadMonFriendshipScore(void)
void CB2_FieldShowRegionMap(void)
{
- FieldInitRegionMap(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ FieldInitRegionMap(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void FieldShowRegionMap(void)
diff --git a/src/field_weather.c b/src/field_weather.c
index 9a5a83737..340445fd2 100644
--- a/src/field_weather.c
+++ b/src/field_weather.c
@@ -216,21 +216,21 @@ static const u8 sBasePaletteGammaTypes[32] =
#if DEBUG
-static const u8 sDebugText_Weather_None[] = _("なし   "); // "none"
-static const u8 sDebugText_Weather_Clear[] = _("はれ   "); // "clear"
-static const u8 sDebugText_Weather_Clear2[] = _("はれ2  "); // "clear2"
-static const u8 sDebugText_Weather_Rain[] = _("あめ   "); // "rain"
-static const u8 sDebugText_Weather_Snow[] = _("ゆき   "); // "snow"
-static const u8 sDebugText_Weather_Lightning[] = _("かみなり "); // "lightning"
-static const u8 sDebugText_Weather_Fog[] = _("きり   "); // "fog"
-static const u8 sDebugText_Weather_VolcanicAsh[] = _("かざんばい"); // "volcanic ash"
-static const u8 sDebugText_Weather_Sandstorm[] = _("すなあらし"); // "sandstorm
-static const u8 sDebugText_Weather_Fog2[] = _("きり2  "); // "fog2"
-static const u8 sDebugText_Weather_Underwater[] = _("かいてい "); // "undersea"
-static const u8 sDebugText_Weather_Cloudy[] = _("くもり  "); // "cloudy"
-static const u8 sDebugText_Weather_Clear3[] = _("はれ3  "); // "clear3"
-static const u8 sDebugText_Weather_HeavyRain[] = _("おおあめ"); // "heavy rain"
-static const u8 sDebugText_Weather_Underwater2[] = _("かいてい2"); // "undersea2"
+static const u8 sDebugText_Weather_None[] = DTR("なし   ", "NONE ");
+static const u8 sDebugText_Weather_Clear[] = DTR("はれ   ", "CLOUDY ");
+static const u8 sDebugText_Weather_Clear2[] = DTR("はれ2  ", "SUNNY ");
+static const u8 sDebugText_Weather_Rain[] = DTR("あめ   ", "RAIN ");
+static const u8 sDebugText_Weather_Snow[] = DTR("ゆき   ", "SNOW ");
+static const u8 sDebugText_Weather_Lightning[] = DTR("かみなり ", "LIGHTNING ");
+static const u8 sDebugText_Weather_Fog[] = DTR("きり   ", "FOG 1 ");
+static const u8 sDebugText_Weather_VolcanicAsh[] = DTR("かざんばい", "ASH ");
+static const u8 sDebugText_Weather_Sandstorm[] = DTR("すなあらし", "SANDSTORM ");
+static const u8 sDebugText_Weather_Fog2[] = DTR("きり2  ", "FOG 2 ");
+static const u8 sDebugText_Weather_Underwater[] = DTR("かいてい ", "FOG 3 ");
+static const u8 sDebugText_Weather_Cloudy[] = DTR("くもり  ", "SHADE ");
+static const u8 sDebugText_Weather_Clear3[] = DTR("はれ3  ", "DROUGHT ");
+static const u8 sDebugText_Weather_HeavyRain[] = DTR("おおあめ", "HEAVY RAIN");
+static const u8 sDebugText_Weather_Underwater2[] = DTR("かいてい2", "UNDERWATER");
static const u8 *const sDebugText_Weather[] =
{
diff --git a/src/item_use.c b/src/item_use.c
index d927b5937..9c8c2da57 100644
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -420,8 +420,6 @@ bool8 sub_80C9688(struct MapConnection *connection, int x, int y)
return HiddenItemAtPos(mapHeader->events, localX, localY);
}
-// weird math
-#ifdef NONMATCHING
void sub_80C9720(u8 taskId)
{
s16 x, y;
@@ -429,15 +427,18 @@ void sub_80C9720(u8 taskId)
s16 width = gMapHeader.mapLayout->width + 7;
s16 height = gMapHeader.mapLayout->height + 7;
+ s16 var1 = 7;
+ s16 var2 = 7;
+
PlayerGetDestCoords(&x, &y);
for (curX = x - 7; curX <= x + 7; curX++)
{
for (curY = y - 5; curY <= y + 5; curY++)
{
- if (7 > curX
+ if (var1 > curX
|| curX >= width
- || 7 > curY
+ || var2 > curY
|| curY >= height)
{
struct MapConnection *conn = sub_8056BA0(curX, curY);
@@ -447,156 +448,6 @@ void sub_80C9720(u8 taskId)
}
}
}
-#else
-NAKED
-void sub_80C9720(u8 taskId)
-{
- asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0x14\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- str r0, [sp, 0x4]\n\
- ldr r0, _080C9834 @ =gMapHeader\n\
- ldr r1, [r0]\n\
- ldr r0, [r1]\n\
- adds r0, 0x7\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- str r0, [sp, 0x8]\n\
- ldr r0, [r1, 0x4]\n\
- adds r0, 0x7\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- str r0, [sp, 0xC]\n\
- mov r4, sp\n\
- adds r4, 0x2\n\
- mov r0, sp\n\
- adds r1, r4, 0\n\
- bl PlayerGetDestCoords\n\
- mov r0, sp\n\
- ldrh r0, [r0]\n\
- subs r0, 0x7\n\
- lsls r0, 16\n\
- lsrs r3, r0, 16\n\
- asrs r0, 16\n\
- mov r1, sp\n\
- movs r2, 0\n\
- ldrsh r1, [r1, r2]\n\
- adds r1, 0x7\n\
- cmp r0, r1\n\
- bgt _080C9824\n\
-_080C976E:\n\
- mov r5, sp\n\
- ldrh r0, [r5, 0x2]\n\
- subs r0, 0x5\n\
- lsls r0, 16\n\
- lsrs r4, r0, 16\n\
- lsls r2, r4, 16\n\
- asrs r1, r2, 16\n\
- movs r6, 0x2\n\
- ldrsh r0, [r5, r6]\n\
- adds r0, 0x5\n\
- lsls r3, 16\n\
- mov r8, r3\n\
- cmp r1, r0\n\
- bgt _080C980E\n\
- movs r0, 0x7\n\
- str r0, [sp, 0x10]\n\
- mov r1, r8\n\
- asrs r1, 16\n\
- mov r9, r1\n\
- mov r10, r0\n\
-_080C9796:\n\
- ldr r3, [sp, 0x10]\n\
- cmp r3, r9\n\
- bgt _080C97B8\n\
- ldr r5, [sp, 0x8]\n\
- lsls r0, r5, 16\n\
- asrs r0, 16\n\
- cmp r9, r0\n\
- bge _080C97B8\n\
- asrs r1, r2, 16\n\
- cmp r10, r1\n\
- bgt _080C97B8\n\
- ldr r6, [sp, 0xC]\n\
- lsls r0, r6, 16\n\
- asrs r0, 16\n\
- lsls r7, r4, 16\n\
- cmp r1, r0\n\
- blt _080C97F6\n\
-_080C97B8:\n\
- mov r0, r8\n\
- asrs r5, r0, 16\n\
- lsls r4, 16\n\
- asrs r6, r4, 16\n\
- adds r0, r5, 0\n\
- adds r1, r6, 0\n\
- bl sub_8056BA0\n\
- adds r7, r4, 0\n\
- cmp r0, 0\n\
- beq _080C97F6\n\
- adds r1, r5, 0\n\
- adds r2, r6, 0\n\
- bl sub_80C9688\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- cmp r0, 0x1\n\
- bne _080C97F6\n\
- mov r0, sp\n\
- ldrh r1, [r0]\n\
- subs r1, r5, r1\n\
- lsls r1, 16\n\
- asrs r1, 16\n\
- ldrh r2, [r0, 0x2]\n\
- subs r2, r6, r2\n\
- lsls r2, 16\n\
- asrs r2, 16\n\
- ldr r0, [sp, 0x4]\n\
- bl sub_80C9838\n\
-_080C97F6:\n\
- movs r1, 0x80\n\
- lsls r1, 9\n\
- adds r0, r7, r1\n\
- lsrs r4, r0, 16\n\
- lsls r2, r4, 16\n\
- asrs r1, r2, 16\n\
- mov r3, sp\n\
- movs r5, 0x2\n\
- ldrsh r0, [r3, r5]\n\
- adds r0, 0x5\n\
- cmp r1, r0\n\
- ble _080C9796\n\
-_080C980E:\n\
- movs r1, 0x80\n\
- lsls r1, 9\n\
- add r1, r8\n\
- lsrs r3, r1, 16\n\
- asrs r1, 16\n\
- mov r0, sp\n\
- movs r6, 0\n\
- ldrsh r0, [r0, r6]\n\
- adds r0, 0x7\n\
- cmp r1, r0\n\
- ble _080C976E\n\
-_080C9824:\n\
- add sp, 0x14\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .align 2, 0\n\
-_080C9834: .4byte gMapHeader\n\
- .syntax divided");
-}
-#endif
void sub_80C9838(u8 taskId, s16 x, s16 y)
{
diff --git a/src/mail.c b/src/mail.c
index 8b4647532..9a56d73cc 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -242,9 +242,9 @@ const struct MailLayout gUnknown_083E57A4[] =
#if DEBUG
-const u8 Str_8411540[] = _("レイアウトを にほんごで ひょうじ?"); // Display using Japanese layout?
-const u8 Str_8411553[] = _("にほんご "); // Japanese
-const u8 Str_8411559[] = _("かいがい "); // Overseas
+const u8 Str_8411540[] = DTR("レイアウトを にほんごで ひょうじ?", "Display using JAPANESE layout?");
+const u8 Str_8411553[] = DTR("にほんご ", "JAPANESE");
+const u8 Str_8411559[] = DTR("かいがい ", "OVERSEAS");
const u8 *const _8411560[] =
{
@@ -252,20 +252,20 @@ const u8 *const _8411560[] =
Str_8411559,
};
-const u8 Str_8411568[] = _("イメージ タイプを えらんでね"); // Choose an image type
+const u8 Str_8411568[] = DTR("イメージ タイプを えらんでね", "Choose an image type");
const u8 Str_8411578[] = _("{STR_VAR_1}");
-const u8 Str_841157B[] = _("オレンジ "); // Orange
-const u8 Str_8411581[] = _("ハーバー "); // Harbor
-const u8 Str_8411587[] = _("キラキラ "); // Glitter
-const u8 Str_841158D[] = _("メカニカル"); // Mech
-const u8 Str_8411593[] = _("ウッディー"); // Wood
-const u8 Str_8411599[] = _("クロス  "); // Wave
-const u8 Str_841159F[] = _("トレジャー"); // Bead
-const u8 Str_84115A5[] = _("シャドウ "); // Shadow
-const u8 Str_84115AB[] = _("トロピカル"); // Tropic
-const u8 Str_84115B1[] = _("ドリーム "); // Dream
-const u8 Str_84115B7[] = _("ミラクル "); // Fab
-const u8 Str_84115BD[] = _("レトロ  "); // Retro
+const u8 Str_841157B[] = DTR("オレンジ ", "ORANGE ");
+const u8 Str_8411581[] = DTR("ハーバー ", "HARBOR ");
+const u8 Str_8411587[] = DTR("キラキラ ", "GLITTER");
+const u8 Str_841158D[] = DTR("メカニカル", "MECH ");
+const u8 Str_8411593[] = DTR("ウッディー", "WOOD ");
+const u8 Str_8411599[] = DTR("クロス  ", "WAVE ");
+const u8 Str_841159F[] = DTR("トレジャー", "BEAD ");
+const u8 Str_84115A5[] = DTR("シャドウ ", "SHADOW ");
+const u8 Str_84115AB[] = DTR("トロピカル", "TROPIC ");
+const u8 Str_84115B1[] = DTR("ドリーム ", "DREAM ");
+const u8 Str_84115B7[] = DTR("ミラクル ", "FAB ");
+const u8 Str_84115BD[] = DTR("レトロ  ", "RETRO ");
const u8 *const _84115C4[] =
{
@@ -283,10 +283,10 @@ const u8 *const _84115C4[] =
Str_84115BD,
};
-const u8 Str_84115F4[] = _("メールをみる"); // View Mail
-const u8 Str_84115FB[] = _("メールとうろく"); // Register Mail
-const u8 Str_8411603[] = _("もたせる"); // Give to Pokémon
-const u8 Str_8411608[] = _("メールをけす"); // Delete Mail
+const u8 Str_84115F4[] = DTR("メールをみる", "View MAIL");
+const u8 Str_84115FB[] = DTR("メールとうろく", "Register MAIL");
+const u8 Str_8411603[] = DTR("もたせる", "Give MAIL");
+const u8 Str_8411608[] = DTR("メールをけす", "Delete MAIL");
#endif
@@ -744,7 +744,7 @@ void debug_sub_810CA7C(u8 taskId)
void debug_sub_810CB50(u8 taskId)
{
u8 sp0[] = _("{STR_VAR_1} {STR_VAR_2}");
- u8 sp8[] = _("メール{STR_VAR_1} {STR_VAR_2}");
+ u8 sp8[] = DTR("メール{STR_VAR_1} {STR_VAR_2}", "MAIL{STR_VAR_1} {STR_VAR_2}");
bool8 r2 = FALSE;
if (gMain.newKeys & A_BUTTON)
@@ -791,7 +791,7 @@ void debug_sub_810CB50(u8 taskId)
void debug_sub_810CCEC(u8 taskId)
{
- u8 string1[] = _("メール{STR_VAR_1}を だれに もたせる?");
+ u8 string1[] = DTR("メール{STR_VAR_1}を だれに もたせる?", "Give MAIL {STR_VAR_1} to who?");
u8 string2[] = _("000 {STR_VAR_1}");
ConvertIntToDecimalStringN(gStringVar1, gSpecialVar_0x8005, 1, 1);
@@ -876,8 +876,10 @@ u8 debug_sub_810CEA4(void)
u8 debug_sub_810CED0(void)
{
- u8 text[] = _("せいきの データが とうろくずみ です\n"
- "しんき とうろく できません");
+ u8 text[] = DTR("せいきの データが とうろくずみ です\n"
+ "しんき とうろく できません",
+ "Normal data is registered.\n"
+ "Cannot register new data.");
s8 input = Menu_ProcessInput();
switch (input)
@@ -911,8 +913,10 @@ u8 debug_sub_810CED0(void)
u8 debug_sub_810CFA4(void)
{
- u8 text[] = _("せいきに とうろくされたメールデータは\n"
- "へんこう できません");
+ u8 text[] = DTR("せいきに とうろくされたメールデータは\n"
+ "へんこう できません",
+ "Regularly, registered MAIL data\n"
+ "cannot be changed.");
s8 input = Menu_ProcessInput();
switch (input)
@@ -943,9 +947,11 @@ u8 debug_sub_810CFA4(void)
u8 debug_sub_810D030(void)
{
- const u8 text1[] = _("メール{STR_VAR_1} とうろく かいじょ");
- const u8 text2[] = _("デバッグメニューから とうろくした\n"
- "メール いがいは けせません");
+ const u8 text1[] = DTR("メール{STR_VAR_1} とうろく かいじょ", "UNREGISTER MAIL{STR_VAR_1}");
+ const u8 text2[] = DTR("デバッグメニューから とうろくした\n"
+ "メール いがいは けせません",
+ "You cannot delete REGISTERED MAIL\n"
+ "from the DEBUG MENU");
s8 input = Menu_ProcessInput();
switch (input)
@@ -990,7 +996,7 @@ u8 debug_sub_810D030(void)
void debug_sub_810D174(u8 a)
{
- u8 string[] = _("メール{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}");
+ u8 string[] = DTR("メール{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}", "MAIL{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}");
u8 buffer[9][20];
struct MenuAction menuActions[9];
u8 i;
diff --git a/src/main.c b/src/main.c
index 5cb8039c7..b778631f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,13 +2,13 @@
#include "gba/flash_internal.h"
#include "gba/m4a_internal.h"
#include "main.h"
+#include "battle_controllers.h"
#include "intro.h"
#include "link.h"
#include "load_save.h"
#include "m4a.h"
#include "play_time.h"
#include "random.h"
-#include "rom3.h"
#include "overworld.h"
#include "rtc.h"
#include "siirtc.h"
@@ -34,10 +34,12 @@ const u8 gGameVersion = GAME_VERSION;
const u8 gGameLanguage = GAME_LANGUAGE;
-#if defined(ENGLISH)
-const char BuildDateTime[] = "2002 10 15 20:34";
-#elif defined(GERMAN)
+// The debug menu expects this exact format. With the English build string, it
+// will overflow on the title debug menu, outputting '9999ィ'.
+#if defined(GERMAN) || DEBUG
const char BuildDateTime[] = "$Name: debug-Euro-2003-05-09-A $";
+#elif defined(ENGLISH)
+const char BuildDateTime[] = "2002 10 15 20:34";
#endif
const IntrFunc gIntrTableTemplate[] =
diff --git a/src/overworld.c b/src/overworld.c
index 19fe5f377..934b09dbc 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -1441,7 +1441,7 @@ void sub_80546B8(void)
CB2_ReturnToField();
}
-void c2_exit_to_overworld_1_continue_scripts_restart_music(void)
+void CB2_ReturnToFieldContinueScriptPlayMapMusic(void)
{
FieldClearVBlankHBlankCallbacks();
gFieldCallback = sub_8080990;
diff --git a/src/pokemon_item_effect.c b/src/pokemon_item_effect.c
index 2542e42c3..d59e8d77c 100644
--- a/src/pokemon_item_effect.c
+++ b/src/pokemon_item_effect.c
@@ -367,7 +367,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *pkmn, u16 item, u8 partyIndex, u8 mo
SetMonData(pkmn, MON_DATA_PP1 + r5, &data);
if (gMain.inBattle
&& sp34 != 4 && !(gBattleMons[sp34].status2 & 0x200000)
- && !(gDisableStructs[sp34].unk18_b & gBitTable[r5]))
+ && !(gDisableStructs[sp34].mimickedMoves & gBitTable[r5]))
gBattleMons[sp34].pp[r5] = data;
retVal = FALSE;
}
@@ -392,7 +392,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *pkmn, u16 item, u8 partyIndex, u8 mo
SetMonData(pkmn, MON_DATA_PP1 + moveIndex, &data);
if (gMain.inBattle
&& sp34 != 4 && !(gBattleMons[sp34].status2 & 0x200000)
- && !(gDisableStructs[sp34].unk18_b & gBitTable[moveIndex]))
+ && !(gDisableStructs[sp34].mimickedMoves & gBitTable[moveIndex]))
gBattleMons[sp34].pp[moveIndex] = data;
retVal = FALSE;
}
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index e970cc3bc..ef8360681 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -4772,15 +4772,15 @@ void sub_80A1C30(u8 a)
u8 GetPrimaryStatus(u32 status)
{
- if (status & (STATUS_POISON | STATUS_TOXIC_POISON))
+ if (status & (STATUS1_POISON | STATUS1_TOXIC_POISON))
return STATUS_PRIMARY_POISON;
- if (status & STATUS_PARALYSIS)
+ if (status & STATUS1_PARALYSIS)
return STATUS_PRIMARY_PARALYSIS;
- if (status & STATUS_SLEEP)
+ if (status & STATUS1_SLEEP)
return STATUS_PRIMARY_SLEEP;
- if (status & STATUS_FREEZE)
+ if (status & STATUS1_FREEZE)
return STATUS_PRIMARY_FREEZE;
- if (status & STATUS_BURN)
+ if (status & STATUS1_BURN)
return STATUS_PRIMARY_BURN;
return STATUS_PRIMARY_NONE;
diff --git a/src/reset_rtc_screen.c b/src/reset_rtc_screen.c
index 7c0a47b13..e33caed82 100644
--- a/src/reset_rtc_screen.c
+++ b/src/reset_rtc_screen.c
@@ -635,10 +635,10 @@ void debug_sub_806F9B8(void)
ScriptContext2_Enable();
}
-static const u8 sDebugText_Days[] = _("にっすう"); // "days"
-static const u8 sDebugText_Time[] = _("じかん"); // "time"
-static const u8 sDebugText_GameTime[] = _("ゲームない じかん"); // "game time"
-static const u8 sDebugText_RTCTime[] = _("RTC じかん"); // "RTC time"
+static const u8 sDebugText_Days[] = DTR("にっすう", "days");
+static const u8 sDebugText_Time[] = DTR("じかん", "time");
+static const u8 sDebugText_GameTime[] = DTR("ゲームない じかん", "game time");
+static const u8 sDebugText_RTCTime[] = DTR("RTC じかん", "RTC time");
void debug_sub_806F9E4(u8 taskId)
{
diff --git a/src/rom_8077ABC.c b/src/rom_8077ABC.c
index e7c49144e..036209fbf 100644
--- a/src/rom_8077ABC.c
+++ b/src/rom_8077ABC.c
@@ -62,7 +62,7 @@ extern u8 gBattleMonSprites[NUM_BATTLE_SLOTS];
extern u8 gBattleAnimAttacker;
extern u8 gBattleAnimTarget;
extern s16 gBattleAnimArgs[8];
-extern u8 gBanksBySide[NUM_BATTLE_SLOTS];
+extern u8 gBattlerPositions[NUM_BATTLE_SLOTS];
extern u8 gBattlersCount; // gNumBattleMons?
extern struct OamMatrix gOamMatrices[];
extern struct Struct_2017810 unk_2017810[];
@@ -815,12 +815,12 @@ void InitAnimSpritePos(struct Sprite *sprite, u8 a2)
u8 GetBattlerSide(u8 slot)
{
- return gBanksBySide[slot] & 1;
+ return gBattlerPositions[slot] & 1;
}
u8 GetBattlerPosition(u8 slot)
{
- return gBanksBySide[slot];
+ return gBattlerPositions[slot];
}
u8 GetBattlerAtPosition(u8 slot)
@@ -829,7 +829,7 @@ u8 GetBattlerAtPosition(u8 slot)
for (i = 0; i < gBattlersCount; i++)
{
- if (gBanksBySide[i] == slot)
+ if (gBattlerPositions[i] == slot)
break;
}
return i;
@@ -847,7 +847,7 @@ bool8 IsBankSpritePresent(u8 slot)
}
else
{
- if (gBanksBySide[slot] == 0xff)
+ if (gBattlerPositions[slot] == 0xff)
return FALSE;
if (GetBattlerSide(slot) != B_SIDE_PLAYER)
{
diff --git a/src/safari_zone.c b/src/safari_zone.c
index 7aa05c7dc..8e5f3c692 100644
--- a/src/safari_zone.c
+++ b/src/safari_zone.c
@@ -110,7 +110,7 @@ void sub_80C824C(void)
{
ScriptContext1_SetupScript(&gUnknown_081C3459);
ScriptContext1_Stop();
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
}
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 6084cfc5d..4dd5d08a2 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -1782,7 +1782,7 @@ bool8 ScrCmd_playslotmachine(struct ScriptContext *ctx)
{
u8 v2 = VarGet(ScriptReadHalfword(ctx));
- PlaySlotMachine(v2, c2_exit_to_overworld_1_continue_scripts_restart_music);
+ PlaySlotMachine(v2, CB2_ReturnToFieldContinueScriptPlayMapMusic);
ScriptContext1_Stop();
return TRUE;
}
diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c
index f6cb8ae0a..ce6c01439 100644
--- a/src/script_pokemon_util_80C4BF0.c
+++ b/src/script_pokemon_util_80C4BF0.c
@@ -214,7 +214,7 @@ void sub_80C4D80(void)
void ShowContestWinnerCleanup(void)
{
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void ShowContestWinner(void)
@@ -521,7 +521,7 @@ void sub_80C5580(void)
break;
}
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void ChooseBattleTowerPlayerParty(void)
@@ -546,7 +546,7 @@ void SetBattleTowerPlayerParty(void)
break;
}
- SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music);
+ SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
}
void ReducePlayerPartyToThree(void)
diff --git a/src/slot_machine.c b/src/slot_machine.c
index 3de87e0f7..c03ae0dfa 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -5616,29 +5616,30 @@ static void debug_sub_811B2E8(void)
Menu_PrintText(text, 6, 1);
}
-static const u8 Str_841B1C4[] = _("SETTEI");
-static const u8 Str_841B1CB[] = _("MAWASITA");
-static const u8 Str_841B1D4[] = _("MODOSI");
-static const u8 Str_841B1DB[] = _("NOMARE");
-static const u8 Str_841B1E2[] = _("MAE 7");
-static const u8 Str_841B1E8[] = _("LR  HENKOU");
-static const u8 Str_841B1F3[] = _("START  JIDOUSU");
-static const u8 Str_841B202[] = _("SELECT  SETTEI");
-static const u8 Str_841B211[] = _("TYUHSEN");
+static const u8 Str_841B1C4[] = DTR("SETTEI", "SET");
+static const u8 Str_841B1CB[] = DTR("MAWASITA", "TURNED");
+static const u8 Str_841B1D4[] = DTR("MODOSI", "RETURN");
+static const u8 Str_841B1DB[] = DTR("NOMARE", "CONSUMED");
+static const u8 Str_841B1E2[] = DTR("MAE 7", "BEFORE 7");
+static const u8 Str_841B1E8[] = DTR("LR HENKOU", "LR: CHANGE");
+static const u8 Str_841B1F3[] = DTR("START JIDOUSU", "START: AUTO");
+static const u8 Str_841B202[] = DTR("SELECT SETTEI", "SELECT: FORCE");
+// Irregular Romaji: 抽選 (ちゅうせん/chuusen)
+static const u8 Str_841B211[] = DTR("TYUHSEN", "DRAWINGS");
static const u8 Str_841B219[] = _("CHERRY");
static const u8 Str_841B220[] = _("REPLAY");
-static const u8 Str_841B227[] = _("HASUBO");
-static const u8 Str_841B22E[] = _("RURIRI");
-static const u8 Str_841B235[] = _("INAZU");
+static const u8 Str_841B227[] = DTR("HASUBO", "LOTAD");
+static const u8 Str_841B22E[] = DTR("RURIRI", "AZURILL");
+static const u8 Str_841B235[] = DTR("INAZU", "LIGHTNING");
static const u8 Str_841B23B[] = _("REG");
static const u8 Str_841B23F[] = _("BIG");
-static const u8 Str_841B243[] = _("BD");
+static const u8 Str_841B243[] = DTR("BD", "REEL TIME");
static const u8 Str_841B246[] = _("R7");
static const u8 Str_841B249[] = _("B7");
-static const u8 Str_841B24C[] = _("A  COIN");
-static const u8 Str_841B254[] = _("TYUHSEN");
-static const u8 Str_841B25C[] = _("UD  100");
-static const u8 Str_841B264[] = _("LR  1000");
+static const u8 Str_841B24C[] = DTR("A COIN", "A: COIN");
+static const u8 Str_841B254[] = DTR("TYUHSEN", "DRAWINGS");
+static const u8 Str_841B25C[] = _("UD 100");
+static const u8 Str_841B264[] = _("LR 1000");
static const u8 Str_841B26D[] = _("×");
void debug_sub_811B310(void)
@@ -5675,15 +5676,21 @@ void debug_sub_811B310(void)
PRINT_NUMBER(eSlotMachine->unk68, 10, 3);
PRINT_NUMBER(eSlotMachine->unk6C, 10, 5);
PRINT_NUMBER(eSlotMachine->unk10, 10, 7);
- PRINT_NUMBER(eSlotMachine->unk70, 20, 3);
- PRINT_NUMBER(eSlotMachine->unk74, 20, 5);
- PRINT_NUMBER(eSlotMachine->unk78, 20, 7);
- PRINT_NUMBER(eSlotMachine->unk7C, 20, 9);
- PRINT_NUMBER(eSlotMachine->unk80, 20, 11);
- PRINT_NUMBER(eSlotMachine->unk84, 20, 13);
- PRINT_NUMBER(eSlotMachine->unk88, 20, 15);
- PRINT_NUMBER(eSlotMachine->unk8C, 20, 17);
+#if DEBUG_TRANSLATE
+#define OFFSET 24 // wider window
+#else
+#define OFFSET 20
+#endif
+ PRINT_NUMBER(eSlotMachine->unk70, OFFSET, 3);
+ PRINT_NUMBER(eSlotMachine->unk74, OFFSET, 5);
+ PRINT_NUMBER(eSlotMachine->unk78, OFFSET, 7);
+ PRINT_NUMBER(eSlotMachine->unk7C, OFFSET, 9);
+ PRINT_NUMBER(eSlotMachine->unk80, OFFSET, 11);
+ PRINT_NUMBER(eSlotMachine->unk84, OFFSET, 13);
+ PRINT_NUMBER(eSlotMachine->unk88, OFFSET, 15);
+ PRINT_NUMBER(eSlotMachine->unk8C, OFFSET, 17);
+#undef OFFSET
#undef PRINT_NUMBER
if (unk_debug_bss_1_0 != 0)
@@ -5778,7 +5785,12 @@ static void debug_sub_811B654(u8 taskId)
switch (task->data[0])
{
case 0:
+#if DEBUG_TRANSLATE
+ Menu_DrawStdWindowFrame(0, 0, 28, 19); // wider window
+#else
Menu_DrawStdWindowFrame(0, 0, 24, 19);
+#endif
+
debug_sub_811B310();
task->data[0]++;
break;
@@ -5882,10 +5894,10 @@ static void debug_sub_811B654(u8 taskId)
}
}
-static const u8 Str_841B2B0[] = _("·カウントエラーがおきました");
-static const u8 Str_841B2BF[] = _("·リールそうさで エラーが おきました");
-static const u8 Str_841B2D3[] = _("·フラグオフエラーが おきました");
-static const u8 Str_841B2E4[] = _("·ボーナスこやくの エラーが おきました");
+static const u8 Str_841B2B0[] = DTR("·カウントエラーがおきました", "Count error occured.");
+static const u8 Str_841B2BF[] = DTR("·リールそうさで エラーが おきました", "Reel processing error occurred.");
+static const u8 Str_841B2D3[] = DTR("·フラグオフエラーが おきました", "FLAG OFF error occurred.");
+static const u8 Str_841B2E4[] = DTR("·ボーナスこやくの エラーが おきました", "BONUS use error occurred."); // TRN
static void debug_sub_811B894(void)
{
diff --git a/src/trainer_card.c b/src/trainer_card.c
index b34517def..5e07fdcc8 100644
--- a/src/trainer_card.c
+++ b/src/trainer_card.c
@@ -87,7 +87,7 @@ const struct TrainerCard sTestTrainerCard =
.pokemonTrades = 0xFFFF,
.money = 99999,
.var_28 = {1, 2, 3, 4},
- .playerName = _("てすと"), // "test"
+ .playerName = DTR("てすと", "TEST"),
};
#endif
diff --git a/src/tv.c b/src/tv.c
index 9cd8d7eea..8badfd405 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -635,7 +635,7 @@ void GabbyAndTyBeforeInterview(void)
gSaveBlock1.gabbyAndTyData.lastMove = gBattleResults.lastUsedMove;
if (gSaveBlock1.gabbyAndTyData.battleNum != 0xff)
gSaveBlock1.gabbyAndTyData.battleNum ++;
- gSaveBlock1.gabbyAndTyData.valA_0 = gBattleResults.unk5_0;
+ gSaveBlock1.gabbyAndTyData.valA_0 = gBattleResults.playerMonWasDamaged;
if (gBattleResults.playerFaintCounter)
gSaveBlock1.gabbyAndTyData.valA_1 = 1;
@@ -2074,7 +2074,7 @@ void ChangePokemonNickname(void)
void ChangePokemonNickname_CB(void)
{
SetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, gStringVar2);
- c2_exit_to_overworld_1_continue_scripts_restart_music();
+ CB2_ReturnToFieldContinueScriptPlayMapMusic();
}
void TV_CopyNicknameToStringVar1AndEnsureTerminated(void)
diff --git a/src/wild_encounter.c b/src/wild_encounter.c
index 0680570fc..47eb81541 100644
--- a/src/wild_encounter.c
+++ b/src/wild_encounter.c
@@ -203,34 +203,35 @@ enum
static u8 ChooseWildMonIndex_Fishing(u8 rod)
{
u8 wildMonIndex = 0;
- u8 rand = Random() % 100;
+ u8 rand = Random() % max(max(ENCOUNTER_CHANCE_FISHING_MONS_OLD_ROD_TOTAL, ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_TOTAL),
+ ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_TOTAL);;
switch (rod)
{
case OLD_ROD:
- if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_0)
+ if (rand < ENCOUNTER_CHANCE_FISHING_MONS_OLD_ROD_SLOT_0)
wildMonIndex = 0;
else
wildMonIndex = 1;
break;
case GOOD_ROD:
- if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_2)
+ if (rand < ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_SLOT_2)
wildMonIndex = 2;
- if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_2 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_3)
+ if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_SLOT_2 && rand < ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_SLOT_3)
wildMonIndex = 3;
- if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_3 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_4)
+ if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_SLOT_3 && rand < ENCOUNTER_CHANCE_FISHING_MONS_GOOD_ROD_SLOT_4)
wildMonIndex = 4;
break;
case SUPER_ROD:
- if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_5)
+ if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_5)
wildMonIndex = 5;
- if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_5 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_6)
+ if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_5 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_6)
wildMonIndex = 6;
- if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_6 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_7)
+ if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_6 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_7)
wildMonIndex = 7;
- if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_7 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_8)
+ if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_7 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_8)
wildMonIndex = 8;
- if (rand == ENCOUNTER_CHANCE_FISHING_MONS_SLOT_8)
+ if (rand == ENCOUNTER_CHANCE_FISHING_MONS_SUPER_ROD_SLOT_8)
wildMonIndex = 9;
break;
}
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 316a47b5a..80e699ab2 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -6,7 +6,7 @@
. += 0x2E8;
. = ALIGN(4); src/link.o(ewram_data);
-. = ALIGN(4); src/rom3.o(ewram_data);
+. = ALIGN(4); src/battle_controllers.o(ewram_data);
/* battle */
@@ -70,13 +70,13 @@ gBattlersCount = .; /* 2024A68 */
gBattlerPartyIndexes = .; /* 2024A6A */
. += 0x8;
-gBanksBySide = .; /* 2024A72 */
+gBattlerPositions = .; /* 2024A72 */
. += 0x4;
gActionsByTurnOrder = .; /* 2024A76 */
. += 0x4;
-gBanksByTurnOrder = .; /* 2024A7A */
+gBattlerByTurnOrder = .; /* 2024A7A */
. += 0x4;
gCurrentTurnActionNumber = .; /* 2024A7E */
@@ -157,7 +157,7 @@ gSelectionBattleScripts = .; /* 2024C1C */
gUnknown_02024C2C = .; /* 2024C2C */
. += 0x8;
-gLastUsedMove = .; /* 2024C34 */
+gLastMoves = .; /* 2024C34 */
. += 0x8;
gLastLandedMoves = .; /* 2024C3C */
@@ -187,13 +187,13 @@ gHitMarker = .; /* 2024C6C */
gUnknown_02024C70 = .; /* 2024C70 */
. += 0x4;
-gTakenDmgBanks = .; /* 2024C74 */
+gTakenDmgByBattler = .; /* 2024C74 */
. += 0x4;
gUnknown_02024C78 = .; /* 2024C78 */
. += 0x2;
-gSideAffecting = .; /* 2024C7A */
+gSideStatuses = .; /* 2024C7A */
. += 0x6;
gSideTimers = .; /* 2024C80 */
diff --git a/tools/jsonproc/inja.hpp b/tools/jsonproc/inja.hpp
index 3b7263546..d5bf5bcba 100755
--- a/tools/jsonproc/inja.hpp
+++ b/tools/jsonproc/inja.hpp
@@ -517,7 +517,7 @@ public:
typedef const_pointer iterator;
typedef const_pointer const_iterator;
typedef std::reverse_iterator< const_iterator > reverse_iterator;
- typedef std::reverse_iterator< const_iterator > const_reverse_iterator;
+ typedef std::reverse_iterator< const_iterator > const_reverse_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
@@ -1411,6 +1411,9 @@ enum class ElementNotation {
Pointer
};
+/*!
+ * \brief Class for lexer configuration.
+ */
struct LexerConfig {
std::string statement_open {"{%"};
std::string statement_close {"%}"};
@@ -1421,6 +1424,9 @@ struct LexerConfig {
std::string comment_close {"#}"};
std::string open_chars {"#{"};
+ bool trim_blocks {false};
+ bool lstrip_blocks {false};
+
void update_open_chars() {
open_chars = "";
if (open_chars.find(line_statement[0]) == std::string::npos) {
@@ -1438,6 +1444,9 @@ struct LexerConfig {
}
};
+/*!
+ * \brief Class for parser configuration.
+ */
struct ParserConfig {
ElementNotation notation {ElementNotation::Dot};
};
@@ -1450,10 +1459,13 @@ struct ParserConfig {
#ifndef PANTOR_INJA_FUNCTION_STORAGE_HPP
#define PANTOR_INJA_FUNCTION_STORAGE_HPP
+#include <vector>
+
// #include "bytecode.hpp"
#ifndef PANTOR_INJA_BYTECODE_HPP
#define PANTOR_INJA_BYTECODE_HPP
+#include <string>
#include <utility>
#include <nlohmann/json.hpp>
@@ -1464,7 +1476,7 @@ struct ParserConfig {
namespace inja {
-using namespace nlohmann;
+using json = nlohmann::json;
struct Bytecode {
@@ -1492,6 +1504,7 @@ struct Bytecode {
GreaterEqual,
Less,
LessEqual,
+ At,
Different,
DivisibleBy,
Even,
@@ -1594,6 +1607,9 @@ using namespace nlohmann;
using Arguments = std::vector<const json*>;
using CallbackFunction = std::function<json(Arguments& args)>;
+/*!
+ * \brief Class for builtin functions and user-defined callbacks.
+ */
class FunctionStorage {
public:
void add_builtin(nonstd::string_view name, unsigned int num_args, Bytecode::Op op) {
@@ -1658,6 +1674,9 @@ class FunctionStorage {
#define PANTOR_INJA_PARSER_HPP
#include <limits>
+#include <string>
+#include <utility>
+#include <vector>
// #include "bytecode.hpp"
@@ -1678,12 +1697,17 @@ class FunctionStorage {
#ifndef PANTOR_INJA_TOKEN_HPP
#define PANTOR_INJA_TOKEN_HPP
+#include <string>
+
// #include "string_view.hpp"
namespace inja {
+/*!
+ * \brief Helper-class for the inja Parser.
+ */
struct Token {
enum class Kind {
Text,
@@ -1737,13 +1761,17 @@ struct Token {
}
-#endif // PANTOR_INJA_TOKEN_HPP
+#endif // PANTOR_INJA_TOKEN_HPP
// #include "utils.hpp"
#ifndef PANTOR_INJA_UTILS_HPP
#define PANTOR_INJA_UTILS_HPP
+#include <algorithm>
+#include <fstream>
#include <stdexcept>
+#include <string>
+#include <utility>
// #include "string_view.hpp"
@@ -1755,11 +1783,22 @@ inline void inja_throw(const std::string& type, const std::string& message) {
throw std::runtime_error("[inja.exception." + type + "] " + message);
}
+inline std::ifstream open_file_or_throw(const std::string& path) {
+ std::ifstream file;
+ file.exceptions(std::ifstream::failbit | std::ifstream::badbit);
+ try {
+ file.open(path);
+ } catch(const std::ios_base::failure& e) {
+ inja_throw("file_error", "failed accessing file at '" + path + "'");
+ }
+ return file;
+}
+
namespace string_view {
inline nonstd::string_view slice(nonstd::string_view view, size_t start, size_t end) {
start = std::min(start, view.size());
end = std::min(std::max(start, end), view.size());
- return view.substr(start, end - start); // StringRef(Data + Start, End - Start);
+ return view.substr(start, end - start); // StringRef(Data + Start, End - Start);
}
inline std::pair<nonstd::string_view, nonstd::string_view> split(nonstd::string_view view, char Separator) {
@@ -1783,6 +1822,9 @@ namespace string_view {
namespace inja {
+/*!
+ * \brief Class for lexing an inja Template.
+ */
class Lexer {
enum class State {
Text,
@@ -1831,12 +1873,15 @@ class Lexer {
// try to match one of the opening sequences, and get the close
nonstd::string_view open_str = m_in.substr(m_pos);
+ bool must_lstrip = false;
if (inja::string_view::starts_with(open_str, m_config.expression_open)) {
m_state = State::ExpressionStart;
} else if (inja::string_view::starts_with(open_str, m_config.statement_open)) {
m_state = State::StatementStart;
+ must_lstrip = m_config.lstrip_blocks;
} else if (inja::string_view::starts_with(open_str, m_config.comment_open)) {
m_state = State::CommentStart;
+ must_lstrip = m_config.lstrip_blocks;
} else if ((m_pos == 0 || m_in[m_pos - 1] == '\n') &&
inja::string_view::starts_with(open_str, m_config.line_statement)) {
m_state = State::LineStart;
@@ -1844,8 +1889,13 @@ class Lexer {
m_pos += 1; // wasn't actually an opening sequence
goto again;
}
- if (m_pos == m_tok_start) goto again; // don't generate empty token
- return make_token(Token::Kind::Text);
+
+ nonstd::string_view text = string_view::slice(m_in, m_tok_start, m_pos);
+ if (must_lstrip)
+ text = clear_final_line_if_whitespace(text);
+
+ if (text.empty()) goto again; // don't generate empty token
+ return Token(Token::Kind::Text, text);
}
case State::ExpressionStart: {
m_state = State::ExpressionBody;
@@ -1872,7 +1922,7 @@ class Lexer {
case State::LineBody:
return scan_body("\n", Token::Kind::LineStatementClose);
case State::StatementBody:
- return scan_body(m_config.statement_close, Token::Kind::StatementClose);
+ return scan_body(m_config.statement_close, Token::Kind::StatementClose, m_config.trim_blocks);
case State::CommentBody: {
// fast-scan to comment close
size_t end = m_in.substr(m_pos).find(m_config.comment_close);
@@ -1883,7 +1933,10 @@ class Lexer {
// return the entire comment in the close token
m_state = State::Text;
m_pos += end + m_config.comment_close.size();
- return make_token(Token::Kind::CommentClose);
+ Token tok = make_token(Token::Kind::CommentClose);
+ if (m_config.trim_blocks)
+ skip_newline();
+ return tok;
}
}
}
@@ -1891,7 +1944,7 @@ class Lexer {
const LexerConfig& get_config() const { return m_config; }
private:
- Token scan_body(nonstd::string_view close, Token::Kind closeKind) {
+ Token scan_body(nonstd::string_view close, Token::Kind closeKind, bool trim = false) {
again:
// skip whitespace (except for \n as it might be a close)
if (m_tok_start >= m_in.size()) return make_token(Token::Kind::Eof);
@@ -1905,7 +1958,10 @@ class Lexer {
if (inja::string_view::starts_with(m_in.substr(m_tok_start), close)) {
m_state = State::Text;
m_pos = m_tok_start + close.size();
- return make_token(closeKind);
+ Token tok = make_token(closeKind);
+ if (trim)
+ skip_newline();
+ return tok;
}
// skip \n
@@ -2026,6 +2082,34 @@ class Lexer {
Token make_token(Token::Kind kind) const {
return Token(kind, string_view::slice(m_in, m_tok_start, m_pos));
}
+
+ void skip_newline() {
+ if (m_pos < m_in.size()) {
+ char ch = m_in[m_pos];
+ if (ch == '\n')
+ m_pos += 1;
+ else if (ch == '\r') {
+ m_pos += 1;
+ if (m_pos < m_in.size() && m_in[m_pos] == '\n')
+ m_pos += 1;
+ }
+ }
+ }
+
+ static nonstd::string_view clear_final_line_if_whitespace(nonstd::string_view text)
+ {
+ nonstd::string_view result = text;
+ while (!result.empty()) {
+ char ch = result.back();
+ if (ch == ' ' || ch == '\t')
+ result.remove_suffix(1);
+ else if (ch == '\n' || ch == '\r')
+ break;
+ else
+ return text;
+ }
+ return result;
+ }
};
}
@@ -2036,6 +2120,7 @@ class Lexer {
#ifndef PANTOR_INJA_TEMPLATE_HPP
#define PANTOR_INJA_TEMPLATE_HPP
+#include <map>
#include <string>
#include <vector>
@@ -2045,6 +2130,9 @@ class Lexer {
namespace inja {
+/*!
+ * \brief The main inja Template.
+ */
struct Template {
std::vector<Bytecode> bytecodes;
std::string content;
@@ -2054,7 +2142,7 @@ using TemplateStorage = std::map<std::string, Template>;
}
-#endif // PANTOR_INJA_TEMPLATE_HPP
+#endif // PANTOR_INJA_TEMPLATE_HPP
// #include "token.hpp"
@@ -2068,6 +2156,7 @@ namespace inja {
class ParserStatic {
ParserStatic() {
+ functions.add_builtin("at", 2, Bytecode::Op::At);
functions.add_builtin("default", 2, Bytecode::Op::Default);
functions.add_builtin("divisibleBy", 2, Bytecode::Op::DivisibleBy);
functions.add_builtin("even", 1, Bytecode::Op::Even);
@@ -2107,13 +2196,16 @@ class ParserStatic {
FunctionStorage functions;
};
+/*!
+ * \brief Class for parsing an inja Template.
+ */
class Parser {
public:
explicit Parser(const ParserConfig& parser_config, const LexerConfig& lexer_config, TemplateStorage& included_templates): m_config(parser_config), m_lexer(lexer_config), m_included_templates(included_templates), m_static(ParserStatic::get_instance()) { }
bool parse_expression(Template& tmpl) {
if (!parse_expression_and(tmpl)) return false;
- if (m_tok.kind != Token::Kind::Id || m_tok.text != "or") return true;
+ if (m_tok.kind != Token::Kind::Id || m_tok.text != static_cast<decltype(m_tok.text)>("or")) return true;
get_next_token();
if (!parse_expression_and(tmpl)) return false;
append_function(tmpl, Bytecode::Op::Or, 2);
@@ -2122,7 +2214,7 @@ class Parser {
bool parse_expression_and(Template& tmpl) {
if (!parse_expression_not(tmpl)) return false;
- if (m_tok.kind != Token::Kind::Id || m_tok.text != "and") return true;
+ if (m_tok.kind != Token::Kind::Id || m_tok.text != static_cast<decltype(m_tok.text)>("and")) return true;
get_next_token();
if (!parse_expression_not(tmpl)) return false;
append_function(tmpl, Bytecode::Op::And, 2);
@@ -2130,7 +2222,7 @@ class Parser {
}
bool parse_expression_not(Template& tmpl) {
- if (m_tok.kind == Token::Kind::Id && m_tok.text == "not") {
+ if (m_tok.kind == Token::Kind::Id && m_tok.text == static_cast<decltype(m_tok.text)>("not")) {
get_next_token();
if (!parse_expression_not(tmpl)) return false;
append_function(tmpl, Bytecode::Op::Not, 1);
@@ -2145,7 +2237,7 @@ class Parser {
Bytecode::Op op;
switch (m_tok.kind) {
case Token::Kind::Id:
- if (m_tok.text == "in")
+ if (m_tok.text == static_cast<decltype(m_tok.text)>("in"))
op = Bytecode::Op::In;
else
return true;
@@ -2233,7 +2325,9 @@ class Parser {
append_callback(tmpl, func_token.text, num_args);
return true;
}
- } else if (m_tok.text == "true" || m_tok.text == "false" || m_tok.text == "null") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("true") ||
+ m_tok.text == static_cast<decltype(m_tok.text)>("false") ||
+ m_tok.text == static_cast<decltype(m_tok.text)>("null")) {
// true, false, null are json literals
if (brace_level == 0 && bracket_level == 0) {
json_first = m_tok.text;
@@ -2312,7 +2406,7 @@ class Parser {
bool parse_statement(Template& tmpl, nonstd::string_view path) {
if (m_tok.kind != Token::Kind::Id) return false;
- if (m_tok.text == "if") {
+ if (m_tok.text == static_cast<decltype(m_tok.text)>("if")) {
get_next_token();
// evaluate expression
@@ -2323,7 +2417,7 @@ class Parser {
// conditional jump; destination will be filled in by else or endif
tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump);
- } else if (m_tok.text == "endif") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("endif")) {
if (m_if_stack.empty()) {
inja_throw("parser_error", "endif without matching if");
}
@@ -2342,7 +2436,7 @@ class Parser {
// pop if stack
m_if_stack.pop_back();
- } else if (m_tok.text == "else") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("else")) {
if (m_if_stack.empty())
inja_throw("parser_error", "else without matching if");
auto& if_data = m_if_stack.back();
@@ -2358,7 +2452,7 @@ class Parser {
if_data.prev_cond_jump = std::numeric_limits<unsigned int>::max();
// chained else if
- if (m_tok.kind == Token::Kind::Id && m_tok.text == "if") {
+ if (m_tok.kind == Token::Kind::Id && m_tok.text == static_cast<decltype(m_tok.text)>("if")) {
get_next_token();
// evaluate expression
@@ -2370,7 +2464,7 @@ class Parser {
// conditional jump; destination will be filled in by else or endif
tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump);
}
- } else if (m_tok.text == "for") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("for")) {
get_next_token();
// options: for a in arr; for a, b in obj
@@ -2389,7 +2483,7 @@ class Parser {
get_next_token();
}
- if (m_tok.kind != Token::Kind::Id || m_tok.text != "in")
+ if (m_tok.kind != Token::Kind::Id || m_tok.text != static_cast<decltype(m_tok.text)>("in"))
inja_throw("parser_error",
"expected 'in', got '" + m_tok.describe() + "'");
get_next_token();
@@ -2403,7 +2497,7 @@ class Parser {
tmpl.bytecodes.back().value = key_token.text;
}
tmpl.bytecodes.back().str = static_cast<std::string>(value_token.text);
- } else if (m_tok.text == "endfor") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("endfor")) {
get_next_token();
if (m_loop_stack.empty()) {
inja_throw("parser_error", "endfor without matching for");
@@ -2415,7 +2509,7 @@ class Parser {
tmpl.bytecodes.emplace_back(Bytecode::Op::EndLoop);
tmpl.bytecodes.back().args = m_loop_stack.back() + 1; // loop body
m_loop_stack.pop_back();
- } else if (m_tok.text == "include") {
+ } else if (m_tok.text == static_cast<decltype(m_tok.text)>("include")) {
get_next_token();
if (m_tok.kind != Token::Kind::String) {
@@ -2431,8 +2525,10 @@ class Parser {
}
// sys::path::remove_dots(pathname, true, sys::path::Style::posix);
- Template include_template = parse_template(pathname);
- m_included_templates.emplace(pathname, include_template);
+ if (m_included_templates.find(pathname) == m_included_templates.end()) {
+ Template include_template = parse_template(pathname);
+ m_included_templates.emplace(pathname, include_template);
+ }
// generate a reference bytecode
tmpl.bytecodes.emplace_back(Bytecode::Op::Include, json(pathname), Bytecode::Flag::ValueImmediate);
@@ -2552,10 +2648,10 @@ class Parser {
}
std::string load_file(nonstd::string_view filename) {
- std::ifstream file(static_cast<std::string>(filename));
- std::string text((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
- return text;
- }
+ std::ifstream file = open_file_or_throw(static_cast<std::string>(filename));
+ std::string text((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
+ return text;
+ }
private:
const ParserConfig& m_config;
@@ -2605,6 +2701,7 @@ class Parser {
#if __cplusplus < 201402L
#include <cstddef>
+#include <memory>
#include <type_traits>
#include <utility>
@@ -2655,6 +2752,9 @@ namespace stdinja = std;
#include <algorithm>
#include <numeric>
+#include <string>
+#include <utility>
+#include <vector>
#include <nlohmann/json.hpp>
@@ -2679,6 +2779,9 @@ inline nonstd::string_view convert_dot_to_json_pointer(nonstd::string_view dot,
return nonstd::string_view(out.data(), out.size());
}
+/*!
+ * \brief Class for rendering a Template with data.
+ */
class Renderer {
std::vector<const json*>& get_args(const Bytecode& bc) {
m_tmp_args.clear();
@@ -2765,7 +2868,7 @@ class Renderer {
LoopLevel& level = m_loop_stack.back();
if (level.loop_type == LoopLevel::Type::Array) {
- level.data[static_cast<std::string>(level.value_name)] = level.values.at(level.index); // *level.it;
+ level.data[static_cast<std::string>(level.value_name)] = level.values.at(level.index); // *level.it;
auto& loopData = level.data["loop"];
loopData["index"] = level.index;
loopData["index1"] = level.index + 1;
@@ -2787,8 +2890,8 @@ class Renderer {
enum class Type { Map, Array };
Type loop_type;
- nonstd::string_view key_name; // variable name for keys
- nonstd::string_view value_name; // variable name for values
+ nonstd::string_view key_name; // variable name for keys
+ nonstd::string_view value_name; // variable name for values
json data; // data with loop info added
json values; // values to iterate over
@@ -2800,8 +2903,8 @@ class Renderer {
// loop over map
using KeyValue = std::pair<nonstd::string_view, json*>;
using MapValues = std::vector<KeyValue>;
- MapValues map_values; // values to iterate over
- MapValues::iterator map_it; // iterator over values
+ MapValues map_values; // values to iterate over
+ MapValues::iterator map_it; // iterator over values
};
@@ -2835,11 +2938,11 @@ class Renderer {
}
case Bytecode::Op::PrintValue: {
const json& val = *get_args(bc)[0];
- if (val.is_string())
+ if (val.is_string()) {
os << val.get_ref<const std::string&>();
- else
+ } else {
os << val.dump();
- // val.dump(os);
+ }
pop_args(bc);
break;
}
@@ -2870,7 +2973,15 @@ class Renderer {
break;
}
case Bytecode::Op::Length: {
- auto result = get_args(bc)[0]->size();
+ const json& val = *get_args(bc)[0];
+
+ int result;
+ if (val.is_string()) {
+ result = val.get_ref<const std::string&>().length();
+ } else {
+ result = val.size();
+ }
+
pop_args(bc);
m_stack.emplace_back(result);
break;
@@ -2882,6 +2993,13 @@ class Renderer {
m_stack.emplace_back(std::move(result));
break;
}
+ case Bytecode::Op::At: {
+ auto args = get_args(bc);
+ auto result = args[0]->at(args[1]->get<int>());
+ pop_args(bc);
+ m_stack.emplace_back(result);
+ break;
+ }
case Bytecode::Op::First: {
auto result = get_args(bc)[0]->front();
pop_args(bc);
@@ -3091,7 +3209,7 @@ class Renderer {
break;
}
case Bytecode::Op::Include:
- Renderer(m_included_templates, m_callbacks).render_to(os, m_included_templates.find(get_imm(bc)->get_ref<const std::string&>())->second, data);
+ Renderer(m_included_templates, m_callbacks).render_to(os, m_included_templates.find(get_imm(bc)->get_ref<const std::string&>())->second, *m_data);
break;
case Bytecode::Op::Callback: {
auto callback = m_callbacks.find_callback(bc.str, bc.args);
@@ -3216,12 +3334,17 @@ class Renderer {
// #include "template.hpp"
+// #include "utils.hpp"
+
namespace inja {
using namespace nlohmann;
+/*!
+ * \brief Class for changing the configuration.
+ */
class Environment {
class Impl {
public:
@@ -3238,7 +3361,7 @@ class Environment {
std::unique_ptr<Impl> m_impl;
public:
- Environment(): Environment("./") { }
+ Environment(): Environment("") { }
explicit Environment(const std::string& global_path): m_impl(stdinja::make_unique<Impl>()) {
m_impl->input_path = global_path;
@@ -3277,6 +3400,16 @@ class Environment {
m_impl->lexer_config.update_open_chars();
}
+ /// Sets whether to remove the first newline after a block
+ void set_trim_blocks(bool trim_blocks) {
+ m_impl->lexer_config.trim_blocks = trim_blocks;
+ }
+
+ /// Sets whether to strip the spaces and tabs from the start of a line to a block
+ void set_lstrip_blocks(bool lstrip_blocks) {
+ m_impl->lexer_config.lstrip_blocks = lstrip_blocks;
+ }
+
/// Sets the element notation syntax
void set_element_notation(ElementNotation notation) {
m_impl->parser_config.notation = notation;
@@ -3290,8 +3423,8 @@ class Environment {
Template parse_template(const std::string& filename) {
Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates);
- return parser.parse_template(m_impl->input_path + static_cast<std::string>(filename));
- }
+ return parser.parse_template(m_impl->input_path + static_cast<std::string>(filename));
+ }
std::string render(nonstd::string_view input, const json& data) {
return render(parse(input), data);
@@ -3304,35 +3437,35 @@ class Environment {
}
std::string render_file(const std::string& filename, const json& data) {
- return render(parse_template(filename), data);
- }
+ return render(parse_template(filename), data);
+ }
std::string render_file_with_json_file(const std::string& filename, const std::string& filename_data) {
- const json data = load_json(filename_data);
- return render_file(filename, data);
- }
+ const json data = load_json(filename_data);
+ return render_file(filename, data);
+ }
void write(const std::string& filename, const json& data, const std::string& filename_out) {
- std::ofstream file(m_impl->output_path + filename_out);
- file << render_file(filename, data);
- file.close();
- }
+ std::ofstream file(m_impl->output_path + filename_out);
+ file << render_file(filename, data);
+ file.close();
+ }
void write(const Template& temp, const json& data, const std::string& filename_out) {
- std::ofstream file(m_impl->output_path + filename_out);
- file << render(temp, data);
- file.close();
- }
+ std::ofstream file(m_impl->output_path + filename_out);
+ file << render(temp, data);
+ file.close();
+ }
- void write_with_json_file(const std::string& filename, const std::string& filename_data, const std::string& filename_out) {
- const json data = load_json(filename_data);
- write(filename, data, filename_out);
- }
+ void write_with_json_file(const std::string& filename, const std::string& filename_data, const std::string& filename_out) {
+ const json data = load_json(filename_data);
+ write(filename, data, filename_out);
+ }
- void write_with_json_file(const Template& temp, const std::string& filename_data, const std::string& filename_out) {
- const json data = load_json(filename_data);
- write(temp, data, filename_out);
- }
+ void write_with_json_file(const Template& temp, const std::string& filename_data, const std::string& filename_out) {
+ const json data = load_json(filename_data);
+ write(temp, data, filename_out);
+ }
std::ostream& render_to(std::ostream& os, const Template& tmpl, const json& data) {
Renderer(m_impl->included_templates, m_impl->callbacks).render_to(os, tmpl, data);
@@ -3341,15 +3474,15 @@ class Environment {
std::string load_file(const std::string& filename) {
Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates);
- return parser.load_file(m_impl->input_path + filename);
- }
+ return parser.load_file(m_impl->input_path + filename);
+ }
json load_json(const std::string& filename) {
- std::ifstream file(m_impl->input_path + filename);
- json j;
- file >> j;
- return j;
- }
+ std::ifstream file = open_file_or_throw(m_impl->input_path + filename);
+ json j;
+ file >> j;
+ return j;
+ }
void add_callback(const std::string& name, unsigned int numArgs, const CallbackFunction& callback) {
m_impl->callbacks.add_callback(name, numArgs, callback);
diff --git a/tools/jsonproc/jsonproc.cpp b/tools/jsonproc/jsonproc.cpp
index 428d8e6e9..f70c9131d 100755
--- a/tools/jsonproc/jsonproc.cpp
+++ b/tools/jsonproc/jsonproc.cpp
@@ -72,21 +72,6 @@ int main(int argc, char *argv[])
return get_custom_var(key);
});
- env.add_callback("trackVar", 2, [](Arguments& args) {
- static int counter = 0;
-
- int addValue = args.at(0)->get<int>();
- int checkValue = args.at(1)->get<int>();
-
- bool over = false;
-
- counter = (counter + addValue) % (checkValue + 1);
-
- if (counter <= addValue) over = true;
-
- return over;
- });
-
env.add_callback("concat", 2, [](Arguments& args) {
string first = args.at(0)->get<string>();
string second = args.at(1)->get<string>();
@@ -113,6 +98,11 @@ int main(int argc, char *argv[])
return rawValue.substr(0, i);
});
+ // single argument is a json object
+ env.add_callback("isEmpty", 1, [](Arguments& args) {
+ return args.at(0)->empty();
+ });
+
try
{
env.write_with_json_file(templateFilepath, jsonfilepath, outputFilepath);
diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile
index 32c16c31f..4292b07b1 100644
--- a/tools/scaninc/Makefile
+++ b/tools/scaninc/Makefile
@@ -1,6 +1,6 @@
CXX = g++
-CXXFLAGS = -Wall -Werror -std=c++11 -O2 -s
+CXXFLAGS = -Wall -Werror -std=c++11 -O2
SRCS = scaninc.cpp c_file.cpp asm_file.cpp