summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-01-05 11:36:47 -0800
committerMarcus Huderle <huderlem@gmail.com>2018-01-05 11:36:47 -0800
commitaed64560bc222e4ea5ccec266c0d77859a05eaac (patch)
treeecdbc1f85cf112f24207adb27b63b93d1e503edf
parentf5fbe5b66226f4e7e38fe5d4638831d1ce19b36b (diff)
Add friendly macros for goto_if and call_if variants
-rw-r--r--asm/macros/event.inc66
-rw-r--r--data-de/event_scripts.s157
-rw-r--r--data-de/field_move_scripts.inc12
-rw-r--r--data/event_scripts.s157
-rw-r--r--data/field_move_scripts.inc12
-rw-r--r--data/scripts/cable_club.inc23
-rw-r--r--data/scripts/contest_hall.inc131
-rw-r--r--data/scripts/day_care.inc6
-rw-r--r--data/scripts/gabby_and_ty.inc18
-rw-r--r--data/scripts/magma_chimney.inc14
-rw-r--r--data/scripts/maps/AbandonedShip_CaptainsOffice.inc6
-rw-r--r--data/scripts/maps/AbandonedShip_Corridors_B1F.inc9
-rw-r--r--data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc36
-rw-r--r--data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc14
-rw-r--r--data/scripts/maps/AncientTomb.inc9
-rw-r--r--data/scripts/maps/AquaHideout_1F.inc6
-rw-r--r--data/scripts/maps/AquaHideout_B1F.inc3
-rw-r--r--data/scripts/maps/BattleTower_Lobby.inc20
-rw-r--r--data/scripts/maps/CaveOfOrigin_1F.inc3
-rw-r--r--data/scripts/maps/CaveOfOrigin_B1F.inc3
-rw-r--r--data/scripts/maps/CaveOfOrigin_B2F.inc3
-rw-r--r--data/scripts/maps/CaveOfOrigin_B3F.inc3
-rw-r--r--data/scripts/maps/CaveOfOrigin_B4F.inc8
-rw-r--r--data/scripts/maps/DesertRuins.inc9
-rw-r--r--data/scripts/maps/DewfordTown.inc12
-rw-r--r--data/scripts/maps/DewfordTown_Gym.inc20
-rw-r--r--data/scripts/maps/DewfordTown_Hall.inc7
-rw-r--r--data/scripts/maps/DewfordTown_House2.inc3
-rw-r--r--data/scripts/maps/EverGrandeCity.inc3
-rw-r--r--data/scripts/maps/EverGrandeCity_ChampionsRoom.inc8
-rw-r--r--data/scripts/maps/EverGrandeCity_DrakesRoom.inc8
-rw-r--r--data/scripts/maps/EverGrandeCity_GlaciasRoom.inc8
-rw-r--r--data/scripts/maps/EverGrandeCity_PhoebesRoom.inc8
-rw-r--r--data/scripts/maps/EverGrandeCity_PokemonLeague.inc13
-rw-r--r--data/scripts/maps/EverGrandeCity_SidneysRoom.inc8
-rw-r--r--data/scripts/maps/FallarborTown.inc3
-rw-r--r--data/scripts/maps/FallarborTown_ContestLobby.inc3
-rw-r--r--data/scripts/maps/FallarborTown_House1.inc15
-rw-r--r--data/scripts/maps/FallarborTown_House2.inc3
-rw-r--r--data/scripts/maps/FortreeCity.inc3
-rw-r--r--data/scripts/maps/FortreeCity_Gym.inc12
-rw-r--r--data/scripts/maps/FortreeCity_House1.inc5
-rw-r--r--data/scripts/maps/FortreeCity_House2.inc6
-rw-r--r--data/scripts/maps/FortreeCity_House4.inc9
-rw-r--r--data/scripts/maps/GraniteCave_1F.inc3
-rw-r--r--data/scripts/maps/GraniteCave_StevensRoom.inc10
-rw-r--r--data/scripts/maps/IslandCave.inc12
-rw-r--r--data/scripts/maps/JaggedPass.inc2
-rw-r--r--data/scripts/maps/LavaridgeTown.inc42
-rw-r--r--data/scripts/maps/LavaridgeTown_Gym_1F.inc14
-rw-r--r--data/scripts/maps/LavaridgeTown_HerbShop.inc3
-rw-r--r--data/scripts/maps/LilycoveCity.inc65
-rw-r--r--data/scripts/maps/LilycoveCity_ContestLobby.inc19
-rw-r--r--data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc6
-rw-r--r--data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc6
-rw-r--r--data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc3
-rw-r--r--data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc22
-rw-r--r--data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc17
-rw-r--r--data/scripts/maps/LilycoveCity_Harbor.inc23
-rw-r--r--data/scripts/maps/LilycoveCity_House2.inc3
-rw-r--r--data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc33
-rw-r--r--data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc3
-rw-r--r--data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc16
-rw-r--r--data/scripts/maps/LittlerootTown.inc103
-rw-r--r--data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc11
-rw-r--r--data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc5
-rw-r--r--data/scripts/maps/LittlerootTown_MaysHouse_1F.inc21
-rw-r--r--data/scripts/maps/LittlerootTown_MaysHouse_2F.inc34
-rw-r--r--data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc20
-rw-r--r--data/scripts/maps/MagmaHideout_B1F.inc3
-rw-r--r--data/scripts/maps/MauvilleCity.inc20
-rw-r--r--data/scripts/maps/MauvilleCity_BikeShop.inc6
-rw-r--r--data/scripts/maps/MauvilleCity_GameCorner.inc28
-rw-r--r--data/scripts/maps/MauvilleCity_Gym.inc35
-rw-r--r--data/scripts/maps/MauvilleCity_House1.inc3
-rw-r--r--data/scripts/maps/MauvilleCity_House2.inc3
-rw-r--r--data/scripts/maps/MeteorFalls_1F_1R.inc3
-rw-r--r--data/scripts/maps/MossdeepCity.inc6
-rw-r--r--data/scripts/maps/MossdeepCity_GameCorner_1F.inc20
-rw-r--r--data/scripts/maps/MossdeepCity_GameCorner_B1F.inc6
-rw-r--r--data/scripts/maps/MossdeepCity_Gym.inc36
-rw-r--r--data/scripts/maps/MossdeepCity_House2.inc4
-rw-r--r--data/scripts/maps/MossdeepCity_House3.inc3
-rw-r--r--data/scripts/maps/MossdeepCity_House4.inc3
-rw-r--r--data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc7
-rw-r--r--data/scripts/maps/MossdeepCity_StevensHouse.inc10
-rw-r--r--data/scripts/maps/MtChimney.inc8
-rw-r--r--data/scripts/maps/MtChimney_CableCarStation.inc2
-rw-r--r--data/scripts/maps/MtPyre_1F.inc3
-rw-r--r--data/scripts/maps/MtPyre_Exterior.inc2
-rw-r--r--data/scripts/maps/MtPyre_Summit.inc37
-rw-r--r--data/scripts/maps/NewMauville_Entrance.inc2
-rw-r--r--data/scripts/maps/NewMauville_Inside.inc9
-rw-r--r--data/scripts/maps/OldaleTown.inc18
-rw-r--r--data/scripts/maps/OldaleTown_Mart.inc6
-rw-r--r--data/scripts/maps/OldaleTown_PokemonCenter_1F.inc3
-rw-r--r--data/scripts/maps/PacifidlogTown_House2.inc18
-rw-r--r--data/scripts/maps/PacifidlogTown_House3.inc5
-rw-r--r--data/scripts/maps/PetalburgCity.inc20
-rw-r--r--data/scripts/maps/PetalburgCity_Gym.inc179
-rw-r--r--data/scripts/maps/PetalburgCity_Mart.inc3
-rw-r--r--data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc6
-rw-r--r--data/scripts/maps/PetalburgCity_WallysHouse.inc21
-rw-r--r--data/scripts/maps/PetalburgWoods.inc3
-rw-r--r--data/scripts/maps/Route104.inc21
-rw-r--r--data/scripts/maps/Route104_MrBrineysHouse.inc14
-rw-r--r--data/scripts/maps/Route104_PrettyPetalFlowerShop.inc26
-rw-r--r--data/scripts/maps/Route104_Prototype.inc30
-rw-r--r--data/scripts/maps/Route105.inc3
-rw-r--r--data/scripts/maps/Route109.inc6
-rw-r--r--data/scripts/maps/Route109_SeashoreHouse.inc15
-rw-r--r--data/scripts/maps/Route110.inc24
-rw-r--r--data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc6
-rw-r--r--data/scripts/maps/Route110_TrickHouseEnd.inc26
-rw-r--r--data/scripts/maps/Route110_TrickHouseEntrance.inc83
-rw-r--r--data/scripts/maps/Route110_TrickHousePuzzle2.inc8
-rw-r--r--data/scripts/maps/Route110_TrickHousePuzzle3.inc36
-rw-r--r--data/scripts/maps/Route110_TrickHousePuzzle5.inc90
-rw-r--r--data/scripts/maps/Route110_TrickHousePuzzle7.inc77
-rw-r--r--data/scripts/maps/Route111.inc26
-rw-r--r--data/scripts/maps/Route111_WinstrateFamilysHouse.inc6
-rw-r--r--data/scripts/maps/Route112_CableCarStation.inc2
-rw-r--r--data/scripts/maps/Route113.inc4
-rw-r--r--data/scripts/maps/Route113_GlassWorkshop.inc28
-rw-r--r--data/scripts/maps/Route114.inc6
-rw-r--r--data/scripts/maps/Route114_FossilManiacsHouse.inc3
-rw-r--r--data/scripts/maps/Route114_FossilManiacsTunnel.inc3
-rw-r--r--data/scripts/maps/Route114_LanettesHouse.inc5
-rw-r--r--data/scripts/maps/Route116.inc28
-rw-r--r--data/scripts/maps/Route116_TunnelersRestHouse.inc3
-rw-r--r--data/scripts/maps/Route117.inc3
-rw-r--r--data/scripts/maps/Route118.inc9
-rw-r--r--data/scripts/maps/Route119.inc29
-rw-r--r--data/scripts/maps/Route119_WeatherInstitute_1F.inc2
-rw-r--r--data/scripts/maps/Route119_WeatherInstitute_2F.inc7
-rw-r--r--data/scripts/maps/Route120.inc48
-rw-r--r--data/scripts/maps/Route121_SafariZoneEntrance.inc2
-rw-r--r--data/scripts/maps/Route123.inc3
-rw-r--r--data/scripts/maps/Route123_BerryMastersHouse.inc21
-rw-r--r--data/scripts/maps/Route124.inc3
-rw-r--r--data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc11
-rw-r--r--data/scripts/maps/Route125.inc3
-rw-r--r--data/scripts/maps/Route126.inc3
-rw-r--r--data/scripts/maps/Route127.inc3
-rw-r--r--data/scripts/maps/Route128.inc3
-rw-r--r--data/scripts/maps/Route131.inc3
-rw-r--r--data/scripts/maps/RustboroCity.inc35
-rw-r--r--data/scripts/maps/RustboroCity_CuttersHouse.inc3
-rw-r--r--data/scripts/maps/RustboroCity_DevonCorp_1F.inc27
-rw-r--r--data/scripts/maps/RustboroCity_DevonCorp_2F.inc20
-rw-r--r--data/scripts/maps/RustboroCity_DevonCorp_3F.inc11
-rw-r--r--data/scripts/maps/RustboroCity_Flat2_2F.inc3
-rw-r--r--data/scripts/maps/RustboroCity_Gym.inc14
-rw-r--r--data/scripts/maps/RustboroCity_House1.inc5
-rw-r--r--data/scripts/maps/RustboroCity_Mart.inc6
-rw-r--r--data/scripts/maps/RustboroCity_PokemonSchool.inc7
-rw-r--r--data/scripts/maps/RusturfTunnel.inc27
-rw-r--r--data/scripts/maps/SSTidalCorridor.inc25
-rw-r--r--data/scripts/maps/SSTidalRooms.inc3
-rw-r--r--data/scripts/maps/SafariZone_Southeast.inc2
-rw-r--r--data/scripts/maps/SealedChamber_InnerRoom.inc3
-rw-r--r--data/scripts/maps/SealedChamber_OuterRoom.inc6
-rw-r--r--data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc8
-rw-r--r--data/scripts/maps/ShoalCave_LowTideInnerRoom.inc45
-rw-r--r--data/scripts/maps/ShoalCave_LowTideLowerRoom.inc9
-rw-r--r--data/scripts/maps/ShoalCave_LowTideStairsRoom.inc6
-rw-r--r--data/scripts/maps/SkyPillar_Top.inc3
-rw-r--r--data/scripts/maps/SlateportCity.inc43
-rw-r--r--data/scripts/maps/SlateportCity_ContestHall.inc3
-rw-r--r--data/scripts/maps/SlateportCity_ContestLobby.inc3
-rw-r--r--data/scripts/maps/SlateportCity_Harbor.inc32
-rw-r--r--data/scripts/maps/SlateportCity_House1.inc2
-rw-r--r--data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc5
-rw-r--r--data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc10
-rw-r--r--data/scripts/maps/SlateportCity_PokemonFanClub.inc47
-rw-r--r--data/scripts/maps/SlateportCity_SternsShipyard_1F.inc12
-rw-r--r--data/scripts/maps/SootopolisCity.inc38
-rw-r--r--data/scripts/maps/SootopolisCity_Gym_1F.inc21
-rw-r--r--data/scripts/maps/SootopolisCity_House1.inc3
-rw-r--r--data/scripts/maps/SootopolisCity_House2.inc4
-rw-r--r--data/scripts/maps/SootopolisCity_House6.inc5
-rw-r--r--data/scripts/maps/SootopolisCity_Mart.inc12
-rw-r--r--data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc12
-rw-r--r--data/scripts/maps/SouthernIsland_Interior.inc9
-rw-r--r--data/scripts/maps/Underwater_SeafloorCavern.inc6
-rw-r--r--data/scripts/maps/Underwater_SealedChamber.inc4
-rw-r--r--data/scripts/maps/UnknownMap_25_34.inc14
-rw-r--r--data/scripts/maps/VerdanturfTown.inc6
-rw-r--r--data/scripts/maps/VerdanturfTown_ContestLobby.inc3
-rw-r--r--data/scripts/maps/VerdanturfTown_WandasHouse.inc24
-rw-r--r--data/scripts/maps/VictoryRoad_1F.inc3
-rw-r--r--data/scripts/mystery_event_club.inc13
-rw-r--r--data/scripts/players_house.inc42
-rw-r--r--data/scripts/pokeblocks.inc10
-rw-r--r--data/scripts/safari_zone.inc4
-rw-r--r--data/scripts/secret_power_tm.inc6
-rw-r--r--data/scripts/tv.inc10
197 files changed, 1418 insertions, 1910 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index cf4c9628a..b29af7a04 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -1361,10 +1361,74 @@
@ Supplementary
- .macro goto_if_eq dest
+ .macro goto_if_unset flag, dest
+ checkflag \flag
+ goto_if 0, \dest
+ .endm
+
+ .macro goto_if_set flag, dest
+ checkflag \flag
+ goto_if 1, \dest
+ .endm
+
+ .macro goto_if_lt dest @ LESS THAN
+ goto_if 0, \dest
+ .endm
+
+ .macro goto_if_eq dest @ EQUAL
goto_if 1, \dest
.endm
+ .macro goto_if_gt dest @ GREATER THAN
+ goto_if 2, \dest
+ .endm
+
+ .macro goto_if_le dest @ LESS THAN OR EQUAL
+ goto_if 3, \dest
+ .endm
+
+ .macro goto_if_ge dest @ GREATER THAN OR EQUAL
+ goto_if 4, \dest
+ .endm
+
+ .macro goto_if_ne dest @ NOT EQUAL
+ goto_if 5, \dest
+ .endm
+
+ .macro call_if_unset flag, dest
+ checkflag \flag
+ call_if 0, \dest
+ .endm
+
+ .macro call_if_set flag, dest
+ checkflag \flag
+ call_if 1, \dest
+ .endm
+
+ .macro call_if_lt dest @ LESS THAN
+ call_if 0, \dest
+ .endm
+
+ .macro call_if_eq dest @ EQUAL
+ call_if 1, \dest
+ .endm
+
+ .macro call_if_gt dest @ GREATER THAN
+ call_if 2, \dest
+ .endm
+
+ .macro call_if_le dest @ LESS THAN OR EQUAL
+ call_if 3, \dest
+ .endm
+
+ .macro call_if_ge dest @ GREATER THAN OR EQUAL
+ call_if 4, \dest
+ .endm
+
+ .macro call_if_ne dest @ NOT EQUAL
+ call_if 5, \dest
+ .endm
+
.macro switch var
copyvar VAR_SPECIAL_0, \var
.endm
diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s
index 020c9a97d..18fb0a64d 100644
--- a/data-de/event_scripts.s
+++ b/data-de/event_scripts.s
@@ -410,8 +410,7 @@ gUnknown_0815F36C:: @ 815F36C
EventScript_15F384:
message UnknownString_81A3A87
waitmessage
- checkflag FLAG_DECORATION_16
- goto_if_eq EventScript_15F3A0
+ goto_if_set FLAG_DECORATION_16, EventScript_15F3A0
goto EventScript_15F3E2
end
@@ -954,7 +953,7 @@ gUnknown_0819F818:: @ 819F818
waitmovement 0
specialvar RESULT, ScrSpecial_HasTrainerBeenFought
compare RESULT, 0
- goto_if 5, EventScript_19F83F
+ goto_if_ne EventScript_19F83F
special PlayTrainerEncounterMusic
special sub_8082524
goto EventScript_19F8F2
@@ -968,10 +967,10 @@ gUnknown_0819F840:: @ 819F840
call EventScript_19F8E5
specialvar RESULT, ScrSpecial_HasTrainerBeenFought
compare RESULT, 0
- goto_if 5, EventScript_19F877
+ goto_if_ne EventScript_19F877
special CheckForAlivePartyMons
compare RESULT, 0
- goto_if 5, EventScript_19F870
+ goto_if_ne EventScript_19F870
special PlayTrainerEncounterMusic
special sub_8082524
goto EventScript_19F8F2
@@ -1017,7 +1016,7 @@ gUnknown_0819F8AE:: @ 819F8AE
goto_if_eq EventScript_19F8DD
special CheckForAlivePartyMons
compare RESULT, 0
- goto_if 5, EventScript_19F8DE
+ goto_if_ne EventScript_19F8DE
special PlayTrainerEncounterMusic
special sub_8082524
special ScrSpecial_ShowTrainerIntroSpeech
@@ -1308,14 +1307,10 @@ EverGrandeCity_HallOfFame_EventScript_19FC13:: @ 819FC13
clearflag FLAG_HIDE_SS_TIDAL_SLATEPORT_HARBOR
clearflag FLAG_HIDE_SS_TIDAL_LILYCOVE_HARBOR
special sub_810FAA0
- checkflag FLAG_RECEIVED_SS_TICKET
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC62
- checkflag FLAG_LATIOS_OR_LATIAS_ROAMING
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC70
- checkflag FLAG_RECEIVED_BELDUM
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5A
- checkflag FLAG_RECEIVED_HM08
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5E
+ call_if_unset FLAG_RECEIVED_SS_TICKET, EverGrandeCity_HallOfFame_EventScript_19FC62
+ call_if_unset FLAG_LATIOS_OR_LATIAS_ROAMING, EverGrandeCity_HallOfFame_EventScript_19FC70
+ call_if_unset FLAG_RECEIVED_BELDUM, EverGrandeCity_HallOfFame_EventScript_19FC5A
+ call_if_unset FLAG_RECEIVED_HM08, EverGrandeCity_HallOfFame_EventScript_19FC5E
return
EverGrandeCity_HallOfFame_EventScript_19FC5A:: @ 819FC5A
@@ -1343,10 +1338,8 @@ S_WhiteOut:: @ 819FC74
end
EventScript_19FC84:
- checkflag FLAG_RECEIVED_GO_GOGGLES
- goto_if_eq Route101_EventScript_1A14DC
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if 0, Route101_EventScript_1A14DC
+ goto_if_set FLAG_RECEIVED_GO_GOGGLES, Route101_EventScript_1A14DC
+ goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Route101_EventScript_1A14DC
clearflag FLAG_HIDE_RIVAL_LAVARIDGE_1
setvar VAR_LAVARIDGE_RIVAL_STATE, 2
return
@@ -1409,16 +1402,11 @@ PetalburgCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
- checkflag FLAG_RECEIVED_POKENAV
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_1A14DC
- checkflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49
- checkflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F
- checkflag FLAG_HIDE_MR_BRINEY_ROUTE109
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55
+ goto_if_unset FLAG_RECEIVED_POKENAV, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
+ goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, OldaleTown_PokemonCenter_1F_EventScript_19FD49
+ goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, OldaleTown_PokemonCenter_1F_EventScript_19FD4F
+ goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, OldaleTown_PokemonCenter_1F_EventScript_19FD55
return
OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49
@@ -1467,8 +1455,7 @@ OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C
applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A0845
waitmovement 0
special ScrSpecial_HealPlayerParty
- checkflag FLAG_POKERUS_EXPLAINED
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
+ goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0
end
@@ -1516,9 +1503,9 @@ Std_ObtainItem_: @ 819FE07
checkitemtype VAR_SPECIAL_0
call GetItem_HandlePocket
compare VAR_SPECIAL_7, 0x1
- call_if 1, Std_ObtainItem_Success
+ call_if_eq Std_ObtainItem_Success
compare VAR_SPECIAL_7, 0x0
- call_if 1, Std_ObtainItem_Fail
+ call_if_eq Std_ObtainItem_Fail
return
GetItem_HandlePocket:
@@ -1533,31 +1520,31 @@ GetItem_HandlePocket:
GetItem_HandlePocket_Items:
bufferstdstring 2, 0xE
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_KeyItems:
bufferstdstring 2, 0xF
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_PokeBalls:
bufferstdstring 2, 0x10
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_TMsHMs:
bufferstdstring 2, 0x11
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetTMHMFanfare
+ call_if_eq PlayGetTMHMFanfare
return
GetItem_HandlePocket_Berries:
bufferstdstring 2, 0x12
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
Std_ObtainItem_Success: @ 819FEB7
@@ -1589,9 +1576,9 @@ Std_ObtainDecoration: @ 819FEDA
Std_ObtainDecoration_: @ 819FEE8
bufferdecorationname 1, VAR_SPECIAL_0
compare VAR_SPECIAL_7, 1
- call_if 1, Std_ObtainDecoration_Success
+ call_if_eq Std_ObtainDecoration_Success
compare VAR_SPECIAL_7, 0
- call_if 1, Std_ObtainDecoration_Fail
+ call_if_eq Std_ObtainDecoration_Fail
return
Std_ObtainDecoration_Success: @ 819FF03
@@ -1617,9 +1604,9 @@ Std_FindItem: @ 819FF21
checkitemtype VAR_SPECIAL_0
call GetItem_HandlePocket
compare VAR_SPECIAL_7, 1
- call_if 1, Std_FindItem_Success
+ call_if_eq Std_FindItem_Success
compare VAR_SPECIAL_7, 0
- call_if 1, Std_FindItem_Fail
+ call_if_eq Std_FindItem_Fail
release
return
@@ -1724,10 +1711,8 @@ EventScript_1A0070:
EventScript_1A0085:
playse SE_PC_LOGON
- checkflag FLAG_SYS_PC_LANETTE
- call_if 0, EventScript_1A00AC
- checkflag FLAG_SYS_PC_LANETTE
- call_if 1, EventScript_1A00B5
+ call_if_unset FLAG_SYS_PC_LANETTE, EventScript_1A00AC
+ call_if_set FLAG_SYS_PC_LANETTE, EventScript_1A00B5
msgbox UnknownString_81A0A35, 4
special ShowPokemonStorageSystem
waitstate
@@ -1750,8 +1735,7 @@ EventScript_1A00BE:
end
EventScript_1A00CB:
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, EventScript_1A00BE
+ goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_1A00BE
playse SE_PC_LOGON
special AccessHallOfFamePC
waitstate
@@ -2156,21 +2140,21 @@ Route103_EventScript_1A02F4:: @ 81A02F4
compare VAR_PETALBURG_GYM_STATE, 0
goto_if_eq Route101_EventScript_1A14DC
compare VAR_BIRCH_STATE, 0
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 1
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 2
- call_if 1, Route101_EventScript_1A0365
+ call_if_eq Route101_EventScript_1A0365
compare VAR_BIRCH_STATE, 3
- call_if 1, Route101_EventScript_1A0365
+ call_if_eq Route101_EventScript_1A0365
compare VAR_BIRCH_STATE, 4
- call_if 1, Route101_EventScript_1A0372
+ call_if_eq Route101_EventScript_1A0372
compare VAR_BIRCH_STATE, 5
- call_if 1, Route101_EventScript_1A0372
+ call_if_eq Route101_EventScript_1A0372
compare VAR_BIRCH_STATE, 6
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 7
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
return
Route101_EventScript_1A0358:: @ 81A0358
@@ -2297,9 +2281,9 @@ Movement_1A047A:
BattleTower_Outside_EventScript_1A047C:: @ 81A047C
SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C
compare FACING, 1
- call_if 1, BattleTower_Outside_EventScript_160B2F
+ call_if_eq BattleTower_Outside_EventScript_160B2F
compare FACING, 3
- call_if 1, BattleTower_Outside_EventScript_160B3A
+ call_if_eq BattleTower_Outside_EventScript_160B3A
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
call BattleTower_Outside_EventScript_1A040E
@@ -2467,19 +2451,19 @@ Route119_EventScript_1A05C3:: @ 81A05C3
waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
compare VAR_SPECIAL_4, 1
- call_if 1, Route119_EventScript_1A0646
+ call_if_eq Route119_EventScript_1A0646
compare VAR_SPECIAL_4, 2
- call_if 1, Route119_EventScript_1A064A
+ call_if_eq Route119_EventScript_1A064A
compare VAR_SPECIAL_4, 3
- call_if 1, Route119_EventScript_1A064E
+ call_if_eq Route119_EventScript_1A064E
compare VAR_SPECIAL_4, 4
- call_if 1, Route119_EventScript_1A0652
+ call_if_eq Route119_EventScript_1A0652
compare VAR_SPECIAL_4, 5
- call_if 1, Route119_EventScript_1A0656
+ call_if_eq Route119_EventScript_1A0656
compare VAR_SPECIAL_4, 6
- call_if 1, Route119_EventScript_1A065A
+ call_if_eq Route119_EventScript_1A065A
compare VAR_SPECIAL_4, 7
- call_if 1, Route119_EventScript_1A065E
+ call_if_eq Route119_EventScript_1A065E
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
@@ -3965,8 +3949,7 @@ SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0
end
SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3086
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3086
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30A5
lock
@@ -4000,8 +3983,7 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5
end
SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3102
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3102
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3121
lock
@@ -4035,8 +4017,7 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121
end
SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A317E
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A317E
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A319D
lock
@@ -4070,8 +4051,7 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D
end
SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A31FA
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A31FA
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3219
lock
@@ -4105,8 +4085,7 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219
end
SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3276
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3276
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3295
lock
@@ -4140,8 +4119,7 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295
end
SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A32F2
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A32F2
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3311
lock
@@ -4175,8 +4153,7 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311
end
SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A336E
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A336E
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A338D
lock
@@ -4210,8 +4187,7 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D
end
SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A33EA
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A33EA
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3409
lock
@@ -4245,8 +4221,7 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409
end
SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3466
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3466
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3485
lock
@@ -4280,8 +4255,7 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485
end
SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A34E2
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A34E2
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3501
lock
@@ -4472,8 +4446,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0
compare RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96
copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- checkflag FLAG_OCEANIC_MUSEUM_MET_REPORTER
- goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25
+ 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
@@ -4601,8 +4574,7 @@ SlateportCity_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
lock
faceplayer
- checkflag FLAG_TEMP_2
- goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E
+ goto_if_set FLAG_TEMP_2, FallarborTown_ContestLobby_EventScript_1AE17E
setvar VAR_SPECIAL_5, 6
special InterviewBefore
compare RESULT, 1
@@ -4662,7 +4634,7 @@ LilycoveCity_ContestLobby_EventScript_1AE188:: @ 81AE188
SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188
VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188
compare VAR_LINK_CONTEST_ROOM_STATE, 2
- goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE
+ goto_if_ne FallarborTown_ContestLobby_EventScript_1AE1FE
setvar VAR_SPECIAL_5, 6
special InterviewBefore
compare RESULT, 1
@@ -4698,8 +4670,7 @@ FallarborTown_ContestLobby_EventScript_1AE1FE:: @ 81AE1FE
BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF
lock
faceplayer
- checkflag FLAG_TEMP_2
- goto_if_eq BattleTower_Lobby_EventScript_1AE2E3
+ goto_if_set FLAG_TEMP_2, BattleTower_Lobby_EventScript_1AE2E3
setvar VAR_SPECIAL_5, 7
special InterviewBefore
compare RESULT, 1
@@ -4718,9 +4689,9 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241
multichoice 19, 8, 45, 1
copyvar VAR_SPECIAL_8, RESULT
compare RESULT, 0
- call_if 1, BattleTower_Lobby_EventScript_1AE2A1
+ call_if_eq BattleTower_Lobby_EventScript_1AE2A1
compare RESULT, 1
- call_if 1, BattleTower_Lobby_EventScript_1AE2AA
+ 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
diff --git a/data-de/field_move_scripts.inc b/data-de/field_move_scripts.inc
index 91f6ca620..86a4d1b24 100644
--- a/data-de/field_move_scripts.inc
+++ b/data-de/field_move_scripts.inc
@@ -1,7 +1,6 @@
S_CuttableTree:: @ 81B0DCC
lockall
- checkflag FLAG_BADGE01_GET
- goto_if 0, CannotUseCut
+ goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
compare RESULT, 6
goto_if_eq CannotUseCut
@@ -61,8 +60,7 @@ CannotUseCutText: @ 81B0E8E
S_BreakableRock:: @ 81B0EB7
lockall
- checkflag FLAG_BADGE03_GET
- goto_if 0, CannotUseRockSmash
+ goto_if_unset FLAG_BADGE03_GET, CannotUseRockSmash
checkpartymove MOVE_ROCK_SMASH
compare RESULT, 6
goto_if_eq CannotUseRockSmash
@@ -128,10 +126,8 @@ CannotUseRockSmashText: @ 81B0F90
S_PushableBoulder:: @ 81B0FCB
lockall
- checkflag FLAG_BADGE04_GET
- goto_if 0, CannotUseStrength
- checkflag FLAG_SYS_USE_STRENGTH
- goto_if_eq AlreadyUsedStrength
+ goto_if_unset FLAG_BADGE04_GET, CannotUseStrength
+ goto_if_set FLAG_SYS_USE_STRENGTH, AlreadyUsedStrength
checkpartymove 70
compare RESULT, 6
goto_if_eq CannotUseStrength
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 1ed419b52..1c8cff8d6 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -410,8 +410,7 @@ gUnknown_0815F36C:: @ 815F36C
EventScript_15F384:
message UnknownString_81A3A87
waitmessage
- checkflag FLAG_DECORATION_16
- goto_if_eq EventScript_15F3A0
+ goto_if_set FLAG_DECORATION_16, EventScript_15F3A0
goto EventScript_15F3E2
end
@@ -948,7 +947,7 @@ gUnknown_0819F818:: @ 819F818
waitmovement 0
specialvar RESULT, ScrSpecial_HasTrainerBeenFought
compare RESULT, 0
- goto_if 5, EventScript_19F83F
+ goto_if_ne EventScript_19F83F
special PlayTrainerEncounterMusic
special sub_8082524
goto EventScript_19F8F2
@@ -962,10 +961,10 @@ gUnknown_0819F840:: @ 819F840
call EventScript_19F8E5
specialvar RESULT, ScrSpecial_HasTrainerBeenFought
compare RESULT, 0
- goto_if 5, EventScript_19F877
+ goto_if_ne EventScript_19F877
special CheckForAlivePartyMons
compare RESULT, 0
- goto_if 5, EventScript_19F870
+ goto_if_ne EventScript_19F870
special PlayTrainerEncounterMusic
special sub_8082524
goto EventScript_19F8F2
@@ -1011,7 +1010,7 @@ gUnknown_0819F8AE:: @ 819F8AE
goto_if_eq EventScript_19F8DD
special CheckForAlivePartyMons
compare RESULT, 0
- goto_if 5, EventScript_19F8DE
+ goto_if_ne EventScript_19F8DE
special PlayTrainerEncounterMusic
special sub_8082524
special ScrSpecial_ShowTrainerIntroSpeech
@@ -1302,14 +1301,10 @@ EverGrandeCity_HallOfFame_EventScript_19FC13:: @ 819FC13
clearflag FLAG_HIDE_SS_TIDAL_SLATEPORT_HARBOR
clearflag FLAG_HIDE_SS_TIDAL_LILYCOVE_HARBOR
special sub_810FAA0
- checkflag FLAG_RECEIVED_SS_TICKET
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC62
- checkflag FLAG_LATIOS_OR_LATIAS_ROAMING
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC70
- checkflag FLAG_RECEIVED_BELDUM
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5A
- checkflag FLAG_RECEIVED_HM08
- call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5E
+ call_if_unset FLAG_RECEIVED_SS_TICKET, EverGrandeCity_HallOfFame_EventScript_19FC62
+ call_if_unset FLAG_LATIOS_OR_LATIAS_ROAMING, EverGrandeCity_HallOfFame_EventScript_19FC70
+ call_if_unset FLAG_RECEIVED_BELDUM, EverGrandeCity_HallOfFame_EventScript_19FC5A
+ call_if_unset FLAG_RECEIVED_HM08, EverGrandeCity_HallOfFame_EventScript_19FC5E
return
EverGrandeCity_HallOfFame_EventScript_19FC5A:: @ 819FC5A
@@ -1337,10 +1332,8 @@ S_WhiteOut:: @ 819FC74
end
EventScript_19FC84:
- checkflag FLAG_RECEIVED_GO_GOGGLES
- goto_if_eq Route101_EventScript_1A14DC
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if 0, Route101_EventScript_1A14DC
+ goto_if_set FLAG_RECEIVED_GO_GOGGLES, Route101_EventScript_1A14DC
+ goto_if_unset FLAG_DEFEATED_LAVARIDGE_GYM, Route101_EventScript_1A14DC
clearflag FLAG_HIDE_RIVAL_LAVARIDGE_1
setvar VAR_LAVARIDGE_RIVAL_STATE, 2
return
@@ -1403,16 +1396,11 @@ PetalburgCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B
- checkflag FLAG_RECEIVED_POKENAV
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_1A14DC
- checkflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49
- checkflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F
- checkflag FLAG_HIDE_MR_BRINEY_ROUTE109
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55
+ goto_if_unset FLAG_RECEIVED_POKENAV, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, OldaleTown_PokemonCenter_1F_EventScript_1A14DC
+ goto_if_unset FLAG_HIDE_MR_BRINEY_BOAT_ROUTE104, OldaleTown_PokemonCenter_1F_EventScript_19FD49
+ goto_if_unset FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN, OldaleTown_PokemonCenter_1F_EventScript_19FD4F
+ goto_if_unset FLAG_HIDE_MR_BRINEY_ROUTE109, OldaleTown_PokemonCenter_1F_EventScript_19FD55
return
OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49
@@ -1461,8 +1449,7 @@ do_heal_party:: @ 819FD7C
applymovement VAR_SPECIAL_B, OldaleTown_PokemonCenter_1F_Movement_1A0845
waitmovement 0
special ScrSpecial_HealPlayerParty
- checkflag FLAG_POKERUS_EXPLAINED
- goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
+ goto_if_unset FLAG_POKERUS_EXPLAINED, OldaleTown_PokemonCenter_1F_EventScript_19FDCE
goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0
end
@@ -1510,9 +1497,9 @@ Std_ObtainItem_: @ 819FE07
checkitemtype VAR_SPECIAL_0
call GetItem_HandlePocket
compare VAR_SPECIAL_7, 0x1
- call_if 1, Std_ObtainItem_Success
+ call_if_eq Std_ObtainItem_Success
compare VAR_SPECIAL_7, 0x0
- call_if 1, Std_ObtainItem_Fail
+ call_if_eq Std_ObtainItem_Fail
return
GetItem_HandlePocket:
@@ -1527,31 +1514,31 @@ GetItem_HandlePocket:
GetItem_HandlePocket_Items:
bufferstdstring 2, 0xE
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_KeyItems:
bufferstdstring 2, 0xF
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_PokeBalls:
bufferstdstring 2, 0x10
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
GetItem_HandlePocket_TMsHMs:
bufferstdstring 2, 0x11
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetTMHMFanfare
+ call_if_eq PlayGetTMHMFanfare
return
GetItem_HandlePocket_Berries:
bufferstdstring 2, 0x12
compare VAR_SPECIAL_7, 1
- call_if 1, PlayGetItemFanfare
+ call_if_eq PlayGetItemFanfare
return
Std_ObtainItem_Success: @ 819FEB7
@@ -1583,9 +1570,9 @@ Std_ObtainDecoration: @ 819FEDA
Std_ObtainDecoration_: @ 819FEE8
bufferdecorationname 1, VAR_SPECIAL_0
compare VAR_SPECIAL_7, 1
- call_if 1, Std_ObtainDecoration_Success
+ call_if_eq Std_ObtainDecoration_Success
compare VAR_SPECIAL_7, 0
- call_if 1, Std_ObtainDecoration_Fail
+ call_if_eq Std_ObtainDecoration_Fail
return
Std_ObtainDecoration_Success: @ 819FF03
@@ -1611,9 +1598,9 @@ Std_FindItem: @ 819FF21
checkitemtype VAR_SPECIAL_0
call GetItem_HandlePocket
compare VAR_SPECIAL_7, 1
- call_if 1, Std_FindItem_Success
+ call_if_eq Std_FindItem_Success
compare VAR_SPECIAL_7, 0
- call_if 1, Std_FindItem_Fail
+ call_if_eq Std_FindItem_Fail
release
return
@@ -1718,10 +1705,8 @@ EventScript_1A0070:
EventScript_1A0085:
playse SE_PC_LOGON
- checkflag FLAG_SYS_PC_LANETTE
- call_if 0, EventScript_1A00AC
- checkflag FLAG_SYS_PC_LANETTE
- call_if 1, EventScript_1A00B5
+ call_if_unset FLAG_SYS_PC_LANETTE, EventScript_1A00AC
+ call_if_set FLAG_SYS_PC_LANETTE, EventScript_1A00B5
msgbox UnknownString_81A0A35, 4
special ShowPokemonStorageSystem
waitstate
@@ -1744,8 +1729,7 @@ EventScript_1A00BE:
end
EventScript_1A00CB:
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, EventScript_1A00BE
+ goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_1A00BE
playse SE_PC_LOGON
special AccessHallOfFamePC
waitstate
@@ -2150,21 +2134,21 @@ Route103_EventScript_1A02F4:: @ 81A02F4
compare VAR_PETALBURG_GYM_STATE, 0
goto_if_eq Route101_EventScript_1A14DC
compare VAR_BIRCH_STATE, 0
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 1
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 2
- call_if 1, Route101_EventScript_1A0365
+ call_if_eq Route101_EventScript_1A0365
compare VAR_BIRCH_STATE, 3
- call_if 1, Route101_EventScript_1A0365
+ call_if_eq Route101_EventScript_1A0365
compare VAR_BIRCH_STATE, 4
- call_if 1, Route101_EventScript_1A0372
+ call_if_eq Route101_EventScript_1A0372
compare VAR_BIRCH_STATE, 5
- call_if 1, Route101_EventScript_1A0372
+ call_if_eq Route101_EventScript_1A0372
compare VAR_BIRCH_STATE, 6
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
compare VAR_BIRCH_STATE, 7
- call_if 1, Route101_EventScript_1A0358
+ call_if_eq Route101_EventScript_1A0358
return
Route101_EventScript_1A0358:: @ 81A0358
@@ -2291,9 +2275,9 @@ Movement_1A047A:
BattleTower_Outside_EventScript_1A047C:: @ 81A047C
SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C
compare FACING, 1
- call_if 1, BattleTower_Outside_EventScript_160B2F
+ call_if_eq BattleTower_Outside_EventScript_160B2F
compare FACING, 3
- call_if 1, BattleTower_Outside_EventScript_160B3A
+ call_if_eq BattleTower_Outside_EventScript_160B3A
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
call BattleTower_Outside_EventScript_1A040E
@@ -2461,19 +2445,19 @@ Route119_EventScript_1A05C3:: @ 81A05C3
waitmoncry
setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
compare VAR_SPECIAL_4, 1
- call_if 1, Route119_EventScript_1A0646
+ call_if_eq Route119_EventScript_1A0646
compare VAR_SPECIAL_4, 2
- call_if 1, Route119_EventScript_1A064A
+ call_if_eq Route119_EventScript_1A064A
compare VAR_SPECIAL_4, 3
- call_if 1, Route119_EventScript_1A064E
+ call_if_eq Route119_EventScript_1A064E
compare VAR_SPECIAL_4, 4
- call_if 1, Route119_EventScript_1A0652
+ call_if_eq Route119_EventScript_1A0652
compare VAR_SPECIAL_4, 5
- call_if 1, Route119_EventScript_1A0656
+ call_if_eq Route119_EventScript_1A0656
compare VAR_SPECIAL_4, 6
- call_if 1, Route119_EventScript_1A065A
+ call_if_eq Route119_EventScript_1A065A
compare VAR_SPECIAL_4, 7
- call_if 1, Route119_EventScript_1A065E
+ call_if_eq Route119_EventScript_1A065E
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
@@ -3944,8 +3928,7 @@ SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0
end
SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3086
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3086
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A30A5
lock
@@ -3979,8 +3962,7 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5
end
SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3102
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3102
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3121
lock
@@ -4014,8 +3996,7 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121
end
SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A317E
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A317E
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A319D
lock
@@ -4049,8 +4030,7 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D
end
SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A31FA
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A31FA
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3219
lock
@@ -4084,8 +4064,7 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219
end
SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3276
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3276
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3295
lock
@@ -4119,8 +4098,7 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295
end
SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A32F2
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A32F2
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3311
lock
@@ -4154,8 +4132,7 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311
end
SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A336E
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A336E
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A338D
lock
@@ -4189,8 +4166,7 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D
end
SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A33EA
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A33EA
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3409
lock
@@ -4224,8 +4200,7 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409
end
SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A3466
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A3466
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3485
lock
@@ -4259,8 +4234,7 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485
end
SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, SecretBase_RedCave1_EventScript_1A34E2
+ goto_if_unset FLAG_SYS_GAME_CLEAR, SecretBase_RedCave1_EventScript_1A34E2
compare RESULT, 1
goto_if_eq SecretBase_RedCave1_EventScript_1A3501
lock
@@ -4440,8 +4414,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0
compare RESULT, 1
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96
copyvar VAR_SPECIAL_9, VAR_SPECIAL_6
- checkflag FLAG_OCEANIC_MUSEUM_MET_REPORTER
- goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25
+ 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
@@ -4569,8 +4542,7 @@ SlateportCity_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6
lock
faceplayer
- checkflag FLAG_TEMP_2
- goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E
+ goto_if_set FLAG_TEMP_2, FallarborTown_ContestLobby_EventScript_1AE17E
setvar VAR_SPECIAL_5, 6
special InterviewBefore
compare RESULT, 1
@@ -4630,7 +4602,7 @@ LilycoveCity_ContestLobby_EventScript_1AE188:: @ 81AE188
SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188
VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188
compare VAR_LINK_CONTEST_ROOM_STATE, 2
- goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE
+ goto_if_ne FallarborTown_ContestLobby_EventScript_1AE1FE
setvar VAR_SPECIAL_5, 6
special InterviewBefore
compare RESULT, 1
@@ -4666,8 +4638,7 @@ FallarborTown_ContestLobby_EventScript_1AE1FE:: @ 81AE1FE
BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF
lock
faceplayer
- checkflag FLAG_TEMP_2
- goto_if_eq BattleTower_Lobby_EventScript_1AE2E3
+ goto_if_set FLAG_TEMP_2, BattleTower_Lobby_EventScript_1AE2E3
setvar VAR_SPECIAL_5, 7
special InterviewBefore
compare RESULT, 1
@@ -4686,9 +4657,9 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241
multichoice 19, 8, 45, 1
copyvar VAR_SPECIAL_8, RESULT
compare RESULT, 0
- call_if 1, BattleTower_Lobby_EventScript_1AE2A1
+ call_if_eq BattleTower_Lobby_EventScript_1AE2A1
compare RESULT, 1
- call_if 1, BattleTower_Lobby_EventScript_1AE2AA
+ 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
diff --git a/data/field_move_scripts.inc b/data/field_move_scripts.inc
index a4a7513e5..f5ba25643 100644
--- a/data/field_move_scripts.inc
+++ b/data/field_move_scripts.inc
@@ -1,7 +1,6 @@
S_CuttableTree:: @ 81B0DCC
lockall
- checkflag FLAG_BADGE01_GET
- goto_if 0, CannotUseCut
+ goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
compare RESULT, 6
goto_if_eq CannotUseCut
@@ -58,8 +57,7 @@ CannotUseCutText: @ 81B0E8E
S_BreakableRock:: @ 81B0EB7
lockall
- checkflag FLAG_BADGE03_GET
- goto_if 0, CannotUseRockSmash
+ goto_if_unset FLAG_BADGE03_GET, CannotUseRockSmash
checkpartymove MOVE_ROCK_SMASH
compare RESULT, 6
goto_if_eq CannotUseRockSmash
@@ -125,10 +123,8 @@ CannotUseRockSmashText: @ 81B0F90
S_PushableBoulder:: @ 81B0FCB
lockall
- checkflag FLAG_BADGE04_GET
- goto_if 0, CannotUseStrength
- checkflag FLAG_SYS_USE_STRENGTH
- goto_if_eq AlreadyUsedStrength
+ goto_if_unset FLAG_BADGE04_GET, CannotUseStrength
+ goto_if_set FLAG_SYS_USE_STRENGTH, AlreadyUsedStrength
checkpartymove 70
compare RESULT, 6
goto_if_eq CannotUseStrength
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index 334a52382..0e2012de9 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -174,8 +174,7 @@ RustboroCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
SlateportCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
SootopolisCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
VerdanturfTown_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6
- checkflag FLAG_SYS_POKEDEX_GET
- goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A4342
+ goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_1A4342
copyvar VAR_SPECIAL_7, LAST_TALKED
lock
faceplayer
@@ -282,7 +281,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A403C:: @ 81A403C
OldaleTown_PokemonCenter_2F_EventScript_1A4042:: @ 81A4042
special CheckForAlivePartyMons
compare RESULT, 0
- goto_if 5, OldaleTown_PokemonCenter_2F_EventScript_1A4056
+ goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_1A4056
setvar VAR_SPECIAL_4, 2
return
@@ -346,8 +345,7 @@ RustboroCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
SlateportCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
SootopolisCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
VerdanturfTown_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC
- checkflag FLAG_SYS_POKEDEX_GET
- goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A4339
+ goto_if_unset FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_2F_EventScript_1A4339
copyvar VAR_SPECIAL_7, LAST_TALKED
lock
faceplayer
@@ -407,7 +405,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4166:: @ 81A4166
OldaleTown_PokemonCenter_2F_EventScript_1A41BB:: @ 81A41BB
specialvar RESULT, CalculatePlayerPartyCount
compare RESULT, 2
- goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A41E1
+ goto_if_lt OldaleTown_PokemonCenter_2F_EventScript_1A41E1
specialvar RESULT, GetNameOfEnigmaBerryInPlayerParty
compare RESULT, 1
goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A41EE
@@ -443,8 +441,7 @@ RustboroCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
SlateportCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
SootopolisCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
VerdanturfTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB
- checkflag FLAG_VISITED_MAUVILLE_CITY
- goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A434B
+ goto_if_unset FLAG_VISITED_MAUVILLE_CITY, OldaleTown_PokemonCenter_2F_EventScript_1A434B
copyvar VAR_SPECIAL_7, LAST_TALKED
lock
faceplayer
@@ -691,7 +688,7 @@ RecordCorner_EventScript_1A4418:: @ 81A4418
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
- goto_if 5, RecordCorner_EventScript_1A446C
+ goto_if_ne RecordCorner_EventScript_1A446C
end
RecordCorner_EventScript_1A442D:: @ 81A442D
@@ -699,7 +696,7 @@ RecordCorner_EventScript_1A442D:: @ 81A442D
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
- goto_if 5, RecordCorner_EventScript_1A446C
+ goto_if_ne RecordCorner_EventScript_1A446C
end
RecordCorner_EventScript_1A4442:: @ 81A4442
@@ -707,7 +704,7 @@ RecordCorner_EventScript_1A4442:: @ 81A4442
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
- goto_if 5, RecordCorner_EventScript_1A446C
+ goto_if_ne RecordCorner_EventScript_1A446C
end
RecordCorner_EventScript_1A4457:: @ 81A4457
@@ -715,7 +712,7 @@ RecordCorner_EventScript_1A4457:: @ 81A4457
special sub_80B929C
waitstate
compare VAR_TEMP_1, 0
- goto_if 5, RecordCorner_EventScript_1A446C
+ goto_if_ne RecordCorner_EventScript_1A446C
end
RecordCorner_EventScript_1A446C:: @ 81A446C
@@ -771,7 +768,7 @@ TradeCenter_EventScript_1A44AD:: @ 81A44AD
RecordCorner_EventScript_1A44BC:: @ 81A44BC
compare VAR_TEMP_0, 0
- goto_if 5, RecordCorner_EventScript_1A44D6
+ goto_if_ne RecordCorner_EventScript_1A44D6
special sub_8064EAC
message RecordCorner_Text_1A4DD7
waitmessage
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index af2c39979..7f0f6b710 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -6,11 +6,10 @@ VerdanturfTown_ContestLobby_EventScript_1A4E92:: @ 81A4E92
faceplayer
checkitem ITEM_CONTEST_PASS, 1
compare RESULT, 0
- call_if 1, FallarborTown_ContestLobby_EventScript_1A4EDD
+ call_if_eq FallarborTown_ContestLobby_EventScript_1A4EDD
compare VAR_CONTEST_PRIZE_PICKUP, 0
- goto_if 5, FallarborTown_ContestLobby_EventScript_1A4F4E
- checkflag FLAG_TEMP_1
- goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F8F
+ goto_if_ne FallarborTown_ContestLobby_EventScript_1A4F4E
+ goto_if_set FLAG_TEMP_1, FallarborTown_ContestLobby_EventScript_1A4F8F
bufferstdstring 0, VAR_SPECIAL_B
msgbox FallarborTown_ContestLobby_Text_1A5DFC, 4
checkitem ITEM_CONTEST_PASS, 1
@@ -40,8 +39,7 @@ FallarborTown_ContestLobby_EventScript_1A4EF6:: @ 81A4EF6
end
FallarborTown_ContestLobby_EventScript_1A4F13:: @ 81A4F13
- checkflag FLAG_RECEIVED_CONTEST_PASS
- goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F44
+ goto_if_set FLAG_RECEIVED_CONTEST_PASS, FallarborTown_ContestLobby_EventScript_1A4F44
msgbox FallarborTown_ContestLobby_Text_1A6583, 4
giveitem_std ITEM_CONTEST_PASS
setflag FLAG_RECEIVED_CONTEST_PASS
@@ -288,7 +286,7 @@ LinkContestRoom1_EventScript_1A527A:: @ 81A527A
call LinkContestRoom1_EventScript_1A5880
addvar VAR_SPECIAL_6, 1
compare VAR_SPECIAL_6, 4
- goto_if 5, LinkContestRoom1_EventScript_1A527A
+ goto_if_ne LinkContestRoom1_EventScript_1A527A
call LinkContestRoom1_EventScript_1A5377
setvar VAR_TEMP_1, 6
return
@@ -432,15 +430,15 @@ LinkContestRoom1_EventScript_1A53E5:: @ 81A53E5
LinkContestRoom1_EventScript_1A5455:: @ 81A5455
special sub_80C47A0
compare VAR_CONTEST_LOCATION, 1
- call_if 1, LinkContestRoom1_EventScript_1A555A
+ call_if_eq LinkContestRoom1_EventScript_1A555A
compare VAR_CONTEST_LOCATION, 2
- call_if 1, LinkContestRoom1_EventScript_1A55B8
+ call_if_eq LinkContestRoom1_EventScript_1A55B8
compare VAR_CONTEST_LOCATION, 3
- call_if 1, LinkContestRoom1_EventScript_1A5616
+ call_if_eq LinkContestRoom1_EventScript_1A5616
compare VAR_CONTEST_LOCATION, 4
- call_if 1, LinkContestRoom1_EventScript_1A5674
+ call_if_eq LinkContestRoom1_EventScript_1A5674
compare VAR_CONTEST_LOCATION, 5
- call_if 1, LinkContestRoom1_EventScript_1A56D2
+ call_if_eq LinkContestRoom1_EventScript_1A56D2
setvar VAR_TEMP_1, 9
setvar VAR_TEMP_2, 9
setvar VAR_TEMP_3, 9
@@ -450,7 +448,7 @@ LinkContestRoom1_EventScript_1A5455:: @ 81A5455
setvar VAR_TEMP_7, 9
setvar VAR_TEMP_8, 9
compare VAR_TEMP_0, 0
- call_if 2, LinkContestRoom1_EventScript_1A54EB
+ call_if_gt LinkContestRoom1_EventScript_1A54EB
setvar VAR_TEMP_1, 0
setvar VAR_TEMP_2, 0
setvar VAR_TEMP_3, 0
@@ -465,123 +463,123 @@ LinkContestRoom1_EventScript_1A54EB:: @ 81A54EB
setvar RESULT, 8
special ScriptRandom
compare RESULT, 0
- call_if 1, LinkContestRoom1_EventScript_1A5760
+ call_if_eq LinkContestRoom1_EventScript_1A5760
compare RESULT, 1
- call_if 1, LinkContestRoom1_EventScript_1A5784
+ call_if_eq LinkContestRoom1_EventScript_1A5784
compare RESULT, 2
- call_if 1, LinkContestRoom1_EventScript_1A57A8
+ call_if_eq LinkContestRoom1_EventScript_1A57A8
compare RESULT, 3
- call_if 1, LinkContestRoom1_EventScript_1A57CC
+ call_if_eq LinkContestRoom1_EventScript_1A57CC
compare RESULT, 4
- call_if 1, LinkContestRoom1_EventScript_1A57F0
+ call_if_eq LinkContestRoom1_EventScript_1A57F0
compare RESULT, 5
- call_if 1, LinkContestRoom1_EventScript_1A5814
+ call_if_eq LinkContestRoom1_EventScript_1A5814
compare RESULT, 6
- call_if 1, LinkContestRoom1_EventScript_1A5838
+ call_if_eq LinkContestRoom1_EventScript_1A5838
compare RESULT, 7
- call_if 1, LinkContestRoom1_EventScript_1A585C
+ call_if_eq LinkContestRoom1_EventScript_1A585C
compare VAR_TEMP_0, 0
- goto_if 2, LinkContestRoom1_EventScript_1A54EB
+ goto_if_gt LinkContestRoom1_EventScript_1A54EB
waitmovement 0
return
LinkContestRoom1_EventScript_1A555A:: @ 81A555A
compare VAR_SPECIAL_4, 80
- goto_if 2, LinkContestRoom1_EventScript_1A575A
+ goto_if_gt LinkContestRoom1_EventScript_1A575A
compare VAR_SPECIAL_4, 70
- goto_if 2, LinkContestRoom1_EventScript_1A5754
+ goto_if_gt LinkContestRoom1_EventScript_1A5754
compare VAR_SPECIAL_4, 60
- goto_if 2, LinkContestRoom1_EventScript_1A574E
+ goto_if_gt LinkContestRoom1_EventScript_1A574E
compare VAR_SPECIAL_4, 50
- goto_if 2, LinkContestRoom1_EventScript_1A5748
+ goto_if_gt LinkContestRoom1_EventScript_1A5748
compare VAR_SPECIAL_4, 40
- goto_if 2, LinkContestRoom1_EventScript_1A5742
+ goto_if_gt LinkContestRoom1_EventScript_1A5742
compare VAR_SPECIAL_4, 30
- goto_if 2, LinkContestRoom1_EventScript_1A573C
+ goto_if_gt LinkContestRoom1_EventScript_1A573C
compare VAR_SPECIAL_4, 20
- goto_if 2, LinkContestRoom1_EventScript_1A5736
+ goto_if_gt LinkContestRoom1_EventScript_1A5736
compare VAR_SPECIAL_4, 10
- goto_if 2, LinkContestRoom1_EventScript_1A5730
+ goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A55B8:: @ 81A55B8
compare VAR_SPECIAL_4, 230
- goto_if 2, LinkContestRoom1_EventScript_1A575A
+ goto_if_gt LinkContestRoom1_EventScript_1A575A
compare VAR_SPECIAL_4, 210
- goto_if 2, LinkContestRoom1_EventScript_1A5754
+ goto_if_gt LinkContestRoom1_EventScript_1A5754
compare VAR_SPECIAL_4, 190
- goto_if 2, LinkContestRoom1_EventScript_1A574E
+ goto_if_gt LinkContestRoom1_EventScript_1A574E
compare VAR_SPECIAL_4, 170
- goto_if 2, LinkContestRoom1_EventScript_1A5748
+ goto_if_gt LinkContestRoom1_EventScript_1A5748
compare VAR_SPECIAL_4, 150
- goto_if 2, LinkContestRoom1_EventScript_1A5742
+ goto_if_gt LinkContestRoom1_EventScript_1A5742
compare VAR_SPECIAL_4, 130
- goto_if 2, LinkContestRoom1_EventScript_1A573C
+ goto_if_gt LinkContestRoom1_EventScript_1A573C
compare VAR_SPECIAL_4, 110
- goto_if 2, LinkContestRoom1_EventScript_1A5736
+ goto_if_gt LinkContestRoom1_EventScript_1A5736
compare VAR_SPECIAL_4, 90
- goto_if 2, LinkContestRoom1_EventScript_1A5730
+ goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A5616:: @ 81A5616
compare VAR_SPECIAL_4, 380
- goto_if 2, LinkContestRoom1_EventScript_1A575A
+ goto_if_gt LinkContestRoom1_EventScript_1A575A
compare VAR_SPECIAL_4, 350
- goto_if 2, LinkContestRoom1_EventScript_1A5754
+ goto_if_gt LinkContestRoom1_EventScript_1A5754
compare VAR_SPECIAL_4, 320
- goto_if 2, LinkContestRoom1_EventScript_1A574E
+ goto_if_gt LinkContestRoom1_EventScript_1A574E
compare VAR_SPECIAL_4, 290
- goto_if 2, LinkContestRoom1_EventScript_1A5748
+ goto_if_gt LinkContestRoom1_EventScript_1A5748
compare VAR_SPECIAL_4, 260
- goto_if 2, LinkContestRoom1_EventScript_1A5742
+ goto_if_gt LinkContestRoom1_EventScript_1A5742
compare VAR_SPECIAL_4, 230
- goto_if 2, LinkContestRoom1_EventScript_1A573C
+ goto_if_gt LinkContestRoom1_EventScript_1A573C
compare VAR_SPECIAL_4, 200
- goto_if 2, LinkContestRoom1_EventScript_1A5736
+ goto_if_gt LinkContestRoom1_EventScript_1A5736
compare VAR_SPECIAL_4, 170
- goto_if 2, LinkContestRoom1_EventScript_1A5730
+ goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A5674:: @ 81A5674
compare VAR_SPECIAL_4, 600
- goto_if 2, LinkContestRoom1_EventScript_1A575A
+ goto_if_gt LinkContestRoom1_EventScript_1A575A
compare VAR_SPECIAL_4, 560
- goto_if 2, LinkContestRoom1_EventScript_1A5754
+ goto_if_gt LinkContestRoom1_EventScript_1A5754
compare VAR_SPECIAL_4, 520
- goto_if 2, LinkContestRoom1_EventScript_1A574E
+ goto_if_gt LinkContestRoom1_EventScript_1A574E
compare VAR_SPECIAL_4, 480
- goto_if 2, LinkContestRoom1_EventScript_1A5748
+ goto_if_gt LinkContestRoom1_EventScript_1A5748
compare VAR_SPECIAL_4, 440
- goto_if 2, LinkContestRoom1_EventScript_1A5742
+ goto_if_gt LinkContestRoom1_EventScript_1A5742
compare VAR_SPECIAL_4, 400
- goto_if 2, LinkContestRoom1_EventScript_1A573C
+ goto_if_gt LinkContestRoom1_EventScript_1A573C
compare VAR_SPECIAL_4, 360
- goto_if 2, LinkContestRoom1_EventScript_1A5736
+ goto_if_gt LinkContestRoom1_EventScript_1A5736
compare VAR_SPECIAL_4, 320
- goto_if 2, LinkContestRoom1_EventScript_1A5730
+ goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
LinkContestRoom1_EventScript_1A56D2:: @ 81A56D2
compare VAR_SPECIAL_4, 600
- goto_if 2, LinkContestRoom1_EventScript_1A575A
+ goto_if_gt LinkContestRoom1_EventScript_1A575A
compare VAR_SPECIAL_4, 550
- goto_if 2, LinkContestRoom1_EventScript_1A5754
+ goto_if_gt LinkContestRoom1_EventScript_1A5754
compare VAR_SPECIAL_4, 500
- goto_if 2, LinkContestRoom1_EventScript_1A574E
+ goto_if_gt LinkContestRoom1_EventScript_1A574E
compare VAR_SPECIAL_4, 450
- goto_if 2, LinkContestRoom1_EventScript_1A5748
+ goto_if_gt LinkContestRoom1_EventScript_1A5748
compare VAR_SPECIAL_4, 400
- goto_if 2, LinkContestRoom1_EventScript_1A5742
+ goto_if_gt LinkContestRoom1_EventScript_1A5742
compare VAR_SPECIAL_4, 300
- goto_if 2, LinkContestRoom1_EventScript_1A573C
+ goto_if_gt LinkContestRoom1_EventScript_1A573C
compare VAR_SPECIAL_4, 200
- goto_if 2, LinkContestRoom1_EventScript_1A5736
+ goto_if_gt LinkContestRoom1_EventScript_1A5736
compare VAR_SPECIAL_4, 100
- goto_if 2, LinkContestRoom1_EventScript_1A5730
+ goto_if_gt LinkContestRoom1_EventScript_1A5730
setvar VAR_TEMP_0, 0
return
@@ -909,7 +907,7 @@ LinkContestRoom1_EventScript_1A5A90:: @ 81A5A90
addvar VAR_TEMP_1, 1
lockall
compare VAR_CONTEST_LOCATION, 1
- call_if 2, LinkContestRoom1_EventScript_1A5AE4
+ call_if_gt LinkContestRoom1_EventScript_1A5AE4
applymovement 9, LinkContestRoom1_Movement_1A5DB7
applymovement 12, LinkContestRoom1_Movement_1A5DBB
applymovement 7, LinkContestRoom1_Movement_1A5DB7
@@ -919,7 +917,7 @@ LinkContestRoom1_EventScript_1A5A90:: @ 81A5A90
applymovement 6, LinkContestRoom1_Movement_1A5DB3
applymovement 8, LinkContestRoom1_Movement_1A5DAF
compare VAR_TEMP_1, 4
- goto_if 5, LinkContestRoom1_EventScript_1A5A90
+ goto_if_ne LinkContestRoom1_EventScript_1A5A90
delay 30
return
@@ -996,8 +994,7 @@ LinkContestRoom1_EventScript_1A5BAB:: @ 81A5BAB
compare VAR_CONTEST_LOCATION, 5
goto_if_eq LinkContestRoom1_EventScript_1A5C4C
call LinkContestRoom1_EventScript_1A5C12
- checkflag FLAG_TEMP_2
- goto_if_eq LinkContestRoom1_EventScript_1A5BF6
+ goto_if_set FLAG_TEMP_2, LinkContestRoom1_EventScript_1A5BF6
msgbox LinkContestRoom1_Text_1A6DC5, 3
waitmessage
call LinkContestRoom1_EventScript_1A5C7F
@@ -1118,7 +1115,7 @@ LinkContestRoom1_EventScript_1A5CE5:: @ 81A5CE5
LinkContestRoom1_EventScript_1A5CFC:: @ 81A5CFC
compare VAR_CONTEST_LOCATION, 2
- call_if 1, LinkContestRoom1_EventScript_1A5C42
+ call_if_eq LinkContestRoom1_EventScript_1A5C42
incrementgamestat GAME_STAT_WON_CONTEST
specialvar RESULT, sub_80C4440
compare RESULT, 0
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 0d0d83801..fc5df6abe 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -29,7 +29,7 @@ Route117_EventScript_1B2262:: @ 81B2262
Route117_EventScript_1B2298:: @ 81B2298
specialvar RESULT, CalculatePlayerPartyCount
compare RESULT, 6
- goto_if 5, Route117_EventScript_1B22B2
+ goto_if_ne Route117_EventScript_1B22B2
msgbox Route117_Text_1B2766, 4
release
end
@@ -49,7 +49,7 @@ Route117_EventScript_1B22B2:: @ 81B22B2
Route117_EventScript_1B22CD:: @ 81B22CD
specialvar RESULT, sub_8042B4C
compare RESULT, 1
- call_if 1, Route117_EventScript_1B22DE
+ call_if_eq Route117_EventScript_1B22DE
return
Route117_EventScript_1B22DE:: @ 81B22DE
@@ -155,7 +155,7 @@ Route117_PokemonDayCare_EventScript_1B2411:: @ 81B2411
Route117_PokemonDayCare_EventScript_1B241A:: @ 81B241A
specialvar RESULT, GetNumLevelsGainedFromDaycare
compare RESULT, 0
- call_if 5, Route117_PokemonDayCare_EventScript_1B2411
+ call_if_ne Route117_PokemonDayCare_EventScript_1B2411
return
Route117_PokemonDayCare_EventScript_1B242B:: @ 81B242B
diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc
index ad7a3d3c5..5ddcf4a65 100644
--- a/data/scripts/gabby_and_ty.inc
+++ b/data/scripts/gabby_and_ty.inc
@@ -203,13 +203,12 @@ Route111_EventScript_1AE5A2:: @ 81AE5A2
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToFieldObjectLocalIds
compare FACING, 2
- call_if 1, Route111_EventScript_1AE5E0
+ call_if_eq Route111_EventScript_1AE5E0
compare FACING, 1
- call_if 1, Route111_EventScript_1AE5EB
+ call_if_eq Route111_EventScript_1AE5EB
compare FACING, 4
- call_if 1, Route111_EventScript_1AE5FD
- checkflag FLAG_TEMP_1
- goto_if_eq Route111_EventScript_1AE73A
+ call_if_eq Route111_EventScript_1AE5FD
+ goto_if_set FLAG_TEMP_1, Route111_EventScript_1AE73A
msgbox Route111_Text_1AC015, MSGBOX_YESNO
goto Route111_EventScript_1AE6F3
end
@@ -237,13 +236,12 @@ Route120_EventScript_1AE60F:: @ 81AE60F
special GabbyAndTyBeforeInterview
special GabbyAndTySetScriptVarsToFieldObjectLocalIds
compare FACING, 2
- call_if 1, Route111_EventScript_1AE5E0
+ call_if_eq Route111_EventScript_1AE5E0
compare FACING, 1
- call_if 1, Route111_EventScript_1AE5EB
+ call_if_eq Route111_EventScript_1AE5EB
compare FACING, 4
- call_if 1, Route111_EventScript_1AE5FD
- checkflag FLAG_TEMP_1
- goto_if_eq Route111_EventScript_1AE73A
+ call_if_eq Route111_EventScript_1AE5FD
+ goto_if_set FLAG_TEMP_1, Route111_EventScript_1AE73A
specialvar RESULT, GabbyAndTyGetLastQuote
compare RESULT, 0
goto_if_eq Route111_EventScript_1AE69F
diff --git a/data/scripts/magma_chimney.inc b/data/scripts/magma_chimney.inc
index 11f42daf0..ed81e6628 100644
--- a/data/scripts/magma_chimney.inc
+++ b/data/scripts/magma_chimney.inc
@@ -1,10 +1,8 @@
MtChimney_EventScript_1B2C95:: @ 81B2C95
lock
faceplayer
- checkflag FLAG_EVIL_LEADER_PLEASE_STOP
- call_if 0, MtChimney_EventScript_1B2CB9
- checkflag FLAG_EVIL_LEADER_PLEASE_STOP
- call_if 1, MtChimney_EventScript_1B2CC2
+ call_if_unset FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_1B2CB9
+ call_if_set FLAG_EVIL_LEADER_PLEASE_STOP, MtChimney_EventScript_1B2CC2
closemessage
applymovement 1, MtChimney_Movement_1A083D
waitmovement 0
@@ -68,9 +66,9 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB
setobjectxyperm 1, 10, 12
addobject 1
compare FACING, 4
- call_if 1, MtChimney_EventScript_1B2D7D
+ call_if_eq MtChimney_EventScript_1B2D7D
compare FACING, 2
- call_if 1, MtChimney_EventScript_1B2D88
+ call_if_eq MtChimney_EventScript_1B2D88
applymovement 255, MtChimney_Movement_1A083F
waitmovement 0
.ifdef SAPPHIRE
@@ -80,9 +78,9 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB
.endif
closemessage
compare FACING, 4
- call_if 1, MtChimney_EventScript_1B2D93
+ call_if_eq MtChimney_EventScript_1B2D93
compare FACING, 2
- call_if 1, MtChimney_EventScript_1B2D9E
+ call_if_eq MtChimney_EventScript_1B2D9E
removeobject 1
setflag FLAG_HIDE_OTEHR_TEAM_MT_CHIMNEY
setflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY
diff --git a/data/scripts/maps/AbandonedShip_CaptainsOffice.inc b/data/scripts/maps/AbandonedShip_CaptainsOffice.inc
index 2430ba4af..22c76847a 100644
--- a/data/scripts/maps/AbandonedShip_CaptainsOffice.inc
+++ b/data/scripts/maps/AbandonedShip_CaptainsOffice.inc
@@ -4,13 +4,11 @@ AbandonedShip_CaptainsOffice_MapScripts:: @ 815EAF4
AbandonedShip_CaptainsOffice_EventScript_15EAF5:: @ 815EAF5
lock
faceplayer
- checkflag FLAG_EXCHANGED_SCANNER
- goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB2D
+ goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_15EB2D
checkitem ITEM_SCANNER, 1
compare RESULT, 1
goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB23
- checkflag FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS_2
- goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB2D
+ goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS_2, AbandonedShip_CaptainsOffice_EventScript_15EB2D
msgbox AbandonedShip_CaptainsOffice_Text_198C85, 4
release
end
diff --git a/data/scripts/maps/AbandonedShip_Corridors_B1F.inc b/data/scripts/maps/AbandonedShip_Corridors_B1F.inc
index b4d29632e..c34f2c28b 100644
--- a/data/scripts/maps/AbandonedShip_Corridors_B1F.inc
+++ b/data/scripts/maps/AbandonedShip_Corridors_B1F.inc
@@ -8,10 +8,8 @@ AbandonedShip_Corridors_B1F_MapScript1_15E99A:: @ 815E99A
end
AbandonedShip_Corridors_B1F_MapScript1_15E9A3:: @ 815E9A3
- checkflag FLAG_USED_STORAGE_KEY
- call_if 0, AbandonedShip_Corridors_B1F_EventScript_15E9B6
- checkflag FLAG_USED_STORAGE_KEY
- call_if 1, AbandonedShip_Corridors_B1F_EventScript_15E9C0
+ call_if_unset FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15E9B6
+ call_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15E9C0
end
AbandonedShip_Corridors_B1F_EventScript_15E9B6:: @ 815E9B6
@@ -28,8 +26,7 @@ AbandonedShip_Corridors_B1F_EventScript_15E9CA:: @ 815E9CA
AbandonedShip_Corridors_B1F_EventScript_15E9D3:: @ 815E9D3
lockall
- checkflag FLAG_USED_STORAGE_KEY
- goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA14
+ goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15EA14
checkitem ITEM_STORAGE_KEY, 1
compare RESULT, 0
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA0A
diff --git a/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc b/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc
index 7b61190e5..e8e48a6f6 100644
--- a/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc
+++ b/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc
@@ -8,22 +8,14 @@ AbandonedShip_HiddenFloorCorridors_MapScript1_15EB51:: @ 815EB51
end
AbandonedShip_HiddenFloorCorridors_MapScript1_15EB5A:: @ 815EB5A
- checkflag FLAG_USED_ROOM_1_KEY
- call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBCB
- checkflag FLAG_USED_ROOM_2_KEY
- call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBD5
- checkflag FLAG_USED_ROOM_4_KEY
- call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBDF
- checkflag FLAG_USED_ROOM_6_KEY
- call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9
- checkflag FLAG_USED_ROOM_1_KEY
- call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3
- checkflag FLAG_USED_ROOM_2_KEY
- call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD
- checkflag FLAG_USED_ROOM_4_KEY
- call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7
- checkflag FLAG_USED_ROOM_6_KEY
- call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1
+ call_if_unset FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBCB
+ call_if_unset FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBD5
+ call_if_unset FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBDF
+ call_if_unset FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9
+ call_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3
+ call_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD
+ call_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7
+ call_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1
end
AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3:: @ 815EBA3
@@ -60,8 +52,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9:: @ 815EBE9
AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3
lockall
- checkflag FLAG_USED_ROOM_1_KEY
- goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
+ goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_1_KEY, 1
compare RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECCF
@@ -76,8 +67,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3
AbandonedShip_HiddenFloorCorridors_EventScript_15EC2A:: @ 815EC2A
lockall
- checkflag FLAG_USED_ROOM_2_KEY
- goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
+ goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_2_KEY, 1
compare RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECD9
@@ -92,8 +82,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC2A:: @ 815EC2A
AbandonedShip_HiddenFloorCorridors_EventScript_15EC61:: @ 815EC61
lockall
- checkflag FLAG_USED_ROOM_4_KEY
- goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
+ goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_4_KEY, 1
compare RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECE3
@@ -108,8 +97,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC61:: @ 815EC61
AbandonedShip_HiddenFloorCorridors_EventScript_15EC98:: @ 815EC98
lockall
- checkflag FLAG_USED_ROOM_6_KEY
- goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
+ goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7
checkitem ITEM_ROOM_6_KEY, 1
compare RESULT, 0
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECED
diff --git a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc
index 9ad419da1..7f9b06500 100644
--- a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc
+++ b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc
@@ -11,11 +11,11 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED11:: @ 815ED11
getplayerxy VAR_TEMP_2, VAR_TEMP_3
setvar VAR_TEMP_4, 1
compare VAR_TEMP_2, 21
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED89
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15ED89
compare VAR_TEMP_2, 36
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED8F
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15ED8F
compare VAR_TEMP_3, 2
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED95
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15ED95
switch VAR_TEMP_4
case 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED9B
case 2, AbandonedShip_HiddenFloorRooms_EventScript_15EDC4
@@ -45,7 +45,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED9B:: @ 815ED9B
dofieldeffect 54
specialvar RESULT, FoundAbandonedShipRoom4Key
compare RESULT, 0
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE8B
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE8B
waitfieldeffect 54
delay 10
end
@@ -59,7 +59,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDC5:: @ 815EDC5
goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EDEA
delay 20
compare RESULT, 0
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE6B
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE6B
waitfieldeffect 54
delay 10
end
@@ -79,7 +79,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EDEB:: @ 815EDEB
dofieldeffect 54
specialvar RESULT, FoundAbandonedShipRoom6Key
compare RESULT, 0
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE9B
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE9B
waitfieldeffect 54
delay 10
end
@@ -100,7 +100,7 @@ AbandonedShip_HiddenFloorRooms_EventScript_15EE23:: @ 815EE23
dofieldeffect 54
specialvar RESULT, FoundAbandonedShipRoom2Key
compare RESULT, 0
- call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE7B
+ call_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EE7B
waitfieldeffect 54
delay 10
end
diff --git a/data/scripts/maps/AncientTomb.inc b/data/scripts/maps/AncientTomb.inc
index b849f41ba..8ff39c0a4 100644
--- a/data/scripts/maps/AncientTomb.inc
+++ b/data/scripts/maps/AncientTomb.inc
@@ -5,8 +5,7 @@ AncientTomb_MapScripts:: @ 815EFBE
.byte 0
AncientTomb_MapScript1_15EFCE:: @ 815EFCE
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, AncientTomb_EventScript_15EFD8
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AncientTomb_EventScript_15EFD8
end
AncientTomb_EventScript_15EFD8:: @ 815EFD8
@@ -18,8 +17,7 @@ AncientTomb_MapScript1_15EFDC:: @ 815EFDC
end
AncientTomb_MapScript1_15EFE0:: @ 815EFE0
- checkflag FLAG_SYS_BRAILLE_FLY
- call_if 0, AncientTomb_EventScript_15EFEA
+ call_if_unset FLAG_SYS_BRAILLE_FLY, AncientTomb_EventScript_15EFEA
end
AncientTomb_EventScript_15EFEA:: @ 815EFEA
@@ -33,8 +31,7 @@ AncientTomb_EventScript_15EFEA:: @ 815EFEA
AncientTomb_EventScript_15F021:: @ 815F021
lockall
- checkflag FLAG_SYS_BRAILLE_FLY
- goto_if_eq AncientTomb_EventScript_15F038
+ goto_if_set FLAG_SYS_BRAILLE_FLY, AncientTomb_EventScript_15F038
braillemessage AncientTomb_Braille_1C552E
waitbuttonpress
erasebox 0, 0, 29, 19
diff --git a/data/scripts/maps/AquaHideout_1F.inc b/data/scripts/maps/AquaHideout_1F.inc
index 028a0ee7b..ee49ba695 100644
--- a/data/scripts/maps/AquaHideout_1F.inc
+++ b/data/scripts/maps/AquaHideout_1F.inc
@@ -10,8 +10,7 @@ AquaHideout_1F_EventScript_15D7CE:: @ 815D7CE
MagmaHideout_1F_EventScript_15D7CE:: @ 815D7CE
lock
faceplayer
- checkflag FLAG_MT_PYRE_ORB_STOLEN
- goto_if_eq AquaHideout_1F_EventScript_15D7E3
+ goto_if_set FLAG_MT_PYRE_ORB_STOLEN, AquaHideout_1F_EventScript_15D7E3
msgbox AquaHideout_1F_Text_196AFD, 4
release
end
@@ -25,8 +24,7 @@ AquaHideout_1F_EventScript_15D7ED:: @ 815D7ED
MagmaHideout_1F_EventScript_15D7ED:: @ 815D7ED
lock
faceplayer
- checkflag FLAG_MT_PYRE_ORB_STOLEN
- goto_if_eq AquaHideout_1F_EventScript_15D802
+ goto_if_set FLAG_MT_PYRE_ORB_STOLEN, AquaHideout_1F_EventScript_15D802
msgbox AquaHideout_1F_Text_196C83, 4
release
end
diff --git a/data/scripts/maps/AquaHideout_B1F.inc b/data/scripts/maps/AquaHideout_B1F.inc
index 82d0c10c5..3be8d487d 100644
--- a/data/scripts/maps/AquaHideout_B1F.inc
+++ b/data/scripts/maps/AquaHideout_B1F.inc
@@ -4,8 +4,7 @@ AquaHideout_B1F_MapScripts:: @ 815D831
.byte 0
AquaHideout_B1F_MapScript1_15D83C:: @ 815D83C
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, AquaHideout_B1F_EventScript_15D846
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, AquaHideout_B1F_EventScript_15D846
end
AquaHideout_B1F_EventScript_15D846:: @ 815D846
diff --git a/data/scripts/maps/BattleTower_Lobby.inc b/data/scripts/maps/BattleTower_Lobby.inc
index 14b85c5b0..57eb62dfe 100644
--- a/data/scripts/maps/BattleTower_Lobby.inc
+++ b/data/scripts/maps/BattleTower_Lobby.inc
@@ -13,13 +13,11 @@ BattleTower_Lobby_MapScript1_160293:: @ 8160293
BattleTower_Lobby_EventScript_16029C:: @ 816029C
setvar VAR_SPECIAL_4, 10
special SetBattleTowerProperty
- checkflag FLAG_RECEIVED_GOLD_SHIELD
- goto_if_eq BattleTower_Lobby_EventScript_1602E4
- checkflag FLAG_RECEIVED_SILVER_SHIELD
- goto_if_eq BattleTower_Lobby_EventScript_1602CD
+ 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
- goto_if 0, BattleTower_Lobby_EventScript_1602E4
+ goto_if_lt BattleTower_Lobby_EventScript_1602E4
clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER
special sub_810F8FC
return
@@ -27,7 +25,7 @@ BattleTower_Lobby_EventScript_16029C:: @ 816029C
BattleTower_Lobby_EventScript_1602CD:: @ 81602CD
specialvar VAR_SPECIAL_7, GetBestBattleTowerStreak
compare VAR_SPECIAL_7, 100
- goto_if 0, BattleTower_Lobby_EventScript_1602E4
+ goto_if_lt BattleTower_Lobby_EventScript_1602E4
clearflag FLAG_HIDE_AWARD_MAN_BATTLE_TOWER
special sub_810F8FC
return
@@ -119,7 +117,7 @@ BattleTower_Lobby_EventScript_1603AD:: @ 81603AD
setvar VAR_SPECIAL_4, 9
special BattleTowerUtil
compare RESULT, 49
- goto_if 5, BattleTower_Lobby_EventScript_1603F8
+ goto_if_ne BattleTower_Lobby_EventScript_1603F8
msgbox BattleTower_Lobby_Text_19A617, 4
BattleTower_Lobby_EventScript_1603F8:: @ 81603F8
@@ -387,10 +385,8 @@ BattleTower_Lobby_EventScript_160727:: @ 8160727
BattleTower_Lobby_EventScript_160733:: @ 8160733
lock
faceplayer
- checkflag FLAG_RECEIVED_GOLD_SHIELD
- goto_if_eq BattleTower_Lobby_EventScript_1607C5
- checkflag FLAG_RECEIVED_SILVER_SHIELD
- goto_if_eq BattleTower_Lobby_EventScript_160773
+ 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
givedecoration_std DECOR_SILVER_SHIELD
@@ -404,7 +400,7 @@ BattleTower_Lobby_EventScript_160733:: @ 8160733
BattleTower_Lobby_EventScript_160773:: @ 8160773
specialvar RESULT, GetBestBattleTowerStreak
compare RESULT, 100
- goto_if 0, BattleTower_Lobby_EventScript_1607C5
+ goto_if_lt BattleTower_Lobby_EventScript_1607C5
msgbox BattleTower_Lobby_Text_19AAC4, 4
setvar VAR_SPECIAL_8, DECOR_GOLD_SHIELD
givedecoration_std DECOR_GOLD_SHIELD
diff --git a/data/scripts/maps/CaveOfOrigin_1F.inc b/data/scripts/maps/CaveOfOrigin_1F.inc
index 6411aad49..58c6563f6 100644
--- a/data/scripts/maps/CaveOfOrigin_1F.inc
+++ b/data/scripts/maps/CaveOfOrigin_1F.inc
@@ -3,6 +3,5 @@ CaveOfOrigin_1F_MapScripts:: @ 815DD6C
.byte 0
CaveOfOrigin_1F_MapScript1_15DD72:: @ 815DD72
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, CaveOfOrigin_1F_EventScript_1A04E3
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, CaveOfOrigin_1F_EventScript_1A04E3
end
diff --git a/data/scripts/maps/CaveOfOrigin_B1F.inc b/data/scripts/maps/CaveOfOrigin_B1F.inc
index b8d4149b6..c79eb088e 100644
--- a/data/scripts/maps/CaveOfOrigin_B1F.inc
+++ b/data/scripts/maps/CaveOfOrigin_B1F.inc
@@ -3,6 +3,5 @@ CaveOfOrigin_B1F_MapScripts:: @ 815DD7C
.byte 0
CaveOfOrigin_B1F_MapScript1_15DD82:: @ 815DD82
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, CaveOfOrigin_B1F_EventScript_1A04E3
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, CaveOfOrigin_B1F_EventScript_1A04E3
end
diff --git a/data/scripts/maps/CaveOfOrigin_B2F.inc b/data/scripts/maps/CaveOfOrigin_B2F.inc
index 9b014d0e9..66b02ee9f 100644
--- a/data/scripts/maps/CaveOfOrigin_B2F.inc
+++ b/data/scripts/maps/CaveOfOrigin_B2F.inc
@@ -3,6 +3,5 @@ CaveOfOrigin_B2F_MapScripts:: @ 815DD8C
.byte 0
CaveOfOrigin_B2F_MapScript1_15DD92:: @ 815DD92
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, CaveOfOrigin_B2F_EventScript_1A04E3
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, CaveOfOrigin_B2F_EventScript_1A04E3
end
diff --git a/data/scripts/maps/CaveOfOrigin_B3F.inc b/data/scripts/maps/CaveOfOrigin_B3F.inc
index d6f7bdaf1..8084ceb43 100644
--- a/data/scripts/maps/CaveOfOrigin_B3F.inc
+++ b/data/scripts/maps/CaveOfOrigin_B3F.inc
@@ -3,6 +3,5 @@ CaveOfOrigin_B3F_MapScripts:: @ 815DD9C
.byte 0
CaveOfOrigin_B3F_MapScript1_15DDA2:: @ 815DDA2
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, CaveOfOrigin_B3F_EventScript_1A04E3
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, CaveOfOrigin_B3F_EventScript_1A04E3
end
diff --git a/data/scripts/maps/CaveOfOrigin_B4F.inc b/data/scripts/maps/CaveOfOrigin_B4F.inc
index 315dda886..aa79e1213 100644
--- a/data/scripts/maps/CaveOfOrigin_B4F.inc
+++ b/data/scripts/maps/CaveOfOrigin_B4F.inc
@@ -4,8 +4,7 @@ CaveOfOrigin_B4F_MapScripts:: @ 815DDAC
.byte 0
CaveOfOrigin_B4F_MapScript1_15DDB7:: @ 815DDB7
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, CaveOfOrigin_B4F_EventScript_15DDC1
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, CaveOfOrigin_B4F_EventScript_15DDC1
end
CaveOfOrigin_B4F_EventScript_15DDC1:: @ 815DDC1
@@ -19,8 +18,7 @@ CaveOfOrigin_B4F_MapScript1_15DDC5:: @ 815DDC5
setmaplayoutindex 313
.endif
call CaveOfOrigin_B4F_EventScript_1A01B5
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, CaveOfOrigin_B4F_EventScript_1A04E3
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, CaveOfOrigin_B4F_EventScript_1A04E3
end
CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7
@@ -67,7 +65,7 @@ CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7
clearflag FLAG_SYS_CTRL_OBJ_DELETE
specialvar RESULT, GetBattleOutcome
compare RESULT, 1
- call_if 1, CaveOfOrigin_B4F_EventScript_15DE73
+ call_if_eq CaveOfOrigin_B4F_EventScript_15DE73
setflag FLAG_HIDE_WALLACE_SOOTOPOLIS
setflag FLAG_HIDE_CAVE_OF_ORIGIN_ENTRANCE_WOMAN_1
setflag FLAG_HIDE_CAVE_OF_ORIGIN_ENTRANCE_WOMAN_2
diff --git a/data/scripts/maps/DesertRuins.inc b/data/scripts/maps/DesertRuins.inc
index 7aa56a82d..2627a8261 100644
--- a/data/scripts/maps/DesertRuins.inc
+++ b/data/scripts/maps/DesertRuins.inc
@@ -5,8 +5,7 @@ DesertRuins_MapScripts:: @ 815CAF3
.byte 0
DesertRuins_MapScript1_15CB03:: @ 815CB03
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, DesertRuins_EventScript_15CB0D
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, DesertRuins_EventScript_15CB0D
end
DesertRuins_EventScript_15CB0D:: @ 815CB0D
@@ -14,8 +13,7 @@ DesertRuins_EventScript_15CB0D:: @ 815CB0D
return
DesertRuins_MapScript1_15CB11:: @ 815CB11
- checkflag FLAG_SYS_BRAILLE_STRENGTH
- call_if 0, DesertRuins_EventScript_15CB1B
+ call_if_unset FLAG_SYS_BRAILLE_STRENGTH, DesertRuins_EventScript_15CB1B
end
DesertRuins_EventScript_15CB1B:: @ 815CB1B
@@ -33,8 +31,7 @@ DesertRuins_MapScript1_15CB52:: @ 815CB52
DesertRuins_EventScript_15CB56:: @ 815CB56
lockall
- checkflag FLAG_SYS_BRAILLE_STRENGTH
- goto_if_eq DesertRuins_EventScript_15CB6D
+ goto_if_set FLAG_SYS_BRAILLE_STRENGTH, DesertRuins_EventScript_15CB6D
braillemessage DesertRuins_Braille_1C54C8
waitbuttonpress
erasebox 0, 0, 29, 19
diff --git a/data/scripts/maps/DewfordTown.inc b/data/scripts/maps/DewfordTown.inc
index 50c9d8991..e7aeccbd0 100644
--- a/data/scripts/maps/DewfordTown.inc
+++ b/data/scripts/maps/DewfordTown.inc
@@ -9,8 +9,7 @@ DewfordTown_MapScript1_14DFFE:: @ 814DFFE
DewfordTown_EventScript_14E002:: @ 814E002
lock
faceplayer
- checkflag FLAG_DELIVERED_STEVEN_LETTER
- goto_if 0, DewfordTown_EventScript_14E076
+ goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, DewfordTown_EventScript_14E076
message DewfordTown_Text_16B522
waitmessage
multichoicedefault 21, 6, 0, 2, 0
@@ -74,8 +73,7 @@ DewfordTown_EventScript_14E0BD:: @ 814E0BD
DewfordTown_EventScript_14E0C6:: @ 814E0C6
lock
faceplayer
- checkflag FLAG_RECEIVED_OLD_ROD
- goto_if_eq DewfordTown_EventScript_14E11B
+ goto_if_set FLAG_RECEIVED_OLD_ROD, DewfordTown_EventScript_14E11B
msgbox DewfordTown_Text_16B665, MSGBOX_YESNO
compare RESULT, YES
goto_if_eq DewfordTown_EventScript_14E0F0
@@ -176,10 +174,8 @@ DewfordTown_EventScript_14E1D8:: @ 814E1D8
clearflag FLAG_HIDE_MR_BRINEY_BOAT_ROUTE109
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD
hideobjectat 4, MAP_DEWFORD_TOWN
- checkflag FLAG_DELIVERED_DEVON_GOODS
- call_if 0, DewfordTown_EventScript_14E281
- checkflag FLAG_DELIVERED_DEVON_GOODS
- call_if 1, DewfordTown_EventScript_14E28A
+ 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
resetobjectpriority 255, MAP_DEWFORD_TOWN
diff --git a/data/scripts/maps/DewfordTown_Gym.inc b/data/scripts/maps/DewfordTown_Gym.inc
index ba933dbe9..2dc15d92c 100644
--- a/data/scripts/maps/DewfordTown_Gym.inc
+++ b/data/scripts/maps/DewfordTown_Gym.inc
@@ -82,17 +82,17 @@ DewfordTown_Gym_EventScript_153117:: @ 8153117
DewfordTown_Gym_EventScript_153122:: @ 8153122
setvar VAR_SPECIAL_0, 0
checktrainerflag OPPONENT_HIDEKI
- goto_if 0, DewfordTown_Gym_EventScript_153135
+ goto_if_lt DewfordTown_Gym_EventScript_153135
addvar VAR_SPECIAL_0, 1
DewfordTown_Gym_EventScript_153135:: @ 8153135
checktrainerflag OPPONENT_TESSA
- goto_if 0, DewfordTown_Gym_EventScript_153143
+ goto_if_lt DewfordTown_Gym_EventScript_153143
addvar VAR_SPECIAL_0, 1
DewfordTown_Gym_EventScript_153143:: @ 8153143
checktrainerflag OPPONENT_LAURA
- goto_if 0, DewfordTown_Gym_EventScript_153151
+ goto_if_lt DewfordTown_Gym_EventScript_153151
addvar VAR_SPECIAL_0, 1
DewfordTown_Gym_EventScript_153151:: @ 8153151
@@ -100,8 +100,7 @@ DewfordTown_Gym_EventScript_153151:: @ 8153151
DewfordTown_Gym_EventScript_153152:: @ 8153152
trainerbattle 1, OPPONENT_BRAWLY, 0, DewfordTown_Gym_Text_175182, DewfordTown_Gym_Text_175246, DewfordTown_Gym_EventScript_153177
- checkflag FLAG_RECEIVED_TM08
- goto_if 0, DewfordTown_Gym_EventScript_1531B5
+ goto_if_unset FLAG_RECEIVED_TM08, DewfordTown_Gym_EventScript_1531B5
msgbox DewfordTown_Gym_Text_175412, 4
release
end
@@ -116,7 +115,7 @@ DewfordTown_Gym_EventScript_153177:: @ 8153177
setflag FLAG_BADGE02_GET
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
- call_if 1, DewfordTown_Gym_EventScript_1A00FB
+ call_if_eq DewfordTown_Gym_EventScript_1A00FB
setvar VAR_SPECIAL_8, 2
call DewfordTown_Gym_EventScript_1A01C0
goto DewfordTown_Gym_EventScript_1531B5
@@ -164,8 +163,7 @@ DewfordTown_Gym_EventScript_153238:: @ 8153238
DewfordTown_Gym_EventScript_15323F:: @ 815323F
lock
faceplayer
- checkflag FLAG_DEFEATED_DEWFORD_GYM
- goto_if_eq DewfordTown_Gym_EventScript_153254
+ goto_if_set FLAG_DEFEATED_DEWFORD_GYM, DewfordTown_Gym_EventScript_153254
msgbox DewfordTown_Gym_Text_174D98, 4
release
end
@@ -177,15 +175,13 @@ DewfordTown_Gym_EventScript_153254:: @ 8153254
DewfordTown_Gym_EventScript_15325E:: @ 815325E
lockall
- checkflag FLAG_BADGE02_GET
- goto_if_eq DewfordTown_Gym_EventScript_15327E
+ goto_if_set FLAG_BADGE02_GET, DewfordTown_Gym_EventScript_15327E
goto DewfordTown_Gym_EventScript_153288
end
DewfordTown_Gym_EventScript_15326E:: @ 815326E
lockall
- checkflag FLAG_BADGE02_GET
- goto_if_eq DewfordTown_Gym_EventScript_15327E
+ goto_if_set FLAG_BADGE02_GET, DewfordTown_Gym_EventScript_15327E
goto DewfordTown_Gym_EventScript_153288
end
diff --git a/data/scripts/maps/DewfordTown_Hall.inc b/data/scripts/maps/DewfordTown_Hall.inc
index c4ccc769c..84334068e 100644
--- a/data/scripts/maps/DewfordTown_Hall.inc
+++ b/data/scripts/maps/DewfordTown_Hall.inc
@@ -218,9 +218,9 @@ DewfordTown_Hall_EventScript_153535:: @ 8153535
DewfordTown_Hall_EventScript_153556:: @ 8153556
compare FACING, 2
- call_if 1, DewfordTown_Hall_EventScript_15356D
+ call_if_eq DewfordTown_Hall_EventScript_15356D
compare FACING, 1
- call_if 1, DewfordTown_Hall_EventScript_153578
+ call_if_eq DewfordTown_Hall_EventScript_153578
return
DewfordTown_Hall_EventScript_15356D:: @ 815356D
@@ -252,8 +252,7 @@ DewfordTown_Hall_EventScript_15359D:: @ 815359D
lock
faceplayer
call DewfordTown_Hall_EventScript_1A0102
- checkflag FLAG_RECEIVED_TM36
- goto_if_eq DewfordTown_Hall_EventScript_1535D1
+ goto_if_set FLAG_RECEIVED_TM36, DewfordTown_Hall_EventScript_1535D1
msgbox DewfordTown_Hall_Text_175E13, 4
giveitem_std ITEM_TM36
compare RESULT, 0
diff --git a/data/scripts/maps/DewfordTown_House2.inc b/data/scripts/maps/DewfordTown_House2.inc
index e704efa50..a2341bc76 100644
--- a/data/scripts/maps/DewfordTown_House2.inc
+++ b/data/scripts/maps/DewfordTown_House2.inc
@@ -4,8 +4,7 @@ DewfordTown_House2_MapScripts:: @ 81535DB
DewfordTown_House2_EventScript_1535DC:: @ 81535DC
lock
faceplayer
- checkflag FLAG_RECEIVED_SILK_SCARF
- goto_if_eq DewfordTown_House2_EventScript_153615
+ 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
diff --git a/data/scripts/maps/EverGrandeCity.inc b/data/scripts/maps/EverGrandeCity.inc
index 9a1bd9fa7..293780716 100644
--- a/data/scripts/maps/EverGrandeCity.inc
+++ b/data/scripts/maps/EverGrandeCity.inc
@@ -3,8 +3,7 @@ EverGrandeCity_MapScripts:: @ 814D4D5
.byte 0
EverGrandeCity_MapScript1_14D4DB:: @ 814D4DB
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, EverGrandeCity_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, EverGrandeCity_EventScript_1A02C1
end
EverGrandeCity_EventScript_14D4E5:: @ 814D4E5
diff --git a/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc b/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc
index 29c29c80b..78009271b 100644
--- a/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc
+++ b/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc
@@ -54,9 +54,9 @@ EverGrandeCity_ChampionsRoom_EventScript_15B821:: @ 815B821
playse SE_DOOR
checkplayergender
compare RESULT, 0
- call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B87C
+ call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B87C
compare RESULT, 1
- call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B881
+ call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B881
addobject 2
call EverGrandeCity_ChampionsRoom_EventScript_15B9BD
checkplayergender
@@ -129,9 +129,9 @@ EverGrandeCity_ChampionsRoom_EventScript_15B8F0:: @ 815B8F0
msgbox EverGrandeCity_ChampionsRoom_Text_191546, 4
checkplayergender
compare RESULT, 0
- call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B9AB
+ call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B9AB
compare RESULT, 1
- call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B9B4
+ call_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B9B4
closemessage
applymovement 1, EverGrandeCity_ChampionsRoom_Movement_15B9FF
applymovement 255, EverGrandeCity_ChampionsRoom_Movement_15B9E0
diff --git a/data/scripts/maps/EverGrandeCity_DrakesRoom.inc b/data/scripts/maps/EverGrandeCity_DrakesRoom.inc
index a738264fe..8eb7bbc45 100644
--- a/data/scripts/maps/EverGrandeCity_DrakesRoom.inc
+++ b/data/scripts/maps/EverGrandeCity_DrakesRoom.inc
@@ -24,10 +24,9 @@ EverGrandeCity_DrakesRoom_EventScript_15B736:: @ 815B736
end
EverGrandeCity_DrakesRoom_MapScript1_15B743:: @ 815B743
- checkflag FLAG_DEFEATED_ELITE_4_DRAKE
- call_if 1, EverGrandeCity_DrakesRoom_EventScript_15B758
+ call_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_15B758
compare VAR_ELITE_4_STATE, 4
- call_if 1, EverGrandeCity_DrakesRoom_EventScript_15B75E
+ call_if_eq EverGrandeCity_DrakesRoom_EventScript_15B75E
end
EverGrandeCity_DrakesRoom_EventScript_15B758:: @ 815B758
@@ -41,8 +40,7 @@ EverGrandeCity_DrakesRoom_EventScript_15B75E:: @ 815B75E
EverGrandeCity_DrakesRoom_EventScript_15B764:: @ 815B764
lock
faceplayer
- checkflag FLAG_DEFEATED_ELITE_4_DRAKE
- goto_if_eq EverGrandeCity_DrakesRoom_EventScript_15B78B
+ goto_if_set FLAG_DEFEATED_ELITE_4_DRAKE, EverGrandeCity_DrakesRoom_EventScript_15B78B
playbgm BGM_SITENNOU, FALSE
msgbox EverGrandeCity_DrakesRoom_Text_190CEB, 4
trainerbattle 3, OPPONENT_DRAKE, 0, EverGrandeCity_DrakesRoom_Text_190E42
diff --git a/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc b/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc
index e3a4145d6..a72b84440 100644
--- a/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc
+++ b/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc
@@ -24,10 +24,9 @@ EverGrandeCity_GlaciasRoom_EventScript_15B69C:: @ 815B69C
end
EverGrandeCity_GlaciasRoom_MapScript1_15B6A9:: @ 815B6A9
- checkflag FLAG_DEFEATED_ELITE_4_GLACIA
- call_if 1, EverGrandeCity_GlaciasRoom_EventScript_15B6BE
+ call_if_set FLAG_DEFEATED_ELITE_4_GLACIA, EverGrandeCity_GlaciasRoom_EventScript_15B6BE
compare VAR_ELITE_4_STATE, 3
- call_if 1, EverGrandeCity_GlaciasRoom_EventScript_15B6C4
+ call_if_eq EverGrandeCity_GlaciasRoom_EventScript_15B6C4
end
EverGrandeCity_GlaciasRoom_EventScript_15B6BE:: @ 815B6BE
@@ -41,8 +40,7 @@ EverGrandeCity_GlaciasRoom_EventScript_15B6C4:: @ 815B6C4
EverGrandeCity_GlaciasRoom_EventScript_15B6CA:: @ 815B6CA
lock
faceplayer
- checkflag FLAG_DEFEATED_ELITE_4_GLACIA
- goto_if_eq EverGrandeCity_GlaciasRoom_EventScript_15B6F1
+ goto_if_set FLAG_DEFEATED_ELITE_4_GLACIA, EverGrandeCity_GlaciasRoom_EventScript_15B6F1
playbgm BGM_SITENNOU, FALSE
msgbox EverGrandeCity_GlaciasRoom_Text_190AF9, 4
trainerbattle 3, OPPONENT_GLACIA, 0, EverGrandeCity_GlaciasRoom_Text_190C01
diff --git a/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc b/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc
index d23f234db..2d09f1ebb 100644
--- a/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc
+++ b/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc
@@ -24,10 +24,9 @@ EverGrandeCity_PhoebesRoom_EventScript_15B602:: @ 815B602
end
EverGrandeCity_PhoebesRoom_MapScript1_15B60F:: @ 815B60F
- checkflag FLAG_DEFEATED_ELITE_4_PHOEBE
- call_if 1, EverGrandeCity_PhoebesRoom_EventScript_15B624
+ call_if_set FLAG_DEFEATED_ELITE_4_PHOEBE, EverGrandeCity_PhoebesRoom_EventScript_15B624
compare VAR_ELITE_4_STATE, 2
- call_if 1, EverGrandeCity_PhoebesRoom_EventScript_15B62A
+ call_if_eq EverGrandeCity_PhoebesRoom_EventScript_15B62A
end
EverGrandeCity_PhoebesRoom_EventScript_15B624:: @ 815B624
@@ -41,8 +40,7 @@ EverGrandeCity_PhoebesRoom_EventScript_15B62A:: @ 815B62A
EverGrandeCity_PhoebesRoom_EventScript_15B630:: @ 815B630
lock
faceplayer
- checkflag FLAG_DEFEATED_ELITE_4_PHOEBE
- goto_if_eq EverGrandeCity_PhoebesRoom_EventScript_15B657
+ goto_if_set FLAG_DEFEATED_ELITE_4_PHOEBE, EverGrandeCity_PhoebesRoom_EventScript_15B657
playbgm BGM_SITENNOU, FALSE
msgbox EverGrandeCity_PhoebesRoom_Text_1908F5, 4
trainerbattle 3, OPPONENT_PHOEBE, 0, EverGrandeCity_PhoebesRoom_Text_190A0C
diff --git a/data/scripts/maps/EverGrandeCity_PokemonLeague.inc b/data/scripts/maps/EverGrandeCity_PokemonLeague.inc
index a787b0f90..a8eb820ea 100644
--- a/data/scripts/maps/EverGrandeCity_PokemonLeague.inc
+++ b/data/scripts/maps/EverGrandeCity_PokemonLeague.inc
@@ -5,8 +5,7 @@ EverGrandeCity_PokemonLeague_MapScripts:: @ 815BA75
EverGrandeCity_PokemonLeague_MapScript1_15BA7B:: @ 815BA7B
setrespawn 20
setflag FLAG_SYS_POKEMON_LEAGUE_FLY
- checkflag FLAG_ENTERED_ELITE_FOUR
- call_if 0, EverGrandeCity_PokemonLeague_EventScript_15BA8B
+ call_if_unset FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_EventScript_15BA8B
end
EverGrandeCity_PokemonLeague_EventScript_15BA8B:: @ 815BA8B
@@ -47,18 +46,16 @@ EverGrandeCity_PokemonLeague_Items:: @ 815BAC0
EverGrandeCity_PokemonLeague_EventScript_15BAD2:: @ 815BAD2
lockall
- checkflag FLAG_ENTERED_ELITE_FOUR
- goto_if_eq EverGrandeCity_PokemonLeague_EventScript_15BB57
+ goto_if_set FLAG_ENTERED_ELITE_FOUR, EverGrandeCity_PokemonLeague_EventScript_15BB57
getplayerxy VAR_TEMP_0, VAR_TEMP_1
compare VAR_TEMP_0, 11
- call_if 4, EverGrandeCity_PokemonLeague_EventScript_15BB34
+ call_if_ge EverGrandeCity_PokemonLeague_EventScript_15BB34
compare VAR_TEMP_0, 8
- call_if 3, EverGrandeCity_PokemonLeague_EventScript_15BB3F
+ call_if_le EverGrandeCity_PokemonLeague_EventScript_15BB3F
message EverGrandeCity_PokemonLeague_Text_1916FD
waitmessage
delay 75
- checkflag FLAG_BADGE06_GET
- goto_if 0, EverGrandeCity_PokemonLeague_EventScript_15BB4A
+ goto_if_unset FLAG_BADGE06_GET, EverGrandeCity_PokemonLeague_EventScript_15BB4A
closemessage
applymovement 3, EverGrandeCity_PokemonLeague_Movement_15BB7E
applymovement 4, EverGrandeCity_PokemonLeague_Movement_15BB81
diff --git a/data/scripts/maps/EverGrandeCity_SidneysRoom.inc b/data/scripts/maps/EverGrandeCity_SidneysRoom.inc
index 4531845ab..45a729c0a 100644
--- a/data/scripts/maps/EverGrandeCity_SidneysRoom.inc
+++ b/data/scripts/maps/EverGrandeCity_SidneysRoom.inc
@@ -5,10 +5,9 @@ EverGrandeCity_SidneysRoom_MapScripts:: @ 815B53F
.byte 0
EverGrandeCity_SidneysRoom_MapScript1_15B54F:: @ 815B54F
- checkflag FLAG_DEFEATED_ELITE_4_SYDNEY
- call_if 1, EverGrandeCity_SidneysRoom_EventScript_15B564
+ call_if_set FLAG_DEFEATED_ELITE_4_SYDNEY, EverGrandeCity_SidneysRoom_EventScript_15B564
compare VAR_ELITE_4_STATE, 1
- call_if 1, EverGrandeCity_SidneysRoom_EventScript_15B56A
+ call_if_eq EverGrandeCity_SidneysRoom_EventScript_15B56A
end
EverGrandeCity_SidneysRoom_EventScript_15B564:: @ 815B564
@@ -42,8 +41,7 @@ EverGrandeCity_SidneysRoom_EventScript_15B589:: @ 815B589
EverGrandeCity_SidneysRoom_EventScript_15B596:: @ 815B596
lock
faceplayer
- checkflag FLAG_DEFEATED_ELITE_4_SYDNEY
- goto_if_eq EverGrandeCity_SidneysRoom_EventScript_15B5BD
+ goto_if_set FLAG_DEFEATED_ELITE_4_SYDNEY, EverGrandeCity_SidneysRoom_EventScript_15B5BD
playbgm BGM_SITENNOU, FALSE
msgbox EverGrandeCity_SidneysRoom_Text_190728, 4
trainerbattle 3, OPPONENT_SIDNEY, 0, EverGrandeCity_SidneysRoom_Text_190823
diff --git a/data/scripts/maps/FallarborTown.inc b/data/scripts/maps/FallarborTown.inc
index 23295f778..a168a0ef5 100644
--- a/data/scripts/maps/FallarborTown.inc
+++ b/data/scripts/maps/FallarborTown.inc
@@ -12,8 +12,7 @@ FallarborTown_MapScript1_14E7E6:: @ 814E7E6
FallarborTown_EventScript_14E7F5:: @ 814E7F5
lock
faceplayer
- checkflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY
- goto_if_eq FallarborTown_EventScript_14E80A
+ goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_EventScript_14E80A
msgbox FallarborTown_Text_16C7FF, 4
release
end
diff --git a/data/scripts/maps/FallarborTown_ContestLobby.inc b/data/scripts/maps/FallarborTown_ContestLobby.inc
index 641a201e3..11dd6159e 100644
--- a/data/scripts/maps/FallarborTown_ContestLobby.inc
+++ b/data/scripts/maps/FallarborTown_ContestLobby.inc
@@ -92,8 +92,7 @@ FallarborTown_ContestLobby_EventScript_153A8E:: @ 8153A8E
end
FallarborTown_ContestLobby_EventScript_153A97:: @ 8153A97
- checkflag FLAG_CONTEST_SKETCH_CREATED
- goto_if_eq FallarborTown_ContestLobby_EventScript_153AA9
+ goto_if_set FLAG_CONTEST_SKETCH_CREATED, FallarborTown_ContestLobby_EventScript_153AA9
msgbox FallarborTown_ContestLobby_Text_177246, 2
end
diff --git a/data/scripts/maps/FallarborTown_House1.inc b/data/scripts/maps/FallarborTown_House1.inc
index d2b27f478..f62a2da37 100644
--- a/data/scripts/maps/FallarborTown_House1.inc
+++ b/data/scripts/maps/FallarborTown_House1.inc
@@ -8,8 +8,7 @@ FallarborTown_House1_MapScript1_153BB4:: @ 8153BB4
FallarborTown_House1_EventScript_153BB5:: @ 8153BB5
lock
faceplayer
- checkflag FLAG_RECEIVED_TM27
- goto_if_eq FallarborTown_House1_EventScript_153C54
+ goto_if_set FLAG_RECEIVED_TM27, FallarborTown_House1_EventScript_153C54
checkitem ITEM_METEORITE, 1
compare RESULT, 1
goto_if_eq FallarborTown_House1_EventScript_153BDA
@@ -18,10 +17,8 @@ FallarborTown_House1_EventScript_153BB5:: @ 8153BB5
end
FallarborTown_House1_EventScript_153BDA:: @ 8153BDA
- checkflag FLAG_TEMP_2
- call_if 0, FallarborTown_House1_EventScript_153C2D
- checkflag FLAG_TEMP_2
- call_if 1, FallarborTown_House1_EventScript_153C3E
+ call_if_unset FLAG_TEMP_2, FallarborTown_House1_EventScript_153C2D
+ call_if_set FLAG_TEMP_2, FallarborTown_House1_EventScript_153C3E
compare RESULT, NO
goto_if_eq FallarborTown_House1_EventScript_153C47
msgbox FallarborTown_House1_Text_1778C4, 4
@@ -58,10 +55,8 @@ FallarborTown_House1_EventScript_153C54:: @ 8153C54
FallarborTown_House1_EventScript_153C5E:: @ 8153C5E
lock
faceplayer
- checkflag FLAG_RECEIVED_TM27
- goto_if_eq FallarborTown_House1_EventScript_153C86
- checkflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY
- goto_if_eq FallarborTown_House1_EventScript_153C7C
+ goto_if_set FLAG_RECEIVED_TM27, FallarborTown_House1_EventScript_153C86
+ goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_House1_EventScript_153C7C
msgbox FallarborTown_House1_Text_177A2B, 4
release
end
diff --git a/data/scripts/maps/FallarborTown_House2.inc b/data/scripts/maps/FallarborTown_House2.inc
index 7ceaabdef..bb1656fc2 100644
--- a/data/scripts/maps/FallarborTown_House2.inc
+++ b/data/scripts/maps/FallarborTown_House2.inc
@@ -5,8 +5,7 @@ FallarborTown_House2_EventScript_153C91:: @ 8153C91
lockall
applymovement 1, FallarborTown_House2_Movement_1A0839
waitmovement 0
- checkflag FLAG_TEMP_1
- goto_if_eq FallarborTown_House2_EventScript_153CB6
+ goto_if_set FLAG_TEMP_1, FallarborTown_House2_EventScript_153CB6
msgbox FallarborTown_House2_Text_177AF4, 4
setflag FLAG_TEMP_1
goto FallarborTown_House2_EventScript_153CB6
diff --git a/data/scripts/maps/FortreeCity.inc b/data/scripts/maps/FortreeCity.inc
index 937b435a6..e576df5bd 100644
--- a/data/scripts/maps/FortreeCity.inc
+++ b/data/scripts/maps/FortreeCity.inc
@@ -18,8 +18,7 @@ FortreeCity_EventScript_14C955:: @ 814C955
FortreeCity_EventScript_14C95E:: @ 814C95E
lock
faceplayer
- checkflag FLAG_KECLEON_FLED_FORTREE
- goto_if_eq FortreeCity_EventScript_14C973
+ goto_if_set FLAG_KECLEON_FLED_FORTREE, FortreeCity_EventScript_14C973
msgbox FortreeCity_Text_1675C2, 4
release
end
diff --git a/data/scripts/maps/FortreeCity_Gym.inc b/data/scripts/maps/FortreeCity_Gym.inc
index 9217ba8f4..94df378f8 100644
--- a/data/scripts/maps/FortreeCity_Gym.inc
+++ b/data/scripts/maps/FortreeCity_Gym.inc
@@ -17,8 +17,7 @@ FortreeCity_Gym_EventScript_157EEC:: @ 8157EEC
FortreeCity_Gym_EventScript_157EF0:: @ 8157EF0
trainerbattle 1, OPPONENT_WINONA, 0, FortreeCity_Gym_Text_185CCB, FortreeCity_Gym_Text_185DBA, FortreeCity_Gym_EventScript_157F15
- checkflag FLAG_RECEIVED_TM40
- goto_if 0, FortreeCity_Gym_EventScript_157F3E
+ goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_157F3E
msgbox FortreeCity_Gym_Text_185F98, 4
release
end
@@ -67,8 +66,7 @@ FortreeCity_Gym_EventScript_157FA7:: @ 8157FA7
FortreeCity_Gym_EventScript_157FBE:: @ 8157FBE
lock
faceplayer
- checkflag FLAG_DEFEATED_FORTREE_GYM
- goto_if_eq FortreeCity_Gym_EventScript_157FD3
+ goto_if_set FLAG_DEFEATED_FORTREE_GYM, FortreeCity_Gym_EventScript_157FD3
msgbox FortreeCity_Gym_Text_18589C, 4
release
end
@@ -80,15 +78,13 @@ FortreeCity_Gym_EventScript_157FD3:: @ 8157FD3
FortreeCity_Gym_EventScript_157FDD:: @ 8157FDD
lockall
- checkflag FLAG_BADGE06_GET
- goto_if_eq FortreeCity_Gym_EventScript_157FFD
+ goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_157FFD
goto FortreeCity_Gym_EventScript_158007
end
FortreeCity_Gym_EventScript_157FED:: @ 8157FED
lockall
- checkflag FLAG_BADGE06_GET
- goto_if_eq FortreeCity_Gym_EventScript_157FFD
+ goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_157FFD
goto FortreeCity_Gym_EventScript_158007
end
diff --git a/data/scripts/maps/FortreeCity_House1.inc b/data/scripts/maps/FortreeCity_House1.inc
index b308aa836..443cc3a5c 100644
--- a/data/scripts/maps/FortreeCity_House1.inc
+++ b/data/scripts/maps/FortreeCity_House1.inc
@@ -4,8 +4,7 @@ FortreeCity_House1_MapScripts:: @ 8157E12
FortreeCity_House1_EventScript_157E13:: @ 8157E13
lock
faceplayer
- checkflag FLAG_FORTREE_NPC_TRADE_COMPLETED
- goto_if_eq FortreeCity_House1_EventScript_157EAD
+ 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
@@ -22,7 +21,7 @@ FortreeCity_House1_EventScript_157E13:: @ 8157E13
specialvar RESULT, GetTradeSpecies
copyvar VAR_SPECIAL_B, RESULT
compare RESULT, VAR_SPECIAL_9
- goto_if 5, FortreeCity_House1_EventScript_157E9F
+ goto_if_ne FortreeCity_House1_EventScript_157E9F
copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
special CreateInGameTradePokemon
diff --git a/data/scripts/maps/FortreeCity_House2.inc b/data/scripts/maps/FortreeCity_House2.inc
index ae70b8644..107c3708c 100644
--- a/data/scripts/maps/FortreeCity_House2.inc
+++ b/data/scripts/maps/FortreeCity_House2.inc
@@ -4,10 +4,8 @@ FortreeCity_House2_MapScripts:: @ 81580B3
FortreeCity_House2_EventScript_1580B4:: @ 81580B4
lock
faceplayer
- checkflag FLAG_RECEIVED_TM10
- goto_if_eq FortreeCity_House2_EventScript_158157
- checkflag FLAG_MET_HIDDEN_POWER_GIVER
- call_if 0, FortreeCity_House2_EventScript_15814B
+ goto_if_set FLAG_RECEIVED_TM10, FortreeCity_House2_EventScript_158157
+ 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
diff --git a/data/scripts/maps/FortreeCity_House4.inc b/data/scripts/maps/FortreeCity_House4.inc
index 1b1b41877..490ef0c9b 100644
--- a/data/scripts/maps/FortreeCity_House4.inc
+++ b/data/scripts/maps/FortreeCity_House4.inc
@@ -7,12 +7,9 @@ FortreeCity_House4_EventScript_15817F:: @ 815817F
FortreeCity_House4_EventScript_158188:: @ 8158188
lockall
- checkflag FLAG_RECEIVED_MENTAL_HERB
- goto_if_eq FortreeCity_House4_EventScript_158204
- checkflag FLAG_WINGULL_DELIVERED_MAIL
- goto_if_eq FortreeCity_House4_EventScript_1581D6
- checkflag FLAG_WINGULL_SENT_ON_ERRAND
- goto_if_eq FortreeCity_House4_EventScript_1581C2
+ goto_if_set FLAG_RECEIVED_MENTAL_HERB, FortreeCity_House4_EventScript_158204
+ goto_if_set FLAG_WINGULL_DELIVERED_MAIL, FortreeCity_House4_EventScript_1581D6
+ goto_if_set FLAG_WINGULL_SENT_ON_ERRAND, FortreeCity_House4_EventScript_1581C2
msgbox FortreeCity_House4_Text_186835, 4
closemessage
setflag FLAG_WINGULL_SENT_ON_ERRAND
diff --git a/data/scripts/maps/GraniteCave_1F.inc b/data/scripts/maps/GraniteCave_1F.inc
index 33296e510..7419b5866 100644
--- a/data/scripts/maps/GraniteCave_1F.inc
+++ b/data/scripts/maps/GraniteCave_1F.inc
@@ -4,8 +4,7 @@ GraniteCave_1F_MapScripts:: @ 815CBA6
GraniteCave_1F_EventScript_15CBA7:: @ 815CBA7
lock
faceplayer
- checkflag FLAG_RECEIVED_HM05
- goto_if_eq GraniteCave_1F_EventScript_15CBD3
+ goto_if_set FLAG_RECEIVED_HM05, GraniteCave_1F_EventScript_15CBD3
msgbox GraniteCave_1F_Text_194917, 4
giveitem_std ITEM_HM05
setflag FLAG_RECEIVED_HM05
diff --git a/data/scripts/maps/GraniteCave_StevensRoom.inc b/data/scripts/maps/GraniteCave_StevensRoom.inc
index c9616266e..9c69e649e 100644
--- a/data/scripts/maps/GraniteCave_StevensRoom.inc
+++ b/data/scripts/maps/GraniteCave_StevensRoom.inc
@@ -11,17 +11,17 @@ GraniteCave_StevensRoom_EventScript_15CBFA:: @ 815CBFA
msgbox GraniteCave_StevensRoom_Text_194BDD, 4
giveitem_std ITEM_TM47
compare RESULT, 0
- call_if 1, GraniteCave_StevensRoom_EventScript_15CC83
+ call_if_eq GraniteCave_StevensRoom_EventScript_15CC83
msgbox GraniteCave_StevensRoom_Text_194C8D, 4
closemessage
compare FACING, 2
- call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D
+ call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
compare FACING, 1
- call_if 1, GraniteCave_StevensRoom_EventScript_15CC78
+ call_if_eq GraniteCave_StevensRoom_EventScript_15CC78
compare FACING, 3
- call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D
+ call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
compare FACING, 4
- call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D
+ call_if_eq GraniteCave_StevensRoom_EventScript_15CC6D
playse SE_KAIDAN
removeobject 1
release
diff --git a/data/scripts/maps/IslandCave.inc b/data/scripts/maps/IslandCave.inc
index dbc71b6bb..d8576e883 100644
--- a/data/scripts/maps/IslandCave.inc
+++ b/data/scripts/maps/IslandCave.inc
@@ -5,8 +5,7 @@ IslandCave_MapScripts:: @ 815EEB6
.byte 0
IslandCave_MapScript1_15EEC6:: @ 815EEC6
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, IslandCave_EventScript_15EED0
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, IslandCave_EventScript_15EED0
end
IslandCave_EventScript_15EED0:: @ 815EED0
@@ -14,8 +13,7 @@ IslandCave_EventScript_15EED0:: @ 815EED0
return
IslandCave_MapScript1_15EED4:: @ 815EED4
- checkflag FLAG_SYS_BRAILLE_WAIT
- call_if 0, IslandCave_EventScript_15EEDE
+ call_if_unset FLAG_SYS_BRAILLE_WAIT, IslandCave_EventScript_15EEDE
end
IslandCave_EventScript_15EEDE:: @ 815EEDE
@@ -45,8 +43,7 @@ S_OpenRegiceChamber:: @ 815EF19
IslandCave_EventScript_15EF59:: @ 815EF59
lockall
- checkflag FLAG_SYS_BRAILLE_WAIT
- goto_if_eq IslandCave_EventScript_15EF72
+ goto_if_set FLAG_SYS_BRAILLE_WAIT, IslandCave_EventScript_15EF72
braillemessage IslandCave_Braille_1C54FC
special DoBrailleWait
waitstate
@@ -61,8 +58,7 @@ IslandCave_EventScript_15EF72:: @ 815EF72
IslandCave_EventScript_15EF7C:: @ 815EF7C
lockall
braillemessage IslandCave_Braille_1C54FC
- checkflag FLAG_SYS_BRAILLE_WAIT
- goto_if_eq IslandCave_EventScript_15EF95
+ goto_if_set FLAG_SYS_BRAILLE_WAIT, IslandCave_EventScript_15EF95
special DoBrailleWait
waitstate
goto IslandCave_EventScript_15EF95
diff --git a/data/scripts/maps/JaggedPass.inc b/data/scripts/maps/JaggedPass.inc
index efe5d6a6e..d75420e88 100644
--- a/data/scripts/maps/JaggedPass.inc
+++ b/data/scripts/maps/JaggedPass.inc
@@ -9,7 +9,7 @@ JaggedPass_MapScript1_15D271:: @ 815D271
JaggedPass_MapScript1_15D274:: @ 815D274
compare VAR_JAGGED_PASS_ASH_WEATHER, 1
- call_if 1, JaggedPass_EventScript_15D280
+ call_if_eq JaggedPass_EventScript_15D280
end
JaggedPass_EventScript_15D280:: @ 815D280
diff --git a/data/scripts/maps/LavaridgeTown.inc b/data/scripts/maps/LavaridgeTown.inc
index 44a1e141b..a7f71baf6 100644
--- a/data/scripts/maps/LavaridgeTown.inc
+++ b/data/scripts/maps/LavaridgeTown.inc
@@ -5,12 +5,11 @@ LavaridgeTown_MapScripts:: @ 814E4A3
LavaridgeTown_MapScript1_14E4AE:: @ 814E4AE
setflag FLAG_VISITED_LAVARIDGE_TOWN
- checkflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY
- call_if 1, LavaridgeTown_EventScript_14E4DF
+ call_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, LavaridgeTown_EventScript_14E4DF
call LavaridgeTown_EventScript_1A014E
call LavaridgeTown_EventScript_1A0172
compare VAR_LAVARIDGE_RIVAL_STATE, 2
- call_if 1, LavaridgeTown_EventScript_14E4D0
+ call_if_eq LavaridgeTown_EventScript_14E4D0
end
LavaridgeTown_EventScript_14E4D0:: @ 814E4D0
@@ -45,11 +44,11 @@ LavaridgeTown_EventScript_14E4ED:: @ 814E4ED
waitmovement 0
checkplayergender
compare RESULT, 0
- call_if 1, LavaridgeTown_EventScript_14E56B
+ call_if_eq LavaridgeTown_EventScript_14E56B
compare RESULT, 1
- call_if 1, LavaridgeTown_EventScript_14E570
+ call_if_eq LavaridgeTown_EventScript_14E570
compare VAR_SPECIAL_8, 1
- call_if 1, LavaridgeTown_EventScript_14E68F
+ call_if_eq LavaridgeTown_EventScript_14E68F
checkplayergender
compare RESULT, 0
goto_if_eq LavaridgeTown_EventScript_14E5AB
@@ -71,9 +70,9 @@ LavaridgeTown_EventScript_14E575:: @ 814E575
setvar VAR_SPECIAL_8, 0
checkplayergender
compare RESULT, 0
- call_if 1, LavaridgeTown_EventScript_14E56B
+ call_if_eq LavaridgeTown_EventScript_14E56B
compare RESULT, 1
- call_if 1, LavaridgeTown_EventScript_14E570
+ call_if_eq LavaridgeTown_EventScript_14E570
checkplayergender
compare RESULT, 0
goto_if_eq LavaridgeTown_EventScript_14E5AB
@@ -100,16 +99,16 @@ LavaridgeTown_EventScript_14E5D0:: @ 814E5D0
LavaridgeTown_EventScript_14E5F5:: @ 814E5F5
closemessage
compare VAR_SPECIAL_8, 1
- call_if 1, LavaridgeTown_EventScript_14E646
+ call_if_eq LavaridgeTown_EventScript_14E646
compare VAR_SPECIAL_8, 0
- call_if 1, LavaridgeTown_EventScript_14E64E
+ call_if_eq LavaridgeTown_EventScript_14E64E
removeobject 8
addobject 7
delay 30
compare VAR_SPECIAL_8, 1
- call_if 1, LavaridgeTown_EventScript_14E69A
+ call_if_eq LavaridgeTown_EventScript_14E69A
compare VAR_SPECIAL_8, 0
- call_if 1, LavaridgeTown_EventScript_14E6A5
+ call_if_eq LavaridgeTown_EventScript_14E6A5
removeobject 7
setvar VAR_LAVARIDGE_RIVAL_STATE, 2
savebgm 0
@@ -129,13 +128,13 @@ LavaridgeTown_EventScript_14E646:: @ 814E646
LavaridgeTown_EventScript_14E64E:: @ 814E64E
compare FACING, 2
- call_if 1, LavaridgeTown_EventScript_14E67B
+ call_if_eq LavaridgeTown_EventScript_14E67B
compare FACING, 1
- call_if 1, LavaridgeTown_EventScript_14E680
+ call_if_eq LavaridgeTown_EventScript_14E680
compare FACING, 3
- call_if 1, LavaridgeTown_EventScript_14E685
+ call_if_eq LavaridgeTown_EventScript_14E685
compare FACING, 4
- call_if 1, LavaridgeTown_EventScript_14E68A
+ call_if_eq LavaridgeTown_EventScript_14E68A
return
LavaridgeTown_EventScript_14E67B:: @ 814E67B
@@ -166,13 +165,13 @@ LavaridgeTown_EventScript_14E69A:: @ 814E69A
LavaridgeTown_EventScript_14E6A5:: @ 814E6A5
compare FACING, 2
- call_if 1, LavaridgeTown_EventScript_14E6D2
+ call_if_eq LavaridgeTown_EventScript_14E6D2
compare FACING, 1
- call_if 1, LavaridgeTown_EventScript_14E6D2
+ call_if_eq LavaridgeTown_EventScript_14E6D2
compare FACING, 3
- call_if 1, LavaridgeTown_EventScript_14E6DD
+ call_if_eq LavaridgeTown_EventScript_14E6DD
compare FACING, 4
- call_if 1, LavaridgeTown_EventScript_14E6D2
+ call_if_eq LavaridgeTown_EventScript_14E6D2
return
LavaridgeTown_EventScript_14E6D2:: @ 814E6D2
@@ -272,8 +271,7 @@ LavaridgeTown_EventScript_14E751:: @ 814E751
LavaridgeTown_EventScript_14E75A:: @ 814E75A
lock
faceplayer
- checkflag FLAG_RECEIVED_LAVARIDGE_EGG
- goto_if_eq LavaridgeTown_EventScript_14E79E
+ goto_if_set FLAG_RECEIVED_LAVARIDGE_EGG, LavaridgeTown_EventScript_14E79E
msgbox LavaridgeTown_Text_16C174, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq LavaridgeTown_EventScript_14E7B2
diff --git a/data/scripts/maps/LavaridgeTown_Gym_1F.inc b/data/scripts/maps/LavaridgeTown_Gym_1F.inc
index 1bbad53bf..52d614436 100644
--- a/data/scripts/maps/LavaridgeTown_Gym_1F.inc
+++ b/data/scripts/maps/LavaridgeTown_Gym_1F.inc
@@ -70,8 +70,7 @@ LavaridgeTown_Gym_1F_EventScript_153740:: @ 8153740
LavaridgeTown_Gym_1F_EventScript_153741:: @ 8153741
trainerbattle 1, OPPONENT_FLANNERY, 0, LavaridgeTown_Gym_1F_Text_176801, LavaridgeTown_Gym_1F_Text_176960, LavaridgeTown_Gym_1F_EventScript_153766
- checkflag FLAG_RECEIVED_TM50
- goto_if 0, LavaridgeTown_Gym_1F_EventScript_1537A7
+ goto_if_unset FLAG_RECEIVED_TM50, LavaridgeTown_Gym_1F_EventScript_1537A7
msgbox LavaridgeTown_Gym_1F_Text_176C4A, 4
release
end
@@ -85,7 +84,7 @@ LavaridgeTown_Gym_1F_EventScript_153766:: @ 8153766
setflag FLAG_BADGE04_GET
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
- call_if 1, LavaridgeTown_Gym_1F_EventScript_1A00FB
+ call_if_eq LavaridgeTown_Gym_1F_EventScript_1A00FB
setvar VAR_SPECIAL_8, 4
call LavaridgeTown_Gym_1F_EventScript_1A01C0
setflag FLAG_HIDE_WALLY_WANDAS_HOUSE
@@ -135,8 +134,7 @@ LavaridgeTown_Gym_1F_EventScript_15383E:: @ 815383E
LavaridgeTown_Gym_1F_EventScript_153859:: @ 8153859
lock
faceplayer
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if_eq LavaridgeTown_Gym_1F_EventScript_15386E
+ goto_if_set FLAG_DEFEATED_LAVARIDGE_GYM, LavaridgeTown_Gym_1F_EventScript_15386E
msgbox LavaridgeTown_Gym_1F_Text_176312, 4
release
end
@@ -148,15 +146,13 @@ LavaridgeTown_Gym_1F_EventScript_15386E:: @ 815386E
LavaridgeTown_Gym_1F_EventScript_153878:: @ 8153878
lockall
- checkflag FLAG_BADGE04_GET
- goto_if_eq LavaridgeTown_Gym_1F_EventScript_153898
+ goto_if_set FLAG_BADGE04_GET, LavaridgeTown_Gym_1F_EventScript_153898
goto LavaridgeTown_Gym_1F_EventScript_1538A2
end
LavaridgeTown_Gym_1F_EventScript_153888:: @ 8153888
lockall
- checkflag FLAG_BADGE04_GET
- goto_if_eq LavaridgeTown_Gym_1F_EventScript_153898
+ goto_if_set FLAG_BADGE04_GET, LavaridgeTown_Gym_1F_EventScript_153898
goto LavaridgeTown_Gym_1F_EventScript_1538A2
end
diff --git a/data/scripts/maps/LavaridgeTown_HerbShop.inc b/data/scripts/maps/LavaridgeTown_HerbShop.inc
index 913734dd5..71fc2cbfe 100644
--- a/data/scripts/maps/LavaridgeTown_HerbShop.inc
+++ b/data/scripts/maps/LavaridgeTown_HerbShop.inc
@@ -28,8 +28,7 @@ LavaridgeTown_HerbShop_EventScript_15364C:: @ 815364C
LavaridgeTown_HerbShop_EventScript_153655:: @ 8153655
lock
faceplayer
- checkflag FLAG_RECEIVED_CHARCOAL
- goto_if_eq LavaridgeTown_HerbShop_EventScript_153684
+ goto_if_set FLAG_RECEIVED_CHARCOAL, LavaridgeTown_HerbShop_EventScript_153684
msgbox LavaridgeTown_HerbShop_Text_1761A2, 4
giveitem_std ITEM_CHARCOAL
compare RESULT, 0
diff --git a/data/scripts/maps/LilycoveCity.inc b/data/scripts/maps/LilycoveCity.inc
index 6ed8054f8..ee29b0f05 100644
--- a/data/scripts/maps/LilycoveCity.inc
+++ b/data/scripts/maps/LilycoveCity.inc
@@ -7,8 +7,7 @@ LilycoveCity_MapScript1_14CA20:: @ 814CA20
setflag FLAG_VISITED_LILYCOVE_CITY
setvar VAR_LINK_CONTEST_ROOM_STATE, 0
setflag FLAG_HIDE_CONTEST_REPORTER_LILYCOVE
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, LilycoveCity_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, LilycoveCity_EventScript_1A02C1
call LilycoveCity_EventScript_1A0196
call LilycoveCity_EventScript_1A014E
end
@@ -28,10 +27,8 @@ LilycoveCity_MapScript1_14CA3F:: @ 814CA3F
setmetatile 71, 6, 368, 0
setmetatile 72, 6, 445, 0
.endif
- checkflag FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE
- call_if 0, LilycoveCity_EventScript_14CABE
- checkflag FLAG_BADGE07_GET
- call_if 1, LilycoveCity_EventScript_14CB2B
+ call_if_unset FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE, LilycoveCity_EventScript_14CABE
+ call_if_set FLAG_BADGE07_GET, LilycoveCity_EventScript_14CB2B
end
LilycoveCity_EventScript_14CABE:: @ 814CABE
@@ -64,8 +61,7 @@ LilycoveCity_EventScript_14CB74:: @ 814CB74
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_LILYCOVE
- goto_if_eq LilycoveCity_EventScript_14CBB4
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_LILYCOVE, LilycoveCity_EventScript_14CBB4
msgbox LilycoveCity_Text_1C5A7A, 4
random 10
addvar RESULT, ITEM_CHERI_BERRY
@@ -89,8 +85,7 @@ LilycoveCity_EventScript_14CBBE:: @ 814CBBE
LilycoveCity_EventScript_14CBC7:: @ 814CBC7
lock
faceplayer
- checkflag FLAG_BADGE07_GET
- goto_if_eq LilycoveCity_EventScript_14CBDC
+ goto_if_set FLAG_BADGE07_GET, LilycoveCity_EventScript_14CBDC
msgbox LilycoveCity_Text_168750, 4
release
end
@@ -107,8 +102,7 @@ LilycoveCity_EventScript_14CBE6:: @ 814CBE6
LilycoveCity_EventScript_14CBEF:: @ 814CBEF
lock
faceplayer
- checkflag FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE
- goto_if_eq LilycoveCity_EventScript_14CC04
+ goto_if_set FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE, LilycoveCity_EventScript_14CC04
msgbox LilycoveCity_Text_1688C1, 4
release
end
@@ -121,8 +115,7 @@ LilycoveCity_EventScript_14CC04:: @ 814CC04
LilycoveCity_EventScript_14CC0E:: @ 814CC0E
lock
faceplayer
- checkflag FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE
- goto_if_eq LilycoveCity_EventScript_14CC23
+ goto_if_set FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE, LilycoveCity_EventScript_14CC23
msgbox LilycoveCity_Text_1689BF, 4
release
end
@@ -147,8 +140,7 @@ LilycoveCity_EventScript_14CC3F:: @ 814CC3F
LilycoveCity_EventScript_14CC48:: @ 814CC48
lock
faceplayer
- checkflag FLAG_BADGE07_GET
- goto_if_eq LilycoveCity_EventScript_14CC5D
+ goto_if_set FLAG_BADGE07_GET, LilycoveCity_EventScript_14CC5D
msgbox LilycoveCity_Text_168C16, 4
release
end
@@ -186,8 +178,7 @@ LilycoveCity_EventScript_14CCA2:: @ 814CCA2
LilycoveCity_EventScript_14CCAC:: @ 814CCAC
lockall
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_EventScript_14CCC0
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_EventScript_14CCC0
msgbox LilycoveCity_Text_168EDA, 4
releaseall
end
@@ -211,8 +202,7 @@ LilycoveCity_EventScript_14CCDC:: @ 814CCDC
LilycoveCity_EventScript_14CCE5:: @ 814CCE5
lockall
- checkflag FLAG_MET_WAILMER_TRAINER
- goto_if_eq LilycoveCity_EventScript_14CD18
+ goto_if_set FLAG_MET_WAILMER_TRAINER, LilycoveCity_EventScript_14CD18
msgbox LilycoveCity_Text_16864A, 4
applymovement LAST_TALKED, LilycoveCity_Movement_1A0839
waitmovement 0
@@ -256,10 +246,8 @@ LilycoveCity_EventScript_14CD46:: @ 814CD46
LilycoveCity_EventScript_14CD60:: @ 814CD60
playbgm BGM_GIRL_SUP, TRUE
- checkflag FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE
- call_if 1, LilycoveCity_EventScript_14CDB0
- checkflag FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE
- call_if 0, LilycoveCity_EventScript_14CDB9
+ 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
goto_if_eq LilycoveCity_EventScript_14CDC2
msgbox LilycoveCity_Text_167B94, 4
@@ -287,10 +275,8 @@ LilycoveCity_EventScript_14CDC2:: @ 814CDC2
LilycoveCity_EventScript_14CDD3:: @ 814CDD3
playbgm BGM_BOY_SUP, TRUE
- checkflag FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE
- call_if 1, LilycoveCity_EventScript_14CE23
- checkflag FLAG_DECLINED_RIVAL_BATTLE_LILYCOVE
- call_if 0, LilycoveCity_EventScript_14CE2C
+ 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
goto_if_eq LilycoveCity_EventScript_14CE35
msgbox LilycoveCity_Text_1680A9, 4
@@ -349,20 +335,18 @@ LilycoveCity_EventScript_14CE96:: @ 814CE96
LilycoveCity_EventScript_14CEA6:: @ 814CEA6
msgbox LilycoveCity_Text_167C6B, 4
setvar RESULT, 0
- checkflag FLAG_BADGE06_GET
- call_if 1, LilycoveCity_EventScript_14CEDE
+ call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_14CEDE
compare RESULT, 0
- call_if 1, LilycoveCity_EventScript_14CEEE
+ call_if_eq LilycoveCity_EventScript_14CEEE
compare RESULT, 1
- call_if 1, LilycoveCity_EventScript_14CEF7
+ call_if_eq LilycoveCity_EventScript_14CEF7
clearflag FLAG_HIDE_MAY_UPSTAIRS
clearflag FLAG_HIDE_MAY_PICHU_DOLL
goto LilycoveCity_EventScript_14CF6B
end
LilycoveCity_EventScript_14CEDE:: @ 814CEDE
- checkflag FLAG_BADGE08_GET
- goto_if_eq LilycoveCity_EventScript_14CEE8
+ goto_if_set FLAG_BADGE08_GET, LilycoveCity_EventScript_14CEE8
return
LilycoveCity_EventScript_14CEE8:: @ 814CEE8
@@ -374,8 +358,7 @@ LilycoveCity_EventScript_14CEEE:: @ 814CEEE
return
LilycoveCity_EventScript_14CEF7:: @ 814CEF7
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_EventScript_14CF09
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_EventScript_14CF09
msgbox LilycoveCity_Text_167DDD, 4
return
@@ -386,12 +369,11 @@ LilycoveCity_EventScript_14CF09:: @ 814CF09
LilycoveCity_EventScript_14CF12:: @ 814CF12
msgbox LilycoveCity_Text_168149, 4
setvar RESULT, 0
- checkflag FLAG_BADGE06_GET
- call_if 1, LilycoveCity_EventScript_14CEDE
+ call_if_set FLAG_BADGE06_GET, LilycoveCity_EventScript_14CEDE
compare RESULT, 0
- call_if 1, LilycoveCity_EventScript_14CF47
+ call_if_eq LilycoveCity_EventScript_14CF47
compare RESULT, 1
- call_if 1, LilycoveCity_EventScript_14CF50
+ call_if_eq LilycoveCity_EventScript_14CF50
clearflag FLAG_HIDE_BRENDAN_UPSTAIRS
goto LilycoveCity_EventScript_14CF6B
end
@@ -401,8 +383,7 @@ LilycoveCity_EventScript_14CF47:: @ 814CF47
return
LilycoveCity_EventScript_14CF50:: @ 814CF50
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_EventScript_14CF62
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_EventScript_14CF62
msgbox LilycoveCity_Text_168282, 4
return
diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc
index 7aceecef6..a04629903 100644
--- a/data/scripts/maps/LilycoveCity_ContestLobby.inc
+++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc
@@ -13,8 +13,7 @@ LilycoveCity_ContestLobby_MapScript2_158877:: @ 8158877
.2byte 0
LilycoveCity_ContestLobby_EventScript_158889:: @ 8158889
- checkflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
- goto_if_eq LilycoveCity_ContestLobby_EventScript_158898
+ goto_if_set FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR, LilycoveCity_ContestLobby_EventScript_158898
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
end
@@ -45,7 +44,7 @@ LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
specialvar RESULT, GiveMonArtistRibbon
compare RESULT, 1
- call_if 1, LilycoveCity_ContestLobby_EventScript_158948
+ call_if_eq LilycoveCity_ContestLobby_EventScript_158948
applymovement 4, LilycoveCity_ContestLobby_Movement_158A43
waitmovement 0
removeobject 4
@@ -188,8 +187,7 @@ LilycoveCity_ContestLobby_Movement_158A52:: @ 8158A52
step_end
LilycoveCity_ContestLobby_EventScript_158A5B:: @ 8158A5B
- checkflag FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR
- goto_if_eq LilycoveCity_ContestLobby_EventScript_158A6A
+ goto_if_set FLAG_HIDE_LILYCOVE_MUSEUM_CURATOR, LilycoveCity_ContestLobby_EventScript_158A6A
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
end
@@ -218,7 +216,7 @@ LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE
setvar VAR_LILYCOVE_CONTEST_LOBBY_STATE, 0
specialvar RESULT, GiveMonArtistRibbon
compare RESULT, 1
- call_if 1, LilycoveCity_ContestLobby_EventScript_158B18
+ call_if_eq LilycoveCity_ContestLobby_EventScript_158B18
applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D
waitmovement 0
removeobject 11
@@ -307,8 +305,7 @@ LilycoveCity_ContestLobby_EventScript_158B85:: @ 8158B85
checkitem ITEM_CONTEST_PASS, 1
compare RESULT, 0
goto_if_eq LilycoveCity_ContestLobby_EventScript_158BBA
- checkflag FLAG_TEMP_2
- goto_if_eq LilycoveCity_ContestLobby_EventScript_158BAE
+ goto_if_set FLAG_TEMP_2, LilycoveCity_ContestLobby_EventScript_158BAE
message LilycoveCity_ContestLobby_Text_18848C
waitmessage
setflag FLAG_TEMP_2
@@ -402,8 +399,7 @@ LilycoveCity_ContestLobby_EventScript_158CC0:: @ 8158CC0
end
LilycoveCity_ContestLobby_EventScript_158CEA:: @ 8158CEA
- checkflag FLAG_TEMP_3
- call_if 0, LilycoveCity_ContestLobby_EventScript_158BC4
+ call_if_unset FLAG_TEMP_3, LilycoveCity_ContestLobby_EventScript_158BC4
message LilycoveCity_ContestLobby_Text_1886DC
waitmessage
multichoice 0, 0, 4, 0
@@ -707,8 +703,7 @@ LilycoveCity_ContestLobby_EventScript_15901E:: @ 815901E
end
LilycoveCity_ContestLobby_EventScript_159027:: @ 8159027
- checkflag FLAG_RECEIVED_CONTEST_PASS
- goto_if 0, LilycoveCity_ContestLobby_EventScript_159039
+ goto_if_unset FLAG_RECEIVED_CONTEST_PASS, LilycoveCity_ContestLobby_EventScript_159039
msgbox LilycoveCity_ContestLobby_Text_188DDA, 2
end
diff --git a/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc b/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc
index c8a3dcab9..b80b0873b 100644
--- a/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc
+++ b/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc
@@ -3,10 +3,8 @@ LilycoveCity_CoveLilyMotel_1F_MapScripts:: @ 81582C4
LilycoveCity_CoveLilyMotel_1F_EventScript_1582C5:: @ 81582C5
lockall
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_CoveLilyMotel_1F_EventScript_158326
- checkflag FLAG_BADGE07_GET
- goto_if_eq LilycoveCity_CoveLilyMotel_1F_EventScript_1582FF
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_CoveLilyMotel_1F_EventScript_158326
+ goto_if_set FLAG_BADGE07_GET, LilycoveCity_CoveLilyMotel_1F_EventScript_1582FF
msgbox LilycoveCity_CoveLilyMotel_1F_Text_186B71, 4
applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839
waitmovement 0
diff --git a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc
index 4878cc6bc..06b982610 100644
--- a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc
+++ b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc
@@ -4,10 +4,8 @@ LilycoveCity_CoveLilyMotel_2F_MapScripts:: @ 81583A0
LilycoveCity_CoveLilyMotel_2F_EventScript_1583A1:: @ 81583A1
lock
faceplayer
- checkflag FLAG_TEMP_2
- call_if 0, LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7
- checkflag FLAG_TEMP_2
- call_if 1, LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD
+ 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
goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0
diff --git a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc
index 1198054f0..f895ea99d 100644
--- a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc
+++ b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc
@@ -4,8 +4,7 @@ LilycoveCity_DepartmentStoreElevator_MapScripts:: @ 815A39B
LilycoveCity_DepartmentStoreElevator_EventScript_15A39C:: @ 815A39C
lock
faceplayer
- checkflag FLAG_TEMP_2
- call_if 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF
+ call_if_unset FLAG_TEMP_2, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF
copyvar VAR_SPECIAL_5, VAR_DEPT_STORE_FLOOR
special DisplayCurrentElevatorFloor
message LilycoveCity_DepartmentStoreElevator_Text_1A0EF6
diff --git a/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc b/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc
index cd5e0d980..e2274110c 100644
--- a/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc
+++ b/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc
@@ -5,9 +5,9 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: @ 815A13F
LilycoveCity_DepartmentStoreRooftop_MapScript1_15A145:: @ 815A145
getpricereduction 3
compare RESULT, 1
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F
compare RESULT, 0
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A163
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A163
end
LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F:: @ 815A15F
@@ -53,7 +53,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A1A0:: @ 815A1A0
faceplayer
getpricereduction 3
compare RESULT, 1
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A1BA
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A1BA
msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C61F, 4
release
end
@@ -128,22 +128,22 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A260:: @ 815A260
LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
compare VAR_TEMP_1, 0
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A23D
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A23D
compare VAR_TEMP_1, 1
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A244
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A244
compare VAR_TEMP_1, 2
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B
compare RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A37A
checkitemspace VAR_TEMP_0, 1
compare RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
compare VAR_TEMP_1, 0
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A252
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A252
compare VAR_TEMP_1, 1
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A259
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A259
compare VAR_TEMP_1, 2
- call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A260
+ call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A260
updatemoneybox 0, 0
nop
bufferitemname 0, VAR_TEMP_0
@@ -155,7 +155,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4
random 64
compare RESULT, 0
- goto_if 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
+ goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
checkitemspace VAR_TEMP_0, 1
compare RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
@@ -167,7 +167,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267
msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4
random 64
compare RESULT, 0
- goto_if 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
+ goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E
checkitemspace VAR_TEMP_0, 1
compare RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388
diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc
index db2b8edf9..f6b23bc05 100644
--- a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc
+++ b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc
@@ -10,9 +10,8 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E
faceplayer
dodailyevents
compare VAR_LOTTERY_PRIZE, 0
- goto_if 5, LilycoveCity_DepartmentStore_1F_EventScript_159EB1
- checkflag FLAG_DAILY_PICKED_LOTTO_TICKET
- goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E4C
+ 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
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E56
@@ -37,18 +36,18 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E60
incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY
compare VAR_SPECIAL_6, 0
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E3A
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E3A
compare VAR_SPECIAL_6, 1
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E43
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E43
bufferitemname 0, VAR_SPECIAL_5
compare VAR_SPECIAL_4, 1
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E78
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E78
compare VAR_SPECIAL_4, 2
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E81
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E81
compare VAR_SPECIAL_4, 3
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E8A
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E8A
compare VAR_SPECIAL_4, 4
- call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E93
+ call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E93
giveitem_std VAR_SPECIAL_5
compare RESULT, 0
goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E9C
diff --git a/data/scripts/maps/LilycoveCity_Harbor.inc b/data/scripts/maps/LilycoveCity_Harbor.inc
index 3b884c233..5dc217585 100644
--- a/data/scripts/maps/LilycoveCity_Harbor.inc
+++ b/data/scripts/maps/LilycoveCity_Harbor.inc
@@ -16,8 +16,7 @@ LilycoveCity_Harbor_EventScript_1598A2:: @ 81598A2
end
LilycoveCity_Harbor_EventScript_1598BA:: @ 81598BA
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_Harbor_EventScript_1598CD
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_1598CD
msgbox LilycoveCity_Harbor_Text_18B306, 4
release
end
@@ -81,9 +80,9 @@ LilycoveCity_Harbor_EventScript_15998A:: @ 815998A
delay 30
hideobjectat LAST_TALKED, MAP_LILYCOVE_CITY_HARBOR
compare FACING, 2
- call_if 1, LilycoveCity_Harbor_EventScript_1599D9
+ call_if_eq LilycoveCity_Harbor_EventScript_1599D9
compare FACING, 4
- call_if 1, LilycoveCity_Harbor_EventScript_1599CE
+ call_if_eq LilycoveCity_Harbor_EventScript_1599CE
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
setvar VAR_SPECIAL_4, 2
@@ -106,12 +105,9 @@ LilycoveCity_Harbor_EventScript_1599E4:: @ 81599E4
end
LilycoveCity_Harbor_EventScript_1599EE:: @ 81599EE
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if 0, LilycoveCity_Harbor_EventScript_1598BA
- checkflag FLAG_ECOUNTERED_LATIAS_OR_LATIOS
- goto_if_eq LilycoveCity_Harbor_EventScript_1598BA
- checkflag FLAG_SYS_HAS_EON_TICKET
- goto_if 0, LilycoveCity_Harbor_EventScript_1598BA
+ goto_if_unset FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_1598BA
+ goto_if_set FLAG_ECOUNTERED_LATIAS_OR_LATIOS, LilycoveCity_Harbor_EventScript_1598BA
+ 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
@@ -130,9 +126,9 @@ LilycoveCity_Harbor_EventScript_1599EE:: @ 81599EE
delay 30
removeobject 4
compare FACING, 2
- call_if 1, LilycoveCity_Harbor_EventScript_1599D9
+ call_if_eq LilycoveCity_Harbor_EventScript_1599D9
compare FACING, 4
- call_if 1, LilycoveCity_Harbor_EventScript_1599CE
+ call_if_eq LilycoveCity_Harbor_EventScript_1599CE
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
special ScrSpecial_HealPlayerParty
@@ -159,8 +155,7 @@ LilycoveCity_Harbor_Movement_159A89:: @ 8159A89
LilycoveCity_Harbor_EventScript_159A8D:: @ 8159A8D
lock
faceplayer
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq LilycoveCity_Harbor_EventScript_159AA2
+ goto_if_set FLAG_SYS_GAME_CLEAR, LilycoveCity_Harbor_EventScript_159AA2
msgbox LilycoveCity_Harbor_Text_18B504, 4
release
end
diff --git a/data/scripts/maps/LilycoveCity_House2.inc b/data/scripts/maps/LilycoveCity_House2.inc
index d0065c9e8..0572c23cc 100644
--- a/data/scripts/maps/LilycoveCity_House2.inc
+++ b/data/scripts/maps/LilycoveCity_House2.inc
@@ -4,8 +4,7 @@ LilycoveCity_House2_MapScripts:: @ 8159BA2
LilycoveCity_House2_EventScript_159BA3:: @ 8159BA3
lock
faceplayer
- checkflag FLAG_RECEIVED_TM44
- goto_if_eq LilycoveCity_House2_EventScript_159BDA
+ goto_if_set FLAG_RECEIVED_TM44, LilycoveCity_House2_EventScript_159BDA
msgbox LilycoveCity_House2_Text_18B83C, 4
giveitem_std ITEM_TM44
compare RESULT, 0
diff --git a/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc b/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc
index 120054e91..9cf3ecbd7 100644
--- a/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc
+++ b/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc
@@ -4,32 +4,27 @@ LilycoveCity_LilycoveMuseum_2F_MapScripts:: @ 81585AC
.byte 0
LilycoveCity_LilycoveMuseum_2F_MapScript1_1585B7:: @ 81585B7
- checkflag FLAG_COOL_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD
+ goto_if_set FLAG_COOL_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD
goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6:: @ 81585C6
- checkflag FLAG_BEAUTY_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158615
+ goto_if_set FLAG_BEAUTY_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_158615
goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5:: @ 81585D5
- checkflag FLAG_CUTE_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15862D
+ goto_if_set FLAG_CUTE_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_15862D
goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4:: @ 81585E4
- checkflag FLAG_SMART_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158645
+ goto_if_set FLAG_SMART_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_158645
goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3:: @ 81585F3
- checkflag FLAG_TOUGH_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15865D
+ goto_if_set FLAG_TOUGH_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_15865D
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD:: @ 81585FD
@@ -96,8 +91,7 @@ LilycoveCity_LilycoveMuseum_2F_Movement_1586D5:: @ 81586D5
LilycoveCity_LilycoveMuseum_2F_EventScript_1586D8:: @ 81586D8
lockall
- checkflag FLAG_RECEIVED_GLASS_ORNAMENT
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158793
+ goto_if_set FLAG_RECEIVED_GLASS_ORNAMENT, LilycoveCity_LilycoveMuseum_2F_EventScript_158793
specialvar VAR_SPECIAL_4, sub_80C4D50
switch VAR_SPECIAL_4
case 1, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C
@@ -146,36 +140,31 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_158793:: @ 8158793
LilycoveCity_LilycoveMuseum_2F_EventScript_15879D:: @ 815879D
lockall
- checkflag FLAG_CUTE_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15883C
+ goto_if_set FLAG_CUTE_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_15883C
msgbox LilycoveCity_LilycoveMuseum_2F_Text_188219, 3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1587B0:: @ 81587B0
lockall
- checkflag FLAG_TOUGH_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158858
+ goto_if_set FLAG_TOUGH_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_158858
msgbox LilycoveCity_LilycoveMuseum_2F_Text_18824C, 3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1587C3:: @ 81587C3
lockall
- checkflag FLAG_COOL_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158820
+ goto_if_set FLAG_COOL_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_158820
msgbox LilycoveCity_LilycoveMuseum_2F_Text_1882B4, 3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1587D6:: @ 81587D6
lockall
- checkflag FLAG_BEAUTY_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15882E
+ goto_if_set FLAG_BEAUTY_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_15882E
msgbox LilycoveCity_LilycoveMuseum_2F_Text_188281, 3
end
LilycoveCity_LilycoveMuseum_2F_EventScript_1587E9:: @ 81587E9
lockall
- checkflag FLAG_SMART_PAINTING_MADE
- goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15884A
+ goto_if_set FLAG_SMART_PAINTING_MADE, LilycoveCity_LilycoveMuseum_2F_EventScript_15884A
msgbox LilycoveCity_LilycoveMuseum_2F_Text_1882E6, 3
end
diff --git a/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc b/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc
index f6eb35c98..cff88caf0 100644
--- a/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc
+++ b/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc
@@ -21,8 +21,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_15933F:: @ 815933F
LilycoveCity_PokemonCenter_1F_EventScript_159348:: @ 8159348
lock
faceplayer
- checkflag FLAG_BADGE07_GET
- goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_15935D
+ goto_if_set FLAG_BADGE07_GET, LilycoveCity_PokemonCenter_1F_EventScript_15935D
msgbox LilycoveCity_PokemonCenter_1F_Text_18A048, 4
release
end
diff --git a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc
index 4656f0182..85ee953ac 100644
--- a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc
+++ b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc
@@ -72,35 +72,35 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159429:: @ 8159429
setvar VAR_SPECIAL_4, 8
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5
setvar VAR_SPECIAL_4, 9
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD
setvar VAR_SPECIAL_4, 10
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5
setvar VAR_SPECIAL_4, 11
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED
setvar VAR_SPECIAL_4, 12
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5
setvar VAR_SPECIAL_4, 13
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD
setvar VAR_SPECIAL_4, 14
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_159505
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159505
setvar VAR_SPECIAL_4, 15
specialvar RESULT, ShouldMoveLilycoveFanClubMember
compare RESULT, 0
- call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_15950D
+ call_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15950D
end
LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5:: @ 81594D5
diff --git a/data/scripts/maps/LittlerootTown.inc b/data/scripts/maps/LittlerootTown.inc
index ef2145bbb..57ad9aae5 100644
--- a/data/scripts/maps/LittlerootTown.inc
+++ b/data/scripts/maps/LittlerootTown.inc
@@ -6,19 +6,18 @@ LittlerootTown_MapScripts:: @ 814D509
LittlerootTown_MapScript1_14D514:: @ 814D514
setflag FLAG_VISITED_LITTLEROOT_TOWN
compare VAR_LITTLEROOT_INTRO_STATE, 2
- call_if 1, LittlerootTown_EventScript_14D57B
- checkflag FLAG_RESCUED_BIRCH
- call_if 0, LittlerootTown_EventScript_14D583
+ call_if_eq LittlerootTown_EventScript_14D57B
+ call_if_unset FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_14D583
compare VAR_LITTLEROOT_STATE, 3
- call_if 1, LittlerootTown_EventScript_14D5A6
+ call_if_eq LittlerootTown_EventScript_14D5A6
compare VAR_LITTLEROOT_HOUSES_STATE, 4
- call_if 1, LittlerootTown_EventScript_14D570
+ call_if_eq LittlerootTown_EventScript_14D570
compare VAR_LITTLEROOT_HOUSES_STATE_2, 4
- call_if 1, LittlerootTown_EventScript_14D570
+ call_if_eq LittlerootTown_EventScript_14D570
compare VAR_OLDALE_STATE, 1
- call_if 1, LittlerootTown_EventScript_14D567
+ call_if_eq LittlerootTown_EventScript_14D567
compare VAR_LITTLEROOT_RIVAL_STATE, 3
- call_if 1, LittlerootTown_EventScript_14D563
+ call_if_eq LittlerootTown_EventScript_14D563
end
LittlerootTown_EventScript_14D563:: @ 814D563
@@ -56,9 +55,9 @@ LittlerootTown_EventScript_14D5A6:: @ 814D5A6
setobjectmovementtype 4, 8
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D5C5
+ call_if_eq LittlerootTown_EventScript_14D5C5
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D5CD
+ call_if_eq LittlerootTown_EventScript_14D5CD
return
LittlerootTown_EventScript_14D5C5:: @ 814D5C5
@@ -187,12 +186,10 @@ LittlerootTown_EventScript_14D6D6:: @ 814D6D6
LittlerootTown_EventScript_14D6DF:: @ 814D6DF
lock
faceplayer
- checkflag FLAG_ADVENTURE_STARTED
- goto_if_eq LittlerootTown_EventScript_14D72F
- checkflag FLAG_RESCUED_BIRCH
- goto_if_eq LittlerootTown_EventScript_14D722
+ goto_if_set FLAG_ADVENTURE_STARTED, LittlerootTown_EventScript_14D72F
+ goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_EventScript_14D722
compare VAR_LITTLEROOT_STATE, 0
- goto_if 5, LittlerootTown_EventScript_14D708
+ goto_if_ne LittlerootTown_EventScript_14D708
msgbox LittlerootTown_Text_16ACEB, 4
release
end
@@ -335,9 +332,9 @@ LittlerootTown_EventScript_14D808:: @ 814D808
lockall
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D822
+ call_if_eq LittlerootTown_EventScript_14D822
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D82B
+ call_if_eq LittlerootTown_EventScript_14D82B
releaseall
end
@@ -353,9 +350,9 @@ LittlerootTown_EventScript_14D834:: @ 814D834
lockall
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D84E
+ call_if_eq LittlerootTown_EventScript_14D84E
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D857
+ call_if_eq LittlerootTown_EventScript_14D857
releaseall
end
@@ -408,27 +405,27 @@ LittlerootTown_EventScript_14D8AA:: @ 814D8AA
LittlerootTown_EventScript_14D8B6:: @ 814D8B6
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D93C
+ call_if_eq LittlerootTown_EventScript_14D93C
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D947
+ call_if_eq LittlerootTown_EventScript_14D947
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D926
+ call_if_eq LittlerootTown_EventScript_14D926
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D931
+ call_if_eq LittlerootTown_EventScript_14D931
msgbox LittlerootTown_Text_16A8EE, 4
closemessage
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D952
+ call_if_eq LittlerootTown_EventScript_14D952
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D995
+ call_if_eq LittlerootTown_EventScript_14D995
call LittlerootTown_EventScript_14DD38
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14DAAA
+ call_if_eq LittlerootTown_EventScript_14DAAA
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14DAED
+ call_if_eq LittlerootTown_EventScript_14DAED
goto LittlerootTown_EventScript_14DD2B
end
@@ -454,32 +451,32 @@ LittlerootTown_EventScript_14D947:: @ 814D947
LittlerootTown_EventScript_14D952:: @ 814D952
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_EventScript_14D9D8
+ call_if_eq LittlerootTown_EventScript_14D9D8
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_EventScript_14D9ED
+ call_if_eq LittlerootTown_EventScript_14D9ED
compare VAR_SPECIAL_8, 2
- call_if 1, LittlerootTown_EventScript_14DA02
+ call_if_eq LittlerootTown_EventScript_14DA02
compare VAR_SPECIAL_8, 3
- call_if 1, LittlerootTown_EventScript_14DA17
+ call_if_eq LittlerootTown_EventScript_14DA17
compare VAR_SPECIAL_8, 4
- call_if 1, LittlerootTown_EventScript_14DA2C
+ call_if_eq LittlerootTown_EventScript_14DA2C
compare VAR_SPECIAL_8, 5
- call_if 1, LittlerootTown_EventScript_14DA41
+ call_if_eq LittlerootTown_EventScript_14DA41
return
LittlerootTown_EventScript_14D995:: @ 814D995
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_EventScript_14D9D8
+ call_if_eq LittlerootTown_EventScript_14D9D8
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_EventScript_14D9ED
+ call_if_eq LittlerootTown_EventScript_14D9ED
compare VAR_SPECIAL_8, 2
- call_if 1, LittlerootTown_EventScript_14DA56
+ call_if_eq LittlerootTown_EventScript_14DA56
compare VAR_SPECIAL_8, 3
- call_if 1, LittlerootTown_EventScript_14DA6B
+ call_if_eq LittlerootTown_EventScript_14DA6B
compare VAR_SPECIAL_8, 4
- call_if 1, LittlerootTown_EventScript_14DA80
+ call_if_eq LittlerootTown_EventScript_14DA80
compare VAR_SPECIAL_8, 5
- call_if 1, LittlerootTown_EventScript_14DA95
+ call_if_eq LittlerootTown_EventScript_14DA95
return
LittlerootTown_EventScript_14D9D8:: @ 814D9D8
@@ -554,32 +551,32 @@ LittlerootTown_EventScript_14DA95:: @ 814DA95
LittlerootTown_EventScript_14DAAA:: @ 814DAAA
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_EventScript_14DB30
+ call_if_eq LittlerootTown_EventScript_14DB30
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_EventScript_14DB3B
+ call_if_eq LittlerootTown_EventScript_14DB3B
compare VAR_SPECIAL_8, 2
- call_if 1, LittlerootTown_EventScript_14DB46
+ call_if_eq LittlerootTown_EventScript_14DB46
compare VAR_SPECIAL_8, 3
- call_if 1, LittlerootTown_EventScript_14DB6C
+ call_if_eq LittlerootTown_EventScript_14DB6C
compare VAR_SPECIAL_8, 4
- call_if 1, LittlerootTown_EventScript_14DB92
+ call_if_eq LittlerootTown_EventScript_14DB92
compare VAR_SPECIAL_8, 5
- call_if 1, LittlerootTown_EventScript_14DBB8
+ call_if_eq LittlerootTown_EventScript_14DBB8
return
LittlerootTown_EventScript_14DAED:: @ 814DAED
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_EventScript_14DB30
+ call_if_eq LittlerootTown_EventScript_14DB30
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_EventScript_14DB3B
+ call_if_eq LittlerootTown_EventScript_14DB3B
compare VAR_SPECIAL_8, 2
- call_if 1, LittlerootTown_EventScript_14DBDE
+ call_if_eq LittlerootTown_EventScript_14DBDE
compare VAR_SPECIAL_8, 3
- call_if 1, LittlerootTown_EventScript_14DC04
+ call_if_eq LittlerootTown_EventScript_14DC04
compare VAR_SPECIAL_8, 4
- call_if 1, LittlerootTown_EventScript_14DC2A
+ call_if_eq LittlerootTown_EventScript_14DC2A
compare VAR_SPECIAL_8, 5
- call_if 1, LittlerootTown_EventScript_14DC50
+ call_if_eq LittlerootTown_EventScript_14DC50
return
LittlerootTown_EventScript_14DB30:: @ 814DB30
@@ -843,9 +840,9 @@ LittlerootTown_EventScript_14DCE2:: @ 814DCE2
faceplayer
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_EventScript_14D926
+ call_if_eq LittlerootTown_EventScript_14D926
compare RESULT, 1
- call_if 1, LittlerootTown_EventScript_14D931
+ call_if_eq LittlerootTown_EventScript_14D931
call LittlerootTown_EventScript_14DD38
applymovement 4, LittlerootTown_Movement_1A0841
waitmovement 0
diff --git a/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc b/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc
index 8a86cd946..1de2e91a4 100644
--- a/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc
+++ b/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc
@@ -6,9 +6,8 @@ LittlerootTown_BrendansHouse_1F_MapScripts:: @ 815263B
LittlerootTown_BrendansHouse_1F_MapScript1_15264B:: @ 815264B
compare VAR_LITTLEROOT_INTRO_STATE, 6
- call_if 0, LittlerootTown_BrendansHouse_1F_EventScript_152660
- checkflag FLAG_RECEIVED_RUNNING_SHOES
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_152673
+ call_if_lt LittlerootTown_BrendansHouse_1F_EventScript_152660
+ call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_BrendansHouse_1F_EventScript_152673
end
LittlerootTown_BrendansHouse_1F_EventScript_152660:: @ 8152660
@@ -28,11 +27,11 @@ LittlerootTown_BrendansHouse_1F_EventScript_152680:: @ 8152680
LittlerootTown_BrendansHouse_1F_MapScript1_15268A:: @ 815268A
compare VAR_LITTLEROOT_INTRO_STATE, 3
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526C4
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1526C4
compare VAR_LITTLEROOT_INTRO_STATE, 5
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526AC
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1526AC
compare VAR_LITTLEROOT_INTRO_STATE, 6
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526B8
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1526B8
end
LittlerootTown_BrendansHouse_1F_EventScript_1526AC:: @ 81526AC
diff --git a/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc b/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc
index e0e1a1086..ed6818fa0 100644
--- a/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc
+++ b/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc
@@ -4,10 +4,9 @@ LittlerootTown_BrendansHouse_2F_MapScripts:: @ 81527A4
.byte 0
LittlerootTown_BrendansHouse_2F_MapScript1_1527AF:: @ 81527AF
- checkflag FLAG_DEFEATED_RIVAL_ROUTE103
- call_if 0, LittlerootTown_BrendansHouse_2F_EventScript_1527CE
+ call_if_unset FLAG_DEFEATED_RIVAL_ROUTE103, LittlerootTown_BrendansHouse_2F_EventScript_1527CE
compare VAR_LITTLEROOT_INTRO_STATE, 4
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6950
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6950
call LittlerootTown_BrendansHouse_2F_EventScript_1A2F3D
setvar VAR_0x4089, 0
end
diff --git a/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc b/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc
index 45e9e0783..8096589aa 100644
--- a/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc
+++ b/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc
@@ -6,9 +6,8 @@ LittlerootTown_MaysHouse_1F_MapScripts:: @ 8152879
LittlerootTown_MaysHouse_1F_MapScript1_152889:: @ 8152889
compare VAR_LITTLEROOT_INTRO_STATE, 6
- call_if 0, LittlerootTown_MaysHouse_1F_EventScript_15289E
- checkflag FLAG_RECEIVED_RUNNING_SHOES
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528B1
+ call_if_lt LittlerootTown_MaysHouse_1F_EventScript_15289E
+ call_if_set FLAG_RECEIVED_RUNNING_SHOES, LittlerootTown_MaysHouse_1F_EventScript_1528B1
end
LittlerootTown_MaysHouse_1F_EventScript_15289E:: @ 815289E
@@ -28,11 +27,11 @@ LittlerootTown_MaysHouse_1F_EventScript_1528BE:: @ 81528BE
LittlerootTown_MaysHouse_1F_MapScript1_1528C8:: @ 81528C8
compare VAR_LITTLEROOT_INTRO_STATE, 3
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_152902
+ call_if_eq LittlerootTown_MaysHouse_1F_EventScript_152902
compare VAR_LITTLEROOT_INTRO_STATE, 5
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528EA
+ call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1528EA
compare VAR_LITTLEROOT_INTRO_STATE, 6
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528F6
+ call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1528F6
end
LittlerootTown_MaysHouse_1F_EventScript_1528EA:: @ 81528EA
@@ -118,9 +117,9 @@ LittlerootTown_MaysHouse_1F_Movement_1529C0:: @ 81529C0
lockall
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1529E1
+ call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1529E1
compare RESULT, 1
- call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1529E2
+ call_if_eq LittlerootTown_MaysHouse_1F_EventScript_1529E2
releaseall
end
@@ -135,10 +134,8 @@ LittlerootTown_BrendansHouse_1F_EventScript_1529EB:: @ 81529EB
LittlerootTown_MaysHouse_1F_EventScript_1529EB:: @ 81529EB
lock
faceplayer
- checkflag FLAG_DEFEATED_RIVAL_ROUTE103
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A21
- checkflag FLAG_RIVAL_LEFT_FOR_ROUTE103
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A17
+ goto_if_set FLAG_DEFEATED_RIVAL_ROUTE103, LittlerootTown_BrendansHouse_1F_EventScript_152A21
+ goto_if_set FLAG_RIVAL_LEFT_FOR_ROUTE103, LittlerootTown_BrendansHouse_1F_EventScript_152A17
compare VAR_LITTLEROOT_RIVAL_STATE, 3
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A2B
special GetRivalSonDaughterString
diff --git a/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc b/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc
index 34300b13e..ede58e7a5 100644
--- a/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc
+++ b/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc
@@ -4,10 +4,9 @@ LittlerootTown_MaysHouse_2F_MapScripts:: @ 8152A50
.byte 0
LittlerootTown_MaysHouse_2F_MapScript1_152A5B:: @ 8152A5B
- checkflag FLAG_DEFEATED_RIVAL_ROUTE103
- call_if 0, LittlerootTown_MaysHouse_2F_EventScript_152A7A
+ call_if_unset FLAG_DEFEATED_RIVAL_ROUTE103, LittlerootTown_MaysHouse_2F_EventScript_152A7A
compare VAR_LITTLEROOT_INTRO_STATE, 4
- call_if 1, LittlerootTown_MaysHouse_2F_EventScript_1B6950
+ call_if_eq LittlerootTown_MaysHouse_2F_EventScript_1B6950
call LittlerootTown_MaysHouse_2F_EventScript_1A2F3D
setvar VAR_0x4089, 0
end
@@ -30,13 +29,12 @@ LittlerootTown_MaysHouse_2F_EventScript_152A90:: @ 8152A90
LittlerootTown_BrendansHouse_2F_EventScript_152A9D:: @ 8152A9D
LittlerootTown_MaysHouse_2F_EventScript_152A9D:: @ 8152A9D
lockall
- checkflag FLAG_MET_RIVAL_LILYCOVE
- goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BB5
+ goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_152BB5
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152AD4
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152AD4
compare RESULT, 1
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B4A
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B4A
playse SE_KAIDAN
removeobject LAST_TALKED
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
@@ -58,11 +56,11 @@ LittlerootTown_BrendansHouse_2F_EventScript_152AD4:: @ 8152AD4
msgbox LittlerootTown_BrendansHouse_2F_Text_1733AF, 4
closemessage
compare FACING, 4
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B29
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B29
compare FACING, 2
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B34
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B34
compare FACING, 3
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B3F
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B3F
return
LittlerootTown_BrendansHouse_2F_EventScript_152B29:: @ 8152B29
@@ -92,11 +90,11 @@ LittlerootTown_BrendansHouse_2F_EventScript_152B4A:: @ 8152B4A
msgbox LittlerootTown_BrendansHouse_2F_Text_1735FC, 4
closemessage
compare FACING, 4
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B9F
compare FACING, 2
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152B9F
compare FACING, 3
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BAA
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BAA
return
LittlerootTown_BrendansHouse_2F_EventScript_152B9F:: @ 8152B9F
@@ -114,22 +112,20 @@ LittlerootTown_BrendansHouse_2F_EventScript_152BB5:: @ 8152BB5
waitmovement 0
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BDB
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BDB
compare RESULT, 1
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BED
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BED
setflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
releaseall
end
LittlerootTown_BrendansHouse_2F_EventScript_152BDB:: @ 8152BDB
- checkflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
- goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BFF
+ goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_152BFF
msgbox LittlerootTown_BrendansHouse_2F_Text_1737AE, 4
return
LittlerootTown_BrendansHouse_2F_EventScript_152BED:: @ 8152BED
- checkflag FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE
- goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152C08
+ goto_if_set FLAG_MET_RIVAL_IN_HOUSE_AFTER_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_152C08
msgbox LittlerootTown_BrendansHouse_2F_Text_1738F2, 4
return
diff --git a/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc b/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc
index 10e4712bb..7608ba65d 100644
--- a/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc
+++ b/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc
@@ -86,9 +86,8 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D63:: @ 8152D63
lock
faceplayer
compare VAR_BIRCH_LAB_STATE, 3
- goto_if 4, LittlerootTown_ProfessorBirchsLab_EventScript_152D90
- checkflag FLAG_BIRCH_AIDE_MET
- goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D86
+ goto_if_ge LittlerootTown_ProfessorBirchsLab_EventScript_152D90
+ goto_if_set FLAG_BIRCH_AIDE_MET, LittlerootTown_ProfessorBirchsLab_EventScript_152D86
msgbox LittlerootTown_ProfessorBirchsLab_Text_173B29, 4
setflag FLAG_BIRCH_AIDE_MET
release
@@ -107,8 +106,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D90:: @ 8152D90
LittlerootTown_ProfessorBirchsLab_EventScript_152D9A:: @ 8152D9A
lock
faceplayer
- checkflag FLAG_UNKNOWN_BIRCH_380
- goto_if 0, LittlerootTown_ProfessorBirchsLab_EventScript_1A037F
+ goto_if_unset FLAG_UNKNOWN_BIRCH_380, LittlerootTown_ProfessorBirchsLab_EventScript_1A037F
compare VAR_BIRCH_LAB_STATE, 5
goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E7B
msgbox LittlerootTown_ProfessorBirchsLab_Text_1740B4, 4
@@ -125,9 +123,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152DBA:: @ 8152DBA
waitmovement 0
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E13
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E13
compare RESULT, 1
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E40
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E40
setvar VAR_BIRCH_LAB_STATE, 5
setflag FLAG_ADVENTURE_STARTED
setvar VAR_ROUTE102_ACCESSIBLE, 1
@@ -140,7 +138,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152E13:: @ 8152E13
msgbox LittlerootTown_ProfessorBirchsLab_Text_1743D4, 4
giveitem_std ITEM_POKE_BALL, 5
compare RESULT, 0
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E85
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E85
msgbox LittlerootTown_ProfessorBirchsLab_Text_17443D, 4
setvar RESULT, 0
return
@@ -149,7 +147,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152E40:: @ 8152E40
msgbox LittlerootTown_ProfessorBirchsLab_Text_17453C, 4
giveitem_std ITEM_POKE_BALL, 5
compare RESULT, 0
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E8E
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E8E
msgbox LittlerootTown_ProfessorBirchsLab_Text_17458C, 4
setvar RESULT, 1
return
@@ -189,9 +187,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152EA3:: @ 8152EA3
faceplayer
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EBE
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152EBE
compare RESULT, 1
- call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EC7
+ call_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152EC7
release
end
diff --git a/data/scripts/maps/MagmaHideout_B1F.inc b/data/scripts/maps/MagmaHideout_B1F.inc
index 6dbdc0461..a55d260ab 100644
--- a/data/scripts/maps/MagmaHideout_B1F.inc
+++ b/data/scripts/maps/MagmaHideout_B1F.inc
@@ -3,8 +3,7 @@ MagmaHideout_B1F_MapScripts:: @ 815F2A8
.byte 0
MagmaHideout_B1F_MapScript1_15F2AE:: @ 815F2AE
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, MagmaHideout_B1F_EventScript_15F2B8
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, MagmaHideout_B1F_EventScript_15F2B8
end
MagmaHideout_B1F_EventScript_15F2B8:: @ 815F2B8
diff --git a/data/scripts/maps/MauvilleCity.inc b/data/scripts/maps/MauvilleCity.inc
index 652a25f6f..03974ddae 100644
--- a/data/scripts/maps/MauvilleCity.inc
+++ b/data/scripts/maps/MauvilleCity.inc
@@ -8,8 +8,7 @@ MauvilleCity_MapScript1_14C038:: @ 814C038
setflag FLAG_SYS_TV_START
clearflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
setvar VAR_MAUVILLE_GYM_STATE, 0
- checkflag FLAG_RECEIVED_TM24
- call_if 1, MauvilleCity_EventScript_14C053
+ call_if_set FLAG_RECEIVED_TM24, MauvilleCity_EventScript_14C053
end
MauvilleCity_EventScript_14C053:: @ 814C053
@@ -52,8 +51,7 @@ MauvilleCity_EventScript_14C099:: @ 814C099
MauvilleCity_EventScript_14C0A2:: @ 814C0A2
lock
faceplayer
- checkflag FLAG_TV_EXPLAINED
- goto_if_eq MauvilleCity_EventScript_14C0BA
+ goto_if_set FLAG_TV_EXPLAINED, MauvilleCity_EventScript_14C0BA
msgbox MauvilleCity_Text_16674A, 4
setflag FLAG_TV_EXPLAINED
release
@@ -67,8 +65,7 @@ MauvilleCity_EventScript_14C0BA:: @ 814C0BA
MauvilleCity_EventScript_14C0C4:: @ 814C0C4
lock
faceplayer
- checkflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE
- goto_if_eq MauvilleCity_EventScript_14C0E4
+ goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_14C0E4
msgbox MauvilleCity_Text_165B76, 4
closemessage
applymovement 7, MauvilleCity_Movement_1A083D
@@ -86,8 +83,7 @@ MauvilleCity_EventScript_14C0E4:: @ 814C0E4
MauvilleCity_EventScript_14C0F9:: @ 814C0F9
lockall
- checkflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE
- goto_if_eq MauvilleCity_EventScript_14C292
+ goto_if_set FLAG_DECLINED_WALLY_BATTLE_MAUVILLE, MauvilleCity_EventScript_14C292
applymovement 6, MauvilleCity_Movement_1A0843
waitmovement 0
msgbox MauvilleCity_Text_165BE3, 4
@@ -106,7 +102,7 @@ MauvilleCity_EventScript_14C0F9:: @ 814C0F9
MauvilleCity_EventScript_14C154:: @ 814C154
compare RESULT, YES
- call_if 1, MauvilleCity_EventScript_14C23C
+ call_if_eq MauvilleCity_EventScript_14C23C
compare RESULT, NO
goto_if_eq MauvilleCity_EventScript_14C285
closemessage
@@ -284,12 +280,10 @@ MauvilleCity_Movement_14C2E8:: @ 814C2E8
MauvilleCity_EventScript_14C2F2:: @ 814C2F2
lock
faceplayer
- checkflag FLAG_RECEIVED_TM24
- goto_if_eq MauvilleCity_EventScript_14C368
+ goto_if_set FLAG_RECEIVED_TM24, MauvilleCity_EventScript_14C368
compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq MauvilleCity_EventScript_14C33C
- checkflag FLAG_RECEIVED_BASEMENT_KEY
- goto_if_eq MauvilleCity_EventScript_14C332
+ goto_if_set FLAG_RECEIVED_BASEMENT_KEY, MauvilleCity_EventScript_14C332
msgbox MauvilleCity_Text_1661C1, 4
giveitem_std ITEM_BASEMENT_KEY
setflag FLAG_RECEIVED_BASEMENT_KEY
diff --git a/data/scripts/maps/MauvilleCity_BikeShop.inc b/data/scripts/maps/MauvilleCity_BikeShop.inc
index 6bd7f0f4f..08f11d641 100644
--- a/data/scripts/maps/MauvilleCity_BikeShop.inc
+++ b/data/scripts/maps/MauvilleCity_BikeShop.inc
@@ -4,10 +4,8 @@ MauvilleCity_BikeShop_MapScripts:: @ 8156795
MauvilleCity_BikeShop_EventScript_156796:: @ 8156796
lock
faceplayer
- checkflag FLAG_RECEIVED_BIKE
- goto_if_eq MauvilleCity_BikeShop_EventScript_15686E
- checkflag FLAG_DECLINED_BIKE
- goto_if_eq MauvilleCity_BikeShop_EventScript_1567D1
+ goto_if_set FLAG_RECEIVED_BIKE, MauvilleCity_BikeShop_EventScript_15686E
+ 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
diff --git a/data/scripts/maps/MauvilleCity_GameCorner.inc b/data/scripts/maps/MauvilleCity_GameCorner.inc
index e938a1b4c..2b784aeb9 100644
--- a/data/scripts/maps/MauvilleCity_GameCorner.inc
+++ b/data/scripts/maps/MauvilleCity_GameCorner.inc
@@ -34,7 +34,7 @@ MauvilleCity_GameCorner_EventScript_156A60:: @ 8156A60
MauvilleCity_GameCorner_EventScript_156AAE:: @ 8156AAE
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, 9950
- goto_if 4, MauvilleCity_GameCorner_EventScript_156B5C
+ goto_if_ge MauvilleCity_GameCorner_EventScript_156B5C
checkmoney 0x3e8, 0
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C
@@ -53,7 +53,7 @@ MauvilleCity_GameCorner_EventScript_156AAE:: @ 8156AAE
MauvilleCity_GameCorner_EventScript_156AF0:: @ 8156AF0
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, 9500
- goto_if 4, MauvilleCity_GameCorner_EventScript_156B5C
+ goto_if_ge MauvilleCity_GameCorner_EventScript_156B5C
checkmoney 0x2710, 0
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C
@@ -155,7 +155,7 @@ MauvilleCity_GameCorner_EventScript_156C0C:: @ 8156C0C
MauvilleCity_GameCorner_EventScript_156C46:: @ 8156C46
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_TREECKO_DOLL
checkdecorspace DECOR_TREECKO_DOLL
compare RESULT, 0
@@ -171,7 +171,7 @@ MauvilleCity_GameCorner_EventScript_156C46:: @ 8156C46
MauvilleCity_GameCorner_EventScript_156C80:: @ 8156C80
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_TORCHIC_DOLL
checkdecorspace DECOR_TORCHIC_DOLL
compare RESULT, 0
@@ -187,7 +187,7 @@ MauvilleCity_GameCorner_EventScript_156C80:: @ 8156C80
MauvilleCity_GameCorner_EventScript_156CBA:: @ 8156CBA
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156CF4
bufferdecorationname 1, DECOR_MUDKIP_DOLL
checkdecorspace DECOR_MUDKIP_DOLL
compare RESULT, 0
@@ -290,7 +290,7 @@ MauvilleCity_GameCorner_EventScript_156DEC:: @ 8156DEC
MauvilleCity_GameCorner_EventScript_156E3C:: @ 8156E3C
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 1500
- goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM32, 1
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
@@ -305,7 +305,7 @@ MauvilleCity_GameCorner_EventScript_156E3C:: @ 8156E3C
MauvilleCity_GameCorner_EventScript_156E76:: @ 8156E76
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 3500
- goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM29, 1
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
@@ -320,7 +320,7 @@ MauvilleCity_GameCorner_EventScript_156E76:: @ 8156E76
MauvilleCity_GameCorner_EventScript_156EB0:: @ 8156EB0
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 4000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM35, 1
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
@@ -335,7 +335,7 @@ MauvilleCity_GameCorner_EventScript_156EB0:: @ 8156EB0
MauvilleCity_GameCorner_EventScript_156EEA:: @ 8156EEA
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 4000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM24, 1
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
@@ -350,7 +350,7 @@ MauvilleCity_GameCorner_EventScript_156EEA:: @ 8156EEA
MauvilleCity_GameCorner_EventScript_156F24:: @ 8156F24
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, 4000
- goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E
+ goto_if_lt MauvilleCity_GameCorner_EventScript_156F5E
checkitemspace ITEM_TM13, 1
compare RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C
@@ -389,8 +389,7 @@ MauvilleCity_GameCorner_EventScript_156F8D:: @ 8156F8D
MauvilleCity_GameCorner_EventScript_156F96:: @ 8156F96
lock
faceplayer
- checkflag FLAG_RECEIVED_STARTER_DOLL
- goto_if_eq MauvilleCity_GameCorner_EventScript_157072
+ goto_if_set FLAG_RECEIVED_STARTER_DOLL, MauvilleCity_GameCorner_EventScript_157072
msgbox MauvilleCity_GameCorner_Text_181F3D, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq MauvilleCity_GameCorner_EventScript_157068
@@ -460,11 +459,10 @@ MauvilleCity_GameCorner_EventScript_15707C:: @ 815707C
end
MauvilleCity_GameCorner_EventScript_15709C:: @ 815709C
- checkflag FLAG_RECEIVED_20_COINS
- goto_if_eq MauvilleCity_GameCorner_EventScript_1570CA
+ goto_if_set FLAG_RECEIVED_20_COINS, MauvilleCity_GameCorner_EventScript_1570CA
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, 1
- goto_if 4, MauvilleCity_GameCorner_EventScript_1570CA
+ goto_if_ge MauvilleCity_GameCorner_EventScript_1570CA
setflag FLAG_RECEIVED_20_COINS
givecoins 20
msgbox MauvilleCity_GameCorner_Text_18208E, 4
diff --git a/data/scripts/maps/MauvilleCity_Gym.inc b/data/scripts/maps/MauvilleCity_Gym.inc
index fd9c673dc..1dc7fc0c7 100644
--- a/data/scripts/maps/MauvilleCity_Gym.inc
+++ b/data/scripts/maps/MauvilleCity_Gym.inc
@@ -3,8 +3,7 @@ MauvilleCity_Gym_MapScripts:: @ 8156450
.byte 0
MauvilleCity_Gym_MapScript1_156456:: @ 8156456
- checkflag FLAG_DEFEATED_MAUVILLE_GYM
- goto_if_eq MauvilleCity_Gym_EventScript_1565A7
+ goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_1565A7
switch VAR_MAUVILLE_GYM_STATE
case 0, MauvilleCity_Gym_EventScript_156491
case 1, MauvilleCity_Gym_EventScript_15657D
@@ -13,8 +12,7 @@ MauvilleCity_Gym_MapScript1_156456:: @ 8156456
end
MauvilleCity_Gym_EventScript_156491:: @ 8156491
- checkflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
- goto_if_eq MauvilleCity_Gym_EventScript_15649B
+ goto_if_set FLAG_MAUVILLE_GYM_BARRIERS_STATE, MauvilleCity_Gym_EventScript_15649B
end
MauvilleCity_Gym_EventScript_15649B:: @ 815649B
@@ -69,8 +67,7 @@ MauvilleCity_Gym_EventScript_1565A7:: @ 81565A7
MauvilleCity_Gym_EventScript_1565AB:: @ 81565AB
trainerbattle 1, OPPONENT_WATTSON, 0, MauvilleCity_Gym_Text_180C32, MauvilleCity_Gym_Text_180D64, MauvilleCity_Gym_EventScript_1565DB
- checkflag FLAG_RECEIVED_TM34
- goto_if 0, MauvilleCity_Gym_EventScript_15661D
+ goto_if_unset FLAG_RECEIVED_TM34, MauvilleCity_Gym_EventScript_15661D
compare VAR_NEW_MAUVILLE_STATE, 2
goto_if_eq MauvilleCity_Gym_EventScript_156641
msgbox MauvilleCity_Gym_Text_180EDB, 4
@@ -86,7 +83,7 @@ MauvilleCity_Gym_EventScript_1565DB:: @ 81565DB
setflag FLAG_BADGE03_GET
addvar VAR_PETALBURG_GYM_STATE, 1
compare VAR_PETALBURG_GYM_STATE, 6
- call_if 1, MauvilleCity_Gym_EventScript_1A00FB
+ call_if_eq MauvilleCity_Gym_EventScript_1A00FB
setvar VAR_SPECIAL_8, 3
call MauvilleCity_Gym_EventScript_1A01C0
special MauvilleGymSpecial3
@@ -111,8 +108,7 @@ MauvilleCity_Gym_EventScript_156641:: @ 8156641
MauvilleCity_Gym_EventScript_15664B:: @ 815664B
lockall
- checkflag FLAG_DEFEATED_MAUVILLE_GYM
- goto_if_eq MauvilleCity_Gym_EventScript_1566DA
+ goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_1566DA
compare VAR_MAUVILLE_GYM_STATE, 1
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 1
@@ -122,8 +118,7 @@ MauvilleCity_Gym_EventScript_15664B:: @ 815664B
MauvilleCity_Gym_EventScript_156670:: @ 8156670
lockall
- checkflag FLAG_DEFEATED_MAUVILLE_GYM
- goto_if_eq MauvilleCity_Gym_EventScript_1566DA
+ goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_1566DA
compare VAR_MAUVILLE_GYM_STATE, 2
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 2
@@ -133,8 +128,7 @@ MauvilleCity_Gym_EventScript_156670:: @ 8156670
MauvilleCity_Gym_EventScript_156695:: @ 8156695
lockall
- checkflag FLAG_DEFEATED_MAUVILLE_GYM
- goto_if_eq MauvilleCity_Gym_EventScript_1566DA
+ goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_1566DA
compare VAR_MAUVILLE_GYM_STATE, 3
goto_if_eq MauvilleCity_Gym_EventScript_1566DA
setvar VAR_MAUVILLE_GYM_STATE, 3
@@ -147,10 +141,8 @@ MauvilleCity_Gym_EventScript_1566BA:: @ 81566BA
special MauvilleGymSpecial1
special DrawWholeMapView
playse SE_KI_GASYAN
- checkflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
- goto_if_eq MauvilleCity_Gym_EventScript_1566E1
- checkflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
- goto_if 0, MauvilleCity_Gym_EventScript_1566DC
+ goto_if_set FLAG_MAUVILLE_GYM_BARRIERS_STATE, MauvilleCity_Gym_EventScript_1566E1
+ goto_if_unset FLAG_MAUVILLE_GYM_BARRIERS_STATE, MauvilleCity_Gym_EventScript_1566DC
releaseall
end
@@ -191,8 +183,7 @@ MauvilleCity_Gym_EventScript_15672B:: @ 815672B
MauvilleCity_Gym_EventScript_156742:: @ 8156742
lock
faceplayer
- checkflag FLAG_DEFEATED_MAUVILLE_GYM
- goto_if_eq MauvilleCity_Gym_EventScript_156757
+ goto_if_set FLAG_DEFEATED_MAUVILLE_GYM, MauvilleCity_Gym_EventScript_156757
msgbox MauvilleCity_Gym_Text_180815, 4
release
end
@@ -204,15 +195,13 @@ MauvilleCity_Gym_EventScript_156757:: @ 8156757
MauvilleCity_Gym_EventScript_156761:: @ 8156761
lockall
- checkflag FLAG_BADGE03_GET
- goto_if_eq MauvilleCity_Gym_EventScript_156781
+ goto_if_set FLAG_BADGE03_GET, MauvilleCity_Gym_EventScript_156781
goto MauvilleCity_Gym_EventScript_15678B
end
MauvilleCity_Gym_EventScript_156771:: @ 8156771
lockall
- checkflag FLAG_BADGE03_GET
- goto_if_eq MauvilleCity_Gym_EventScript_156781
+ goto_if_set FLAG_BADGE03_GET, MauvilleCity_Gym_EventScript_156781
goto MauvilleCity_Gym_EventScript_15678B
end
diff --git a/data/scripts/maps/MauvilleCity_House1.inc b/data/scripts/maps/MauvilleCity_House1.inc
index 210288517..eb21a49e9 100644
--- a/data/scripts/maps/MauvilleCity_House1.inc
+++ b/data/scripts/maps/MauvilleCity_House1.inc
@@ -4,8 +4,7 @@ MauvilleCity_House1_MapScripts:: @ 81569FC
MauvilleCity_House1_EventScript_1569FD:: @ 81569FD
lock
faceplayer
- checkflag FLAG_RECEIVED_HM06
- goto_if_eq MauvilleCity_House1_EventScript_156A29
+ goto_if_set FLAG_RECEIVED_HM06, MauvilleCity_House1_EventScript_156A29
msgbox MauvilleCity_House1_Text_181B1A, 4
giveitem_std ITEM_HM06
setflag FLAG_RECEIVED_HM06
diff --git a/data/scripts/maps/MauvilleCity_House2.inc b/data/scripts/maps/MauvilleCity_House2.inc
index 9d3bce68a..f18d278b5 100644
--- a/data/scripts/maps/MauvilleCity_House2.inc
+++ b/data/scripts/maps/MauvilleCity_House2.inc
@@ -4,8 +4,7 @@ MauvilleCity_House2_MapScripts:: @ 81572BF
MauvilleCity_House2_EventScript_1572C0:: @ 81572C0
lock
faceplayer
- checkflag FLAG_RECEIVED_COIN_CASE
- goto_if_eq MauvilleCity_House2_EventScript_15733D
+ 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
diff --git a/data/scripts/maps/MeteorFalls_1F_1R.inc b/data/scripts/maps/MeteorFalls_1F_1R.inc
index bf51408b8..272d7ed6e 100644
--- a/data/scripts/maps/MeteorFalls_1F_1R.inc
+++ b/data/scripts/maps/MeteorFalls_1F_1R.inc
@@ -215,8 +215,7 @@ MeteorFalls_1F_1R_Movement_15C64F:: @ 815C64F
MeteorFalls_1F_1R_EventScript_15C656:: @ 815C656
lock
faceplayer
- checkflag FLAG_MET_PROF_COSMO
- goto_if_eq MeteorFalls_1F_1R_EventScript_15C66E
+ goto_if_set FLAG_MET_PROF_COSMO, MeteorFalls_1F_1R_EventScript_15C66E
setflag FLAG_MET_PROF_COSMO
msgbox MeteorFalls_1F_1R_Text_1937EB, 4
release
diff --git a/data/scripts/maps/MossdeepCity.inc b/data/scripts/maps/MossdeepCity.inc
index 3d1baf143..7ec338927 100644
--- a/data/scripts/maps/MossdeepCity.inc
+++ b/data/scripts/maps/MossdeepCity.inc
@@ -7,8 +7,7 @@ MossdeepCity_MapScript1_14CF98:: @ 814CF98
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, MossdeepCity_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, MossdeepCity_EventScript_1A02C1
end
MossdeepCity_EventScript_14CFAE:: @ 814CFAE
@@ -68,8 +67,7 @@ MossdeepCity_EventScript_14D011:: @ 814D011
MossdeepCity_EventScript_14D027:: @ 814D027
lock
faceplayer
- checkflag FLAG_RECEIVED_KINGS_ROCK
- goto_if_eq MossdeepCity_EventScript_14D069
+ goto_if_set FLAG_RECEIVED_KINGS_ROCK, MossdeepCity_EventScript_14D069
msgbox MossdeepCity_Text_1690A9, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq MossdeepCity_EventScript_14D073
diff --git a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc
index eac7f4adb..364778613 100644
--- a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc
+++ b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc
@@ -7,7 +7,7 @@ MossdeepCity_GameCorner_1F_MapScripts:: @ 815AC52
MossdeepCity_GameCorner_1F_MapScript1_15AC62:: @ 815AC62
special ValidateEReaderTrainer
compare RESULT, 1
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AC71
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AC71
end
MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71
@@ -18,9 +18,9 @@ MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71
MossdeepCity_GameCorner_1F_MapScript1_15AC84:: @ 815AC84
special ValidateEReaderTrainer
compare RESULT, 0
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AC9E
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AC9E
compare VAR_GAME_CORNER_STATE, 0
- call_if 5, MossdeepCity_GameCorner_1F_EventScript_15ACAF
+ call_if_ne MossdeepCity_GameCorner_1F_EventScript_15ACAF
end
MossdeepCity_GameCorner_1F_EventScript_15AC9E:: @ 815AC9E
@@ -50,11 +50,11 @@ MossdeepCity_GameCorner_1F_EventScript_15ACD5:: @ 815ACD5
applymovement 255, MossdeepCity_GameCorner_1F_Movement_1A0841
waitmovement 0
compare VAR_GAME_CORNER_STATE, 1
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD22
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AD22
compare VAR_GAME_CORNER_STATE, 2
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD2B
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AD2B
compare VAR_GAME_CORNER_STATE, 3
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD34
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AD34
special LoadPlayerParty
setvar VAR_GAME_CORNER_STATE, 0
releaseall
@@ -101,7 +101,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59
goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
msgbox MossdeepCity_GameCorner_1F_Text_18E741, MSGBOX_YESNO
compare RESULT, NO
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15ADE8
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8
special LoadPlayerParty
call S_DoSaveDialog
compare RESULT, 0
@@ -112,11 +112,11 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59
msgbox MossdeepCity_GameCorner_1F_Text_18E777, 4
closemessage
compare FACING, 2
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE04
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE04
compare FACING, 4
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE16
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE16
compare FACING, 3
- call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE28
+ call_if_eq MossdeepCity_GameCorner_1F_EventScript_15AE28
warp MAP_MOSSDEEP_CITY_GAME_CORNER_B1F, 255, 3, 1
waitstate
release
diff --git a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc
index 9f20b6310..f62693756 100644
--- a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc
+++ b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc
@@ -23,11 +23,11 @@ MossdeepCity_GameCorner_B1F_EventScript_15AE6E:: @ 815AE6E
special StartSpecialBattle
waitstate
compare RESULT, 3
- call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AED5
+ call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AED5
compare RESULT, 1
- call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AEE3
+ call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AEE3
compare RESULT, 2
- call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AEEE
+ call_if_eq MossdeepCity_GameCorner_B1F_EventScript_15AEEE
closemessage
special ScrSpecial_HealPlayerParty
applymovement 255, MossdeepCity_GameCorner_B1F_Movement_15AEFF
diff --git a/data/scripts/maps/MossdeepCity_Gym.inc b/data/scripts/maps/MossdeepCity_Gym.inc
index bc22ce3fe..341962431 100644
--- a/data/scripts/maps/MossdeepCity_Gym.inc
+++ b/data/scripts/maps/MossdeepCity_Gym.inc
@@ -3,26 +3,22 @@ MossdeepCity_Gym_MapScripts:: @ 815A4D3
.byte 0
MossdeepCity_Gym_MapScript1_15A4D9:: @ 815A4D9
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_1
- goto_if_eq MossdeepCity_Gym_EventScript_15A510
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_15A510
goto MossdeepCity_Gym_EventScript_15A4E8
end
MossdeepCity_Gym_EventScript_15A4E8:: @ 815A4E8
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_2
- goto_if_eq MossdeepCity_Gym_EventScript_15A528
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_15A528
goto MossdeepCity_Gym_EventScript_15A4F7
end
MossdeepCity_Gym_EventScript_15A4F7:: @ 815A4F7
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_3
- goto_if_eq MossdeepCity_Gym_EventScript_15A540
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_15A540
goto MossdeepCity_Gym_EventScript_15A506
end
MossdeepCity_Gym_EventScript_15A506:: @ 815A506
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_4
- goto_if_eq MossdeepCity_Gym_EventScript_15A558
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_15A558
end
MossdeepCity_Gym_EventScript_15A510:: @ 815A510
@@ -50,8 +46,7 @@ MossdeepCity_Gym_EventScript_15A558:: @ 815A558
MossdeepCity_Gym_EventScript_15A56B:: @ 815A56B
trainerbattle 8, OPPONENT_TATE_AND_LIZA, 0, MossdeepCity_Gym_Text_18CF02, MossdeepCity_Gym_Text_18D077, MossdeepCity_Gym_Text_18D324, MossdeepCity_Gym_EventScript_15A594
- checkflag FLAG_RECEIVED_TM04
- goto_if 0, MossdeepCity_Gym_EventScript_15A5C6
+ goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_15A5C6
msgbox MossdeepCity_Gym_Text_18D273, 4
release
end
@@ -82,8 +77,7 @@ MossdeepCity_Gym_EventScript_15A5C6:: @ 815A5C6
MossdeepCity_Gym_EventScript_15A5EA:: @ 815A5EA
lockall
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_1
- goto_if_eq MossdeepCity_Gym_EventScript_15A621
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_15A621
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
@@ -109,8 +103,7 @@ MossdeepCity_Gym_EventScript_15A621:: @ 815A621
MossdeepCity_Gym_EventScript_15A646:: @ 815A646
lockall
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_2
- goto_if_eq MossdeepCity_Gym_EventScript_15A675
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_2, MossdeepCity_Gym_EventScript_15A675
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
@@ -130,8 +123,7 @@ MossdeepCity_Gym_EventScript_15A675:: @ 815A675
MossdeepCity_Gym_EventScript_15A69A:: @ 815A69A
lockall
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_3
- goto_if_eq MossdeepCity_Gym_EventScript_15A6C9
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_3, MossdeepCity_Gym_EventScript_15A6C9
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
@@ -151,8 +143,7 @@ MossdeepCity_Gym_EventScript_15A6C9:: @ 815A6C9
MossdeepCity_Gym_EventScript_15A6EE:: @ 815A6EE
lockall
- checkflag FLAG_MOSSDEEP_GYM_SWITCH_4
- goto_if_eq MossdeepCity_Gym_EventScript_15A71D
+ goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_4, MossdeepCity_Gym_EventScript_15A71D
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement 255, MossdeepCity_Gym_Movement_15A7F7
waitmovement 0
@@ -210,8 +201,7 @@ MossdeepCity_Gym_EventScript_15A7C1:: @ 815A7C1
MossdeepCity_Gym_EventScript_15A7D8:: @ 815A7D8
lock
faceplayer
- checkflag FLAG_DEFEATED_MOSSDEEP_GYM
- goto_if_eq MossdeepCity_Gym_EventScript_15A7ED
+ goto_if_set FLAG_DEFEATED_MOSSDEEP_GYM, MossdeepCity_Gym_EventScript_15A7ED
msgbox MossdeepCity_Gym_Text_18C7E3, 4
release
end
@@ -228,15 +218,13 @@ MossdeepCity_Gym_Movement_15A7F7:: @ 815A7F7
MossdeepCity_Gym_EventScript_15A7FA:: @ 815A7FA
lockall
- checkflag FLAG_BADGE07_GET
- goto_if_eq MossdeepCity_Gym_EventScript_15A81A
+ goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_15A81A
goto MossdeepCity_Gym_EventScript_15A824
end
MossdeepCity_Gym_EventScript_15A80A:: @ 815A80A
lockall
- checkflag FLAG_BADGE07_GET
- goto_if_eq MossdeepCity_Gym_EventScript_15A81A
+ goto_if_set FLAG_BADGE07_GET, MossdeepCity_Gym_EventScript_15A81A
goto MossdeepCity_Gym_EventScript_15A824
end
diff --git a/data/scripts/maps/MossdeepCity_House2.inc b/data/scripts/maps/MossdeepCity_House2.inc
index 1da204ff0..415dbfc33 100644
--- a/data/scripts/maps/MossdeepCity_House2.inc
+++ b/data/scripts/maps/MossdeepCity_House2.inc
@@ -20,9 +20,9 @@ MossdeepCity_House2_EventScript_15A87B:: @ 815A87B
setflag FLAG_WINGULL_DELIVERED_MAIL
clearflag FLAG_HIDE_WINGULL_FORTREE_HOUSE
compare FACING, 2
- call_if 1, MossdeepCity_House2_EventScript_15A8AE
+ call_if_eq MossdeepCity_House2_EventScript_15A8AE
compare FACING, 3
- call_if 1, MossdeepCity_House2_EventScript_15A8B9
+ call_if_eq MossdeepCity_House2_EventScript_15A8B9
removeobject 3
release
end
diff --git a/data/scripts/maps/MossdeepCity_House3.inc b/data/scripts/maps/MossdeepCity_House3.inc
index fb44685d8..4c4d6cbdd 100644
--- a/data/scripts/maps/MossdeepCity_House3.inc
+++ b/data/scripts/maps/MossdeepCity_House3.inc
@@ -4,8 +4,7 @@ MossdeepCity_House3_MapScripts:: @ 815A971
MossdeepCity_House3_EventScript_15A972:: @ 815A972
lock
faceplayer
- checkflag FLAG_RECEIVED_SUPER_ROD
- goto_if_eq MossdeepCity_House3_EventScript_15A9B1
+ goto_if_set FLAG_RECEIVED_SUPER_ROD, MossdeepCity_House3_EventScript_15A9B1
msgbox MossdeepCity_House3_Text_18D909, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq MossdeepCity_House3_EventScript_15A9BB
diff --git a/data/scripts/maps/MossdeepCity_House4.inc b/data/scripts/maps/MossdeepCity_House4.inc
index 856ee1287..5fb0f97ff 100644
--- a/data/scripts/maps/MossdeepCity_House4.inc
+++ b/data/scripts/maps/MossdeepCity_House4.inc
@@ -4,8 +4,7 @@ MossdeepCity_House4_MapScripts:: @ 815AB30
MossdeepCity_House4_EventScript_15AB31:: @ 815AB31
lock
faceplayer
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq MossdeepCity_House4_EventScript_15AB46
+ goto_if_set FLAG_SYS_GAME_CLEAR, MossdeepCity_House4_EventScript_15AB46
msgbox MossdeepCity_House4_Text_18E0E3, 4
release
end
diff --git a/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc b/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc
index 884124567..83b859c26 100644
--- a/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc
+++ b/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc
@@ -8,9 +8,9 @@ MossdeepCity_SpaceCenter_1F_EventScript_15AB8B:: @ 815AB8B
specialvar RESULT, GetWeekCount
buffernumberstring 0, RESULT
compare RESULT, 0
- call_if 1, MossdeepCity_SpaceCenter_1F_EventScript_15ABBA
+ call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_15ABBA
compare RESULT, 1
- call_if 4, MossdeepCity_SpaceCenter_1F_EventScript_15ABC3
+ call_if_ge MossdeepCity_SpaceCenter_1F_EventScript_15ABC3
closemessage
applymovement LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D
waitmovement 0
@@ -32,8 +32,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_15ABCC:: @ 815ABCC
MossdeepCity_SpaceCenter_1F_EventScript_15ABD5:: @ 815ABD5
lock
faceplayer
- checkflag FLAG_RECEIVED_SUN_STONE_MOSSDEEP
- goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_15AC0C
+ 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
diff --git a/data/scripts/maps/MossdeepCity_StevensHouse.inc b/data/scripts/maps/MossdeepCity_StevensHouse.inc
index ce2f2aad5..d9ad70f70 100644
--- a/data/scripts/maps/MossdeepCity_StevensHouse.inc
+++ b/data/scripts/maps/MossdeepCity_StevensHouse.inc
@@ -5,8 +5,7 @@ MossdeepCity_StevensHouse_MapScripts:: @ 815A9C5
.byte 0
MossdeepCity_StevensHouse_MapScript1_15A9D5:: @ 815A9D5
- checkflag FLAG_SYS_GAME_CLEAR
- call_if 0, MossdeepCity_StevensHouse_EventScript_15A9DF
+ call_if_unset FLAG_SYS_GAME_CLEAR, MossdeepCity_StevensHouse_EventScript_15A9DF
end
MossdeepCity_StevensHouse_EventScript_15A9DF:: @ 815A9DF
@@ -15,7 +14,7 @@ MossdeepCity_StevensHouse_EventScript_15A9DF:: @ 815A9DF
MossdeepCity_StevensHouse_MapScript1_15A9E9:: @ 815A9E9
compare VAR_STEVENS_HOUSE_STATE, 1
- call_if 1, MossdeepCity_StevensHouse_EventScript_15A9F5
+ call_if_eq MossdeepCity_StevensHouse_EventScript_15A9F5
end
MossdeepCity_StevensHouse_EventScript_15A9F5:: @ 815A9F5
@@ -87,7 +86,7 @@ MossdeepCity_StevensHouse_EventScript_15AA7C:: @ 815AA7C
bufferspeciesname 1, SPECIES_BELDUM
msgbox MossdeepCity_StevensHouse_Text_1A1102, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, MossdeepCity_StevensHouse_EventScript_1A0678
+ call_if_eq MossdeepCity_StevensHouse_EventScript_1A0678
setflag FLAG_HIDE_BELDUM_BALL_STEVENS_HOUSE
setflag FLAG_RECEIVED_BELDUM
releaseall
@@ -113,8 +112,7 @@ MossdeepCity_StevensHouse_EventScript_15AAF9:: @ 815AAF9
MossdeepCity_StevensHouse_EventScript_15AB02:: @ 815AB02
lockall
- checkflag FLAG_OMIT_DIVE_FROM_STEVEN_LETTER
- goto_if_eq MossdeepCity_StevensHouse_EventScript_15AB16
+ goto_if_set FLAG_OMIT_DIVE_FROM_STEVEN_LETTER, MossdeepCity_StevensHouse_EventScript_15AB16
msgbox MossdeepCity_StevensHouse_Text_18DF1A, 4
releaseall
end
diff --git a/data/scripts/maps/MtChimney.inc b/data/scripts/maps/MtChimney.inc
index be4799a45..ac7c00013 100644
--- a/data/scripts/maps/MtChimney.inc
+++ b/data/scripts/maps/MtChimney.inc
@@ -26,7 +26,7 @@ MtChimney_EventScript_15CF95:: @ 815CF95
msgbox MtChimney_Text_1957A9, 4
checkitemspace ITEM_LAVA_COOKIE, 1
compare RESULT, 1
- call_if 1, MtChimney_EventScript_15D000
+ call_if_eq MtChimney_EventScript_15D000
giveitem_std ITEM_LAVA_COOKIE
compare RESULT, 0
goto_if_eq MtChimney_EventScript_15CFF3
@@ -406,10 +406,8 @@ MtChimney_EventScript_15D174:: @ 815D174
MtChimney_EventScript_15D17D:: @ 815D17D
lockall
- checkflag FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY
- goto_if 0, MtChimney_EventScript_15D1D0
- checkflag FLAG_RECEIVED_METEORITE
- goto_if_eq MtChimney_EventScript_15D1C6
+ 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
goto_if_eq MtChimney_EventScript_15D1BC
diff --git a/data/scripts/maps/MtChimney_CableCarStation.inc b/data/scripts/maps/MtChimney_CableCarStation.inc
index aefc68bda..d73c427f8 100644
--- a/data/scripts/maps/MtChimney_CableCarStation.inc
+++ b/data/scripts/maps/MtChimney_CableCarStation.inc
@@ -5,7 +5,7 @@ MtChimney_CableCarStation_MapScripts:: @ 815C0FA
MtChimney_CableCarStation_MapScript1_15C105:: @ 815C105
compare VAR_CABLE_CAR_STATION_STATE, 1
- call_if 1, MtChimney_CableCarStation_EventScript_15C111
+ call_if_eq MtChimney_CableCarStation_EventScript_15C111
end
MtChimney_CableCarStation_EventScript_15C111:: @ 815C111
diff --git a/data/scripts/maps/MtPyre_1F.inc b/data/scripts/maps/MtPyre_1F.inc
index 7073000d5..f34c31da0 100644
--- a/data/scripts/maps/MtPyre_1F.inc
+++ b/data/scripts/maps/MtPyre_1F.inc
@@ -4,8 +4,7 @@ MtPyre_1F_MapScripts:: @ 815D322
MtPyre_1F_EventScript_15D323:: @ 815D323
lock
faceplayer
- checkflag FLAG_RECEIVED_CLEANSE_TAG
- goto_if_eq MtPyre_1F_EventScript_15D352
+ 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
diff --git a/data/scripts/maps/MtPyre_Exterior.inc b/data/scripts/maps/MtPyre_Exterior.inc
index ec5864df5..f8b4141d7 100644
--- a/data/scripts/maps/MtPyre_Exterior.inc
+++ b/data/scripts/maps/MtPyre_Exterior.inc
@@ -9,7 +9,7 @@ MtPyre_Exterior_MapScript1_15D48C:: @ 815D48C
MtPyre_Exterior_EventScript_15D492:: @ 815D492
getplayerxy VAR_TEMP_0, VAR_TEMP_1
compare VAR_TEMP_1, 12
- goto_if 0, MtPyre_Exterior_EventScript_15D4A3
+ goto_if_lt MtPyre_Exterior_EventScript_15D4A3
return
MtPyre_Exterior_EventScript_15D4A3:: @ 815D4A3
diff --git a/data/scripts/maps/MtPyre_Summit.inc b/data/scripts/maps/MtPyre_Summit.inc
index 56ef5db79..d37100938 100644
--- a/data/scripts/maps/MtPyre_Summit.inc
+++ b/data/scripts/maps/MtPyre_Summit.inc
@@ -31,11 +31,11 @@ MtPyre_Summit_EventScript_15D4E1:: @ 815D4E1
waitmovement 0
delay 50
compare VAR_SPECIAL_8, 0
- call_if 1, MtPyre_Summit_EventScript_15D593
+ call_if_eq MtPyre_Summit_EventScript_15D593
compare VAR_SPECIAL_8, 1
- call_if 1, MtPyre_Summit_EventScript_15D59E
+ call_if_eq MtPyre_Summit_EventScript_15D59E
compare VAR_SPECIAL_8, 2
- call_if 1, MtPyre_Summit_EventScript_15D59F
+ call_if_eq MtPyre_Summit_EventScript_15D59F
.ifdef SAPPHIRE
msgbox UnknownString_81B52B0, 4
.else
@@ -53,11 +53,11 @@ MtPyre_Summit_EventScript_15D4E1:: @ 815D4E1
delay 20
call MtPyre_Summit_EventScript_15D57A
compare VAR_SPECIAL_8, 0
- call_if 1, MtPyre_Summit_EventScript_15D5AA
+ call_if_eq MtPyre_Summit_EventScript_15D5AA
compare VAR_SPECIAL_8, 1
- call_if 1, MtPyre_Summit_EventScript_15D5BF
+ call_if_eq MtPyre_Summit_EventScript_15D5BF
compare VAR_SPECIAL_8, 2
- call_if 1, MtPyre_Summit_EventScript_15D5CA
+ call_if_eq MtPyre_Summit_EventScript_15D5CA
.ifdef SAPPHIRE
msgbox UnknownString_81B53AB, 4
.else
@@ -144,9 +144,9 @@ MtPyre_Summit_EventScript_15D5EF:: @ 815D5EF
msgbox MtPyre_Summit_Text_1B64B3, MSGBOX_YESNO
.endif
compare RESULT, YES
- call_if 1, MtPyre_Summit_EventScript_15D611
+ call_if_eq MtPyre_Summit_EventScript_15D611
compare RESULT, NO
- call_if 1, MtPyre_Summit_EventScript_15D61A
+ call_if_eq MtPyre_Summit_EventScript_15D61A
release
end
@@ -169,12 +169,9 @@ MtPyre_Summit_EventScript_15D61A:: @ 815D61A
MtPyre_Summit_EventScript_15D623:: @ 815D623
lock
faceplayer
- checkflag FLAG_RETURNED_RED_OR_BLUE_ORB
- goto_if_eq MtPyre_Summit_EventScript_15D6C4
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq MtPyre_Summit_EventScript_15D64A
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if_eq MtPyre_Summit_EventScript_15D6BA
+ goto_if_set FLAG_RETURNED_RED_OR_BLUE_ORB, MtPyre_Summit_EventScript_15D6C4
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, MtPyre_Summit_EventScript_15D64A
+ goto_if_set FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, MtPyre_Summit_EventScript_15D6BA
.ifdef SAPPHIRE
msgbox UnknownString_81B54BE, 4
.else
@@ -269,11 +266,11 @@ MtPyre_Summit_EventScript_15D6F2:: @ 815D6F2
waitmovement 0
delay 50
compare VAR_SPECIAL_8, 0
- call_if 1, MtPyre_Summit_EventScript_15D75E
+ call_if_eq MtPyre_Summit_EventScript_15D75E
compare VAR_SPECIAL_8, 1
- call_if 1, MtPyre_Summit_EventScript_15D769
+ call_if_eq MtPyre_Summit_EventScript_15D769
compare VAR_SPECIAL_8, 2
- call_if 1, MtPyre_Summit_EventScript_15D774
+ call_if_eq MtPyre_Summit_EventScript_15D774
.ifdef SAPPHIRE
msgbox UnknownString_81B5BFC, 4
.else
@@ -281,11 +278,11 @@ MtPyre_Summit_EventScript_15D6F2:: @ 815D6F2
.endif
closemessage
compare VAR_SPECIAL_8, 0
- call_if 1, MtPyre_Summit_EventScript_15D77F
+ call_if_eq MtPyre_Summit_EventScript_15D77F
compare VAR_SPECIAL_8, 1
- call_if 1, MtPyre_Summit_EventScript_15D78A
+ call_if_eq MtPyre_Summit_EventScript_15D78A
compare VAR_SPECIAL_8, 2
- call_if 1, MtPyre_Summit_EventScript_15D795
+ call_if_eq MtPyre_Summit_EventScript_15D795
removeobject 2
setvar VAR_MT_PYRE_STATE, 3
releaseall
diff --git a/data/scripts/maps/NewMauville_Entrance.inc b/data/scripts/maps/NewMauville_Entrance.inc
index 2a4d8afce..1c8bdfb3f 100644
--- a/data/scripts/maps/NewMauville_Entrance.inc
+++ b/data/scripts/maps/NewMauville_Entrance.inc
@@ -5,7 +5,7 @@ NewMauville_Entrance_MapScripts:: @ 815E48A
NewMauville_Entrance_MapScript1_15E495:: @ 815E495
compare VAR_NEW_MAUVILLE_STATE, 0
- call_if 1, NewMauville_Entrance_EventScript_15E4A1
+ call_if_eq NewMauville_Entrance_EventScript_15E4A1
end
NewMauville_Entrance_EventScript_15E4A1:: @ 815E4A1
diff --git a/data/scripts/maps/NewMauville_Inside.inc b/data/scripts/maps/NewMauville_Inside.inc
index ae33d7978..e045cda5d 100644
--- a/data/scripts/maps/NewMauville_Inside.inc
+++ b/data/scripts/maps/NewMauville_Inside.inc
@@ -6,11 +6,10 @@ NewMauville_Inside_MapScripts:: @ 815E55F
NewMauville_Inside_MapScript1_15E56F:: @ 815E56F
compare VAR_TEMP_1, 1
- call_if 1, NewMauville_Inside_EventScript_15E5DA
+ call_if_eq NewMauville_Inside_EventScript_15E5DA
compare VAR_TEMP_2, 1
- call_if 1, NewMauville_Inside_EventScript_15E728
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, NewMauville_Inside_EventScript_15E58F
+ call_if_eq NewMauville_Inside_EventScript_15E728
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, NewMauville_Inside_EventScript_15E58F
end
NewMauville_Inside_EventScript_15E58F:: @ 815E58F
@@ -24,7 +23,7 @@ NewMauville_Inside_MapScript1_15E593:: @ 815E593
NewMauville_Inside_MapScript1_15E59E:: @ 815E59E
compare VAR_NEW_MAUVILLE_STATE, 2
- call_if 1, NewMauville_Inside_EventScript_15E88B
+ call_if_eq NewMauville_Inside_EventScript_15E88B
end
NewMauville_Inside_EventScript_15E5AA:: @ 815E5AA
diff --git a/data/scripts/maps/OldaleTown.inc b/data/scripts/maps/OldaleTown.inc
index a2d2616d3..9b1c9dd80 100644
--- a/data/scripts/maps/OldaleTown.inc
+++ b/data/scripts/maps/OldaleTown.inc
@@ -5,12 +5,9 @@ OldaleTown_MapScripts:: @ 814DD62
OldaleTown_MapScript1_14DD68:: @ 814DD68
call OldaleTown_EventScript_1A014E
setflag FLAG_VISITED_OLDALE_TOWN
- checkflag FLAG_ADVENTURE_STARTED
- call_if 0, OldaleTown_EventScript_14DD92
- checkflag FLAG_RECEIVED_POTION_OLDALE
- call_if 0, OldaleTown_EventScript_14DD9E
- checkflag FLAG_ADVENTURE_STARTED
- call_if 1, OldaleTown_EventScript_14DD8C
+ call_if_unset FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_14DD92
+ call_if_unset FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_14DD9E
+ call_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_14DD8C
end
OldaleTown_EventScript_14DD8C:: @ 814DD8C
@@ -38,10 +35,8 @@ OldaleTown_EventScript_14DDB3:: @ 814DDB3
OldaleTown_EventScript_14DDBC:: @ 814DDBC
lock
faceplayer
- checkflag FLAG_RECEIVED_POTION_OLDALE
- goto_if_eq OldaleTown_EventScript_14DE79
- checkflag FLAG_TEMP_1
- goto_if_eq OldaleTown_EventScript_14DE79
+ goto_if_set FLAG_RECEIVED_POTION_OLDALE, OldaleTown_EventScript_14DE79
+ goto_if_set FLAG_TEMP_1, OldaleTown_EventScript_14DE79
setflag FLAG_TEMP_1
playbgm BGM_TSURETEK, FALSE
msgbox OldaleTown_Text_16AEF2, 4
@@ -195,8 +190,7 @@ OldaleTown_Movement_14DECB:: @ 814DECB
OldaleTown_EventScript_14DEDF:: @ 814DEDF
lock
faceplayer
- checkflag FLAG_ADVENTURE_STARTED
- goto_if_eq OldaleTown_EventScript_14DF26
+ goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_EventScript_14DF26
msgbox OldaleTown_Text_16B0CC, 4
closemessage
applymovement 3, OldaleTown_Movement_1A083D
diff --git a/data/scripts/maps/OldaleTown_Mart.inc b/data/scripts/maps/OldaleTown_Mart.inc
index f90c787c2..15cf40027 100644
--- a/data/scripts/maps/OldaleTown_Mart.inc
+++ b/data/scripts/maps/OldaleTown_Mart.inc
@@ -6,8 +6,7 @@ OldaleTown_Mart_EventScript_152F79:: @ 8152F79
faceplayer
message OldaleTown_Mart_Text_1A0BE4
waitmessage
- checkflag FLAG_ADVENTURE_STARTED
- goto_if_eq OldaleTown_Mart_EventScript_152FA8
+ goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_EventScript_152FA8
pokemart OldaleTown_Mart_Items1
msgbox OldaleTown_Mart_Text_1A0C02, 4
release
@@ -43,8 +42,7 @@ OldaleTown_Mart_Items2:: @ 8152FB8
OldaleTown_Mart_EventScript_152FC6:: @ 8152FC6
lock
faceplayer
- checkflag FLAG_ADVENTURE_STARTED
- goto_if_eq OldaleTown_Mart_EventScript_152FDB
+ goto_if_set FLAG_ADVENTURE_STARTED, OldaleTown_Mart_EventScript_152FDB
msgbox OldaleTown_Mart_Text_174A8A, 4
release
end
diff --git a/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc b/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc
index d94e02227..c993807c6 100644
--- a/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc
+++ b/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc
@@ -26,8 +26,7 @@ OldaleTown_PokemonCenter_1F_EventScript_152F2E:: @ 8152F2E
OldaleTown_PokemonCenter_1F_EventScript_152F37:: @ 8152F37
lock
faceplayer
- checkflag FLAG_SYS_POKEDEX_GET
- goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_152F4C
+ goto_if_set FLAG_SYS_POKEDEX_GET, OldaleTown_PokemonCenter_1F_EventScript_152F4C
msgbox OldaleTown_PokemonCenter_1F_Text_1749C0, 4
release
end
diff --git a/data/scripts/maps/PacifidlogTown_House2.inc b/data/scripts/maps/PacifidlogTown_House2.inc
index df7f42a8b..8ad949bf2 100644
--- a/data/scripts/maps/PacifidlogTown_House2.inc
+++ b/data/scripts/maps/PacifidlogTown_House2.inc
@@ -6,28 +6,24 @@ PacifidlogTown_House2_EventScript_154168:: @ 8154168
faceplayer
dodailyevents
call PacifidlogTown_House2_EventScript_1541B4
- checkflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
- goto_if_eq PacifidlogTown_House2_EventScript_154254
- checkflag FLAG_MET_FANCLUB_YOUNGER_BROTHER
- call_if 1, PacifidlogTown_House2_EventScript_1541CE
- checkflag FLAG_MET_FANCLUB_YOUNGER_BROTHER
- call_if 0, PacifidlogTown_House2_EventScript_1541D7
+ goto_if_set FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_154254
+ 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
- goto_if 4, PacifidlogTown_House2_EventScript_1541EC
+ goto_if_ge PacifidlogTown_House2_EventScript_1541EC
specialvar RESULT, GetLeadMonFriendshipScore
compare RESULT, 2
- goto_if 4, PacifidlogTown_House2_EventScript_15421B
+ goto_if_ge PacifidlogTown_House2_EventScript_15421B
goto PacifidlogTown_House2_EventScript_154225
end
PacifidlogTown_House2_EventScript_1541B4:: @ 81541B4
- checkflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
- goto_if 0, PacifidlogTown_House2_EventScript_1A14DC
+ goto_if_unset FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK, PacifidlogTown_House2_EventScript_1A14DC
specialvar RESULT, GetDaysUntilPacifidlogTMAvailable
compare RESULT, 0
- call_if 1, PacifidlogTown_House2_EventScript_1541E8
+ call_if_eq PacifidlogTown_House2_EventScript_1541E8
return
PacifidlogTown_House2_EventScript_1541CE:: @ 81541CE
diff --git a/data/scripts/maps/PacifidlogTown_House3.inc b/data/scripts/maps/PacifidlogTown_House3.inc
index f51aea6f7..3b21ac996 100644
--- a/data/scripts/maps/PacifidlogTown_House3.inc
+++ b/data/scripts/maps/PacifidlogTown_House3.inc
@@ -4,8 +4,7 @@ PacifidlogTown_House3_MapScripts:: @ 815429D
PacifidlogTown_House3_EventScript_15429E:: @ 815429E
lock
faceplayer
- checkflag FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED
- goto_if_eq PacifidlogTown_House3_EventScript_154338
+ 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
@@ -22,7 +21,7 @@ PacifidlogTown_House3_EventScript_15429E:: @ 815429E
specialvar RESULT, GetTradeSpecies
copyvar VAR_SPECIAL_B, RESULT
compare RESULT, VAR_SPECIAL_9
- goto_if 5, PacifidlogTown_House3_EventScript_15432A
+ goto_if_ne PacifidlogTown_House3_EventScript_15432A
copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
special CreateInGameTradePokemon
diff --git a/data/scripts/maps/PetalburgCity.inc b/data/scripts/maps/PetalburgCity.inc
index ea58f50c6..cb47a0edd 100644
--- a/data/scripts/maps/PetalburgCity.inc
+++ b/data/scripts/maps/PetalburgCity.inc
@@ -6,9 +6,9 @@ PetalburgCity_MapScripts:: @ 814B70C
PetalburgCity_MapScript1_14B717:: @ 814B717
setflag FLAG_VISITED_PETALBURG_CITY
compare VAR_PETALBURG_STATE, 0
- call_if 1, PetalburgCity_EventScript_14B731
+ call_if_eq PetalburgCity_EventScript_14B731
compare VAR_PETALBURG_STATE, 2
- call_if 1, PetalburgCity_EventScript_14B739
+ call_if_eq PetalburgCity_EventScript_14B739
end
PetalburgCity_EventScript_14B731:: @ 814B731
@@ -188,23 +188,23 @@ PetalburgCity_EventScript_14B866:: @ 814B866
applymovement 9, PetalburgCity_Movement_1A0835
waitmovement 0
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_EventScript_14B91B
+ call_if_eq PetalburgCity_EventScript_14B91B
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_EventScript_14B930
+ call_if_eq PetalburgCity_EventScript_14B930
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_EventScript_14B93B
+ call_if_eq PetalburgCity_EventScript_14B93B
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_EventScript_14B950
+ call_if_eq PetalburgCity_EventScript_14B950
msgbox PetalburgCity_Text_16438A, 4
closemessage
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_EventScript_14B965
+ call_if_eq PetalburgCity_EventScript_14B965
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_EventScript_14B977
+ call_if_eq PetalburgCity_EventScript_14B977
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_EventScript_14B989
+ call_if_eq PetalburgCity_EventScript_14B989
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_EventScript_14B99B
+ call_if_eq PetalburgCity_EventScript_14B99B
msgbox PetalburgCity_Text_164426, 4
applymovement 9, PetalburgCity_Movement_1A0843
applymovement 255, PetalburgCity_Movement_1A0843
diff --git a/data/scripts/maps/PetalburgCity_Gym.inc b/data/scripts/maps/PetalburgCity_Gym.inc
index 406f260b0..54c0e89f6 100644
--- a/data/scripts/maps/PetalburgCity_Gym.inc
+++ b/data/scripts/maps/PetalburgCity_Gym.inc
@@ -9,26 +9,26 @@ PetalburgCity_Gym_MapScript1_15448C:: @ 815448C
compare VAR_PETALBURG_GYM_STATE, 6
goto_if_eq PetalburgCity_Gym_EventScript_1544A3
compare VAR_PETALBURG_GYM_STATE, 7
- call_if 4, PetalburgCity_Gym_EventScript_1544ED
+ call_if_ge PetalburgCity_Gym_EventScript_1544ED
end
PetalburgCity_Gym_EventScript_1544A3:: @ 81544A3
setvar VAR_SPECIAL_5, 1
call PetalburgCity_Gym_EventScript_154F9A
checktrainerflag OPPONENT_RANDALL
- call_if 1, PetalburgCity_Gym_EventScript_154FBB
+ call_if_eq PetalburgCity_Gym_EventScript_154FBB
checktrainerflag OPPONENT_MARY
- call_if 1, PetalburgCity_Gym_EventScript_154FDC
+ call_if_eq PetalburgCity_Gym_EventScript_154FDC
checktrainerflag OPPONENT_PARKER
- call_if 1, PetalburgCity_Gym_EventScript_154FFD
+ call_if_eq PetalburgCity_Gym_EventScript_154FFD
checktrainerflag OPPONENT_LORI
- call_if 1, PetalburgCity_Gym_EventScript_15501E
+ call_if_eq PetalburgCity_Gym_EventScript_15501E
checktrainerflag OPPONENT_GEORGE
- call_if 1, PetalburgCity_Gym_EventScript_15503F
+ call_if_eq PetalburgCity_Gym_EventScript_15503F
checktrainerflag OPPONENT_JODY
- call_if 1, PetalburgCity_Gym_EventScript_155060
+ call_if_eq PetalburgCity_Gym_EventScript_155060
checktrainerflag OPPONENT_BERKE
- call_if 1, PetalburgCity_Gym_EventScript_155081
+ call_if_eq PetalburgCity_Gym_EventScript_155081
end
PetalburgCity_Gym_EventScript_1544ED:: @ 81544ED
@@ -45,11 +45,10 @@ PetalburgCity_Gym_EventScript_1544ED:: @ 81544ED
PetalburgCity_Gym_MapScript1_15451B:: @ 815451B
compare VAR_PETALBURG_GYM_STATE, 1
- call_if 1, PetalburgCity_Gym_EventScript_15453B
+ call_if_eq PetalburgCity_Gym_EventScript_15453B
compare VAR_PETALBURG_GYM_STATE, 6
- call_if 0, PetalburgCity_Gym_EventScript_154543
- checkflag FLAG_SYS_GAME_CLEAR
- call_if 1, PetalburgCity_Gym_EventScript_15454B
+ call_if_lt PetalburgCity_Gym_EventScript_154543
+ call_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_15454B
end
PetalburgCity_Gym_EventScript_15453B:: @ 815453B
@@ -145,65 +144,65 @@ PetalburgCity_Gym_EventScript_154669:: @ 8154669
addobject 10
playse SE_DOOR
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_Gym_EventScript_1547EE
+ call_if_eq PetalburgCity_Gym_EventScript_1547EE
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_154800
+ call_if_eq PetalburgCity_Gym_EventScript_154800
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_15481C
+ call_if_eq PetalburgCity_Gym_EventScript_15481C
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_15481C
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_154884
+ call_if_eq PetalburgCity_Gym_EventScript_154884
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_15488F
+ call_if_eq PetalburgCity_Gym_EventScript_15488F
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_1548A1
+ call_if_eq PetalburgCity_Gym_EventScript_1548A1
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_1548B3
+ call_if_eq PetalburgCity_Gym_EventScript_1548B3
msgbox PetalburgCity_Gym_Text_17A04A, 4
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_Gym_EventScript_1548C5
+ call_if_eq PetalburgCity_Gym_EventScript_1548C5
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_1548D0
+ call_if_eq PetalburgCity_Gym_EventScript_1548D0
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_1548DB
+ call_if_eq PetalburgCity_Gym_EventScript_1548DB
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_1548E6
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_15492F
+ call_if_eq PetalburgCity_Gym_EventScript_15492F
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_154930
+ call_if_eq PetalburgCity_Gym_EventScript_154930
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_15493B
+ call_if_eq PetalburgCity_Gym_EventScript_15493B
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_15493C
+ call_if_eq PetalburgCity_Gym_EventScript_15493C
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_Gym_EventScript_1548F1
+ call_if_eq PetalburgCity_Gym_EventScript_1548F1
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_1548FC
+ call_if_eq PetalburgCity_Gym_EventScript_1548FC
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_1548F1
+ call_if_eq PetalburgCity_Gym_EventScript_1548F1
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_1548F1
+ call_if_eq PetalburgCity_Gym_EventScript_1548F1
msgbox PetalburgCity_Gym_Text_17A171, 4
closemessage
setflag FLAG_SPECIAL_FLAG_1
playbgm BGM_TSURETEK, FALSE
compare VAR_SPECIAL_8, 0
- call_if 1, PetalburgCity_Gym_EventScript_154835
+ call_if_eq PetalburgCity_Gym_EventScript_154835
compare VAR_SPECIAL_8, 1
- call_if 1, PetalburgCity_Gym_EventScript_15484E
+ call_if_eq PetalburgCity_Gym_EventScript_15484E
compare VAR_SPECIAL_8, 2
- call_if 1, PetalburgCity_Gym_EventScript_154860
+ call_if_eq PetalburgCity_Gym_EventScript_154860
compare VAR_SPECIAL_8, 3
- call_if 1, PetalburgCity_Gym_EventScript_154872
+ call_if_eq PetalburgCity_Gym_EventScript_154872
removeobject 10
setflag FLAG_HIDE_WALLY_MOM_PETALBURG_1
setvar VAR_PETALBURG_GYM_STATE, 1
@@ -354,10 +353,8 @@ PetalburgCity_Gym_EventScript_15493D:: @ 815493D
call PetalburgCity_Gym_EventScript_154969
compare RESULT, 1
goto_if_eq PetalburgCity_Gym_EventScript_1549B8
- checkflag FLAG_RECEIVED_TM42
- goto_if 0, PetalburgCity_Gym_EventScript_154A2C
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq PetalburgCity_Gym_EventScript_154B69
+ goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_154A2C
+ goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_154B69
msgbox PetalburgCity_Gym_Text_17AA6B, 4
release
end
@@ -420,22 +417,22 @@ PetalburgCity_Gym_EventScript_154A2C:: @ 8154A2C
msgbox PetalburgCity_Gym_Text_17A976, 4
closemessage
compare FACING, 2
- call_if 1, PetalburgCity_Gym_EventScript_154ABC
+ call_if_eq PetalburgCity_Gym_EventScript_154ABC
compare FACING, 1
- call_if 1, PetalburgCity_Gym_EventScript_154AC7
+ call_if_eq PetalburgCity_Gym_EventScript_154AC7
compare FACING, 3
- call_if 1, PetalburgCity_Gym_EventScript_154AD2
+ call_if_eq PetalburgCity_Gym_EventScript_154AD2
compare FACING, 4
- call_if 1, PetalburgCity_Gym_EventScript_154ADD
+ call_if_eq PetalburgCity_Gym_EventScript_154ADD
delay 70
compare FACING, 2
- call_if 1, PetalburgCity_Gym_EventScript_154AE8
+ call_if_eq PetalburgCity_Gym_EventScript_154AE8
compare FACING, 1
- call_if 1, PetalburgCity_Gym_EventScript_154AF3
+ call_if_eq PetalburgCity_Gym_EventScript_154AF3
compare FACING, 3
- call_if 1, PetalburgCity_Gym_EventScript_154AFE
+ call_if_eq PetalburgCity_Gym_EventScript_154AFE
compare FACING, 4
- call_if 1, PetalburgCity_Gym_EventScript_154B09
+ call_if_eq PetalburgCity_Gym_EventScript_154B09
msgbox PetalburgCity_Gym_Text_17A9F6, 4
release
end
@@ -593,7 +590,7 @@ PetalburgCity_Gym_EventScript_154B69:: @ 8154B69
PetalburgCity_Gym_EventScript_154B73:: @ 8154B73
lockall
compare VAR_PETALBURG_GYM_STATE, 6
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 85
msgbox PetalburgCity_Gym_Text_17B870, MSGBOX_YESNO
@@ -623,7 +620,7 @@ PetalburgCity_Gym_EventScript_154BB9:: @ 8154BB9
PetalburgCity_Gym_EventScript_154BC3:: @ 8154BC3
lockall
compare VAR_PETALBURG_GYM_STATE, 6
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 98
msgbox PetalburgCity_Gym_Text_17B8D4, MSGBOX_YESNO
@@ -636,7 +633,7 @@ PetalburgCity_Gym_EventScript_154BC3:: @ 8154BC3
PetalburgCity_Gym_EventScript_154BF8:: @ 8154BF8
lockall
checktrainerflag OPPONENT_RANDALL
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 46
msgbox PetalburgCity_Gym_Text_17B90F, MSGBOX_YESNO
@@ -649,7 +646,7 @@ PetalburgCity_Gym_EventScript_154BF8:: @ 8154BF8
PetalburgCity_Gym_EventScript_154C2B:: @ 8154C2B
lockall
checktrainerflag OPPONENT_RANDALL
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 59
msgbox PetalburgCity_Gym_Text_17B950, MSGBOX_YESNO
@@ -662,7 +659,7 @@ PetalburgCity_Gym_EventScript_154C2B:: @ 8154C2B
PetalburgCity_Gym_EventScript_154C5E:: @ 8154C5E
lockall
checktrainerflag OPPONENT_MARY
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 59
msgbox PetalburgCity_Gym_Text_17B950, MSGBOX_YESNO
@@ -675,7 +672,7 @@ PetalburgCity_Gym_EventScript_154C5E:: @ 8154C5E
PetalburgCity_Gym_EventScript_154C91:: @ 8154C91
lockall
checktrainerflag OPPONENT_MARY
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 72
msgbox PetalburgCity_Gym_Text_17B98A, MSGBOX_YESNO
@@ -688,7 +685,7 @@ PetalburgCity_Gym_EventScript_154C91:: @ 8154C91
PetalburgCity_Gym_EventScript_154CC4:: @ 8154CC4
lockall
checktrainerflag OPPONENT_PARKER
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 20
msgbox PetalburgCity_Gym_Text_17B9C5, MSGBOX_YESNO
@@ -701,7 +698,7 @@ PetalburgCity_Gym_EventScript_154CC4:: @ 8154CC4
PetalburgCity_Gym_EventScript_154CF7:: @ 8154CF7
lockall
checktrainerflag OPPONENT_LORI
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 20
msgbox PetalburgCity_Gym_Text_17B9C5, MSGBOX_YESNO
@@ -714,7 +711,7 @@ PetalburgCity_Gym_EventScript_154CF7:: @ 8154CF7
PetalburgCity_Gym_EventScript_154D2A:: @ 8154D2A
lockall
checktrainerflag OPPONENT_LORI
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 33
msgbox PetalburgCity_Gym_Text_17BA00, MSGBOX_YESNO
@@ -727,7 +724,7 @@ PetalburgCity_Gym_EventScript_154D2A:: @ 8154D2A
PetalburgCity_Gym_EventScript_154D5D:: @ 8154D5D
lockall
checktrainerflag OPPONENT_GEORGE
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 33
msgbox PetalburgCity_Gym_Text_17BA00, MSGBOX_YESNO
@@ -740,7 +737,7 @@ PetalburgCity_Gym_EventScript_154D5D:: @ 8154D5D
PetalburgCity_Gym_EventScript_154D90:: @ 8154D90
lockall
checktrainerflag OPPONENT_JODY
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 1
setvar VAR_SPECIAL_9, 7
msgbox PetalburgCity_Gym_Text_17BA3D, MSGBOX_YESNO
@@ -753,7 +750,7 @@ PetalburgCity_Gym_EventScript_154D90:: @ 8154D90
PetalburgCity_Gym_EventScript_154DC3:: @ 8154DC3
lockall
checktrainerflag OPPONENT_BERKE
- goto_if 0, PetalburgCity_Gym_EventScript_154BB9
+ goto_if_lt PetalburgCity_Gym_EventScript_154BB9
setvar VAR_SPECIAL_8, 7
setvar VAR_SPECIAL_9, 7
msgbox PetalburgCity_Gym_Text_17BA3D, MSGBOX_YESNO
@@ -765,8 +762,7 @@ PetalburgCity_Gym_EventScript_154DC3:: @ 8154DC3
PetalburgCity_Gym_EventScript_154DF6:: @ 8154DF6
trainerbattle 2, OPPONENT_RANDALL, 0, PetalburgCity_Gym_Text_17ADA5, PetalburgCity_Gym_Text_17AE11, PetalburgCity_Gym_EventScript_154E1A
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154E29
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154E29
msgbox PetalburgCity_Gym_Text_17AE30, 6
end
@@ -783,8 +779,7 @@ PetalburgCity_Gym_EventScript_154E29:: @ 8154E29
PetalburgCity_Gym_EventScript_154E32:: @ 8154E32
trainerbattle 2, OPPONENT_PARKER, 0, PetalburgCity_Gym_Text_17AF5A, PetalburgCity_Gym_Text_17AF98, PetalburgCity_Gym_EventScript_154E56
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154E65
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154E65
msgbox PetalburgCity_Gym_Text_17AFD3, 6
end
@@ -801,8 +796,7 @@ PetalburgCity_Gym_EventScript_154E65:: @ 8154E65
PetalburgCity_Gym_EventScript_154E6E:: @ 8154E6E
trainerbattle 2, OPPONENT_GEORGE, 0, PetalburgCity_Gym_Text_17B058, PetalburgCity_Gym_Text_17B0F7, PetalburgCity_Gym_EventScript_154E92
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154EA1
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154EA1
msgbox PetalburgCity_Gym_Text_17B12C, 6
end
@@ -819,8 +813,7 @@ PetalburgCity_Gym_EventScript_154EA1:: @ 8154EA1
PetalburgCity_Gym_EventScript_154EAA:: @ 8154EAA
trainerbattle 2, OPPONENT_BERKE, 0, PetalburgCity_Gym_Text_17B237, PetalburgCity_Gym_Text_17B2C0, PetalburgCity_Gym_EventScript_154ECE
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154EDD
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154EDD
msgbox PetalburgCity_Gym_Text_17B2E4, 6
end
@@ -837,8 +830,7 @@ PetalburgCity_Gym_EventScript_154EDD:: @ 8154EDD
PetalburgCity_Gym_EventScript_154EE6:: @ 8154EE6
trainerbattle 2, OPPONENT_MARY, 0, PetalburgCity_Gym_Text_17B3F7, PetalburgCity_Gym_Text_17B454, PetalburgCity_Gym_EventScript_154F0A
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154F19
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154F19
msgbox PetalburgCity_Gym_Text_17B46F, 6
end
@@ -855,8 +847,7 @@ PetalburgCity_Gym_EventScript_154F19:: @ 8154F19
PetalburgCity_Gym_EventScript_154F22:: @ 8154F22
trainerbattle 2, OPPONENT_LORI, 0, PetalburgCity_Gym_Text_17B58D, PetalburgCity_Gym_Text_17B5CB, PetalburgCity_Gym_EventScript_154F46
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154F55
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154F55
msgbox PetalburgCity_Gym_Text_17B5EA, 6
end
@@ -873,8 +864,7 @@ PetalburgCity_Gym_EventScript_154F55:: @ 8154F55
PetalburgCity_Gym_EventScript_154F5E:: @ 8154F5E
trainerbattle 2, OPPONENT_JODY, 0, PetalburgCity_Gym_Text_17B6D4, PetalburgCity_Gym_Text_17B732, PetalburgCity_Gym_EventScript_154F82
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_154F91
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_154F91
msgbox PetalburgCity_Gym_Text_17B749, 6
end
@@ -892,72 +882,72 @@ PetalburgCity_Gym_EventScript_154F91:: @ 8154F91
PetalburgCity_Gym_EventScript_154F9A:: @ 8154F9A
setvar VAR_SPECIAL_4, 1
compare VAR_SPECIAL_5, 0
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ 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
- call_if 1, PetalburgCity_Gym_EventScript_155182
+ call_if_eq PetalburgCity_Gym_EventScript_155182
compare VAR_SPECIAL_5, 1
- call_if 1, PetalburgCity_Gym_EventScript_155187
+ call_if_eq PetalburgCity_Gym_EventScript_155187
call PetalburgCity_Gym_EventScript_15516F
return
@@ -1021,8 +1011,7 @@ PetalburgCity_Gym_EventScript_155187:: @ 8155187
PetalburgCity_Gym_EventScript_15518B:: @ 815518B
lock
faceplayer
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_Gym_EventScript_1551A0
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_Gym_EventScript_1551A0
msgbox PetalburgCity_Gym_Text_17AB96, 4
release
end
@@ -1034,15 +1023,13 @@ PetalburgCity_Gym_EventScript_1551A0:: @ 81551A0
PetalburgCity_Gym_EventScript_1551AA:: @ 81551AA
lockall
- checkflag FLAG_BADGE05_GET
- goto_if_eq PetalburgCity_Gym_EventScript_1551CA
+ goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_1551CA
goto PetalburgCity_Gym_EventScript_1551D4
end
PetalburgCity_Gym_EventScript_1551BA:: @ 81551BA
lockall
- checkflag FLAG_BADGE05_GET
- goto_if_eq PetalburgCity_Gym_EventScript_1551CA
+ goto_if_set FLAG_BADGE05_GET, PetalburgCity_Gym_EventScript_1551CA
goto PetalburgCity_Gym_EventScript_1551D4
end
diff --git a/data/scripts/maps/PetalburgCity_Mart.inc b/data/scripts/maps/PetalburgCity_Mart.inc
index 66e247323..7584f6f19 100644
--- a/data/scripts/maps/PetalburgCity_Mart.inc
+++ b/data/scripts/maps/PetalburgCity_Mart.inc
@@ -6,8 +6,7 @@ PetalburgCity_Mart_EventScript_1552B0:: @ 81552B0
faceplayer
message PetalburgCity_Mart_Text_1A0BE4
waitmessage
- checkflag FLAG_PETALBURG_MART_EXPANDED_ITEMS
- goto_if_eq PetalburgCity_Mart_EventScript_1552EA
+ goto_if_set FLAG_PETALBURG_MART_EXPANDED_ITEMS, PetalburgCity_Mart_EventScript_1552EA
pokemart PetalburgCity_Mart_Items1
msgbox PetalburgCity_Mart_Text_1A0C02, 4
release
diff --git a/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc b/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc
index 8dda62ea1..136cc11c5 100644
--- a/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc
+++ b/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc
@@ -35,11 +35,11 @@ PetalburgCity_PokemonCenter_1F_EventScript_155233:: @ 8155233
PetalburgCity_PokemonCenter_1F_EventScript_15524F:: @ 815524F
compare VAR_STARTER_MON, 0
- call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_155272
+ call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_155272
compare VAR_STARTER_MON, 1
- call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_15527B
+ call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_15527B
compare VAR_STARTER_MON, 2
- call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_155284
+ call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_155284
release
end
diff --git a/data/scripts/maps/PetalburgCity_WallysHouse.inc b/data/scripts/maps/PetalburgCity_WallysHouse.inc
index 08bbcb0c7..d642d70ed 100644
--- a/data/scripts/maps/PetalburgCity_WallysHouse.inc
+++ b/data/scripts/maps/PetalburgCity_WallysHouse.inc
@@ -4,22 +4,17 @@ PetalburgCity_WallysHouse_MapScripts:: @ 81543C3
PetalburgCity_WallysHouse_EventScript_1543C4:: @ 81543C4
lock
faceplayer
- checkflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
- goto_if_eq PetalburgCity_WallysHouse_EventScript_1543F7
- checkflag FLAG_RECEIVED_HM03
- goto_if_eq PetalburgCity_WallysHouse_EventScript_154427
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_WallysHouse_EventScript_154406
- checkflag FLAG_THANKED_FOR_PLAYING_WITH_WALLY
- goto_if_eq PetalburgCity_WallysHouse_EventScript_15443B
+ goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, PetalburgCity_WallysHouse_EventScript_1543F7
+ goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_154427
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_WallysHouse_EventScript_154406
+ goto_if_set FLAG_THANKED_FOR_PLAYING_WITH_WALLY, PetalburgCity_WallysHouse_EventScript_15443B
msgbox PetalburgCity_WallysHouse_Text_179805, 4
setflag FLAG_THANKED_FOR_PLAYING_WITH_WALLY
release
end
PetalburgCity_WallysHouse_EventScript_1543F7:: @ 81543F7
- checkflag FLAG_RECEIVED_HM03
- goto_if_eq PetalburgCity_WallysHouse_EventScript_154431
+ goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_154431
goto PetalburgCity_WallysHouse_EventScript_154406
end
@@ -49,10 +44,8 @@ PetalburgCity_WallysHouse_EventScript_15443B:: @ 815443B
PetalburgCity_WallysHouse_EventScript_154445:: @ 8154445
lock
faceplayer
- checkflag FLAG_RECEIVED_HM03
- goto_if_eq PetalburgCity_WallysHouse_EventScript_15446D
- checkflag FLAG_DEFEATED_PETALBURG_GYM
- goto_if_eq PetalburgCity_WallysHouse_EventScript_154463
+ goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_15446D
+ goto_if_set FLAG_DEFEATED_PETALBURG_GYM, PetalburgCity_WallysHouse_EventScript_154463
msgbox PetalburgCity_WallysHouse_Text_179C2C, 4
release
end
diff --git a/data/scripts/maps/PetalburgWoods.inc b/data/scripts/maps/PetalburgWoods.inc
index 149fd4e46..17908440c 100644
--- a/data/scripts/maps/PetalburgWoods.inc
+++ b/data/scripts/maps/PetalburgWoods.inc
@@ -241,8 +241,7 @@ PetalburgWoods_EventScript_15CED3:: @ 815CED3
PetalburgWoods_EventScript_15CEDC:: @ 815CEDC
lock
faceplayer
- checkflag FLAG_RECEIVED_MIRACLE_SEED
- goto_if_eq PetalburgWoods_EventScript_15CF0B
+ goto_if_set FLAG_RECEIVED_MIRACLE_SEED, PetalburgWoods_EventScript_15CF0B
msgbox PetalburgWoods_Text_19549E, 4
giveitem_std ITEM_MIRACLE_SEED
compare RESULT, 0
diff --git a/data/scripts/maps/Route104.inc b/data/scripts/maps/Route104.inc
index c90a97531..a3824efcf 100644
--- a/data/scripts/maps/Route104.inc
+++ b/data/scripts/maps/Route104.inc
@@ -17,10 +17,8 @@ Route104_MapScript1_14EEA8:: @ 814EEA8
end
Route104_EventScript_14EEAE:: @ 814EEAE
- checkflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER
- goto_if 0, Route104_EventScript_14EEC4
- checkflag FLAG_BADGE03_GET
- goto_if 0, Route104_EventScript_14EEC4
+ goto_if_unset FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_EventScript_14EEC4
+ goto_if_unset FLAG_BADGE03_GET, Route104_EventScript_14EEC4
clearflag FLAG_HIDE_FLOWER_SHOP_WORKER_OUTSIDE
return
@@ -31,8 +29,7 @@ Route104_EventScript_14EEC4:: @ 814EEC4
Route104_EventScript_14EEC8:: @ 814EEC8
lock
faceplayer
- checkflag FLAG_RECEIVED_CHESTO_BERRY_ROUTE104
- goto_if_eq Route104_EventScript_14EEFF
+ goto_if_set FLAG_RECEIVED_CHESTO_BERRY_ROUTE104, Route104_EventScript_14EEFF
msgbox Route104_Text_1C55B9, 4
giveitem_std ITEM_CHESTO_BERRY
compare RESULT, 0
@@ -50,8 +47,7 @@ Route104_EventScript_14EEFF:: @ 814EEFF
Route104_EventScript_14EF09:: @ 814EF09
lock
faceplayer
- checkflag FLAG_RECEIVED_WHITE_HERB
- goto_if_eq Route104_EventScript_14EF38
+ goto_if_set FLAG_RECEIVED_WHITE_HERB, Route104_EventScript_14EF38
msgbox Route104_Text_16DD91, 4
giveitem_std ITEM_WHITE_HERB
compare RESULT, 0
@@ -104,8 +100,7 @@ Route104_EventScript_14EF8A:: @ 814EF8A
Route104_EventScript_14EF93:: @ 814EF93
lock
faceplayer
- checkflag FLAG_RECEIVED_TM09
- goto_if_eq Route104_EventScript_14EFC2
+ goto_if_set FLAG_RECEIVED_TM09, Route104_EventScript_14EFC2
msgbox Route104_Text_16DC5F, 4
giveitem_std ITEM_TM09
compare RESULT, 0
@@ -158,10 +153,8 @@ Route104_EventScript_14EFD5:: @ 814EFD5
resetobjectpriority 2, MAP_DEWFORD_TOWN
moveobjectoffscreen 2
setvar VAR_BOARD_BRINEY_BOAT_ROUTE104_STATE, 0
- checkflag FLAG_DELIVERED_STEVEN_LETTER
- goto_if 0, Route104_EventScript_14F08B
- checkflag FLAG_DELIVERED_STEVEN_LETTER
- goto_if_eq Route104_EventScript_14F095
+ goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_14F08B
+ goto_if_set FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_14F095
end
Route104_EventScript_14F08B:: @ 814F08B
diff --git a/data/scripts/maps/Route104_MrBrineysHouse.inc b/data/scripts/maps/Route104_MrBrineysHouse.inc
index 4718f9bb9..514b1b9cc 100644
--- a/data/scripts/maps/Route104_MrBrineysHouse.inc
+++ b/data/scripts/maps/Route104_MrBrineysHouse.inc
@@ -5,9 +5,8 @@ Route104_MrBrineysHouse_MapScripts:: @ 815BCB2
Route104_MrBrineysHouse_MapScript1_15BCB8:: @ 815BCB8
setflag FLAG_LANDMARK_MR_BRINEY_HOUSE
compare VAR_BRINEY_HOUSE_STATE, 1
- call_if 1, Route104_MrBrineysHouse_EventScript_15BCD4
- checkflag FLAG_RECEIVED_POKENAV
- call_if 1, Route104_MrBrineysHouse_EventScript_15BCD0
+ call_if_eq Route104_MrBrineysHouse_EventScript_15BCD4
+ call_if_set FLAG_RECEIVED_POKENAV, Route104_MrBrineysHouse_EventScript_15BCD0
end
Route104_MrBrineysHouse_EventScript_15BCD0:: @ 815BCD0
@@ -24,12 +23,9 @@ Route104_MrBrineysHouse_EventScript_15BCD4:: @ 815BCD4
Route104_MrBrineysHouse_EventScript_15BCEB:: @ 815BCEB
lock
faceplayer
- checkflag FLAG_MR_BRINEY_SAILING_INTRO
- call_if 0, Route104_MrBrineysHouse_EventScript_15BD0E
- checkflag FLAG_DELIVERED_STEVEN_LETTER
- goto_if 0, Route104_MrBrineysHouse_EventScript_15BD65
- checkflag FLAG_DELIVERED_DEVON_GOODS
- goto_if 0, Route104_MrBrineysHouse_EventScript_15BD7E
+ call_if_unset FLAG_MR_BRINEY_SAILING_INTRO, Route104_MrBrineysHouse_EventScript_15BD0E
+ goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_MrBrineysHouse_EventScript_15BD65
+ goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route104_MrBrineysHouse_EventScript_15BD7E
goto Route104_MrBrineysHouse_EventScript_15BD32
end
diff --git a/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc b/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc
index f7fbb58b5..5e70a8ec2 100644
--- a/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc
+++ b/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc
@@ -4,10 +4,8 @@ Route104_PrettyPetalFlowerShop_MapScripts:: @ 815BDE4
Route104_PrettyPetalFlowerShop_MapScript1_15BDEA:: @ 815BDEA
setflag FLAG_LANDMARK_FLOWER_SHOP
- checkflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER
- goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03
- checkflag FLAG_BADGE03_GET
- goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03
+ goto_if_unset FLAG_MET_PRETTY_PETAL_SHOP_OWNER, Route104_PrettyPetalFlowerShop_EventScript_15BE03
+ goto_if_unset FLAG_BADGE03_GET, Route104_PrettyPetalFlowerShop_EventScript_15BE03
setflag FLAG_TEMP_1
end
@@ -18,26 +16,24 @@ Route104_PrettyPetalFlowerShop_EventScript_15BE03:: @ 815BE03
Route104_PrettyPetalFlowerShop_EventScript_15BE0B:: @ 815BE0B
lock
faceplayer
- checkflag FLAG_TEMP_1
- goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE7C
+ goto_if_set FLAG_TEMP_1, Route104_PrettyPetalFlowerShop_EventScript_15BE7C
msgbox Route104_PrettyPetalFlowerShop_Text_1C5EC6, 4
- checkflag FLAG_MET_PRETTY_PETAL_SHOP_OWNER
- goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE4A
+ 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
- call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A
+ call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE6A
compare RESULT, NO
- call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73
+ call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE73
release
end
Route104_PrettyPetalFlowerShop_EventScript_15BE4A:: @ 815BE4A
msgbox Route104_PrettyPetalFlowerShop_Text_1C5F1B, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A
+ call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE6A
compare RESULT, NO
- call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73
+ call_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE73
release
end
@@ -72,8 +68,7 @@ Route104_PrettyPetalFlowerShop_Items:: @ 815BE94
Route104_PrettyPetalFlowerShop_EventScript_15BEA4:: @ 815BEA4
lock
faceplayer
- checkflag FLAG_RECEIVED_WAILMER_PAIL
- goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BEB9
+ goto_if_unset FLAG_RECEIVED_WAILMER_PAIL, Route104_PrettyPetalFlowerShop_EventScript_15BEB9
msgbox Route104_PrettyPetalFlowerShop_Text_1C61E8, 4
release
end
@@ -90,8 +85,7 @@ Route104_PrettyPetalFlowerShop_EventScript_15BEDA:: @ 815BEDA
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_FLOWER_SHOP
- goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BF1A
+ 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
diff --git a/data/scripts/maps/Route104_Prototype.inc b/data/scripts/maps/Route104_Prototype.inc
index b3b256d79..7f1c4ca75 100644
--- a/data/scripts/maps/Route104_Prototype.inc
+++ b/data/scripts/maps/Route104_Prototype.inc
@@ -5,21 +5,20 @@ Route104_Prototype_EventScript_160C4B:: @ 8160C4B
lock
faceplayer
checktrainerflag OPPONENT_BRIANNA_1
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
checktrainerflag OPPONENT_CINDY_2
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
checktrainerflag OPPONENT_AMY_AND_LIV_3
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
checktrainerflag OPPONENT_GINA_AND_MIA_2
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
checktrainerflag OPPONENT_LUCAS_2
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
checktrainerflag OPPONENT_MIKE_1
- goto_if 0, Route104_Prototype_EventScript_160C99
+ goto_if_lt Route104_Prototype_EventScript_160C99
setflag FLAG_ROUTE104_PROTOTYPE_COMPLETED_1
msgbox Route104_Prototype_Text_19B267, 4
- checkflag FLAG_ROUTE104_PROTOTYPE_COMPLETED_2
- goto_if_eq Route104_Prototype_EventScript_160CFB
+ goto_if_set FLAG_ROUTE104_PROTOTYPE_COMPLETED_2, Route104_Prototype_EventScript_160CFB
release
end
@@ -32,21 +31,20 @@ Route104_Prototype_EventScript_160CA3:: @ 8160CA3
lock
faceplayer
checktrainerflag OPPONENT_BRIANNA_1
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
checktrainerflag OPPONENT_CINDY_2
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
checktrainerflag OPPONENT_AMY_AND_LIV_3
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
checktrainerflag OPPONENT_GINA_AND_MIA_2
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
checktrainerflag OPPONENT_LUCAS_2
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
checktrainerflag OPPONENT_MIKE_1
- goto_if 0, Route104_Prototype_EventScript_160CF1
+ goto_if_lt Route104_Prototype_EventScript_160CF1
setflag FLAG_ROUTE104_PROTOTYPE_COMPLETED_2
msgbox Route104_Prototype_Text_19B2E9, 4
- checkflag FLAG_ROUTE104_PROTOTYPE_COMPLETED_1
- goto_if_eq Route104_Prototype_EventScript_160CFB
+ goto_if_set FLAG_ROUTE104_PROTOTYPE_COMPLETED_1, Route104_Prototype_EventScript_160CFB
release
end
diff --git a/data/scripts/maps/Route105.inc b/data/scripts/maps/Route105.inc
index 30157e52f..305a2e9af 100644
--- a/data/scripts/maps/Route105.inc
+++ b/data/scripts/maps/Route105.inc
@@ -3,8 +3,7 @@ Route105_MapScripts:: @ 814F298
.byte 0
Route105_MapScript1_14F29E:: @ 814F29E
- checkflag FLAG_REGI_DOORS_OPENED
- call_if 0, Route105_EventScript_14F2A8
+ call_if_unset FLAG_REGI_DOORS_OPENED, Route105_EventScript_14F2A8
end
Route105_EventScript_14F2A8:: @ 814F2A8
diff --git a/data/scripts/maps/Route109.inc b/data/scripts/maps/Route109.inc
index c0344f150..c70365b6a 100644
--- a/data/scripts/maps/Route109.inc
+++ b/data/scripts/maps/Route109.inc
@@ -271,8 +271,7 @@ Route109_Movement_14F67D:: @ 814F67D
Route109_EventScript_14F680:: @ 814F680
lock
faceplayer
- checkflag FLAG_DELIVERED_DEVON_GOODS
- goto_if 0, Route109_EventScript_14F691
+ goto_if_unset FLAG_DELIVERED_DEVON_GOODS, Route109_EventScript_14F691
goto Route109_EventScript_14F6AF
end
@@ -328,8 +327,7 @@ Route109_EventScript_14F725:: @ 814F725
lock
faceplayer
special GetPlayerBigGuyGirlString
- checkflag FLAG_RECEIVED_SOFT_SAND
- goto_if_eq Route109_EventScript_14F762
+ goto_if_set FLAG_RECEIVED_SOFT_SAND, Route109_EventScript_14F762
msgbox Route109_Text_16E433, 4
giveitem_std ITEM_SOFT_SAND
compare RESULT, 0
diff --git a/data/scripts/maps/Route109_SeashoreHouse.inc b/data/scripts/maps/Route109_SeashoreHouse.inc
index 4c1574824..e52958c50 100644
--- a/data/scripts/maps/Route109_SeashoreHouse.inc
+++ b/data/scripts/maps/Route109_SeashoreHouse.inc
@@ -9,12 +9,9 @@ Route109_SeashoreHouse_MapScript1_160DD0:: @ 8160DD0
Route109_SeashoreHouse_EventScript_160DD4:: @ 8160DD4
lock
faceplayer
- checkflag FLAG_RECEIVED_6_SODA_POP
- goto_if_eq Route109_SeashoreHouse_EventScript_160E36
- checkflag FLAG_DEFEATED_SEASHORE_HOUSE_TRAINERS
- goto_if_eq Route109_SeashoreHouse_EventScript_160E08
- checkflag FLAG_TEMP_2
- goto_if_eq Route109_SeashoreHouse_EventScript_160DFE
+ goto_if_set FLAG_RECEIVED_6_SODA_POP, Route109_SeashoreHouse_EventScript_160E36
+ goto_if_set FLAG_DEFEATED_SEASHORE_HOUSE_TRAINERS, Route109_SeashoreHouse_EventScript_160E08
+ goto_if_set FLAG_TEMP_2, Route109_SeashoreHouse_EventScript_160DFE
msgbox Route109_SeashoreHouse_Text_19B4D9, 4
setflag FLAG_TEMP_2
release
@@ -95,11 +92,11 @@ Route109_SeashoreHouse_EventScript_160EEE:: @ 8160EEE
Route109_SeashoreHouse_EventScript_160F09:: @ 8160F09
checktrainerflag OPPONENT_DWAYNE
- goto_if 0, Route109_SeashoreHouse_EventScript_160F29
+ goto_if_lt Route109_SeashoreHouse_EventScript_160F29
checktrainerflag OPPONENT_JOHANNA
- goto_if 0, Route109_SeashoreHouse_EventScript_160F29
+ goto_if_lt Route109_SeashoreHouse_EventScript_160F29
checktrainerflag OPPONENT_SIMON
- goto_if 0, Route109_SeashoreHouse_EventScript_160F29
+ goto_if_lt Route109_SeashoreHouse_EventScript_160F29
setflag FLAG_DEFEATED_SEASHORE_HOUSE_TRAINERS
release
end
diff --git a/data/scripts/maps/Route110.inc b/data/scripts/maps/Route110.inc
index d5219582c..070340760 100644
--- a/data/scripts/maps/Route110.inc
+++ b/data/scripts/maps/Route110.inc
@@ -13,7 +13,7 @@ Route110_MapScript1_14F914:: @ 814F914
call Route110_EventScript_1A014E
call Route110_EventScript_1A0172
compare VAR_CYCLING_CHALLENGE_STATE, 1
- call_if 1, Route110_EventScript_14F92F
+ call_if_eq Route110_EventScript_14F92F
end
Route110_EventScript_14F92F:: @ 814F92F
@@ -327,9 +327,9 @@ Route110_EventScript_14FD34:: @ 814FD34
lockall
checkplayergender
compare RESULT, 0
- call_if 1, Route110_EventScript_14FDA7
+ call_if_eq Route110_EventScript_14FDA7
compare RESULT, 1
- call_if 1, Route110_EventScript_14FDAC
+ call_if_eq Route110_EventScript_14FDAC
applymovement 28, Route110_Movement_1A0845
waitmovement 0
applymovement 28, Route110_Movement_1A0833
@@ -338,11 +338,11 @@ Route110_EventScript_14FD34:: @ 814FD34
waitmovement 0
delay 30
compare VAR_SPECIAL_8, 1
- call_if 1, Route110_EventScript_14FF14
+ call_if_eq Route110_EventScript_14FF14
compare VAR_SPECIAL_8, 2
- call_if 1, Route110_EventScript_14FF1F
+ call_if_eq Route110_EventScript_14FF1F
compare VAR_SPECIAL_8, 3
- call_if 1, Route110_EventScript_14FF2A
+ call_if_eq Route110_EventScript_14FF2A
checkplayergender
compare RESULT, 0
goto_if_eq Route110_EventScript_14FDB1
@@ -426,22 +426,22 @@ Route110_EventScript_14FEA5:: @ 814FEA5
Route110_EventScript_14FEB2:: @ 814FEB2
closemessage
compare VAR_SPECIAL_8, 1
- call_if 1, Route110_EventScript_14FF56
+ call_if_eq Route110_EventScript_14FF56
compare VAR_SPECIAL_8, 2
- call_if 1, Route110_EventScript_14FF5E
+ call_if_eq Route110_EventScript_14FF5E
compare VAR_SPECIAL_8, 3
- call_if 1, Route110_EventScript_14FF66
+ call_if_eq Route110_EventScript_14FF66
setobjectmovementtype 28, 10
setobjectmovementtype 29, 10
removeobject 28
addobject 29
delay 45
compare VAR_SPECIAL_8, 1
- call_if 1, Route110_EventScript_14FF35
+ call_if_eq Route110_EventScript_14FF35
compare VAR_SPECIAL_8, 2
- call_if 1, Route110_EventScript_14FF40
+ call_if_eq Route110_EventScript_14FF40
compare VAR_SPECIAL_8, 3
- call_if 1, Route110_EventScript_14FF4B
+ call_if_eq Route110_EventScript_14FF4B
removeobject 29
setvar VAR_ROUTE110_STATE, 1
savebgm 0
diff --git a/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc b/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc
index af72dedd0..f05e2caa2 100644
--- a/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc
+++ b/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc
@@ -4,9 +4,9 @@ Route110_SeasideCyclingRoadNorthEntrance_MapScripts:: @ 81634C8
Route110_SeasideCyclingRoadNorthEntrance_MapScript1_1634CE:: @ 81634CE
compare VAR_CYCLING_CHALLENGE_STATE, 3
- call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
+ call_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
compare VAR_CYCLING_CHALLENGE_STATE, 2
- call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
+ call_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5
end
Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5:: @ 81634E5
@@ -25,7 +25,7 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634F7:: @ 81634F7
lockall
specialvar RESULT, GetPlayerAvatarBike @ player state?
compare RESULT, 2
- call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D
+ call_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D
compare RESULT, 0
goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523
setflag FLAG_SYS_CYCLING_ROAD
diff --git a/data/scripts/maps/Route110_TrickHouseEnd.inc b/data/scripts/maps/Route110_TrickHouseEnd.inc
index 68ce0f5a7..020c61258 100644
--- a/data/scripts/maps/Route110_TrickHouseEnd.inc
+++ b/data/scripts/maps/Route110_TrickHouseEnd.inc
@@ -7,7 +7,7 @@ Route110_TrickHouseEnd_MapScripts:: @ 8161936
Route110_TrickHouseEnd_MapScript1_16194B:: @ 816194B
compare VAR_TEMP_1, 1
- call_if 1, Route110_TrickHouseEnd_EventScript_161994
+ call_if_eq Route110_TrickHouseEnd_EventScript_161994
end
Route110_TrickHouseEnd_MapScript1_161957:: @ 8161957
@@ -62,7 +62,7 @@ Route110_TrickHouseEnd_EventScript_161A0B:: @ 8161A0B
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_RARE_CANDY
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -75,7 +75,7 @@ Route110_TrickHouseEnd_EventScript_161A47:: @ 8161A47
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TIMER_BALL
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -88,7 +88,7 @@ Route110_TrickHouseEnd_EventScript_161A83:: @ 8161A83
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_HARD_STONE
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -101,7 +101,7 @@ Route110_TrickHouseEnd_EventScript_161ABF:: @ 8161ABF
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_SMOKE_BALL
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -114,7 +114,7 @@ Route110_TrickHouseEnd_EventScript_161AFB:: @ 8161AFB
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_TM12
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -127,7 +127,7 @@ Route110_TrickHouseEnd_EventScript_161B37:: @ 8161B37
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_MAGNET
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -140,7 +140,7 @@ Route110_TrickHouseEnd_EventScript_161B73:: @ 8161B73
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem_std ITEM_PP_MAX
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C4E
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C4E
msgbox Route110_TrickHouseEnd_Text_19C9BD, 4
closemessage
call Route110_TrickHouseEnd_EventScript_161C2E
@@ -151,13 +151,13 @@ Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF
msgbox Route110_TrickHouseEnd_Text_19C5AF, 4
closemessage
compare FACING, 1
- call_if 1, Route110_TrickHouseEnd_EventScript_161C74
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C74
compare FACING, 2
- call_if 1, Route110_TrickHouseEnd_EventScript_161C7F
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C7F
compare FACING, 3
- call_if 1, Route110_TrickHouseEnd_EventScript_161C8A
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C8A
compare FACING, 4
- call_if 1, Route110_TrickHouseEnd_EventScript_161C95
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C95
delay 30
msgbox Route110_TrickHouseEnd_Text_19C602, 4
closemessage
@@ -172,7 +172,7 @@ Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF
givedecoration_std DECOR_RED_TENT
.endc
compare RESULT, 0
- call_if 1, Route110_TrickHouseEnd_EventScript_161C61
+ call_if_eq Route110_TrickHouseEnd_EventScript_161C61
msgbox Route110_TrickHouseEnd_Text_19C85C, 4
call Route110_TrickHouseEnd_EventScript_161C2E
special ResetTrickHouseEndRoomFlag
diff --git a/data/scripts/maps/Route110_TrickHouseEntrance.inc b/data/scripts/maps/Route110_TrickHouseEntrance.inc
index 232d324a4..527f09d27 100644
--- a/data/scripts/maps/Route110_TrickHouseEntrance.inc
+++ b/data/scripts/maps/Route110_TrickHouseEntrance.inc
@@ -13,11 +13,11 @@ Route110_TrickHouseEntrance_MapScript1_160F3B:: @ 8160F3B
compare VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_16108E
compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 5
- call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE
+ call_if_eq Route110_TrickHouseEntrance_EventScript_160FDE
compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 3
- call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE
+ call_if_eq Route110_TrickHouseEntrance_EventScript_160FDE
compare VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE
+ call_if_eq Route110_TrickHouseEntrance_EventScript_160FDE
switch VAR_TRICK_HOUSE_ENTRANCE_STATE_3
case 0, Route110_TrickHouseEntrance_EventScript_16109A
case 1, Route110_TrickHouseEntrance_EventScript_1610A0
@@ -45,56 +45,49 @@ Route110_TrickHouseEntrance_EventScript_160FCE:: @ 8160FCE
Route110_TrickHouseEntrance_EventScript_160FDE:: @ 8160FDE
setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_3, 0
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 1
- call_if 1, Route110_TrickHouseEntrance_EventScript_16103C
+ call_if_eq Route110_TrickHouseEntrance_EventScript_16103C
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 2
- call_if 1, Route110_TrickHouseEntrance_EventScript_161046
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161046
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 3
- call_if 1, Route110_TrickHouseEntrance_EventScript_161050
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161050
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 4
- call_if 1, Route110_TrickHouseEntrance_EventScript_16105A
+ call_if_eq Route110_TrickHouseEntrance_EventScript_16105A
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 5
- call_if 1, Route110_TrickHouseEntrance_EventScript_161064
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161064
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 6
- call_if 1, Route110_TrickHouseEntrance_EventScript_16106E
+ call_if_eq Route110_TrickHouseEntrance_EventScript_16106E
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 7
- call_if 1, Route110_TrickHouseEntrance_EventScript_161078
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161078
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 8
- call_if 1, Route110_TrickHouseEntrance_EventScript_161082
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161082
return
Route110_TrickHouseEntrance_EventScript_16103C:: @ 816103C
- checkflag FLAG_BADGE03_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE03_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_161046:: @ 8161046
- checkflag FLAG_BADGE04_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE04_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_161050:: @ 8161050
- checkflag FLAG_BADGE05_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE05_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_16105A:: @ 816105A
- checkflag FLAG_BADGE06_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE06_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_161064:: @ 8161064
- checkflag FLAG_BADGE07_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE07_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_16106E:: @ 816106E
- checkflag FLAG_BADGE08_GET
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_BADGE08_GET, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_161078:: @ 8161078
- checkflag FLAG_SYS_GAME_CLEAR
- call_if 0, Route110_TrickHouseEntrance_EventScript_161088
+ call_if_unset FLAG_SYS_GAME_CLEAR, Route110_TrickHouseEntrance_EventScript_161088
return
Route110_TrickHouseEntrance_EventScript_161082:: @ 8161082
@@ -214,7 +207,7 @@ Route110_TrickHouseEntrance_EventScript_1611D7:: @ 81611D7
lockall
delay 20
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_161327
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161327
msgbox Route110_TrickHouseEntrance_Text_19BD82, 4
closemessage
delay 20
@@ -249,21 +242,21 @@ Route110_TrickHouseEntrance_EventScript_16124D:: @ 816124D
applymovement 255, Route110_TrickHouseEntrance_Movement_1A0835
waitmovement 0
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612CD
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612CD
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 1
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612D6
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612D6
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 2
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612DF
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612DF
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 3
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612E8
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612E8
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 4
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612F1
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612F1
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 5
- call_if 1, Route110_TrickHouseEntrance_EventScript_1612FA
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1612FA
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 6
- call_if 1, Route110_TrickHouseEntrance_EventScript_161303
+ call_if_eq Route110_TrickHouseEntrance_EventScript_161303
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 7
- call_if 1, Route110_TrickHouseEntrance_EventScript_16130C
+ call_if_eq Route110_TrickHouseEntrance_EventScript_16130C
closemessage
setvar VAR_TRICK_HOUSE_ENTRANCE_STATE_2, 1
warp MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 255, 6, 2
@@ -372,7 +365,7 @@ Route110_TrickHouseEntrance_EventScript_1613CE:: @ 81613CE
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -382,7 +375,7 @@ Route110_TrickHouseEntrance_EventScript_1613FA:: @ 81613FA
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -392,7 +385,7 @@ Route110_TrickHouseEntrance_EventScript_161426:: @ 8161426
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -402,7 +395,7 @@ Route110_TrickHouseEntrance_EventScript_161452:: @ 8161452
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -412,7 +405,7 @@ Route110_TrickHouseEntrance_EventScript_16147E:: @ 816147E
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -422,7 +415,7 @@ Route110_TrickHouseEntrance_EventScript_1614AA:: @ 81614AA
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -432,7 +425,7 @@ Route110_TrickHouseEntrance_EventScript_1614D6:: @ 81614D6
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161502
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02A5
msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4
releaseall
end
@@ -457,7 +450,7 @@ Route110_TrickHouseEntrance_EventScript_161518:: @ 8161518
compare RESULT, 1
goto_if_eq Route110_TrickHouseEntrance_EventScript_161551
compare RESULT, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1A02B8
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1A02B8
msgbox Route110_TrickHouseEntrance_Text_19C18D, 4
releaseall
end
@@ -727,11 +720,11 @@ Route110_TrickHouseEntrance_EventScript_1618B0:: @ 81618B0
msgbox Route110_TrickHouseEntrance_Text_19BA56, 4
releaseall
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 0
- call_if 1, Route110_TrickHouseEntrance_EventScript_1618E1
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1618E1
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 1
- call_if 1, Route110_TrickHouseEntrance_EventScript_1618F6
+ call_if_eq Route110_TrickHouseEntrance_EventScript_1618F6
compare VAR_TRICK_HOUSE_ROOMS_COMPLETED, 2
- call_if 1, Route110_TrickHouseEntrance_EventScript_16190B
+ call_if_eq Route110_TrickHouseEntrance_EventScript_16190B
setvar VAR_TRICK_HOUSE_ENTRANCE_STATE, 1
end
diff --git a/data/scripts/maps/Route110_TrickHousePuzzle2.inc b/data/scripts/maps/Route110_TrickHousePuzzle2.inc
index b1cb0c9df..cdde15d1a 100644
--- a/data/scripts/maps/Route110_TrickHousePuzzle2.inc
+++ b/data/scripts/maps/Route110_TrickHousePuzzle2.inc
@@ -5,13 +5,13 @@ Route110_TrickHousePuzzle2_MapScripts:: @ 8161D76
Route110_TrickHousePuzzle2_MapScript1_161D81:: @ 8161D81
compare VAR_TEMP_1, 1
- call_if 1, Route110_TrickHousePuzzle2_EventScript_161E2C
+ call_if_eq Route110_TrickHousePuzzle2_EventScript_161E2C
compare VAR_TEMP_2, 1
- call_if 1, Route110_TrickHousePuzzle2_EventScript_161E3F
+ call_if_eq Route110_TrickHousePuzzle2_EventScript_161E3F
compare VAR_TEMP_3, 1
- call_if 1, Route110_TrickHousePuzzle2_EventScript_161E52
+ call_if_eq Route110_TrickHousePuzzle2_EventScript_161E52
compare VAR_TEMP_4, 1
- call_if 1, Route110_TrickHousePuzzle2_EventScript_161E65
+ call_if_eq Route110_TrickHousePuzzle2_EventScript_161E65
end
Route110_TrickHousePuzzle2_MapScript1_161DAE:: @ 8161DAE
diff --git a/data/scripts/maps/Route110_TrickHousePuzzle3.inc b/data/scripts/maps/Route110_TrickHousePuzzle3.inc
index 8d5392ae8..14a021e8d 100644
--- a/data/scripts/maps/Route110_TrickHousePuzzle3.inc
+++ b/data/scripts/maps/Route110_TrickHousePuzzle3.inc
@@ -6,9 +6,9 @@ Route110_TrickHousePuzzle3_MapScripts:: @ 8161EBD
Route110_TrickHousePuzzle3_MapScript1_161EC8:: @ 8161EC8
call Route110_TrickHousePuzzle3_EventScript_161F12
compare VAR_TEMP_9, 0
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FE5
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FE5
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle3_EventScript_1622C8
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_1622C8
end
Route110_TrickHousePuzzle3_MapScript1_161EE4:: @ 8161EE4
@@ -32,19 +32,19 @@ Route110_TrickHousePuzzle3_EventScript_161F12:: @ 8161F12
setmetatile 1, 3, 600, 0
setmetatile 10, 2, 600, 0
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161F9F
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161F9F
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FA9
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FA9
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FB3
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FB3
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FBD
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FBD
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FC7
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FC7
compare VAR_TEMP_8, 6
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FD1
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FD1
compare VAR_TEMP_8, 7
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FDB
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FDB
return
Route110_TrickHousePuzzle3_EventScript_161F9F:: @ 8161F9F
@@ -303,19 +303,19 @@ Route110_TrickHousePuzzle3_EventScript_162612:: @ 8162612
setvar VAR_TEMP_6, 0
setvar VAR_TEMP_7, 0
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle3_EventScript_162683
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_162683
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle3_EventScript_162689
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_162689
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle3_EventScript_16268F
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_16268F
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle3_EventScript_162695
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_162695
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle3_EventScript_16269B
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_16269B
compare VAR_TEMP_8, 6
- call_if 1, Route110_TrickHousePuzzle3_EventScript_1626A1
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_1626A1
compare VAR_TEMP_8, 7
- call_if 1, Route110_TrickHousePuzzle3_EventScript_1626A7
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_1626A7
return
Route110_TrickHousePuzzle3_EventScript_162683:: @ 8162683
@@ -348,9 +348,9 @@ Route110_TrickHousePuzzle3_EventScript_1626A7:: @ 81626A7
Route110_TrickHousePuzzle3_EventScript_1626AD:: @ 81626AD
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle3_EventScript_161FE5
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_161FE5
compare VAR_TEMP_9, 0
- call_if 1, Route110_TrickHousePuzzle3_EventScript_1622C8
+ call_if_eq Route110_TrickHousePuzzle3_EventScript_1622C8
special DrawWholeMapView
compare VAR_TEMP_9, 1
goto_if_eq Route110_TrickHousePuzzle3_EventScript_1626DD
diff --git a/data/scripts/maps/Route110_TrickHousePuzzle5.inc b/data/scripts/maps/Route110_TrickHousePuzzle5.inc
index 1bcdb8087..5ec1a4d64 100644
--- a/data/scripts/maps/Route110_TrickHousePuzzle5.inc
+++ b/data/scripts/maps/Route110_TrickHousePuzzle5.inc
@@ -166,11 +166,11 @@ Route110_TrickHousePuzzle5_EventScript_16293F:: @ 816293F
applymovement 1, Route110_TrickHousePuzzle5_Movement_1A0835
waitmovement 0
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162DF3
compare VAR_TEMP_9, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E2B
compare VAR_TEMP_9, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D423, 4
random 3
switch RESULT
@@ -188,11 +188,11 @@ Route110_TrickHousePuzzle5_EventScript_1629B3:: @ 81629B3
applymovement 2, Route110_TrickHousePuzzle5_Movement_1A0835
waitmovement 0
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E9B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E9B
compare VAR_TEMP_9, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162ED3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162ED3
compare VAR_TEMP_9, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F0B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F0B
msgbox Route110_TrickHousePuzzle5_Text_19D636, 4
random 3
switch RESULT
@@ -210,11 +210,11 @@ Route110_TrickHousePuzzle5_EventScript_162A27:: @ 8162A27
applymovement 3, Route110_TrickHousePuzzle5_Movement_1A0835
waitmovement 0
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162DF3
compare VAR_TEMP_9, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E2B
compare VAR_TEMP_9, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D7D3, 4
random 3
switch RESULT
@@ -232,11 +232,11 @@ Route110_TrickHousePuzzle5_EventScript_162A9B:: @ 8162A9B
applymovement 4, Route110_TrickHousePuzzle5_Movement_1A0835
waitmovement 0
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162DF3
compare VAR_TEMP_9, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E2B
compare VAR_TEMP_9, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E63
msgbox Route110_TrickHousePuzzle5_Text_19D93D, 4
random 3
switch RESULT
@@ -254,11 +254,11 @@ Route110_TrickHousePuzzle5_EventScript_162B0F:: @ 8162B0F
applymovement 5, Route110_TrickHousePuzzle5_Movement_1A0835
waitmovement 0
compare VAR_TEMP_9, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162E9B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162E9B
compare VAR_TEMP_9, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162ED3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162ED3
compare VAR_TEMP_9, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F0B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F0B
msgbox Route110_TrickHousePuzzle5_Text_19DA9A, 4
random 3
switch RESULT
@@ -419,80 +419,80 @@ Route110_TrickHousePuzzle5_EventScript_162DE9:: @ 8162DE9
Route110_TrickHousePuzzle5_EventScript_162DF3:: @ 8162DF3
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F43
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F43
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F4E
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F4E
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F59
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F59
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F64
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F64
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F6F
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F6F
return
Route110_TrickHousePuzzle5_EventScript_162E2B:: @ 8162E2B
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F7A
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F7A
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F85
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F85
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F90
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F90
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162F9B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162F9B
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FA6
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FA6
return
Route110_TrickHousePuzzle5_EventScript_162E63:: @ 8162E63
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FB1
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FB1
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FBC
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FBC
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FC7
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FC7
compare VAR_TEMP_9, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FD2
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FD2
compare VAR_TEMP_9, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FDD
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FDD
return
Route110_TrickHousePuzzle5_EventScript_162E9B:: @ 8162E9B
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FE8
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FE8
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FF3
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FF3
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_162FFE
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_162FFE
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163009
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163009
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163014
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163014
return
Route110_TrickHousePuzzle5_EventScript_162ED3:: @ 8162ED3
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_16301F
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_16301F
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_16302A
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_16302A
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163035
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163035
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163040
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163040
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_16304B
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_16304B
return
Route110_TrickHousePuzzle5_EventScript_162F0B:: @ 8162F0B
compare VAR_TEMP_8, 1
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163056
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163056
compare VAR_TEMP_8, 2
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163061
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163061
compare VAR_TEMP_8, 3
- call_if 1, Route110_TrickHousePuzzle5_EventScript_16306C
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_16306C
compare VAR_TEMP_8, 4
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163077
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163077
compare VAR_TEMP_8, 5
- call_if 1, Route110_TrickHousePuzzle5_EventScript_163082
+ call_if_eq Route110_TrickHousePuzzle5_EventScript_163082
return
Route110_TrickHousePuzzle5_EventScript_162F43:: @ 8162F43
diff --git a/data/scripts/maps/Route110_TrickHousePuzzle7.inc b/data/scripts/maps/Route110_TrickHousePuzzle7.inc
index d1de7682f..1ee608166 100644
--- a/data/scripts/maps/Route110_TrickHousePuzzle7.inc
+++ b/data/scripts/maps/Route110_TrickHousePuzzle7.inc
@@ -10,16 +10,11 @@ Route110_TrickHousePuzzle7_MapScript1_163161:: @ 8163161
end
Route110_TrickHousePuzzle7_EventScript_163167:: @ 8163167
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
- call_if 1, Route110_TrickHousePuzzle7_EventScript_163195
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
- call_if 1, Route110_TrickHousePuzzle7_EventScript_1631A8
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
- call_if 1, Route110_TrickHousePuzzle7_EventScript_1631BB
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
- call_if 1, Route110_TrickHousePuzzle7_EventScript_1631CE
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
- call_if 1, Route110_TrickHousePuzzle7_EventScript_1631E1
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_163195
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_1631A8
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_1631BB
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_1631CE
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_1631E1
return
Route110_TrickHousePuzzle7_EventScript_163195:: @ 8163195
@@ -87,7 +82,7 @@ Route110_TrickHousePuzzle7_EventScript_16326E:: @ 816326E
Route110_TrickHousePuzzle7_MapScript1_16326F:: @ 816326F
compare VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
- call_if 1, Route110_TrickHousePuzzle7_EventScript_163167
+ call_if_eq Route110_TrickHousePuzzle7_EventScript_163167
end
Route110_TrickHousePuzzle7_MapScript2_16327B:: @ 816327B
@@ -121,76 +116,56 @@ Route110_TrickHousePuzzle7_EventScript_1632A8:: @ 81632A8
Route110_TrickHousePuzzle7_EventScript_1632B9:: @ 81632B9
lockall
delay 32
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
- call_if 0, Route110_TrickHousePuzzle7_EventScript_163195
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
- call_if 1, Route110_TrickHousePuzzle7_EventScript_1631F4
+ call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_163195
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_1631F4
special DrawWholeMapView
playse SE_TK_KASYA
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
- goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633A4
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
- goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633A9
+ goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_1633A4
+ goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_1633A9
end
Route110_TrickHousePuzzle7_EventScript_1632E8:: @ 81632E8
lockall
delay 32
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
- call_if 0, Route110_TrickHousePuzzle7_EventScript_1631A8
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
- call_if 1, Route110_TrickHousePuzzle7_EventScript_163207
+ call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_1631A8
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_163207
special DrawWholeMapView
playse SE_TK_KASYA
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
- goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633AE
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
- goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633B3
+ goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_1633AE
+ goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_1633B3
end
Route110_TrickHousePuzzle7_EventScript_163317:: @ 8163317
lockall
delay 32
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
- call_if 0, Route110_TrickHousePuzzle7_EventScript_1631BB
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
- call_if 1, Route110_TrickHousePuzzle7_EventScript_16321A
+ call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_1631BB
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_16321A
special DrawWholeMapView
playse SE_TK_KASYA
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
- goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633B8
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
- goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633BD
+ goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_1633B8
+ goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_1633BD
end
Route110_TrickHousePuzzle7_EventScript_163346:: @ 8163346
lockall
delay 32
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
- call_if 0, Route110_TrickHousePuzzle7_EventScript_1631CE
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
- call_if 1, Route110_TrickHousePuzzle7_EventScript_16322D
+ call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_1631CE
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_16322D
special DrawWholeMapView
playse SE_TK_KASYA
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
- goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633C2
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
- goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633C7
+ goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_1633C2
+ goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_1633C7
end
Route110_TrickHousePuzzle7_EventScript_163375:: @ 8163375
lockall
delay 32
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
- call_if 0, Route110_TrickHousePuzzle7_EventScript_1631E1
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
- call_if 1, Route110_TrickHousePuzzle7_EventScript_163240
+ call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_1631E1
+ call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_163240
special DrawWholeMapView
playse SE_TK_KASYA
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
- goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633CC
- checkflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
- goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633D1
+ goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_1633CC
+ goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_1633D1
end
Route110_TrickHousePuzzle7_EventScript_1633A4:: @ 81633A4
diff --git a/data/scripts/maps/Route111.inc b/data/scripts/maps/Route111.inc
index c338091a0..11af07dce 100644
--- a/data/scripts/maps/Route111.inc
+++ b/data/scripts/maps/Route111.inc
@@ -4,8 +4,7 @@ Route111_MapScripts:: @ 814FF91
.byte 0
Route111_MapScript1_14FF9C:: @ 814FF9C
- checkflag FLAG_REGI_DOORS_OPENED
- call_if 0, Route111_EventScript_14FFA6
+ call_if_unset FLAG_REGI_DOORS_OPENED, Route111_EventScript_14FFA6
end
Route111_EventScript_14FFA6:: @ 814FFA6
@@ -17,21 +16,21 @@ Route111_MapScript1_14FFB9:: @ 814FFB9
call Route111_EventScript_14FFCD
call Route111_EventScript_1AE313
checktrainerflag OPPONENT_VICKY
- goto_if 0, Route111_EventScript_15000D
+ goto_if_lt Route111_EventScript_15000D
end
Route111_EventScript_14FFCD:: @ 814FFCD
getplayerxy VAR_TEMP_0, VAR_TEMP_1
compare VAR_TEMP_1, 34
- goto_if 0, Route111_EventScript_15000C
+ goto_if_lt Route111_EventScript_15000C
compare VAR_TEMP_1, 107
- goto_if 2, Route111_EventScript_15000C
+ goto_if_gt Route111_EventScript_15000C
compare VAR_TEMP_1, 72
- goto_if 2, Route111_EventScript_150009
+ goto_if_gt Route111_EventScript_150009
compare VAR_TEMP_0, 2000
- goto_if 2, Route111_EventScript_15000C
+ goto_if_gt Route111_EventScript_15000C
compare VAR_TEMP_0, 8
- goto_if 0, Route111_EventScript_15000C
+ goto_if_lt Route111_EventScript_15000C
Route111_EventScript_150009:: @ 8150009
setweather WEATHER_SANDSTORM
@@ -121,8 +120,7 @@ Route111_EventScript_1500C5:: @ 81500C5
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_ROUTE111
- goto_if_eq Route111_EventScript_150100
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE111, Route111_EventScript_150100
msgbox Route111_Text_1C56F0, 4
giveitem_std ITEM_RAZZ_BERRY
compare RESULT, 0
@@ -174,13 +172,13 @@ Route111_EventScript_150151:: @ 8150151
msgbox Route111_Text_1A0F93, 4
closemessage
compare VAR_SPECIAL_4, 0
- call_if 1, Route111_EventScript_150188
+ call_if_eq Route111_EventScript_150188
compare VAR_SPECIAL_4, 1
- call_if 1, Route111_EventScript_150193
+ call_if_eq Route111_EventScript_150193
compare VAR_SPECIAL_4, 2
- call_if 1, Route111_EventScript_15019E
+ call_if_eq Route111_EventScript_15019E
compare VAR_SPECIAL_4, 3
- call_if 1, Route111_EventScript_1501A9
+ call_if_eq Route111_EventScript_1501A9
releaseall
end
diff --git a/data/scripts/maps/Route111_WinstrateFamilysHouse.inc b/data/scripts/maps/Route111_WinstrateFamilysHouse.inc
index 8352db786..020b51791 100644
--- a/data/scripts/maps/Route111_WinstrateFamilysHouse.inc
+++ b/data/scripts/maps/Route111_WinstrateFamilysHouse.inc
@@ -13,8 +13,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF3A:: @ 815BF3A
lock
faceplayer
setvar VAR_SPECIAL_8, 3
- checkflag FLAG_RECEIVED_MACHO_BRACE
- goto_if_eq Route111_WinstrateFamilysHouse_EventScript_15BF72
+ 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
@@ -40,8 +39,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF95:: @ 815BF95
lock
faceplayer
setvar VAR_SPECIAL_8, 4
- checkflag FLAG_TEMP_4
- goto_if_eq Route111_WinstrateFamilysHouse_EventScript_15BFB6
+ goto_if_set FLAG_TEMP_4, Route111_WinstrateFamilysHouse_EventScript_15BFB6
msgbox Route111_WinstrateFamilysHouse_Text_192219, 4
setflag FLAG_TEMP_4
goto Route111_WinstrateFamilysHouse_EventScript_15BFC4
diff --git a/data/scripts/maps/Route112_CableCarStation.inc b/data/scripts/maps/Route112_CableCarStation.inc
index adbea780e..96eb68046 100644
--- a/data/scripts/maps/Route112_CableCarStation.inc
+++ b/data/scripts/maps/Route112_CableCarStation.inc
@@ -6,7 +6,7 @@ Route112_CableCarStation_MapScripts:: @ 815C033
Route112_CableCarStation_MapScript1_15C03E:: @ 815C03E
setescapewarp MAP_ROUTE112, 255, 28, 28
compare VAR_CABLE_CAR_STATION_STATE, 2
- call_if 1, Route112_CableCarStation_EventScript_15C052
+ call_if_eq Route112_CableCarStation_EventScript_15C052
end
Route112_CableCarStation_EventScript_15C052:: @ 815C052
diff --git a/data/scripts/maps/Route113.inc b/data/scripts/maps/Route113.inc
index a1593ba1e..41b289db0 100644
--- a/data/scripts/maps/Route113.inc
+++ b/data/scripts/maps/Route113.inc
@@ -15,9 +15,9 @@ Route113_MapScript1_1505DA:: @ 81505DA
Route113_EventScript_1505E5:: @ 81505E5
getplayerxy VAR_TEMP_0, VAR_TEMP_1
compare VAR_TEMP_0, 19
- goto_if 0, Route113_EventScript_150604
+ goto_if_lt Route113_EventScript_150604
compare VAR_TEMP_0, 84
- goto_if 2, Route113_EventScript_150604
+ goto_if_gt Route113_EventScript_150604
setweather WEATHER_ASH
return
diff --git a/data/scripts/maps/Route113_GlassWorkshop.inc b/data/scripts/maps/Route113_GlassWorkshop.inc
index 3f991277f..e42a6f89a 100644
--- a/data/scripts/maps/Route113_GlassWorkshop.inc
+++ b/data/scripts/maps/Route113_GlassWorkshop.inc
@@ -5,7 +5,7 @@ Route113_GlassWorkshop_MapScripts:: @ 816354A
Route113_GlassWorkshop_MapScript1_163550:: @ 8163550
setflag FLAG_LANDMARK_GLASS_WORKSHOP
compare VAR_GLASS_WORKSHOP_STATE, 1
- call_if 1, Route113_GlassWorkshop_EventScript_16355F
+ call_if_eq Route113_GlassWorkshop_EventScript_16355F
end
Route113_GlassWorkshop_EventScript_16355F:: @ 816355F
@@ -16,7 +16,7 @@ Route113_GlassWorkshop_EventScript_163565:: @ 8163565
lock
faceplayer
compare VAR_GLASS_WORKSHOP_STATE, 10
- goto_if 4, Route113_GlassWorkshop_EventScript_1638D2
+ goto_if_ge Route113_GlassWorkshop_EventScript_1638D2
compare VAR_GLASS_WORKSHOP_STATE, 2
goto_if_eq Route113_GlassWorkshop_EventScript_1635B5
compare VAR_GLASS_WORKSHOP_STATE, 1
@@ -39,7 +39,7 @@ Route113_GlassWorkshop_EventScript_1635B5:: @ 81635B5
goto_if_eq Route113_GlassWorkshop_EventScript_1635E4
msgbox Route113_GlassWorkshop_Text_19E65B, 4
compare VAR_ASH_GATHER_COUNT, 250
- goto_if 0, Route113_GlassWorkshop_EventScript_163818
+ goto_if_lt Route113_GlassWorkshop_EventScript_163818
message Route113_GlassWorkshop_Text_19E757
waitmessage
goto Route113_GlassWorkshop_EventScript_1635EE
@@ -71,7 +71,7 @@ Route113_GlassWorkshop_EventScript_163660:: @ 8163660
bufferitemname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 250
compare VAR_ASH_GATHER_COUNT, 250
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -85,7 +85,7 @@ Route113_GlassWorkshop_EventScript_16369C:: @ 816369C
bufferitemname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 500
compare VAR_ASH_GATHER_COUNT, 500
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -99,7 +99,7 @@ Route113_GlassWorkshop_EventScript_1636D8:: @ 81636D8
bufferitemname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 500
compare VAR_ASH_GATHER_COUNT, 500
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -113,7 +113,7 @@ Route113_GlassWorkshop_EventScript_163714:: @ 8163714
bufferitemname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -127,7 +127,7 @@ Route113_GlassWorkshop_EventScript_163750:: @ 8163750
bufferitemname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 1000
compare VAR_ASH_GATHER_COUNT, 1000
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -142,7 +142,7 @@ Route113_GlassWorkshop_EventScript_16378C:: @ 816378C
bufferdecorationname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 6000
compare VAR_ASH_GATHER_COUNT, 6000
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -157,7 +157,7 @@ Route113_GlassWorkshop_EventScript_1637CD:: @ 81637CD
bufferdecorationname 0, VAR_SPECIAL_8
setvar VAR_SPECIAL_A, 8000
compare VAR_ASH_GATHER_COUNT, 8000
- goto_if 0, Route113_GlassWorkshop_EventScript_163830
+ goto_if_lt Route113_GlassWorkshop_EventScript_163830
msgbox Route113_GlassWorkshop_Text_19E7CD, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route113_GlassWorkshop_EventScript_163845
@@ -202,9 +202,9 @@ Route113_GlassWorkshop_EventScript_163851:: @ 8163851
fadescreen 0
msgbox Route113_GlassWorkshop_Text_19E9D7, 4
compare VAR_SPECIAL_9, 0
- call_if 1, Route113_GlassWorkshop_EventScript_163889
+ call_if_eq Route113_GlassWorkshop_EventScript_163889
compare VAR_SPECIAL_9, 1
- call_if 1, Route113_GlassWorkshop_EventScript_1638A1
+ call_if_eq Route113_GlassWorkshop_EventScript_1638A1
setvar VAR_GLASS_WORKSHOP_STATE, 2
release
end
@@ -296,9 +296,9 @@ Route113_GlassWorkshop_EventScript_16399D:: @ 816399D
Route113_GlassWorkshop_EventScript_1639B1:: @ 81639B1
msgbox Route113_GlassWorkshop_Text_19E9D7, 4
compare VAR_SPECIAL_9, 0
- call_if 1, Route113_GlassWorkshop_EventScript_163889
+ call_if_eq Route113_GlassWorkshop_EventScript_163889
compare VAR_SPECIAL_9, 1
- call_if 1, Route113_GlassWorkshop_EventScript_1638A1
+ call_if_eq Route113_GlassWorkshop_EventScript_1638A1
setvar VAR_GLASS_WORKSHOP_STATE, 2
release
end
diff --git a/data/scripts/maps/Route114.inc b/data/scripts/maps/Route114.inc
index f6bb6d8ba..30ab8c572 100644
--- a/data/scripts/maps/Route114.inc
+++ b/data/scripts/maps/Route114.inc
@@ -5,8 +5,7 @@ Route114_EventScript_150733:: @ 8150733
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_ROUTE114
- goto_if_eq Route114_EventScript_150778
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE114, Route114_EventScript_150778
msgbox Route114_Text_1C5803, 4
random 5
addvar RESULT, 15
@@ -27,8 +26,7 @@ Route114_EventScript_150778:: @ 8150778
Route114_EventScript_150782:: @ 8150782
lock
faceplayer
- checkflag FLAG_RECEIVED_TM05
- goto_if_eq Route114_EventScript_1507B9
+ goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_1507B9
msgbox Route114_Text_170154, 4
giveitem_std ITEM_TM05
compare RESULT, 0
diff --git a/data/scripts/maps/Route114_FossilManiacsHouse.inc b/data/scripts/maps/Route114_FossilManiacsHouse.inc
index 1a1445fde..b191db5f6 100644
--- a/data/scripts/maps/Route114_FossilManiacsHouse.inc
+++ b/data/scripts/maps/Route114_FossilManiacsHouse.inc
@@ -9,8 +9,7 @@ Route114_FossilManiacsHouse_MapScript1_15C1BF:: @ 815C1BF
Route114_FossilManiacsHouse_EventScript_15C1C3:: @ 815C1C3
lock
faceplayer
- checkflag FLAG_RECEIVED_TM28
- goto_if_eq Route114_FossilManiacsHouse_EventScript_15C1F2
+ goto_if_set FLAG_RECEIVED_TM28, Route114_FossilManiacsHouse_EventScript_15C1F2
msgbox Route114_FossilManiacsHouse_Text_1925E1, 4
giveitem_std ITEM_TM28
compare RESULT, 0
diff --git a/data/scripts/maps/Route114_FossilManiacsTunnel.inc b/data/scripts/maps/Route114_FossilManiacsTunnel.inc
index 2ce9c1bfa..740a48314 100644
--- a/data/scripts/maps/Route114_FossilManiacsTunnel.inc
+++ b/data/scripts/maps/Route114_FossilManiacsTunnel.inc
@@ -4,8 +4,7 @@ Route114_FossilManiacsTunnel_MapScripts:: @ 815C20E
Route114_FossilManiacsTunnel_EventScript_15C20F:: @ 815C20F
lock
faceplayer
- checkflag FLAG_RECEIVED_FOSSIL_MON
- goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C24E
+ goto_if_set FLAG_RECEIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_15C24E
checkitem ITEM_ROOT_FOSSIL, 1
compare RESULT, 1
goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C244
diff --git a/data/scripts/maps/Route114_LanettesHouse.inc b/data/scripts/maps/Route114_LanettesHouse.inc
index c34d4fc7e..30eb844ac 100644
--- a/data/scripts/maps/Route114_LanettesHouse.inc
+++ b/data/scripts/maps/Route114_LanettesHouse.inc
@@ -9,8 +9,7 @@ Route114_LanettesHouse_MapScript1_15C25E:: @ 815C25E
Route114_LanettesHouse_EventScript_15C262:: @ 815C262
lock
faceplayer
- checkflag FLAG_RECEIVED_DOLL_LANETTE
- goto_if_eq Route114_LanettesHouse_EventScript_15C28F
+ goto_if_set FLAG_RECEIVED_DOLL_LANETTE, Route114_LanettesHouse_EventScript_15C28F
setflag FLAG_SYS_PC_LANETTE
msgbox Route114_LanettesHouse_Text_192A0D, 4
.ifdef SAPPHIRE
@@ -41,7 +40,7 @@ Route114_LanettesHouse_EventScript_15C299:: @ 815C299
Route114_LanettesHouse_EventScript_15C2B7:: @ 815C2B7
msgbox Route114_LanettesHouse_Text_192C01, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, Route114_LanettesHouse_EventScript_15C2CC
+ call_if_eq Route114_LanettesHouse_EventScript_15C2CC
releaseall
end
diff --git a/data/scripts/maps/Route116.inc b/data/scripts/maps/Route116.inc
index 4e08705cf..eea14e25d 100644
--- a/data/scripts/maps/Route116.inc
+++ b/data/scripts/maps/Route116.inc
@@ -3,8 +3,7 @@ Route116_MapScripts:: @ 8150A31
.byte 0
Route116_MapScript1_150A37:: @ 8150A37
- checkflag FLAG_RECOVERED_DEVON_GOODS
- call_if 1, Route116_EventScript_150A41
+ call_if_set FLAG_RECOVERED_DEVON_GOODS, Route116_EventScript_150A41
end
Route116_EventScript_150A41:: @ 8150A41
@@ -14,10 +13,8 @@ Route116_EventScript_150A41:: @ 8150A41
Route116_EventScript_150A49:: @ 8150A49
lock
faceplayer
- checkflag FLAG_RECOVERED_DEVON_GOODS
- goto_if_eq Route116_EventScript_150A67
- checkflag FLAG_DEVON_GOODS_STOLEN
- goto_if_eq Route116_EventScript_150A71
+ goto_if_set FLAG_RECOVERED_DEVON_GOODS, Route116_EventScript_150A67
+ goto_if_set FLAG_DEVON_GOODS_STOLEN, Route116_EventScript_150A71
msgbox Route116_Text_1703CF, 4
release
end
@@ -35,8 +32,7 @@ Route116_EventScript_150A71:: @ 8150A71
Route116_EventScript_150A7B:: @ 8150A7B
lock
faceplayer
- checkflag FLAG_MET_DEVON_EMPLOYEE
- goto_if_eq Route116_EventScript_150B04
+ goto_if_set FLAG_MET_DEVON_EMPLOYEE, Route116_EventScript_150B04
msgbox Route116_Text_1705AE, 4
goto Route116_EventScript_150A94
end
@@ -49,13 +45,13 @@ Route116_EventScript_150A94:: @ 8150A94
msgbox Route116_Text_1707B8, 4
closemessage
compare FACING, 2
- call_if 1, Route116_EventScript_150AEE
+ call_if_eq Route116_EventScript_150AEE
compare FACING, 1
- call_if 1, Route116_EventScript_150AEE
+ call_if_eq Route116_EventScript_150AEE
compare FACING, 3
- call_if 1, Route116_EventScript_150AEE
+ call_if_eq Route116_EventScript_150AEE
compare FACING, 4
- call_if 1, Route116_EventScript_150AF9
+ call_if_eq Route116_EventScript_150AF9
removeobject LAST_TALKED
clearflag FLAG_HIDE_EMPLOYEE_DEVON_CORP_3F
setflag FLAG_RECEIVED_REPEAT_BALL
@@ -182,13 +178,13 @@ Route116_EventScript_150BF4:: @ 8150BF4
Route116_EventScript_150C03:: @ 8150C03
delay 20
compare FACING, 2
- call_if 1, Route116_EventScript_150C37
+ call_if_eq Route116_EventScript_150C37
compare FACING, 1
- call_if 1, Route116_EventScript_150C37
+ call_if_eq Route116_EventScript_150C37
compare FACING, 3
- call_if 1, Route116_EventScript_150C37
+ call_if_eq Route116_EventScript_150C37
compare FACING, 4
- call_if 1, Route116_EventScript_150C42
+ call_if_eq Route116_EventScript_150C42
removeobject LAST_TALKED
release
end
diff --git a/data/scripts/maps/Route116_TunnelersRestHouse.inc b/data/scripts/maps/Route116_TunnelersRestHouse.inc
index 24091c4ac..5ec6ef642 100644
--- a/data/scripts/maps/Route116_TunnelersRestHouse.inc
+++ b/data/scripts/maps/Route116_TunnelersRestHouse.inc
@@ -17,8 +17,7 @@ Route116_TunnelersRestHouse_EventScript_15C2F1:: @ 815C2F1
Route116_TunnelersRestHouse_EventScript_15C2FA:: @ 815C2FA
lock
faceplayer
- checkflag FLAG_RUSTURF_TUNNEL_OPENED
- goto_if_eq Route116_TunnelersRestHouse_EventScript_15C30F
+ goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, Route116_TunnelersRestHouse_EventScript_15C30F
msgbox Route116_TunnelersRestHouse_Text_193135, 4
release
end
diff --git a/data/scripts/maps/Route117.inc b/data/scripts/maps/Route117.inc
index fa648f79e..9f42412ab 100644
--- a/data/scripts/maps/Route117.inc
+++ b/data/scripts/maps/Route117.inc
@@ -7,8 +7,7 @@ Route117_MapScript1_150D40:: @ 8150D40
end
Route117_EventScript_150D46:: @ 8150D46
- checkflag FLAG_PENDING_DAYCARE_EGG
- goto_if 0, Route117_EventScript_150D56
+ goto_if_unset FLAG_PENDING_DAYCARE_EGG, Route117_EventScript_150D56
setobjectxyperm 3, 47, 6
Route117_EventScript_150D56:: @ 8150D56
diff --git a/data/scripts/maps/Route118.inc b/data/scripts/maps/Route118.inc
index a4452d989..569a7103e 100644
--- a/data/scripts/maps/Route118.inc
+++ b/data/scripts/maps/Route118.inc
@@ -9,8 +9,7 @@ Route118_MapScript1_150F2E:: @ 8150F2E
Route118_EventScript_150F34:: @ 8150F34
lock
faceplayer
- checkflag FLAG_RECEIVED_GOOD_ROD
- goto_if_eq Route118_EventScript_150F89
+ goto_if_set FLAG_RECEIVED_GOOD_ROD, Route118_EventScript_150F89
msgbox Route118_Text_170F12, MSGBOX_YESNO
compare RESULT, YES
goto_if_eq Route118_EventScript_150F5E
@@ -84,11 +83,11 @@ Route118_EventScript_151004:: @ 8151004
msgbox Route118_Text_170D66, 4
closemessage
compare VAR_SPECIAL_8, 0
- call_if 1, Route118_EventScript_151048
+ call_if_eq Route118_EventScript_151048
compare VAR_SPECIAL_8, 1
- call_if 1, Route118_EventScript_151053
+ call_if_eq Route118_EventScript_151053
compare VAR_SPECIAL_8, 2
- call_if 1, Route118_EventScript_15105E
+ call_if_eq Route118_EventScript_15105E
setvar VAR_ROUTE118_STATE, 1
removeobject 19
releaseall
diff --git a/data/scripts/maps/Route119.inc b/data/scripts/maps/Route119.inc
index 8d9f88474..4b9f3ce5f 100644
--- a/data/scripts/maps/Route119.inc
+++ b/data/scripts/maps/Route119.inc
@@ -4,15 +4,14 @@ Route119_MapScripts:: @ 8151167
.byte 0
Route119_MapScript1_151172:: @ 8151172
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, Route119_EventScript_15117C
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, Route119_EventScript_15117C
end
Route119_EventScript_15117C:: @ 815117C
compare VAR_SPECIAL_4, 6
- call_if 1, Route119_EventScript_151193
+ call_if_eq Route119_EventScript_151193
compare VAR_SPECIAL_4, 7
- call_if 1, Route119_EventScript_151197
+ call_if_eq Route119_EventScript_151197
return
Route119_EventScript_151193:: @ 8151193
@@ -28,7 +27,7 @@ Route119_MapScript1_15119B:: @ 815119B
call Route119_EventScript_1A0172
call Route119_EventScript_1A0196
compare VAR_WEATHER_INSTITUTE_STATE, 1
- call_if 1, Route119_EventScript_1511B9
+ call_if_eq Route119_EventScript_1511B9
special SetRoute119Weather
end
@@ -53,21 +52,21 @@ Route119_EventScript_1511DB:: @ 81511DB
addobject 25
checkplayergender
compare RESULT, 0
- call_if 1, Route119_EventScript_151254
+ call_if_eq Route119_EventScript_151254
compare RESULT, 1
- call_if 1, Route119_EventScript_151259
+ call_if_eq Route119_EventScript_151259
delay 65
compare VAR_TEMP_1, 1
- call_if 1, Route119_EventScript_1513A6
+ call_if_eq Route119_EventScript_1513A6
compare VAR_TEMP_1, 2
- call_if 1, Route119_EventScript_1513B1
+ call_if_eq Route119_EventScript_1513B1
applymovement 255, Route119_Movement_1A0845
waitmovement 0
delay 30
compare VAR_TEMP_1, 1
- call_if 1, Route119_EventScript_1513D2
+ call_if_eq Route119_EventScript_1513D2
compare VAR_TEMP_1, 2
- call_if 1, Route119_EventScript_1513E1
+ call_if_eq Route119_EventScript_1513E1
removeobject 25
addobject 16
delay 30
@@ -155,16 +154,16 @@ Route119_EventScript_151352:: @ 8151352
Route119_EventScript_151362:: @ 8151362
closemessage
compare VAR_TEMP_1, 1
- call_if 1, Route119_EventScript_1513D2
+ call_if_eq Route119_EventScript_1513D2
compare VAR_TEMP_1, 2
- call_if 1, Route119_EventScript_1513E1
+ call_if_eq Route119_EventScript_1513E1
removeobject 16
addobject 25
delay 30
compare VAR_TEMP_1, 1
- call_if 1, Route119_EventScript_1513BC
+ call_if_eq Route119_EventScript_1513BC
compare VAR_TEMP_1, 2
- call_if 1, Route119_EventScript_1513C7
+ call_if_eq Route119_EventScript_1513C7
removeobject 25
setvar VAR_ROUTE119_STATE, 1
savebgm 0
diff --git a/data/scripts/maps/Route119_WeatherInstitute_1F.inc b/data/scripts/maps/Route119_WeatherInstitute_1F.inc
index 8a5c1033f..e5ca6550b 100644
--- a/data/scripts/maps/Route119_WeatherInstitute_1F.inc
+++ b/data/scripts/maps/Route119_WeatherInstitute_1F.inc
@@ -5,7 +5,7 @@ Route119_WeatherInstitute_1F_MapScripts:: @ 8163C2A
Route119_WeatherInstitute_1F_MapScript1_163C30:: @ 8163C30
call Route119_WeatherInstitute_1F_EventScript_1A0196
compare VAR_WEATHER_INSTITUTE_STATE, 0
- call_if 1, Route119_WeatherInstitute_1F_EventScript_163C41
+ call_if_eq Route119_WeatherInstitute_1F_EventScript_163C41
end
Route119_WeatherInstitute_1F_EventScript_163C41:: @ 8163C41
diff --git a/data/scripts/maps/Route119_WeatherInstitute_2F.inc b/data/scripts/maps/Route119_WeatherInstitute_2F.inc
index b36500345..81037941f 100644
--- a/data/scripts/maps/Route119_WeatherInstitute_2F.inc
+++ b/data/scripts/maps/Route119_WeatherInstitute_2F.inc
@@ -5,9 +5,9 @@ Route119_WeatherInstitute_2F_MapScripts:: @ 8163CC2
Route119_WeatherInstitute_2F_MapScript1_163CC8:: @ 8163CC8
call Route119_WeatherInstitute_2F_EventScript_1A0196
compare VAR_WEATHER_INSTITUTE_STATE, 0
- call_if 1, Route119_WeatherInstitute_2F_EventScript_163CE4
+ call_if_eq Route119_WeatherInstitute_2F_EventScript_163CE4
compare VAR_WEATHER_INSTITUTE_STATE, 1
- call_if 1, Route119_WeatherInstitute_2F_EventScript_163CF0
+ call_if_eq Route119_WeatherInstitute_2F_EventScript_163CF0
end
Route119_WeatherInstitute_2F_EventScript_163CE4:: @ 8163CE4
@@ -87,7 +87,6 @@ Route119_WeatherInstitute_2F_Movement_163DC8:: @ 8163DC8
Route119_WeatherInstitute_2F_EventScript_163DCC:: @ 8163DCC
lock
faceplayer
- checkflag FLAG_RECEIVED_CASTFORM
- goto_if_eq Route119_WeatherInstitute_2F_EventScript_163DBE
+ goto_if_set FLAG_RECEIVED_CASTFORM, Route119_WeatherInstitute_2F_EventScript_163DBE
goto Route119_WeatherInstitute_2F_EventScript_163D7A
end
diff --git a/data/scripts/maps/Route120.inc b/data/scripts/maps/Route120.inc
index bacdcd7dd..b49834564 100644
--- a/data/scripts/maps/Route120.inc
+++ b/data/scripts/maps/Route120.inc
@@ -5,23 +5,22 @@ Route120_MapScripts:: @ 815160E
.byte 0
Route120_MapScript1_15161E:: @ 815161E
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, Route120_EventScript_151628
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, Route120_EventScript_151628
end
Route120_EventScript_151628:: @ 8151628
compare VAR_SPECIAL_4, 0
- call_if 1, Route120_EventScript_15166B
+ call_if_eq Route120_EventScript_15166B
compare VAR_SPECIAL_4, 1
- call_if 1, Route120_EventScript_151672
+ call_if_eq Route120_EventScript_151672
compare VAR_SPECIAL_4, 2
- call_if 1, Route120_EventScript_151676
+ call_if_eq Route120_EventScript_151676
compare VAR_SPECIAL_4, 3
- call_if 1, Route120_EventScript_15167A
+ call_if_eq Route120_EventScript_15167A
compare VAR_SPECIAL_4, 4
- call_if 1, Route120_EventScript_15167E
+ call_if_eq Route120_EventScript_15167E
compare VAR_SPECIAL_4, 5
- call_if 1, Route120_EventScript_151682
+ call_if_eq Route120_EventScript_151682
return
Route120_EventScript_15166B:: @ 815166B
@@ -50,12 +49,9 @@ Route120_EventScript_151682:: @ 8151682
return
Route120_MapScript1_151686:: @ 8151686
- checkflag FLAG_REGI_DOORS_OPENED
- call_if 0, Route120_EventScript_1516A2
- checkflag FLAG_RECEIVED_DEVON_SCOPE
- call_if 1, Route120_EventScript_1516B5
- checkflag FLAG_RECEIVED_DEVON_SCOPE
- call_if 0, Route120_EventScript_1516DA
+ call_if_unset FLAG_REGI_DOORS_OPENED, Route120_EventScript_1516A2
+ call_if_set FLAG_RECEIVED_DEVON_SCOPE, Route120_EventScript_1516B5
+ call_if_unset FLAG_RECEIVED_DEVON_SCOPE, Route120_EventScript_1516DA
end
Route120_EventScript_1516A2:: @ 81516A2
@@ -82,11 +78,11 @@ Route120_MapScript1_1516DF:: @ 81516DF
Route120_EventScript_1516EA:: @ 81516EA
getplayerxy VAR_TEMP_0, VAR_TEMP_1
compare VAR_TEMP_1, 14
- goto_if 3, Route120_EventScript_151715
+ goto_if_le Route120_EventScript_151715
compare VAR_TEMP_1, 60
- goto_if 3, Route120_EventScript_151719
+ goto_if_le Route120_EventScript_151719
compare VAR_TEMP_1, 61
- goto_if 4, Route120_EventScript_151711
+ goto_if_ge Route120_EventScript_151711
return
Route120_EventScript_151711:: @ 8151711
@@ -99,9 +95,9 @@ Route120_EventScript_151715:: @ 8151715
Route120_EventScript_151719:: @ 8151719
compare VAR_TEMP_0, 7
- goto_if 3, Route120_EventScript_151735
+ goto_if_le Route120_EventScript_151735
compare VAR_TEMP_0, 19
- goto_if 3, Route120_EventScript_151715
+ goto_if_le Route120_EventScript_151715
goto Route120_EventScript_151735
end
@@ -113,13 +109,12 @@ Route120_EventScript_151739:: @ 8151739
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_ROUTE120
- goto_if_eq Route120_EventScript_151837
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE120, Route120_EventScript_151837
msgbox Route120_Text_1C58F1, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, Route120_EventScript_151841
+ call_if_eq Route120_EventScript_151841
compare RESULT, NO
- call_if 1, Route120_EventScript_15184A
+ call_if_eq Route120_EventScript_15184A
specialvar RESULT, GetPlayerTrainerIdOnesDigit
switch RESULT
case 0, Route120_EventScript_1517DC
@@ -184,8 +179,7 @@ Route120_EventScript_15184A:: @ 815184A
Route120_EventScript_151853:: @ 8151853
lock
faceplayer
- checkflag FLAG_NOT_READY_FOR_BATTLE_ROUTE120
- goto_if_eq Route120_EventScript_151884
+ goto_if_set FLAG_NOT_READY_FOR_BATTLE_ROUTE120, Route120_EventScript_151884
msgbox Route120_Text_171827, MSGBOX_YESNO
compare RESULT, NO
goto_if_eq Route120_EventScript_151877
@@ -209,9 +203,9 @@ Route120_EventScript_15189D:: @ 815189D
msgbox Route120_Text_1719A0, 4
closemessage
compare FACING, 2
- call_if 1, Route120_EventScript_15197F
+ call_if_eq Route120_EventScript_15197F
compare FACING, 3
- call_if 1, Route120_EventScript_15198A
+ call_if_eq Route120_EventScript_15198A
applymovement 31, Route120_Movement_1A083F
waitmovement 0
delay 20
diff --git a/data/scripts/maps/Route121_SafariZoneEntrance.inc b/data/scripts/maps/Route121_SafariZoneEntrance.inc
index ded372aa6..2648e19ce 100644
--- a/data/scripts/maps/Route121_SafariZoneEntrance.inc
+++ b/data/scripts/maps/Route121_SafariZoneEntrance.inc
@@ -89,7 +89,7 @@ Route121_SafariZoneEntrance_EventScript_15C3B3:: @ 815C3B3
Route121_SafariZoneEntrance_EventScript_15C425:: @ 815C425
getpartysize
compare RESULT, 6
- goto_if 5, Route121_SafariZoneEntrance_EventScript_15C44F
+ goto_if_ne Route121_SafariZoneEntrance_EventScript_15C44F
specialvar RESULT, CheckFreePokemonStorageSpace
compare RESULT, 1
goto_if_eq Route121_SafariZoneEntrance_EventScript_15C44F
diff --git a/data/scripts/maps/Route123.inc b/data/scripts/maps/Route123.inc
index a25c306cc..5f77ea023 100644
--- a/data/scripts/maps/Route123.inc
+++ b/data/scripts/maps/Route123.inc
@@ -9,8 +9,7 @@ Route123_MapScript1_151C59:: @ 8151C59
Route123_EventScript_151C5D:: @ 8151C5D
lock
faceplayer
- checkflag FLAG_RECEIVED_TM19
- goto_if_eq Route123_EventScript_151CAC
+ goto_if_set FLAG_RECEIVED_TM19, Route123_EventScript_151CAC
msgbox Route123_Text_171D83, 4
special IsGrassTypeInParty
compare RESULT, 0
diff --git a/data/scripts/maps/Route123_BerryMastersHouse.inc b/data/scripts/maps/Route123_BerryMastersHouse.inc
index 26edb6fbb..3356df83b 100644
--- a/data/scripts/maps/Route123_BerryMastersHouse.inc
+++ b/data/scripts/maps/Route123_BerryMastersHouse.inc
@@ -10,8 +10,7 @@ Route123_BerryMastersHouse_EventScript_1639E9:: @ 81639E9
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER
- goto_if_eq Route123_BerryMastersHouse_EventScript_163A5A
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER, Route123_BerryMastersHouse_EventScript_163A5A
msgbox Route123_BerryMastersHouse_Text_1C5BC4, 4
random 10
addvar RESULT, 20
@@ -40,8 +39,7 @@ Route123_BerryMastersHouse_EventScript_163A64:: @ 8163A64
lock
faceplayer
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_FROM_BERRYMASTER_WIFE
- goto_if_eq Route123_BerryMastersHouse_EventScript_163C13
+ 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
call Route123_BerryMastersHouse_EventScript_1A00F3
@@ -86,8 +84,7 @@ Route123_BerryMastersHouse_EventScript_163AF0:: @ 8163AF0
end
Route123_BerryMastersHouse_EventScript_163B1E:: @ 8163B1E
- checkflag FLAG_RECEIVED_SPELON_BERRY
- goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
+ 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
@@ -97,8 +94,7 @@ Route123_BerryMastersHouse_EventScript_163B1E:: @ 8163B1E
end
Route123_BerryMastersHouse_EventScript_163B4F:: @ 8163B4F
- checkflag FLAG_RECEIVED_PAMTRE_BERRY
- goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
+ 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
@@ -108,8 +104,7 @@ Route123_BerryMastersHouse_EventScript_163B4F:: @ 8163B4F
end
Route123_BerryMastersHouse_EventScript_163B80:: @ 8163B80
- checkflag FLAG_RECEIVED_WATMEL_BERRY
- goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
+ 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
@@ -119,8 +114,7 @@ Route123_BerryMastersHouse_EventScript_163B80:: @ 8163B80
end
Route123_BerryMastersHouse_EventScript_163BB1:: @ 8163BB1
- checkflag FLAG_RECEIVED_DURIN_BERRY
- goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
+ 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
@@ -130,8 +124,7 @@ Route123_BerryMastersHouse_EventScript_163BB1:: @ 8163BB1
end
Route123_BerryMastersHouse_EventScript_163BE2:: @ 8163BE2
- checkflag FLAG_RECEIVED_BELUE_BERRY
- goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0
+ 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
diff --git a/data/scripts/maps/Route124.inc b/data/scripts/maps/Route124.inc
index 289ea2d29..3f02fc6e3 100644
--- a/data/scripts/maps/Route124.inc
+++ b/data/scripts/maps/Route124.inc
@@ -3,8 +3,7 @@ Route124_MapScripts:: @ 8151DDF
.byte 0
Route124_MapScript1_151DE5:: @ 8151DE5
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, Route124_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, Route124_EventScript_1A02C1
end
Route124_EventScript_151DEF:: @ 8151DEF
diff --git a/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc b/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc
index 9423cf845..7bcddfe19 100644
--- a/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc
+++ b/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc
@@ -9,8 +9,7 @@ Route124_DivingTreasureHuntersHouse_MapScript1_163E00:: @ 8163E00
Route124_DivingTreasureHuntersHouse_EventScript_163E04:: @ 8163E04
lock
faceplayer
- checkflag FLAG_MET_DIVING_TREASURE_HUNTER
- goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E20
+ goto_if_set FLAG_MET_DIVING_TREASURE_HUNTER, Route124_DivingTreasureHuntersHouse_EventScript_163E20
msgbox Route124_DivingTreasureHuntersHouse_Text_19F416, 4
setflag FLAG_MET_DIVING_TREASURE_HUNTER
goto Route124_DivingTreasureHuntersHouse_EventScript_163E2E
@@ -32,16 +31,16 @@ Route124_DivingTreasureHuntersHouse_EventScript_163E44:: @ 8163E44
setvar VAR_TEMP_1, 0
checkitem ITEM_RED_SHARD, 1
compare RESULT, 1
- call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E8A
+ call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E8A
checkitem ITEM_YELLOW_SHARD, 1
compare RESULT, 1
- call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E90
+ call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E90
checkitem ITEM_BLUE_SHARD, 1
compare RESULT, 1
- call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E96
+ call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E96
checkitem ITEM_GREEN_SHARD, 1
compare RESULT, 1
- call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E9C
+ call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E9C
return
Route124_DivingTreasureHuntersHouse_EventScript_163E8A:: @ 8163E8A
diff --git a/data/scripts/maps/Route125.inc b/data/scripts/maps/Route125.inc
index 58bf75c51..a1495ac83 100644
--- a/data/scripts/maps/Route125.inc
+++ b/data/scripts/maps/Route125.inc
@@ -3,8 +3,7 @@ Route125_MapScripts:: @ 8151F1E
.byte 0
Route125_MapScript1_151F24:: @ 8151F24
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, Route125_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, Route125_EventScript_1A02C1
end
Route125_EventScript_151F2E:: @ 8151F2E
diff --git a/data/scripts/maps/Route126.inc b/data/scripts/maps/Route126.inc
index a89087994..4a28abfb7 100644
--- a/data/scripts/maps/Route126.inc
+++ b/data/scripts/maps/Route126.inc
@@ -3,8 +3,7 @@ Route126_MapScripts:: @ 8151FFE
.byte 0
Route126_MapScript1_152004:: @ 8152004
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, Route126_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, Route126_EventScript_1A02C1
end
Route126_EventScript_15200E:: @ 815200E
diff --git a/data/scripts/maps/Route127.inc b/data/scripts/maps/Route127.inc
index 5fb122821..7552f7c5d 100644
--- a/data/scripts/maps/Route127.inc
+++ b/data/scripts/maps/Route127.inc
@@ -3,8 +3,7 @@ Route127_MapScripts:: @ 815206A
.byte 0
Route127_MapScript1_152070:: @ 8152070
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, Route127_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, Route127_EventScript_1A02C1
end
Route127_EventScript_15207A:: @ 815207A
diff --git a/data/scripts/maps/Route128.inc b/data/scripts/maps/Route128.inc
index a97a1e93f..6550db979 100644
--- a/data/scripts/maps/Route128.inc
+++ b/data/scripts/maps/Route128.inc
@@ -4,8 +4,7 @@ Route128_MapScripts:: @ 815211B
.byte 0
Route128_MapScript1_152126:: @ 8152126
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, Route128_EventScript_1A02C1
+ call_if_set FLAG_SYS_WEATHER_CTRL, Route128_EventScript_1A02C1
call Route128_EventScript_1A0196
end
diff --git a/data/scripts/maps/Route131.inc b/data/scripts/maps/Route131.inc
index efa26ecd2..ffd204bb9 100644
--- a/data/scripts/maps/Route131.inc
+++ b/data/scripts/maps/Route131.inc
@@ -3,8 +3,7 @@ Route131_MapScripts:: @ 815243E
.byte 0
Route131_MapScript1_152444:: @ 8152444
- checkflag FLAG_SYS_GAME_CLEAR
- call_if 1, Route131_EventScript_15244E
+ call_if_set FLAG_SYS_GAME_CLEAR, Route131_EventScript_15244E
end
Route131_EventScript_15244E:: @ 815244E
diff --git a/data/scripts/maps/RustboroCity.inc b/data/scripts/maps/RustboroCity.inc
index c6bdbbdb7..415138d67 100644
--- a/data/scripts/maps/RustboroCity.inc
+++ b/data/scripts/maps/RustboroCity.inc
@@ -11,8 +11,7 @@ RustboroCity_MapScript1_14C378:: @ 814C378
RustboroCity_EventScript_14C386:: @ 814C386
lock
faceplayer
- checkflag FLAG_DEVON_GOODS_STOLEN
- goto_if_eq RustboroCity_EventScript_14C39B
+ goto_if_set FLAG_DEVON_GOODS_STOLEN, RustboroCity_EventScript_14C39B
msgbox RustboroCity_Text_16689D, 4
release
end
@@ -36,8 +35,7 @@ RustboroCity_EventScript_14C3B1:: @ 814C3B1
RustboroCity_EventScript_14C3BA:: @ 814C3BA
lock
faceplayer
- checkflag FLAG_BADGE01_GET
- goto_if_eq RustboroCity_EventScript_14C3CF
+ goto_if_set FLAG_BADGE01_GET, RustboroCity_EventScript_14C3CF
msgbox RustboroCity_Text_16696D, 4
release
end
@@ -50,8 +48,7 @@ RustboroCity_EventScript_14C3CF:: @ 814C3CF
RustboroCity_EventScript_14C3D9:: @ 814C3D9
lock
faceplayer
- checkflag FLAG_RECEIVED_POKENAV
- goto_if_eq RustboroCity_EventScript_14C3EE
+ goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_EventScript_14C3EE
msgbox RustboroCity_Text_166B86, 4
release
end
@@ -326,8 +323,7 @@ RustboroCity_Movement_14C5F7:: @ 814C5F7
RustboroCity_EventScript_14C5FF:: @ 814C5FF
lock
faceplayer
- checkflag FLAG_RECOVERED_DEVON_GOODS
- goto_if_eq RustboroCity_EventScript_14C614
+ goto_if_set FLAG_RECOVERED_DEVON_GOODS, RustboroCity_EventScript_14C614
msgbox RustboroCity_Text_166F6B, 4
release
end
@@ -364,13 +360,13 @@ RustboroCity_EventScript_14C644:: @ 814C644
RustboroCity_EventScript_14C650:: @ 814C650
compare VAR_TEMP_1, 0
- call_if 1, RustboroCity_EventScript_14C691
+ call_if_eq RustboroCity_EventScript_14C691
compare VAR_TEMP_1, 1
- call_if 1, RustboroCity_EventScript_14C6BD
+ call_if_eq RustboroCity_EventScript_14C6BD
compare VAR_TEMP_1, 2
- call_if 1, RustboroCity_EventScript_14C6E9
+ call_if_eq RustboroCity_EventScript_14C6E9
compare VAR_TEMP_1, 3
- call_if 1, RustboroCity_EventScript_14C715
+ call_if_eq RustboroCity_EventScript_14C715
setflag FLAG_UNKNOWN_9F
setvar VAR_RUSTBORO_STATE, 3
moveobjectoffscreen 9
@@ -458,19 +454,19 @@ RustboroCity_EventScript_14C771:: @ 814C771
RustboroCity_EventScript_14C77D:: @ 814C77D
compare VAR_TEMP_1, 0
- call_if 1, RustboroCity_EventScript_14C7FE
+ call_if_eq RustboroCity_EventScript_14C7FE
compare VAR_TEMP_1, 1
- call_if 1, RustboroCity_EventScript_14C82A
+ call_if_eq RustboroCity_EventScript_14C82A
compare VAR_TEMP_1, 2
- call_if 1, RustboroCity_EventScript_14C856
+ call_if_eq RustboroCity_EventScript_14C856
compare VAR_TEMP_1, 3
- call_if 1, RustboroCity_EventScript_14C882
+ call_if_eq RustboroCity_EventScript_14C882
compare VAR_TEMP_1, 4
- call_if 1, RustboroCity_EventScript_14C8B8
+ call_if_eq RustboroCity_EventScript_14C8B8
msgbox RustboroCity_Text_166FB4, 4
giveitem_std ITEM_GREAT_BALL
compare RESULT, 0
- call_if 1, RustboroCity_EventScript_14C7F5
+ call_if_eq RustboroCity_EventScript_14C7F5
msgbox RustboroCity_Text_16707F, 4
closemessage
setflag FLAG_RETURNED_DEVON_GOODS
@@ -549,8 +545,7 @@ RustboroCity_EventScript_14C8B8:: @ 814C8B8
RustboroCity_EventScript_14C8DA:: @ 814C8DA
lock
faceplayer
- checkflag FLAG_MET_RIVAL_RUSTBORO
- goto_if_eq RustboroCity_EventScript_14C917
+ goto_if_set FLAG_MET_RIVAL_RUSTBORO, RustboroCity_EventScript_14C917
checkplayergender
compare RESULT, 0
goto_if_eq RustboroCity_EventScript_14C8FD
diff --git a/data/scripts/maps/RustboroCity_CuttersHouse.inc b/data/scripts/maps/RustboroCity_CuttersHouse.inc
index 3371005c0..e18a1e029 100644
--- a/data/scripts/maps/RustboroCity_CuttersHouse.inc
+++ b/data/scripts/maps/RustboroCity_CuttersHouse.inc
@@ -4,8 +4,7 @@ RustboroCity_CuttersHouse_MapScripts:: @ 8157D26
RustboroCity_CuttersHouse_EventScript_157D27:: @ 8157D27
lock
faceplayer
- checkflag FLAG_RECEIVED_HM01
- goto_if_eq RustboroCity_CuttersHouse_EventScript_157D53
+ goto_if_set FLAG_RECEIVED_HM01, RustboroCity_CuttersHouse_EventScript_157D53
msgbox RustboroCity_CuttersHouse_Text_18509C, 4
giveitem_std ITEM_HM01
setflag FLAG_RECEIVED_HM01
diff --git a/data/scripts/maps/RustboroCity_DevonCorp_1F.inc b/data/scripts/maps/RustboroCity_DevonCorp_1F.inc
index f9e902763..7b56c72a2 100644
--- a/data/scripts/maps/RustboroCity_DevonCorp_1F.inc
+++ b/data/scripts/maps/RustboroCity_DevonCorp_1F.inc
@@ -3,8 +3,7 @@ RustboroCity_DevonCorp_1F_MapScripts:: @ 8157406
.byte 0
RustboroCity_DevonCorp_1F_MapScript1_15740C:: @ 815740C
- checkflag FLAG_RETURNED_DEVON_GOODS
- call_if 0, RustboroCity_DevonCorp_1F_EventScript_157416
+ call_if_unset FLAG_RETURNED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_157416
end
RustboroCity_DevonCorp_1F_EventScript_157416:: @ 8157416
@@ -15,10 +14,8 @@ RustboroCity_DevonCorp_1F_EventScript_157416:: @ 8157416
RustboroCity_DevonCorp_1F_EventScript_157422:: @ 8157422
lock
faceplayer
- checkflag FLAG_RETURNED_DEVON_GOODS
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_15744A
- checkflag FLAG_DEVON_GOODS_STOLEN
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157440
+ goto_if_set FLAG_RETURNED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_15744A
+ goto_if_set FLAG_DEVON_GOODS_STOLEN, RustboroCity_DevonCorp_1F_EventScript_157440
msgbox RustboroCity_DevonCorp_1F_Text_1829A4, 4
release
end
@@ -36,12 +33,9 @@ RustboroCity_DevonCorp_1F_EventScript_15744A:: @ 815744A
RustboroCity_DevonCorp_1F_EventScript_157454:: @ 8157454
lock
faceplayer
- checkflag FLAG_RETURNED_DEVON_GOODS
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_15747B
- checkflag FLAG_RECOVERED_DEVON_GOODS
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157485
- checkflag FLAG_DEVON_GOODS_STOLEN
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157485
+ goto_if_set FLAG_RETURNED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_15747B
+ goto_if_set FLAG_RECOVERED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_157485
+ goto_if_set FLAG_DEVON_GOODS_STOLEN, RustboroCity_DevonCorp_1F_EventScript_157485
msgbox RustboroCity_DevonCorp_1F_Text_182AF0, 4
release
end
@@ -59,12 +53,9 @@ RustboroCity_DevonCorp_1F_EventScript_157485:: @ 8157485
RustboroCity_DevonCorp_1F_EventScript_15748F:: @ 815748F
lock
faceplayer
- checkflag FLAG_RETURNED_DEVON_GOODS
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574B6
- checkflag FLAG_RECOVERED_DEVON_GOODS
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574C0
- checkflag FLAG_DEVON_GOODS_STOLEN
- goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574C0
+ goto_if_set FLAG_RETURNED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_1574B6
+ goto_if_set FLAG_RECOVERED_DEVON_GOODS, RustboroCity_DevonCorp_1F_EventScript_1574C0
+ goto_if_set FLAG_DEVON_GOODS_STOLEN, RustboroCity_DevonCorp_1F_EventScript_1574C0
msgbox RustboroCity_DevonCorp_1F_Text_1828EE, 4
release
end
diff --git a/data/scripts/maps/RustboroCity_DevonCorp_2F.inc b/data/scripts/maps/RustboroCity_DevonCorp_2F.inc
index 179140378..b7b36dd6d 100644
--- a/data/scripts/maps/RustboroCity_DevonCorp_2F.inc
+++ b/data/scripts/maps/RustboroCity_DevonCorp_2F.inc
@@ -4,7 +4,7 @@ RustboroCity_DevonCorp_2F_MapScripts:: @ 81574CA
RustboroCity_DevonCorp_2F_MapScript1_1574D0:: @ 81574D0
compare VAR_FOSSIL_RESURRECTION_STATE, 1
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1574DC
end
RustboroCity_DevonCorp_2F_EventScript_1574DC:: @ 81574DC
@@ -15,7 +15,7 @@ RustboroCity_DevonCorp_2F_EventScript_1574E2:: @ 81574E2
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1574DC
msgbox RustboroCity_DevonCorp_2F_Text_182B81, 4
release
end
@@ -24,9 +24,8 @@ RustboroCity_DevonCorp_2F_EventScript_1574F9:: @ 81574F9
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC
- checkflag FLAG_MET_DEVON_EMPLOYEE
- goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157519
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1574DC
+ goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_DevonCorp_2F_EventScript_157519
msgbox RustboroCity_DevonCorp_2F_Text_182BD8, 4
release
end
@@ -40,9 +39,8 @@ RustboroCity_DevonCorp_2F_EventScript_157523:: @ 8157523
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC
- checkflag FLAG_RECEIVED_POKENAV
- goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157543
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1574DC
+ goto_if_set FLAG_RECEIVED_POKENAV, RustboroCity_DevonCorp_2F_EventScript_157543
msgbox RustboroCity_DevonCorp_2F_Text_182D2A, 4
release
end
@@ -56,7 +54,7 @@ RustboroCity_DevonCorp_2F_EventScript_15754D:: @ 815754D
lock
faceplayer
compare VAR_FOSSIL_RESURRECTION_STATE, 1
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1574DC
msgbox RustboroCity_DevonCorp_2F_Text_182E6B, 4
release
end
@@ -147,7 +145,7 @@ RustboroCity_DevonCorp_2F_EventScript_157661:: @ 8157661
givemon SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0
msgbox RustboroCity_DevonCorp_2F_Text_1A1102, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1A0678
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1A0678
release
end
@@ -167,7 +165,7 @@ RustboroCity_DevonCorp_2F_EventScript_1576B4:: @ 81576B4
givemon SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0
msgbox RustboroCity_DevonCorp_2F_Text_1A1102, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, RustboroCity_DevonCorp_2F_EventScript_1A0678
+ call_if_eq RustboroCity_DevonCorp_2F_EventScript_1A0678
release
end
diff --git a/data/scripts/maps/RustboroCity_DevonCorp_3F.inc b/data/scripts/maps/RustboroCity_DevonCorp_3F.inc
index ff854d7ef..0b71effee 100644
--- a/data/scripts/maps/RustboroCity_DevonCorp_3F.inc
+++ b/data/scripts/maps/RustboroCity_DevonCorp_3F.inc
@@ -6,7 +6,7 @@ RustboroCity_DevonCorp_3F_MapScripts:: @ 8157711
RustboroCity_DevonCorp_3F_MapScript1_157721:: @ 8157721
compare VAR_DEVON_CORP_3F_STATE, 0
- call_if 1, RustboroCity_DevonCorp_3F_EventScript_15772D
+ call_if_eq RustboroCity_DevonCorp_3F_EventScript_15772D
end
RustboroCity_DevonCorp_3F_EventScript_15772D:: @ 815772D
@@ -146,10 +146,8 @@ RustboroCity_DevonCorp_3F_Movement_157835:: @ 8157835
RustboroCity_DevonCorp_3F_EventScript_15783B:: @ 815783B
lock
faceplayer
- checkflag FLAG_RECEIVED_EXP_SHARE
- goto_if_eq RustboroCity_DevonCorp_3F_EventScript_15789B
- checkflag FLAG_DELIVERED_STEVEN_LETTER
- goto_if_eq RustboroCity_DevonCorp_3F_EventScript_157864
+ goto_if_set FLAG_RECEIVED_EXP_SHARE, RustboroCity_DevonCorp_3F_EventScript_15789B
+ 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
@@ -181,8 +179,7 @@ RustboroCity_DevonCorp_3F_EventScript_15789B:: @ 815789B
RustboroCity_DevonCorp_3F_EventScript_1578B0:: @ 81578B0
lock
faceplayer
- checkflag FLAG_RECEIVED_REPEAT_BALL
- goto_if_eq RustboroCity_DevonCorp_3F_EventScript_1578C5
+ goto_if_set FLAG_RECEIVED_REPEAT_BALL, RustboroCity_DevonCorp_3F_EventScript_1578C5
msgbox RustboroCity_DevonCorp_3F_Text_18395C, 4
release
end
diff --git a/data/scripts/maps/RustboroCity_Flat2_2F.inc b/data/scripts/maps/RustboroCity_Flat2_2F.inc
index 3a2242c7a..5ed9ac0ef 100644
--- a/data/scripts/maps/RustboroCity_Flat2_2F.inc
+++ b/data/scripts/maps/RustboroCity_Flat2_2F.inc
@@ -8,8 +8,7 @@ RustboroCity_Flat2_2F_EventScript_157D97:: @ 8157D97
RustboroCity_Flat2_2F_EventScript_157DA0:: @ 8157DA0
lock
faceplayer
- checkflag FLAG_RECEIVED_PREMIER_BALL_RUSTBORO
- goto_if_eq RustboroCity_Flat2_2F_EventScript_157DCF
+ 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
diff --git a/data/scripts/maps/RustboroCity_Gym.inc b/data/scripts/maps/RustboroCity_Gym.inc
index 1e2256b47..bcd597541 100644
--- a/data/scripts/maps/RustboroCity_Gym.inc
+++ b/data/scripts/maps/RustboroCity_Gym.inc
@@ -3,8 +3,7 @@ RustboroCity_Gym_MapScripts:: @ 81578D8
RustboroCity_Gym_EventScript_1578D9:: @ 81578D9
trainerbattle 1, OPPONENT_ROXANNE, 0, RustboroCity_Gym_Text_183EE5, RustboroCity_Gym_Text_183FC4, RustboroCity_Gym_EventScript_1578FE
- checkflag FLAG_RECEIVED_TM39
- goto_if 0, RustboroCity_Gym_EventScript_15793C
+ goto_if_unset FLAG_RECEIVED_TM39, RustboroCity_Gym_EventScript_15793C
msgbox RustboroCity_Gym_Text_184252, 4
release
end
@@ -21,7 +20,7 @@ RustboroCity_Gym_EventScript_1578FE:: @ 81578FE
setvar VAR_SPECIAL_8, 1
call RustboroCity_Gym_EventScript_1A01C0
compare VAR_PETALBURG_GYM_STATE, 6
- call_if 1, RustboroCity_Gym_EventScript_1A00FB
+ call_if_eq RustboroCity_Gym_EventScript_1A00FB
goto RustboroCity_Gym_EventScript_15793C
end
@@ -47,8 +46,7 @@ RustboroCity_Gym_EventScript_157977:: @ 8157977
RustboroCity_Gym_EventScript_15798E:: @ 815798E
lock
faceplayer
- checkflag FLAG_DEFEATED_RUSTBORO_GYM
- goto_if_eq RustboroCity_Gym_EventScript_1579A3
+ goto_if_set FLAG_DEFEATED_RUSTBORO_GYM, RustboroCity_Gym_EventScript_1579A3
msgbox RustboroCity_Gym_Text_183A4B, 4
release
end
@@ -60,15 +58,13 @@ RustboroCity_Gym_EventScript_1579A3:: @ 81579A3
RustboroCity_Gym_EventScript_1579AD:: @ 81579AD
lockall
- checkflag FLAG_BADGE01_GET
- goto_if_eq RustboroCity_Gym_EventScript_1579CD
+ goto_if_set FLAG_BADGE01_GET, RustboroCity_Gym_EventScript_1579CD
goto RustboroCity_Gym_EventScript_1579D7
end
RustboroCity_Gym_EventScript_1579BD:: @ 81579BD
lockall
- checkflag FLAG_BADGE01_GET
- goto_if_eq RustboroCity_Gym_EventScript_1579CD
+ goto_if_set FLAG_BADGE01_GET, RustboroCity_Gym_EventScript_1579CD
goto RustboroCity_Gym_EventScript_1579D7
end
diff --git a/data/scripts/maps/RustboroCity_House1.inc b/data/scripts/maps/RustboroCity_House1.inc
index c0f1bc689..abbac505b 100644
--- a/data/scripts/maps/RustboroCity_House1.inc
+++ b/data/scripts/maps/RustboroCity_House1.inc
@@ -4,8 +4,7 @@ RustboroCity_House1_MapScripts:: @ 8157C7C
RustboroCity_House1_EventScript_157C7D:: @ 8157C7D
lock
faceplayer
- checkflag FLAG_RUSTBORO_NPC_TRADE_COMPLETED
- goto_if_eq RustboroCity_House1_EventScript_157D13
+ 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
@@ -22,7 +21,7 @@ RustboroCity_House1_EventScript_157C7D:: @ 8157C7D
specialvar RESULT, GetTradeSpecies
copyvar VAR_SPECIAL_B, RESULT
compare RESULT, VAR_SPECIAL_9
- goto_if 5, RustboroCity_House1_EventScript_157D05
+ goto_if_ne RustboroCity_House1_EventScript_157D05
copyvar VAR_SPECIAL_4, VAR_SPECIAL_8
copyvar VAR_SPECIAL_5, VAR_SPECIAL_A
special CreateInGameTradePokemon
diff --git a/data/scripts/maps/RustboroCity_Mart.inc b/data/scripts/maps/RustboroCity_Mart.inc
index 69f977e79..c8e3f3a43 100644
--- a/data/scripts/maps/RustboroCity_Mart.inc
+++ b/data/scripts/maps/RustboroCity_Mart.inc
@@ -6,10 +6,8 @@ RustboroCity_Mart_EventScript_157BD4:: @ 8157BD4
faceplayer
message RustboroCity_Mart_Text_1A0BE4
waitmessage
- checkflag FLAG_MET_DEVON_EMPLOYEE
- goto_if 0, RustboroCity_Mart_EventScript_157BEF
- checkflag FLAG_MET_DEVON_EMPLOYEE
- goto_if_eq RustboroCity_Mart_EventScript_157C18
+ goto_if_unset FLAG_MET_DEVON_EMPLOYEE, RustboroCity_Mart_EventScript_157BEF
+ goto_if_set FLAG_MET_DEVON_EMPLOYEE, RustboroCity_Mart_EventScript_157C18
end
RustboroCity_Mart_EventScript_157BEF:: @ 8157BEF
diff --git a/data/scripts/maps/RustboroCity_PokemonSchool.inc b/data/scripts/maps/RustboroCity_PokemonSchool.inc
index 21fdf3d3b..155df8de5 100644
--- a/data/scripts/maps/RustboroCity_PokemonSchool.inc
+++ b/data/scripts/maps/RustboroCity_PokemonSchool.inc
@@ -77,12 +77,11 @@ RustboroCity_PokemonSchool_EventScript_157AC5:: @ 8157AC5
RustboroCity_PokemonSchool_EventScript_157ACE:: @ 8157ACE
lock
faceplayer
- checkflag FLAG_RECEIVED_QUICK_CLAW
- goto_if_eq RustboroCity_PokemonSchool_EventScript_157B34
+ goto_if_set FLAG_RECEIVED_QUICK_CLAW, RustboroCity_PokemonSchool_EventScript_157B34
compare FACING, 4
- call_if 1, RustboroCity_PokemonSchool_EventScript_157B1E
+ call_if_eq RustboroCity_PokemonSchool_EventScript_157B1E
compare FACING, 3
- call_if 1, RustboroCity_PokemonSchool_EventScript_157B29
+ call_if_eq RustboroCity_PokemonSchool_EventScript_157B29
msgbox RustboroCity_PokemonSchool_Text_1846A2, 4
giveitem_std ITEM_QUICK_CLAW
compare RESULT, 0
diff --git a/data/scripts/maps/RusturfTunnel.inc b/data/scripts/maps/RusturfTunnel.inc
index 050cf28c2..7c715b6c2 100644
--- a/data/scripts/maps/RusturfTunnel.inc
+++ b/data/scripts/maps/RusturfTunnel.inc
@@ -11,7 +11,7 @@ RusturfTunnel_MapScript2_15C750:: @ 815C750
RusturfTunnel_MapScript1_15C762:: @ 815C762
call RusturfTunnel_EventScript_1A0196
compare VAR_RUSTURF_TUNNEL_STATE, 2
- call_if 1, RusturfTunnel_EventScript_15C773
+ call_if_eq RusturfTunnel_EventScript_15C773
end
RusturfTunnel_EventScript_15C773:: @ 815C773
@@ -32,8 +32,7 @@ RusturfTunnel_EventScript_15C782:: @ 815C782
RusturfTunnel_EventScript_15C799:: @ 815C799
lock
faceplayer
- checkflag FLAG_TEMP_1
- goto_if_eq RusturfTunnel_EventScript_15C7BC
+ goto_if_set FLAG_TEMP_1, RusturfTunnel_EventScript_15C7BC
setflag FLAG_TEMP_1
msgbox RusturfTunnel_Text_1944C5, 4
closemessage
@@ -53,35 +52,35 @@ RusturfTunnel_EventScript_15C7BC:: @ 815C7BC
RusturfTunnel_EventScript_15C7D1:: @ 815C7D1
lockall
compare VAR_TEMP_1, 1
- call_if 1, RusturfTunnel_EventScript_15C8CA
+ call_if_eq RusturfTunnel_EventScript_15C8CA
compare VAR_TEMP_1, 2
- call_if 1, RusturfTunnel_EventScript_15C8DF
+ call_if_eq RusturfTunnel_EventScript_15C8DF
compare VAR_TEMP_1, 3
- call_if 1, RusturfTunnel_EventScript_15C8EA
+ call_if_eq RusturfTunnel_EventScript_15C8EA
call RusturfTunnel_EventScript_15C92D
msgbox RusturfTunnel_Text_19461D, 4
compare VAR_TEMP_1, 2
- call_if 1, RusturfTunnel_EventScript_15C8EB
+ call_if_eq RusturfTunnel_EventScript_15C8EB
compare VAR_TEMP_1, 3
- call_if 1, RusturfTunnel_EventScript_15C8EB
+ call_if_eq RusturfTunnel_EventScript_15C8EB
giveitem_std ITEM_HM04
setflag FLAG_RECEIVED_HM04
msgbox RusturfTunnel_Text_194693, 4
closemessage
compare VAR_TEMP_1, 1
- call_if 1, RusturfTunnel_EventScript_15C880
+ call_if_eq RusturfTunnel_EventScript_15C880
compare VAR_TEMP_1, 2
- call_if 1, RusturfTunnel_EventScript_15C892
+ call_if_eq RusturfTunnel_EventScript_15C892
compare VAR_TEMP_1, 3
- call_if 1, RusturfTunnel_EventScript_15C8AE
+ call_if_eq RusturfTunnel_EventScript_15C8AE
msgbox RusturfTunnel_Text_194706, 4
closemessage
compare VAR_TEMP_1, 1
- call_if 1, RusturfTunnel_EventScript_15C8F7
+ call_if_eq RusturfTunnel_EventScript_15C8F7
compare VAR_TEMP_1, 2
- call_if 1, RusturfTunnel_EventScript_15C909
+ call_if_eq RusturfTunnel_EventScript_15C909
compare VAR_TEMP_1, 3
- call_if 1, RusturfTunnel_EventScript_15C91B
+ call_if_eq RusturfTunnel_EventScript_15C91B
call RusturfTunnel_EventScript_1A0442
releaseall
end
diff --git a/data/scripts/maps/SSTidalCorridor.inc b/data/scripts/maps/SSTidalCorridor.inc
index dd5aee95c..cd830f2b0 100644
--- a/data/scripts/maps/SSTidalCorridor.inc
+++ b/data/scripts/maps/SSTidalCorridor.inc
@@ -124,8 +124,7 @@ SSTidalCorridor_EventScript_15FDD6:: @ 815FDD6
SSTidalCorridor_EventScript_15FDF8:: @ 815FDF8
setrespawn 8
msgbox SSTidalCorridor_Text_1991F4, 4
- checkflag FLAG_RECEIVED_TM49
- call_if 1, SSTidalCorridor_EventScript_15FE36
+ call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_15FE36
warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
waitstate
release
@@ -134,8 +133,7 @@ SSTidalCorridor_EventScript_15FDF8:: @ 815FDF8
SSTidalCorridor_EventScript_15FE17:: @ 815FE17
setrespawn 4
msgbox SSTidalCorridor_Text_1991F4, 4
- checkflag FLAG_RECEIVED_TM49
- call_if 1, SSTidalCorridor_EventScript_15FE36
+ call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_15FE36
warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11
waitstate
release
@@ -163,8 +161,7 @@ SSTidalCorridor_EventScript_15FE5B:: @ 815FE5B
SSTidalCorridor_EventScript_15FE60:: @ 815FE60
lock
faceplayer
- checkflag FLAG_DEFEATED_SS_TIDAL_TRAINERS
- goto_if_eq SSTidalCorridor_EventScript_15FE7A
+ goto_if_set FLAG_DEFEATED_SS_TIDAL_TRAINERS, SSTidalCorridor_EventScript_15FE7A
call SSTidalCorridor_EventScript_15FE84
msgbox SSTidalCorridor_Text_199203, 4
release
@@ -177,21 +174,21 @@ SSTidalCorridor_EventScript_15FE7A:: @ 815FE7A
SSTidalCorridor_EventScript_15FE84:: @ 815FE84
checktrainerflag OPPONENT_PHILLIP
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_LEONARD
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_COLTON
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_TUCKER
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_THOMAS
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_LEA_AND_JED
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_GARRET
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
checktrainerflag OPPONENT_ANETTE
- goto_if 0, SSTidalCorridor_EventScript_15FED5
+ goto_if_lt SSTidalCorridor_EventScript_15FED5
setflag FLAG_DEFEATED_SS_TIDAL_TRAINERS
goto SSTidalCorridor_EventScript_15FE7A
return
diff --git a/data/scripts/maps/SSTidalRooms.inc b/data/scripts/maps/SSTidalRooms.inc
index 0390177de..58e7c3235 100644
--- a/data/scripts/maps/SSTidalRooms.inc
+++ b/data/scripts/maps/SSTidalRooms.inc
@@ -4,8 +4,7 @@ SSTidalRooms_MapScripts:: @ 815FF05
SSTidalRooms_EventScript_15FF06:: @ 815FF06
lock
faceplayer
- checkflag FLAG_RECEIVED_TM49
- goto_if_eq SSTidalRooms_EventScript_15FF3D
+ goto_if_set FLAG_RECEIVED_TM49, SSTidalRooms_EventScript_15FF3D
msgbox SSTidalRooms_Text_199B65, 4
giveitem_std ITEM_TM49
compare RESULT, 0
diff --git a/data/scripts/maps/SafariZone_Southeast.inc b/data/scripts/maps/SafariZone_Southeast.inc
index b3eb297e9..493aa55a1 100644
--- a/data/scripts/maps/SafariZone_Southeast.inc
+++ b/data/scripts/maps/SafariZone_Southeast.inc
@@ -21,7 +21,7 @@ SafariZone_Southeast_EventScript_16004B:: @ 816004B
SafariZone_Southeast_MapScript1_160073:: @ 8160073
compare VAR_SAFARI_ZONE_STATE, 2
- call_if 1, SafariZone_Southeast_EventScript_16007F
+ call_if_eq SafariZone_Southeast_EventScript_16007F
end
SafariZone_Southeast_EventScript_16007F:: @ 816007F
diff --git a/data/scripts/maps/SealedChamber_InnerRoom.inc b/data/scripts/maps/SealedChamber_InnerRoom.inc
index d788be9b3..11aba3ac8 100644
--- a/data/scripts/maps/SealedChamber_InnerRoom.inc
+++ b/data/scripts/maps/SealedChamber_InnerRoom.inc
@@ -6,8 +6,7 @@ SealedChamber_InnerRoom_EventScript_15F1E8:: @ 815F1E8
braillemessage SealedChamber_InnerRoom_Braille_1C53C1
waitbuttonpress
erasebox 0, 0, 29, 19
- checkflag FLAG_REGI_DOORS_OPENED
- goto_if_eq SealedChamber_InnerRoom_EventScript_15F247
+ goto_if_set FLAG_REGI_DOORS_OPENED, SealedChamber_InnerRoom_EventScript_15F247
specialvar RESULT, CheckRelicanthWailord
compare RESULT, 0
goto_if_eq SealedChamber_InnerRoom_EventScript_15F247
diff --git a/data/scripts/maps/SealedChamber_OuterRoom.inc b/data/scripts/maps/SealedChamber_OuterRoom.inc
index ad17819c2..1f2159010 100644
--- a/data/scripts/maps/SealedChamber_OuterRoom.inc
+++ b/data/scripts/maps/SealedChamber_OuterRoom.inc
@@ -14,8 +14,7 @@ SealedChamber_OuterRoom_MapScript1_15F0E7:: @ 815F0E7
end
SealedChamber_OuterRoom_MapScript1_15F0EB:: @ 815F0EB
- checkflag FLAG_SYS_BRAILLE_DIG
- call_if 0, SealedChamber_OuterRoom_EventScript_15F0F5
+ call_if_unset FLAG_SYS_BRAILLE_DIG, SealedChamber_OuterRoom_EventScript_15F0F5
end
SealedChamber_OuterRoom_EventScript_15F0F5:: @ 815F0F5
@@ -109,8 +108,7 @@ SealedChamber_OuterRoom_EventScript_15F1AA:: @ 815F1AA
SealedChamber_OuterRoom_EventScript_15F1B8:: @ 815F1B8
lockall
- checkflag FLAG_SYS_BRAILLE_DIG
- goto_if_eq SealedChamber_OuterRoom_EventScript_15F1CF
+ goto_if_set FLAG_SYS_BRAILLE_DIG, SealedChamber_OuterRoom_EventScript_15F1CF
braillemessage SealedChamber_OuterRoom_Braille_1C53B1
waitbuttonpress
erasebox 0, 0, 29, 19
diff --git a/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc b/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc
index 4dcd88761..2005cb67b 100644
--- a/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc
+++ b/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc
@@ -4,8 +4,7 @@ ShoalCave_LowTideEntranceRoom_MapScripts:: @ 815E057
ShoalCave_LowTideEntranceRoom_MapScript1_15E05D:: @ 815E05D
special UpdateShoalTideFlag
- checkflag FLAG_SYS_SHOAL_TIDE
- goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E06E
+ goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideEntranceRoom_EventScript_15E06E
goto ShoalCave_LowTideEntranceRoom_EventScript_15E072
ShoalCave_LowTideEntranceRoom_EventScript_15E06E:: @ 815E06E
@@ -20,8 +19,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076
lock
faceplayer
dodailyevents
- checkflag FLAG_SYS_SHOAL_ITEM
- call_if 1, ShoalCave_LowTideEntranceRoom_EventScript_15E176
+ call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_15E176
checkitem ITEM_SHOAL_SALT, 4
compare RESULT, 0
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E138
@@ -33,7 +31,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E16C
checkitemspace ITEM_SHELL_BELL, 1
compare RESULT, 0
- call_if 1, ShoalCave_LowTideEntranceRoom_EventScript_15E106
+ call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E106
compare RESULT, 2
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E12E
msgbox ShoalCave_LowTideEntranceRoom_Text_1C6808, 4
diff --git a/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc b/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc
index b6aba9523..21997d076 100644
--- a/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc
+++ b/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc
@@ -4,8 +4,7 @@ ShoalCave_LowTideInnerRoom_MapScripts:: @ 815E192
.byte 0
ShoalCave_LowTideInnerRoom_MapScript1_15E19D:: @ 815E19D
- checkflag FLAG_SYS_SHOAL_TIDE
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1AB
+ goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_15E1AB
goto ShoalCave_LowTideInnerRoom_EventScript_15E1AF
ShoalCave_LowTideInnerRoom_EventScript_15E1AB:: @ 815E1AB
@@ -21,47 +20,39 @@ ShoalCave_LowTideInnerRoom_MapScript1_15E1B3:: @ 815E1B3
end
ShoalCave_LowTideInnerRoom_EventScript_15E1B9:: @ 815E1B9
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_1
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1DA
- checkflag FLAG_SYS_SHOAL_TIDE
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1DA
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_15E1DA
+ goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_15E1DA
setmetatile 31, 8, 856, 1
goto ShoalCave_LowTideInnerRoom_EventScript_15E1DA
end
ShoalCave_LowTideInnerRoom_EventScript_15E1DA:: @ 815E1DA
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_2
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1FB
- checkflag FLAG_SYS_SHOAL_TIDE
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1FB
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_15E1FB
+ goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_15E1FB
setmetatile 14, 26, 856, 1
goto ShoalCave_LowTideInnerRoom_EventScript_15E1FB
end
ShoalCave_LowTideInnerRoom_EventScript_15E1FB:: @ 815E1FB
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_1
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E213
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_15E213
setmetatile 41, 20, 857, 1
goto ShoalCave_LowTideInnerRoom_EventScript_15E213
end
ShoalCave_LowTideInnerRoom_EventScript_15E213:: @ 815E213
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_2
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E22B
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_15E22B
setmetatile 41, 10, 857, 1
goto ShoalCave_LowTideInnerRoom_EventScript_15E22B
end
ShoalCave_LowTideInnerRoom_EventScript_15E22B:: @ 815E22B
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_3
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E243
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_15E243
setmetatile 6, 9, 857, 1
goto ShoalCave_LowTideInnerRoom_EventScript_15E243
end
ShoalCave_LowTideInnerRoom_EventScript_15E243:: @ 815E243
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_4
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E256
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_15E256
setmetatile 16, 13, 857, 1
return
@@ -70,8 +61,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E256:: @ 815E256
ShoalCave_LowTideInnerRoom_EventScript_15E257:: @ 815E257
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_1
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
@@ -88,8 +78,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E289:: @ 815E289
ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_2
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
@@ -101,8 +90,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293
ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_3
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
@@ -114,8 +102,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5
ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SHELL_4
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_15E289
giveitem_std ITEM_SHOAL_SHELL
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
@@ -127,8 +114,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7
ShoalCave_LowTideInnerRoom_EventScript_15E329:: @ 815E329
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_1
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E35B
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_15E35B
giveitem_std ITEM_SHOAL_SALT
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
@@ -145,8 +131,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E35B:: @ 815E35B
ShoalCave_LowTideInnerRoom_EventScript_15E365:: @ 815E365
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_2
- goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E35B
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_15E35B
giveitem_std ITEM_SHOAL_SALT
compare RESULT, 0
goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B
diff --git a/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc b/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc
index c7cb08a9b..19223a499 100644
--- a/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc
+++ b/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc
@@ -7,8 +7,7 @@ ShoalCave_LowTideLowerRoom_MapScript1_15E3F9:: @ 815E3F9
end
ShoalCave_LowTideLowerRoom_EventScript_15E3FF:: @ 815E3FF
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_4
- goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E412
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_15E412
setmetatile 18, 2, 856, 1
return
@@ -17,8 +16,7 @@ ShoalCave_LowTideLowerRoom_EventScript_15E412:: @ 815E412
ShoalCave_LowTideLowerRoom_EventScript_15E413:: @ 815E413
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_4
- goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E445
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_15E445
giveitem_std ITEM_SHOAL_SALT
compare RESULT, 0
goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_1A029B
@@ -36,8 +34,7 @@ ShoalCave_LowTideLowerRoom_EventScript_15E445:: @ 815E445
ShoalCave_LowTideLowerRoom_EventScript_15E44F:: @ 815E44F
lock
faceplayer
- checkflag FLAG_RECEIVED_FOCUS_BAND
- goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E47E
+ 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
diff --git a/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc b/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc
index efcad59d3..5f9726038 100644
--- a/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc
+++ b/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc
@@ -7,8 +7,7 @@ ShoalCave_LowTideStairsRoom_MapScript1_15E39D:: @ 815E39D
end
ShoalCave_LowTideStairsRoom_EventScript_15E3A3:: @ 815E3A3
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_3
- goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_15E3B6
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_15E3B6
setmetatile 11, 11, 856, 1
return
@@ -17,8 +16,7 @@ ShoalCave_LowTideStairsRoom_EventScript_15E3B6:: @ 815E3B6
ShoalCave_LowTideStairsRoom_EventScript_15E3B7:: @ 815E3B7
lockall
- checkflag FLAG_HIDE_TOOK_SHOAL_SALT_3
- goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_15E3E9
+ goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_15E3E9
giveitem_std ITEM_SHOAL_SALT
compare RESULT, 0
goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_1A029B
diff --git a/data/scripts/maps/SkyPillar_Top.inc b/data/scripts/maps/SkyPillar_Top.inc
index 07a78d2c4..82149a4bc 100644
--- a/data/scripts/maps/SkyPillar_Top.inc
+++ b/data/scripts/maps/SkyPillar_Top.inc
@@ -3,8 +3,7 @@ SkyPillar_Top_MapScripts:: @ 815F302
.byte 0
SkyPillar_Top_MapScript1_15F308:: @ 815F308
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, SkyPillar_Top_EventScript_15F312
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SkyPillar_Top_EventScript_15F312
end
SkyPillar_Top_EventScript_15F312:: @ 815F312
diff --git a/data/scripts/maps/SlateportCity.inc b/data/scripts/maps/SlateportCity.inc
index ae8534ad9..4af912ed3 100644
--- a/data/scripts/maps/SlateportCity.inc
+++ b/data/scripts/maps/SlateportCity.inc
@@ -13,7 +13,7 @@ SlateportCity_MapScript1_14BA3C:: @ 814BA3C
setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 0
call SlateportCity_EventScript_14BA5C
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BA68
+ call_if_eq SlateportCity_EventScript_14BA68
end
SlateportCity_EventScript_14BA5C:: @ 814BA5C
@@ -68,10 +68,10 @@ SlateportCity_EventScript_14BAE0:: @ 814BAE0
msgbox SlateportCity_Text_164682, 4
specialvar RESULT, LeadMonHasEffortRibbon
compare RESULT, 1
- call_if 1, SlateportCity_EventScript_14BB35
+ call_if_eq SlateportCity_EventScript_14BB35
specialvar RESULT, ScrSpecial_AreLeadMonEVsMaxedOut
compare RESULT, 0
- call_if 1, SlateportCity_EventScript_14BB2B
+ call_if_eq SlateportCity_EventScript_14BB2B
msgbox SlateportCity_Text_164691, 4
playfanfare BGM_FANFA4
message SlateportCity_Text_1646DD
@@ -96,7 +96,7 @@ SlateportCity_EventScript_14BB3F:: @ 814BB3F
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BB56
+ call_if_eq SlateportCity_EventScript_14BB56
msgbox SlateportCity_Text_164814, 4
release
end
@@ -110,7 +110,7 @@ SlateportCity_EventScript_14BB60:: @ 814BB60
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BB77
+ call_if_eq SlateportCity_EventScript_14BB77
msgbox SlateportCity_Text_1648A0, 4
release
end
@@ -124,9 +124,8 @@ SlateportCity_EventScript_14BB81:: @ 814BB81
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BBA1
- checkflag FLAG_RECEIVED_SECRET_POWER
- goto_if_eq SlateportCity_EventScript_14BBAB
+ call_if_eq SlateportCity_EventScript_14BBA1
+ goto_if_set FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_14BBAB
msgbox SlateportCity_Text_164937, 4
release
end
@@ -145,7 +144,7 @@ SlateportCity_EventScript_14BBB5:: @ 814BBB5
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BBCC
+ call_if_eq SlateportCity_EventScript_14BBCC
msgbox SlateportCity_Text_164A30, 4
release
end
@@ -169,7 +168,7 @@ SlateportCity_EventScript_14BBF3:: @ 814BBF3
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BC0A
+ call_if_eq SlateportCity_EventScript_14BC0A
msgbox SlateportCity_Text_164B34, 4
release
end
@@ -182,8 +181,7 @@ SlateportCity_EventScript_14BC0A:: @ 814BC0A
SlateportCity_EventScript_14BC14:: @ 814BC14
lock
faceplayer
- checkflag FLAG_DOCK_REJECTED_DEVON_GOODS
- goto_if_eq SlateportCity_EventScript_14BC29
+ goto_if_set FLAG_DOCK_REJECTED_DEVON_GOODS, SlateportCity_EventScript_14BC29
msgbox SlateportCity_Text_164BBF, 4
release
end
@@ -199,10 +197,8 @@ SlateportCity_EventScript_14BC33:: @ 814BC33
SlateportCity_EventScript_14BC3C:: @ 814BC3C
lockall
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq SlateportCity_EventScript_14BC63
- checkflag FLAG_BADGE07_GET
- goto_if_eq SlateportCity_EventScript_14BC59
+ goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_EventScript_14BC63
+ goto_if_set FLAG_BADGE07_GET, SlateportCity_EventScript_14BC59
msgbox SlateportCity_Text_1658A0, 4
releaseall
end
@@ -235,8 +231,7 @@ SlateportCity_EventScript_14BC88:: @ 814BC88
SlateportCity_EventScript_14BC91:: @ 814BC91
lockall
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq SlateportCity_EventScript_14BCA5
+ goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_EventScript_14BCA5
msgbox SlateportCity_Text_165A8B, 4
releaseall
end
@@ -254,7 +249,7 @@ SlateportCity_EventScript_14BCB8:: @ 814BCB8
lock
faceplayer
compare VAR_SLATEPORT_STATE, 1
- call_if 1, SlateportCity_EventScript_14BCCF
+ call_if_eq SlateportCity_EventScript_14BCCF
msgbox SlateportCity_Text_164F9E, 4
release
end
@@ -289,9 +284,9 @@ SlateportCity_EventScript_14BD06:: @ 814BD06
faceplayer
msgbox SlateportCity_Text_1650F1, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, SlateportCity_EventScript_14BD28
+ call_if_eq SlateportCity_EventScript_14BD28
compare RESULT, NO
- call_if 1, SlateportCity_EventScript_14BD31
+ call_if_eq SlateportCity_EventScript_14BD31
release
end
@@ -410,8 +405,7 @@ SlateportCity_EventScript_14BE16:: @ 814BE16
SlateportCity_EventScript_14BE20:: @ 814BE20
lock
faceplayer
- checkflag FLAG_RECEIVED_SECRET_POWER
- goto_if 0, SlateportCity_EventScript_14BE16
+ goto_if_unset FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_14BE16
message SlateportCity_Text_1A0BE4
waitmessage
pokemartdecoration SlateportCity_Decorations2
@@ -442,8 +436,7 @@ SlateportCity_Decorations2:: @ 814BE40
@ 814BE60
lock
faceplayer
- checkflag FLAG_RECEIVED_SECRET_POWER
- goto_if 0, SlateportCity_EventScript_14BE16
+ goto_if_unset FLAG_RECEIVED_SECRET_POWER, SlateportCity_EventScript_14BE16
message SlateportCity_Text_1A0BE4
waitmessage
pokemartdecoration SlateportCity_Decorations3
diff --git a/data/scripts/maps/SlateportCity_ContestHall.inc b/data/scripts/maps/SlateportCity_ContestHall.inc
index 0a6f40c75..4151579a2 100644
--- a/data/scripts/maps/SlateportCity_ContestHall.inc
+++ b/data/scripts/maps/SlateportCity_ContestHall.inc
@@ -12,8 +12,7 @@ SlateportCity_ContestHall_EventScript_155555:: @ 8155555
SlateportCity_ContestHall_EventScript_15555E:: @ 815555E
lock
faceplayer
- checkflag FLAG_RECEIVED_TM41
- goto_if_eq SlateportCity_ContestHall_EventScript_155595
+ goto_if_set FLAG_RECEIVED_TM41, SlateportCity_ContestHall_EventScript_155595
msgbox SlateportCity_ContestHall_Text_17CCE2, 4
giveitem_std ITEM_TM41
compare RESULT, 0
diff --git a/data/scripts/maps/SlateportCity_ContestLobby.inc b/data/scripts/maps/SlateportCity_ContestLobby.inc
index 59c5b13fc..22f797968 100644
--- a/data/scripts/maps/SlateportCity_ContestLobby.inc
+++ b/data/scripts/maps/SlateportCity_ContestLobby.inc
@@ -101,8 +101,7 @@ SlateportCity_ContestLobby_EventScript_1554F0:: @ 81554F0
SlateportCity_ContestLobby_EventScript_1554F9:: @ 81554F9
lockall
- checkflag FLAG_RECEIVED_POKEBLOCK_CASE
- goto_if_eq SlateportCity_ContestLobby_EventScript_155526
+ goto_if_set FLAG_RECEIVED_POKEBLOCK_CASE, SlateportCity_ContestLobby_EventScript_155526
applymovement 7, SlateportCity_ContestLobby_Movement_1A0839
waitmovement 0
msgbox SlateportCity_ContestLobby_Text_17CA67, 4
diff --git a/data/scripts/maps/SlateportCity_Harbor.inc b/data/scripts/maps/SlateportCity_Harbor.inc
index 4be5c6daf..82a17b0a6 100644
--- a/data/scripts/maps/SlateportCity_Harbor.inc
+++ b/data/scripts/maps/SlateportCity_Harbor.inc
@@ -6,9 +6,8 @@ SlateportCity_Harbor_MapScript1_155F63:: @ 8155F63
setescapewarp MAP_SLATEPORT_CITY, 255, 28, 13
setvar VAR_TEMP_1, 0
compare VAR_SLATEPORT_HARBOR_STATE, 1
- call_if 1, SlateportCity_Harbor_EventScript_155F89
- checkflag FLAG_SYS_GAME_CLEAR
- call_if 1, SlateportCity_Harbor_EventScript_155F85
+ call_if_eq SlateportCity_Harbor_EventScript_155F89
+ call_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_155F85
end
SlateportCity_Harbor_EventScript_155F85:: @ 8155F85
@@ -64,13 +63,13 @@ SlateportCity_Harbor_EventScript_155FD5:: @ 8155FD5
removeobject 8
setvar VAR_SLATEPORT_HARBOR_STATE, 2
compare VAR_SPECIAL_8, 0
- call_if 1, SlateportCity_Harbor_EventScript_15605C
+ call_if_eq SlateportCity_Harbor_EventScript_15605C
compare VAR_SPECIAL_8, 1
- call_if 1, SlateportCity_Harbor_EventScript_156071
+ call_if_eq SlateportCity_Harbor_EventScript_156071
compare VAR_SPECIAL_8, 2
- call_if 1, SlateportCity_Harbor_EventScript_156086
+ call_if_eq SlateportCity_Harbor_EventScript_156086
compare VAR_SPECIAL_8, 3
- call_if 1, SlateportCity_Harbor_EventScript_156086
+ call_if_eq SlateportCity_Harbor_EventScript_156086
msgbox SlateportCity_Harbor_Text_17FE60, 4
closemessage
setflag FLAG_HIDE_GRUNT_1_BLOCKING_HIDEOUT
@@ -159,8 +158,7 @@ SlateportCity_Harbor_Movement_1560C2:: @ 81560C2
SlateportCity_Harbor_EventScript_1560C4:: @ 81560C4
lock
faceplayer
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq SlateportCity_Harbor_EventScript_1560D9
+ goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_1560D9
msgbox SlateportCity_Harbor_Text_17FA0A, 4
release
end
@@ -224,9 +222,9 @@ SlateportCity_Harbor_EventScript_156196:: @ 8156196
delay 30
hideobjectat LAST_TALKED, MAP_SLATEPORT_CITY_HARBOR
compare FACING, 2
- call_if 1, SlateportCity_Harbor_EventScript_1561EF
+ call_if_eq SlateportCity_Harbor_EventScript_1561EF
compare FACING, 4
- call_if 1, SlateportCity_Harbor_EventScript_1561E4
+ call_if_eq SlateportCity_Harbor_EventScript_1561E4
delay 30
hideobjectat 255, MAP_PETALBURG_CITY
setvar VAR_SPECIAL_4, 5
@@ -268,12 +266,9 @@ SlateportCity_Harbor_EventScript_156208:: @ 8156208
SlateportCity_Harbor_EventScript_156211:: @ 8156211
lock
faceplayer
- checkflag FLAG_BADGE07_GET
- goto_if_eq SlateportCity_Harbor_EventScript_15626F
- checkflag FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE
- goto_if_eq SlateportCity_Harbor_EventScript_156265
- checkflag FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE
- goto_if_eq SlateportCity_Harbor_EventScript_156258
+ goto_if_set FLAG_BADGE07_GET, SlateportCity_Harbor_EventScript_15626F
+ goto_if_set FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE, SlateportCity_Harbor_EventScript_156265
+ goto_if_set FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE, SlateportCity_Harbor_EventScript_156258
compare VAR_SLATEPORT_HARBOR_STATE, 2
goto_if_eq SlateportCity_Harbor_EventScript_15624E
msgbox SlateportCity_Harbor_Text_17FD1C, 4
@@ -305,8 +300,7 @@ SlateportCity_Harbor_EventScript_15626F:: @ 815626F
checkitem ITEM_SCANNER, 1
compare RESULT, 1
goto_if_eq SlateportCity_Harbor_EventScript_1562A7
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq SlateportCity_Harbor_EventScript_15629D
+ goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_15629D
msgbox SlateportCity_Harbor_Text_18017B, 4
release
end
diff --git a/data/scripts/maps/SlateportCity_House1.inc b/data/scripts/maps/SlateportCity_House1.inc
index 13de091cb..be2955937 100644
--- a/data/scripts/maps/SlateportCity_House1.inc
+++ b/data/scripts/maps/SlateportCity_House1.inc
@@ -16,7 +16,7 @@ SlateportCity_House1_EventScript_15569C:: @ 815569C
special SelectMonForNPCTrade
waitstate
compare VAR_SPECIAL_4, 255
- goto_if 5, SlateportCity_House1_EventScript_1556C9
+ goto_if_ne SlateportCity_House1_EventScript_1556C9
compare VAR_SPECIAL_4, 255
goto_if_eq SlateportCity_House1_EventScript_1556BF
end
diff --git a/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc b/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc
index 5d0fdb411..c8ece697d 100644
--- a/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc
+++ b/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc
@@ -57,8 +57,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_155B2D:: @ 8155B2D
end
SlateportCity_OceanicMuseum_1F_EventScript_155B5A:: @ 8155B5A
- checkflag FLAG_DELIVERED_DEVON_GOODS
- goto_if 0, SlateportCity_OceanicMuseum_1F_EventScript_155B7B
+ goto_if_unset FLAG_DELIVERED_DEVON_GOODS, SlateportCity_OceanicMuseum_1F_EventScript_155B7B
msgbox SlateportCity_OceanicMuseum_1F_Text_17E1F5, 4
closemessage
hidemoneybox 0, 0
@@ -173,7 +172,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_155C3A:: @ 8155C3A
compare FACING, 2
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155C98
compare FACING, 2
- goto_if 5, SlateportCity_OceanicMuseum_1F_EventScript_155CAD
+ goto_if_ne SlateportCity_OceanicMuseum_1F_EventScript_155CAD
end
SlateportCity_OceanicMuseum_1F_EventScript_155C98:: @ 8155C98
diff --git a/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc b/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc
index 5dae0bc6b..d84982e2e 100644
--- a/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc
+++ b/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc
@@ -22,21 +22,21 @@ SlateportCity_OceanicMuseum_2F_EventScript_155CE6:: @ 8155CE6
applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EC5
waitmovement 0
compare FACING, 1
- call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62
+ call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E62
compare FACING, 4
- call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62
+ call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E62
msgbox SlateportCity_OceanicMuseum_2F_Text_17EDAE, 4
compare FACING, 4
- call_if 5, SlateportCity_OceanicMuseum_2F_EventScript_155E6D
+ 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
- call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E78
+ call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E78
compare FACING, 3
- call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E83
+ call_if_eq SlateportCity_OceanicMuseum_2F_EventScript_155E83
trainerbattle 3, OPPONENT_MUSEUM_2F_GRUNT_1, 0, SlateportCity_OceanicMuseum_2F_Text_17EE4E
msgbox SlateportCity_OceanicMuseum_2F_Text_17EE66, 4
closemessage
diff --git a/data/scripts/maps/SlateportCity_PokemonFanClub.inc b/data/scripts/maps/SlateportCity_PokemonFanClub.inc
index f7cc67236..6a8c88e1e 100644
--- a/data/scripts/maps/SlateportCity_PokemonFanClub.inc
+++ b/data/scripts/maps/SlateportCity_PokemonFanClub.inc
@@ -23,18 +23,13 @@ SlateportCity_PokemonFanClub_EventScript_155795:: @ 8155795
SlateportCity_PokemonFanClub_EventScript_1557A8:: @ 81557A8
setvar VAR_TEMP_2, 0
- checkflag FLAG_RECEIVED_YELLOW_SCARF
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155893
- checkflag FLAG_RECEIVED_GREEN_SCARF
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155893
- checkflag FLAG_RECEIVED_PINK_SCARF
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155893
- checkflag FLAG_RECEIVED_BLUE_SCARF
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155893
- checkflag FLAG_RECEIVED_RED_SCARF
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155893
+ call_if_set FLAG_RECEIVED_YELLOW_SCARF, SlateportCity_PokemonFanClub_EventScript_155893
+ call_if_set FLAG_RECEIVED_GREEN_SCARF, SlateportCity_PokemonFanClub_EventScript_155893
+ call_if_set FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_155893
+ call_if_set FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_155893
+ call_if_set FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_155893
compare VAR_TEMP_2, 5
- call_if 1, SlateportCity_PokemonFanClub_EventScript_15588D
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_15588D
compare VAR_SLATEPORT_FAN_CLUB_STATE, 2
goto_if_eq SlateportCity_PokemonFanClub_EventScript_1557FE
msgbox SlateportCity_PokemonFanClub_Text_17DA14, 4
@@ -49,16 +44,11 @@ SlateportCity_PokemonFanClub_EventScript_1557FE:: @ 81557FE
SlateportCity_PokemonFanClub_EventScript_155808:: @ 8155808
msgbox SlateportCity_PokemonFanClub_Text_17DA49, 4
setvar VAR_TEMP_1, 0
- checkflag FLAG_RECEIVED_YELLOW_SCARF
- call_if 0, SlateportCity_PokemonFanClub_EventScript_1559FE
- checkflag FLAG_RECEIVED_GREEN_SCARF
- call_if 0, SlateportCity_PokemonFanClub_EventScript_1559E7
- checkflag FLAG_RECEIVED_PINK_SCARF
- call_if 0, SlateportCity_PokemonFanClub_EventScript_1559D0
- checkflag FLAG_RECEIVED_BLUE_SCARF
- call_if 0, SlateportCity_PokemonFanClub_EventScript_1559B9
- checkflag FLAG_RECEIVED_RED_SCARF
- call_if 0, SlateportCity_PokemonFanClub_EventScript_1559A2
+ call_if_unset FLAG_RECEIVED_YELLOW_SCARF, SlateportCity_PokemonFanClub_EventScript_1559FE
+ call_if_unset FLAG_RECEIVED_GREEN_SCARF, SlateportCity_PokemonFanClub_EventScript_1559E7
+ call_if_unset FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_1559D0
+ call_if_unset FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_1559B9
+ call_if_unset FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_1559A2
bufferleadmonspeciesname 0
switch VAR_TEMP_1
case 0, SlateportCity_PokemonFanClub_EventScript_155899
@@ -146,7 +136,7 @@ SlateportCity_PokemonFanClub_EventScript_155998:: @ 8155998
SlateportCity_PokemonFanClub_EventScript_1559A2:: @ 81559A2
specialvar RESULT, CheckLeadMonCool
compare RESULT, 1
- call_if 1, SlateportCity_PokemonFanClub_EventScript_1559B3
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_1559B3
return
SlateportCity_PokemonFanClub_EventScript_1559B3:: @ 81559B3
@@ -156,7 +146,7 @@ SlateportCity_PokemonFanClub_EventScript_1559B3:: @ 81559B3
SlateportCity_PokemonFanClub_EventScript_1559B9:: @ 81559B9
specialvar RESULT, CheckLeadMonBeauty
compare RESULT, 1
- call_if 1, SlateportCity_PokemonFanClub_EventScript_1559CA
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_1559CA
return
SlateportCity_PokemonFanClub_EventScript_1559CA:: @ 81559CA
@@ -166,7 +156,7 @@ SlateportCity_PokemonFanClub_EventScript_1559CA:: @ 81559CA
SlateportCity_PokemonFanClub_EventScript_1559D0:: @ 81559D0
specialvar RESULT, CheckLeadMonCute
compare RESULT, 1
- call_if 1, SlateportCity_PokemonFanClub_EventScript_1559E1
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_1559E1
return
SlateportCity_PokemonFanClub_EventScript_1559E1:: @ 81559E1
@@ -176,7 +166,7 @@ SlateportCity_PokemonFanClub_EventScript_1559E1:: @ 81559E1
SlateportCity_PokemonFanClub_EventScript_1559E7:: @ 81559E7
specialvar RESULT, CheckLeadMonSmart
compare RESULT, 1
- call_if 1, SlateportCity_PokemonFanClub_EventScript_1559F8
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_1559F8
return
SlateportCity_PokemonFanClub_EventScript_1559F8:: @ 81559F8
@@ -186,7 +176,7 @@ SlateportCity_PokemonFanClub_EventScript_1559F8:: @ 81559F8
SlateportCity_PokemonFanClub_EventScript_1559FE:: @ 81559FE
specialvar RESULT, CheckLeadMonTough
compare RESULT, 1
- call_if 1, SlateportCity_PokemonFanClub_EventScript_155A0F
+ call_if_eq SlateportCity_PokemonFanClub_EventScript_155A0F
return
SlateportCity_PokemonFanClub_EventScript_155A0F:: @ 8155A0F
@@ -196,12 +186,11 @@ SlateportCity_PokemonFanClub_EventScript_155A0F:: @ 8155A0F
SlateportCity_PokemonFanClub_EventScript_155A15:: @ 8155A15
lock
faceplayer
- checkflag FLAG_RECEIVED_SOOTHE_BELL
- goto_if_eq SlateportCity_PokemonFanClub_EventScript_155A75
+ goto_if_set FLAG_RECEIVED_SOOTHE_BELL, SlateportCity_PokemonFanClub_EventScript_155A75
msgbox SlateportCity_PokemonFanClub_Text_17DE6B, 4
specialvar RESULT, GetLeadMonFriendshipScore
compare RESULT, 4
- goto_if 4, SlateportCity_PokemonFanClub_EventScript_155A3A
+ goto_if_ge SlateportCity_PokemonFanClub_EventScript_155A3A
release
end
diff --git a/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc b/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc
index 46dc8419c..dd31e8e26 100644
--- a/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc
+++ b/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc
@@ -3,14 +3,10 @@ SlateportCity_SternsShipyard_1F_MapScripts:: @ 8155335
SlateportCity_SternsShipyard_1F_EventScript_155336:: @ 8155336
lockall
- checkflag FLAG_SYS_GAME_CLEAR
- goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_155388
- checkflag FLAG_BADGE07_GET
- goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_15539C
- checkflag FLAG_DELIVERED_DEVON_GOODS
- goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_1553CF
- checkflag FLAG_DOCK_REJECTED_DEVON_GOODS
- goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_1553B0
+ goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_SternsShipyard_1F_EventScript_155388
+ goto_if_set FLAG_BADGE07_GET, SlateportCity_SternsShipyard_1F_EventScript_15539C
+ goto_if_set FLAG_DELIVERED_DEVON_GOODS, SlateportCity_SternsShipyard_1F_EventScript_1553CF
+ goto_if_set FLAG_DOCK_REJECTED_DEVON_GOODS, SlateportCity_SternsShipyard_1F_EventScript_1553B0
msgbox SlateportCity_SternsShipyard_1F_Text_17C14B, 4
applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839
waitmovement 0
diff --git a/data/scripts/maps/SootopolisCity.inc b/data/scripts/maps/SootopolisCity.inc
index 367677751..669d4ecfa 100644
--- a/data/scripts/maps/SootopolisCity.inc
+++ b/data/scripts/maps/SootopolisCity.inc
@@ -5,10 +5,8 @@ SootopolisCity_MapScripts:: @ 814D07D
.byte 0
SootopolisCity_MapScript1_14D08D:: @ 814D08D
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- call_if 0, SootopolisCity_EventScript_14D0A0
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- call_if 1, SootopolisCity_EventScript_14D0B1
+ call_if_unset FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_EventScript_14D0A0
+ call_if_set FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_EventScript_14D0B1
end
SootopolisCity_EventScript_14D0A0:: @ 814D0A0
@@ -17,8 +15,7 @@ SootopolisCity_EventScript_14D0A0:: @ 814D0A0
return
SootopolisCity_EventScript_14D0B1:: @ 814D0B1
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 0, SootopolisCity_EventScript_14D0BB
+ call_if_unset FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D0BB
return
SootopolisCity_EventScript_14D0BB:: @ 814D0BB
@@ -35,10 +32,8 @@ SootopolisCity_EventScript_14D0BB:: @ 814D0BB
SootopolisCity_MapScript1_14D10D:: @ 814D10D
setflag FLAG_VISITED_SOOTOPOLIS_CITY
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- call_if 1, SootopolisCity_EventScript_14D159
- checkflag FLAG_SYS_WEATHER_CTRL
- call_if 1, SootopolisCity_EventScript_14D123
+ call_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D159
+ call_if_set FLAG_SYS_WEATHER_CTRL, SootopolisCity_EventScript_14D123
end
SootopolisCity_EventScript_14D123:: @ 814D123
@@ -46,7 +41,7 @@ SootopolisCity_EventScript_14D123:: @ 814D123
setobjectxyperm 1, 29, 19
setobjectxyperm 2, 33, 19
compare VAR_SOOTOPOLIS_STATE, 1
- call_if 1, SootopolisCity_EventScript_14D142
+ call_if_eq SootopolisCity_EventScript_14D142
return
SootopolisCity_EventScript_14D142:: @ 814D142
@@ -68,8 +63,7 @@ SootopolisCity_MapScript1_14D165:: @ 814D165
SootopolisCity_EventScript_14D16E:: @ 814D16E
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_EventScript_14D183
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D183
msgbox SootopolisCity_Text_1696A4, 4
release
end
@@ -92,8 +86,7 @@ SootopolisCity_EventScript_14D19F:: @ 814D19F
faceplayer
dodailyevents
special GetPlayerBigGuyGirlString
- checkflag FLAG_DAILY_RECEIVED_BERRY_SOOTOPOLIS
- goto_if_eq SootopolisCity_EventScript_14D241
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_SOOTOPOLIS, SootopolisCity_EventScript_14D241
msgbox SootopolisCity_Text_1C63F2, 4
random 10
addvar RESULT, 20
@@ -142,8 +135,7 @@ SootopolisCity_EventScript_14D25E:: @ 814D25E
SootopolisCity_EventScript_14D268:: @ 814D268
lock
faceplayer
- checkflag FLAG_DEFEATED_SOOTOPOLIS_GYM
- goto_if_eq SootopolisCity_EventScript_14D27D
+ goto_if_set FLAG_DEFEATED_SOOTOPOLIS_GYM, SootopolisCity_EventScript_14D27D
msgbox SootopolisCity_Text_16A4D6, 4
release
end
@@ -156,8 +148,7 @@ SootopolisCity_EventScript_14D27D:: @ 814D27D
SootopolisCity_EventScript_14D287:: @ 814D287
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_EventScript_14D29C
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D29C
msgbox SootopolisCity_Text_169813, 4
release
end
@@ -170,8 +161,7 @@ SootopolisCity_EventScript_14D29C:: @ 814D29C
SootopolisCity_EventScript_14D2A6:: @ 814D2A6
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_EventScript_14D2BB
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D2BB
msgbox SootopolisCity_Text_1698A0, 4
release
end
@@ -184,8 +174,7 @@ SootopolisCity_EventScript_14D2BB:: @ 814D2BB
SootopolisCity_EventScript_14D2C5:: @ 814D2C5
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_EventScript_14D2DA
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D2DA
msgbox SootopolisCity_Text_1697A7, 4
release
end
@@ -445,8 +434,7 @@ SootopolisCity_EventScript_14D48F:: @ 814D48F
SootopolisCity_EventScript_14D498:: @ 814D498
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_EventScript_14D4AD
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_EventScript_14D4AD
.ifdef SAPPHIRE
msgbox SootopolisCity_Text_169DA6, 4
.else
diff --git a/data/scripts/maps/SootopolisCity_Gym_1F.inc b/data/scripts/maps/SootopolisCity_Gym_1F.inc
index 35fa306e6..44bcda12f 100644
--- a/data/scripts/maps/SootopolisCity_Gym_1F.inc
+++ b/data/scripts/maps/SootopolisCity_Gym_1F.inc
@@ -20,11 +20,11 @@ SootopolisCity_Gym_1F_MapScript1_15AF25:: @ 815AF25
SootopolisCity_Gym_1F_EventScript_15AF2E:: @ 815AF2E
compare VAR_ICE_STEP_COUNT, 8
- goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF85
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_15AF85
compare VAR_ICE_STEP_COUNT, 28
- goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF73
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_15AF73
compare VAR_ICE_STEP_COUNT, 69
- goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF61
+ goto_if_lt SootopolisCity_Gym_1F_EventScript_15AF61
setmetatile 8, 4, 519, 0
setmetatile 8, 5, 519, 0
@@ -87,10 +87,8 @@ SootopolisCity_Gym_1F_Movement_15AFFD:: @ 815AFFD
SootopolisCity_Gym_1F_EventScript_15AFFF:: @ 815AFFF
trainerbattle 1, OPPONENT_WALLACE, 0, SootopolisCity_Gym_1F_Text_18F0CA, SootopolisCity_Gym_1F_Text_18F282, SootopolisCity_Gym_1F_EventScript_15B02D
- checkflag FLAG_RECEIVED_TM03
- goto_if 0, SootopolisCity_Gym_1F_EventScript_15B056
- checkflag FLAG_BADGE06_GET
- goto_if 0, SootopolisCity_Gym_1F_EventScript_15B07A
+ goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_15B056
+ goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_15B07A
msgbox SootopolisCity_Gym_1F_Text_18F4D7, 4
release
end
@@ -124,8 +122,7 @@ SootopolisCity_Gym_1F_EventScript_15B07A:: @ 815B07A
SootopolisCity_Gym_1F_EventScript_15B084:: @ 815B084
lock
faceplayer
- checkflag FLAG_DEFEATED_SOOTOPOLIS_GYM
- goto_if_eq SootopolisCity_Gym_1F_EventScript_15B099
+ goto_if_set FLAG_DEFEATED_SOOTOPOLIS_GYM, SootopolisCity_Gym_1F_EventScript_15B099
msgbox SootopolisCity_Gym_1F_Text_18E8A5, 4
release
end
@@ -137,15 +134,13 @@ SootopolisCity_Gym_1F_EventScript_15B099:: @ 815B099
SootopolisCity_Gym_1F_EventScript_15B0A3:: @ 815B0A3
lockall
- checkflag FLAG_BADGE08_GET
- goto_if_eq SootopolisCity_Gym_1F_EventScript_15B0C3
+ goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_15B0C3
goto SootopolisCity_Gym_1F_EventScript_15B0CD
end
SootopolisCity_Gym_1F_EventScript_15B0B3:: @ 815B0B3
lockall
- checkflag FLAG_BADGE08_GET
- goto_if_eq SootopolisCity_Gym_1F_EventScript_15B0C3
+ goto_if_set FLAG_BADGE08_GET, SootopolisCity_Gym_1F_EventScript_15B0C3
goto SootopolisCity_Gym_1F_EventScript_15B0CD
end
diff --git a/data/scripts/maps/SootopolisCity_House1.inc b/data/scripts/maps/SootopolisCity_House1.inc
index 074c9a179..67be3738b 100644
--- a/data/scripts/maps/SootopolisCity_House1.inc
+++ b/data/scripts/maps/SootopolisCity_House1.inc
@@ -4,8 +4,7 @@ SootopolisCity_House1_MapScripts:: @ 815B29A
SootopolisCity_House1_EventScript_15B29B:: @ 815B29B
lock
faceplayer
- checkflag FLAG_RECEIVED_TM31
- goto_if_eq SootopolisCity_House1_EventScript_15B2C7
+ goto_if_set FLAG_RECEIVED_TM31, SootopolisCity_House1_EventScript_15B2C7
msgbox SootopolisCity_House1_Text_18F991, 4
giveitem_std ITEM_TM31
setflag FLAG_RECEIVED_TM31
diff --git a/data/scripts/maps/SootopolisCity_House2.inc b/data/scripts/maps/SootopolisCity_House2.inc
index e32e993dd..d714993d4 100644
--- a/data/scripts/maps/SootopolisCity_House2.inc
+++ b/data/scripts/maps/SootopolisCity_House2.inc
@@ -6,9 +6,9 @@ SootopolisCity_House2_EventScript_15B2E5:: @ 815B2E5
faceplayer
msgbox SootopolisCity_House2_Text_18FA66, MSGBOX_YESNO
compare RESULT, YES
- call_if 1, SootopolisCity_House2_EventScript_15B307
+ call_if_eq SootopolisCity_House2_EventScript_15B307
compare RESULT, NO
- call_if 1, SootopolisCity_House2_EventScript_15B310
+ call_if_eq SootopolisCity_House2_EventScript_15B310
release
end
diff --git a/data/scripts/maps/SootopolisCity_House6.inc b/data/scripts/maps/SootopolisCity_House6.inc
index d2fb4ed7b..24c59500a 100644
--- a/data/scripts/maps/SootopolisCity_House6.inc
+++ b/data/scripts/maps/SootopolisCity_House6.inc
@@ -4,11 +4,10 @@ SootopolisCity_House6_MapScripts:: @ 815B385
SootopolisCity_House6_EventScript_15B386:: @ 815B386
lock
faceplayer
- checkflag FLAG_RECEIVED_WAILMER_DOLL
- goto_if_eq SootopolisCity_House6_EventScript_15B3CD
+ goto_if_set FLAG_RECEIVED_WAILMER_DOLL, SootopolisCity_House6_EventScript_15B3CD
msgbox SootopolisCity_House6_Text_18FEA1, MSGBOX_YESNO
compare RESULT, NO
- call_if 1, SootopolisCity_House6_EventScript_15B3C3
+ call_if_eq SootopolisCity_House6_EventScript_15B3C3
msgbox SootopolisCity_House6_Text_18FF12, 4
givedecoration_std DECOR_WAILMER_DOLL
compare RESULT, 0
diff --git a/data/scripts/maps/SootopolisCity_Mart.inc b/data/scripts/maps/SootopolisCity_Mart.inc
index 115ed0453..1687bd91e 100644
--- a/data/scripts/maps/SootopolisCity_Mart.inc
+++ b/data/scripts/maps/SootopolisCity_Mart.inc
@@ -29,10 +29,8 @@ SootopolisCity_Mart_Items:: @ 815B234
SootopolisCity_Mart_EventScript_15B24A:: @ 815B24A
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_Mart_EventScript_15B268
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if 0, SootopolisCity_Mart_EventScript_15B268
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_Mart_EventScript_15B268
+ goto_if_unset FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_15B268
msgbox SootopolisCity_Mart_Text_18F8D7, 4
release
end
@@ -45,10 +43,8 @@ SootopolisCity_Mart_EventScript_15B268:: @ 815B268
SootopolisCity_Mart_EventScript_15B272:: @ 815B272
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_Mart_EventScript_15B290
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if 0, SootopolisCity_Mart_EventScript_15B290
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_Mart_EventScript_15B290
+ goto_if_unset FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_Mart_EventScript_15B290
msgbox SootopolisCity_Mart_Text_18F96B, 4
release
end
diff --git a/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc b/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc
index 9eb5b4a57..820dd4858 100644
--- a/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc
+++ b/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc
@@ -17,10 +17,8 @@ SootopolisCity_PokemonCenter_1F_MapScript1_15B196:: @ 815B196
SootopolisCity_PokemonCenter_1F_EventScript_15B1A8:: @ 815B1A8
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_15B1C6
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1C6
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_PokemonCenter_1F_EventScript_15B1C6
+ goto_if_unset FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_15B1C6
msgbox SootopolisCity_PokemonCenter_1F_Text_18F770, 4
release
end
@@ -33,10 +31,8 @@ SootopolisCity_PokemonCenter_1F_EventScript_15B1C6:: @ 815B1C6
SootopolisCity_PokemonCenter_1F_EventScript_15B1D0:: @ 815B1D0
lock
faceplayer
- checkflag FLAG_LEGENDARY_BATTLE_COMPLETED
- goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_15B1EE
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1EE
+ goto_if_set FLAG_LEGENDARY_BATTLE_COMPLETED, SootopolisCity_PokemonCenter_1F_EventScript_15B1EE
+ goto_if_unset FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, SootopolisCity_PokemonCenter_1F_EventScript_15B1EE
msgbox SootopolisCity_PokemonCenter_1F_Text_18F860, 4
release
end
diff --git a/data/scripts/maps/SouthernIsland_Interior.inc b/data/scripts/maps/SouthernIsland_Interior.inc
index cbc451a18..5878a43d5 100644
--- a/data/scripts/maps/SouthernIsland_Interior.inc
+++ b/data/scripts/maps/SouthernIsland_Interior.inc
@@ -4,8 +4,7 @@ SouthernIsland_Interior_MapScripts:: @ 8160B53
.byte 0
SouthernIsland_Interior_MapScript1_160B5E:: @ 8160B5E
- checkflag FLAG_SYS_CTRL_OBJ_DELETE
- call_if 1, SouthernIsland_Interior_EventScript_160B68
+ call_if_set FLAG_SYS_CTRL_OBJ_DELETE, SouthernIsland_Interior_EventScript_160B68
end
SouthernIsland_Interior_EventScript_160B68:: @ 8160B68
@@ -44,10 +43,8 @@ SouthernIsland_Interior_EventScript_160B9B:: @ 8160B9B
end
SouthernIsland_Interior_EventScript_160BA7:: @ 8160BA7
- checkflag FLAG_ECOUNTERED_LATIAS_OR_LATIOS
- goto_if_eq SouthernIsland_Interior_EventScript_160C08
- checkflag FLAG_SYS_HAS_EON_TICKET
- goto_if 0, SouthernIsland_Interior_EventScript_160C08
+ goto_if_set FLAG_ECOUNTERED_LATIAS_OR_LATIOS, SouthernIsland_Interior_EventScript_160C08
+ goto_if_unset FLAG_SYS_HAS_EON_TICKET, SouthernIsland_Interior_EventScript_160C08
setflag FLAG_ECOUNTERED_LATIAS_OR_LATIOS
special SpawnCameraDummy
applymovement 127, SouthernIsland_Interior_Movement_160C12
diff --git a/data/scripts/maps/Underwater_SeafloorCavern.inc b/data/scripts/maps/Underwater_SeafloorCavern.inc
index d991a7096..d34558e40 100644
--- a/data/scripts/maps/Underwater_SeafloorCavern.inc
+++ b/data/scripts/maps/Underwater_SeafloorCavern.inc
@@ -6,8 +6,7 @@ Underwater_SeafloorCavern_MapScripts:: @ 815D99E
Underwater_SeafloorCavern_MapScript1_15D9AE:: @ 815D9AE
setflag FLAG_LANDMARK_SEAFLOOR_CAVERN
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- goto_if_eq Underwater_SeafloorCavern_EventScript_15D9BB
+ goto_if_set FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, Underwater_SeafloorCavern_EventScript_15D9BB
end
Underwater_SeafloorCavern_EventScript_15D9BB:: @ 815D9BB
@@ -15,8 +14,7 @@ Underwater_SeafloorCavern_EventScript_15D9BB:: @ 815D9BB
end
Underwater_SeafloorCavern_MapScript1_15D9BF:: @ 815D9BF
- checkflag FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN
- call_if 1, Underwater_SeafloorCavern_EventScript_15D9C9
+ call_if_set FLAG_LEGEND_ESCAPED_SEAFLOOR_CAVERN, Underwater_SeafloorCavern_EventScript_15D9C9
end
Underwater_SeafloorCavern_EventScript_15D9C9:: @ 815D9C9
diff --git a/data/scripts/maps/Underwater_SealedChamber.inc b/data/scripts/maps/Underwater_SealedChamber.inc
index 8d3e8e723..3151c4575 100644
--- a/data/scripts/maps/Underwater_SealedChamber.inc
+++ b/data/scripts/maps/Underwater_SealedChamber.inc
@@ -5,9 +5,9 @@ Underwater_SealedChamber_MapScripts:: @ 815F080
Underwater_SealedChamber_MapScript1_15F086:: @ 815F086
getplayerxy VAR_SPECIAL_4, VAR_SPECIAL_5
compare VAR_SPECIAL_4, 12
- goto_if 5, Underwater_SealedChamber_EventScript_15F0A6
+ goto_if_ne Underwater_SealedChamber_EventScript_15F0A6
compare VAR_SPECIAL_5, 44
- goto_if 5, Underwater_SealedChamber_EventScript_15F0A6
+ goto_if_ne Underwater_SealedChamber_EventScript_15F0A6
goto Underwater_SealedChamber_EventScript_15F0AF
Underwater_SealedChamber_EventScript_15F0A6:: @ 815F0A6
diff --git a/data/scripts/maps/UnknownMap_25_34.inc b/data/scripts/maps/UnknownMap_25_34.inc
index ffd184ddf..44b9463b4 100644
--- a/data/scripts/maps/UnknownMap_25_34.inc
+++ b/data/scripts/maps/UnknownMap_25_34.inc
@@ -14,15 +14,15 @@ LinkContestRoom1_MapScript1_15F595:: @ 815F595
LinkContestRoom1_EventScript_15F5A5:: @ 815F5A5
special ScriptGetMultiplayerId
compare RESULT, 0
- call_if 1, LinkContestRoom1_EventScript_15F5E0
+ call_if_eq LinkContestRoom1_EventScript_15F5E0
compare RESULT, 1
- call_if 1, LinkContestRoom1_EventScript_15F5E4
+ call_if_eq LinkContestRoom1_EventScript_15F5E4
compare RESULT, 2
- call_if 1, LinkContestRoom1_EventScript_15F5E8
+ call_if_eq LinkContestRoom1_EventScript_15F5E8
compare RESULT, 3
- call_if 1, LinkContestRoom1_EventScript_15F5EC
+ call_if_eq LinkContestRoom1_EventScript_15F5EC
compare RESULT, 4
- call_if 1, LinkContestRoom1_EventScript_15F5F0
+ call_if_eq LinkContestRoom1_EventScript_15F5F0
return
LinkContestRoom1_EventScript_15F5E0:: @ 815F5E0
@@ -47,7 +47,7 @@ LinkContestRoom1_EventScript_15F5F0:: @ 815F5F0
LinkContestRoom1_MapScript1_15F5F4:: @ 815F5F4
compare VAR_TEMP_9, 1
- call_if 1, LinkContestRoom1_EventScript_15F600
+ call_if_eq LinkContestRoom1_EventScript_15F600
end
LinkContestRoom1_EventScript_15F600:: @ 815F600
@@ -76,7 +76,7 @@ LinkContestRoom1_EventScript_15F630:: @ 815F630
call LinkContestRoom1_EventScript_15F6E6
call LinkContestRoom1_EventScript_15F646
compare VAR_TEMP_0, 8
- goto_if 0, LinkContestRoom1_EventScript_15F630
+ goto_if_lt LinkContestRoom1_EventScript_15F630
return
LinkContestRoom1_EventScript_15F646:: @ 815F646
diff --git a/data/scripts/maps/VerdanturfTown.inc b/data/scripts/maps/VerdanturfTown.inc
index ca2a3c245..c8adf85c3 100644
--- a/data/scripts/maps/VerdanturfTown.inc
+++ b/data/scripts/maps/VerdanturfTown.inc
@@ -11,8 +11,7 @@ VerdanturfTown_MapScript1_14E85A:: @ 814E85A
VerdanturfTown_EventScript_14E866:: @ 814E866
lock
faceplayer
- checkflag FLAG_RUSTURF_TUNNEL_OPENED
- goto_if_eq VerdanturfTown_EventScript_14E885
+ goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, VerdanturfTown_EventScript_14E885
msgbox VerdanturfTown_Text_16CAEB, 4
applymovement 2, VerdanturfTown_Movement_1A083D
waitmovement 0
@@ -37,8 +36,7 @@ VerdanturfTown_EventScript_14E8A2:: @ 814E8A2
VerdanturfTown_EventScript_14E8AB:: @ 814E8AB
lock
faceplayer
- checkflag FLAG_RUSTURF_TUNNEL_OPENED
- goto_if_eq VerdanturfTown_EventScript_14E8C0
+ goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, VerdanturfTown_EventScript_14E8C0
msgbox VerdanturfTown_Text_16CD4D, 4
release
end
diff --git a/data/scripts/maps/VerdanturfTown_ContestLobby.inc b/data/scripts/maps/VerdanturfTown_ContestLobby.inc
index 37811dbc1..85b524c99 100644
--- a/data/scripts/maps/VerdanturfTown_ContestLobby.inc
+++ b/data/scripts/maps/VerdanturfTown_ContestLobby.inc
@@ -101,8 +101,7 @@ VerdanturfTown_ContestLobby_EventScript_153E3E:: @ 8153E3E
VerdanturfTown_ContestLobby_EventScript_153E47:: @ 8153E47
lock
faceplayer
- checkflag FLAG_RECEIVED_TM45
- goto_if_eq VerdanturfTown_ContestLobby_EventScript_153E76
+ goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_ContestLobby_EventScript_153E76
msgbox VerdanturfTown_ContestLobby_Text_177DEC, 4
giveitem_std ITEM_TM45
compare RESULT, 0
diff --git a/data/scripts/maps/VerdanturfTown_WandasHouse.inc b/data/scripts/maps/VerdanturfTown_WandasHouse.inc
index 205a4315c..4410beaba 100644
--- a/data/scripts/maps/VerdanturfTown_WandasHouse.inc
+++ b/data/scripts/maps/VerdanturfTown_WandasHouse.inc
@@ -4,8 +4,7 @@ VerdanturfTown_WandasHouse_MapScripts:: @ 8153F5A
VerdanturfTown_WandasHouse_EventScript_153F5B:: @ 8153F5B
lock
faceplayer
- checkflag FLAG_WALLY_SPEECH
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_153F73
+ goto_if_set FLAG_WALLY_SPEECH, VerdanturfTown_WandasHouse_EventScript_153F73
msgbox VerdanturfTown_WandasHouse_Text_1783F6, 4
setflag FLAG_WALLY_SPEECH
release
@@ -19,10 +18,8 @@ VerdanturfTown_WandasHouse_EventScript_153F73:: @ 8153F73
VerdanturfTown_WandasHouse_EventScript_153F7D:: @ 8153F7D
lock
faceplayer
- checkflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FA5
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_153F9B
+ goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, VerdanturfTown_WandasHouse_EventScript_153FA5
+ goto_if_set FLAG_DEFEATED_LAVARIDGE_GYM, VerdanturfTown_WandasHouse_EventScript_153F9B
msgbox VerdanturfTown_WandasHouse_Text_17859A, 4
release
end
@@ -44,10 +41,8 @@ VerdanturfTown_WandasHouse_EventScript_153FAF:: @ 8153FAF
VerdanturfTown_WandasHouse_EventScript_153FB8:: @ 8153FB8
lock
faceplayer
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FE0
- checkflag FLAG_DEFEATED_WALLY_MAUVILLE
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FD6
+ goto_if_set FLAG_DEFEATED_LAVARIDGE_GYM, VerdanturfTown_WandasHouse_EventScript_153FE0
+ goto_if_set FLAG_DEFEATED_WALLY_MAUVILLE, VerdanturfTown_WandasHouse_EventScript_153FD6
msgbox VerdanturfTown_WandasHouse_Text_1787FB, 4
release
end
@@ -65,12 +60,9 @@ VerdanturfTown_WandasHouse_EventScript_153FE0:: @ 8153FE0
VerdanturfTown_WandasHouse_EventScript_153FEA:: @ 8153FEA
lock
faceplayer
- checkflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_154025
- checkflag FLAG_DEFEATED_LAVARIDGE_GYM
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_15401B
- checkflag FLAG_RUSTURF_TUNNEL_OPENED
- goto_if_eq VerdanturfTown_WandasHouse_EventScript_154011
+ goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, VerdanturfTown_WandasHouse_EventScript_154025
+ goto_if_set FLAG_DEFEATED_LAVARIDGE_GYM, VerdanturfTown_WandasHouse_EventScript_15401B
+ goto_if_set FLAG_RUSTURF_TUNNEL_OPENED, VerdanturfTown_WandasHouse_EventScript_154011
msgbox VerdanturfTown_WandasHouse_Text_1788B1, 4
release
end
diff --git a/data/scripts/maps/VictoryRoad_1F.inc b/data/scripts/maps/VictoryRoad_1F.inc
index ed0440343..4f3180318 100644
--- a/data/scripts/maps/VictoryRoad_1F.inc
+++ b/data/scripts/maps/VictoryRoad_1F.inc
@@ -3,8 +3,7 @@ VictoryRoad_1F_MapScripts:: @ 815DE83
.byte 0
VictoryRoad_1F_MapScript1_15DE89:: @ 815DE89
- checkflag FLAG_DEFEATED_WALLY_VICTORY_ROAD
- call_if 1, VictoryRoad_1F_EventScript_15DE93
+ call_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, VictoryRoad_1F_EventScript_15DE93
end
VictoryRoad_1F_EventScript_15DE93:: @ 815DE93
diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc
index b02ab4faa..4813caa68 100644
--- a/data/scripts/mystery_event_club.inc
+++ b/data/scripts/mystery_event_club.inc
@@ -1,8 +1,7 @@
PetalburgCity_PokemonCenter_1F_EventScript_1B1B14:: @ 81B1B14
lock
faceplayer
- checkflag FLAG_SYS_CHAT_USED
- goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB
+ goto_if_set FLAG_SYS_CHAT_USED, PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB
msgbox PetalburgCity_PokemonCenter_1F_Text_1B1C97, 4
goto PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D
end
@@ -30,7 +29,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1B7A:: @ 81B1B7A
lock
faceplayer
compare VAR_SPECIAL_4, 1
- call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
+ call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
compare RESULT, 0
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1
compare RESULT, 1
@@ -84,7 +83,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1C36:: @ 81B1C36
lock
faceplayer
compare VAR_SPECIAL_4, 1
- call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
+ call_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C77
compare RESULT, 0
goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1
compare RESULT, 1
@@ -97,10 +96,8 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1C6D:: @ 81B1C6D
end
PetalburgCity_PokemonCenter_1F_EventScript_1B1C77:: @ 81B1C77
- checkflag FLAG_BADGE05_GET
- goto_if 0, PetalburgCity_PokemonCenter_1F_EventScript_1B1C96
- checkflag FLAG_SYS_EXDATA_ENABLE
- goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C96
+ goto_if_unset FLAG_BADGE05_GET, PetalburgCity_PokemonCenter_1F_EventScript_1B1C96
+ goto_if_set FLAG_SYS_EXDATA_ENABLE, PetalburgCity_PokemonCenter_1F_EventScript_1B1C96
setflag FLAG_SYS_EXDATA_ENABLE
msgbox PetalburgCity_PokemonCenter_1F_Text_1B21CC, 3
release
diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc
index b1ead4060..3d8f5532f 100644
--- a/data/scripts/players_house.inc
+++ b/data/scripts/players_house.inc
@@ -9,9 +9,9 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6956:: @ 81B6956
applymovement VAR_SPECIAL_4, LittlerootTown_BrendansHouse_1F_Movement_1A0839
waitmovement 0
compare VAR_SPECIAL_5, 0
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B699F
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B699F
compare VAR_SPECIAL_5, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B69AA
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B69AA
msgbox LittlerootTown_BrendansHouse_1F_Text_172453, 4
closemessage
setvar VAR_LITTLEROOT_INTRO_STATE, 4
@@ -59,8 +59,7 @@ LittlerootTown_MaysHouse_2F_EventScript_1B69DF:: @ 81B69DF
LittlerootTown_BrendansHouse_2F_EventScript_1B69EB:: @ 81B69EB
LittlerootTown_MaysHouse_2F_EventScript_1B69EB:: @ 81B69EB
- checkflag FLAG_SET_WALL_CLOCK
- goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A91
+ goto_if_set FLAG_SET_WALL_CLOCK, LittlerootTown_BrendansHouse_2F_EventScript_1B6A91
msgbox LittlerootTown_BrendansHouse_2F_Text_172E18, 4
call LittlerootTown_BrendansHouse_2F_EventScript_1B6A9B
delay 30
@@ -70,9 +69,9 @@ LittlerootTown_MaysHouse_2F_EventScript_1B69EB:: @ 81B69EB
setflag FLAG_HIDE_MACHOKE_MOVER_2
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A31
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A31
compare RESULT, 1
- call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A61
+ call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A61
playse SE_KAIDAN
removeobject VAR_SPECIAL_8
releaseall
@@ -256,14 +255,12 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6BE9:: @ 81B6BE9
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33
compare VAR_LITTLEROOT_HOUSES_STATE_2, 4
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33
- checkflag FLAG_BADGE05_GET
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D
- checkflag FLAG_RESCUED_BIRCH
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72
+ goto_if_set FLAG_BADGE05_GET, LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D
+ goto_if_set FLAG_RESCUED_BIRCH, LittlerootTown_BrendansHouse_1F_EventScript_1B6C72
compare VAR_TEMP_1, 1
goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C80
compare VAR_LITTLEROOT_INTRO_STATE, 7
- goto_if 4, LittlerootTown_BrendansHouse_1F_EventScript_1B6C9C
+ goto_if_ge LittlerootTown_BrendansHouse_1F_EventScript_1B6C9C
msgbox LittlerootTown_BrendansHouse_1F_Text_172429, 4
release
end
@@ -274,8 +271,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6C33:: @ 81B6C33
end
LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D:: @ 81B6C3D
- checkflag FLAG_RECEIVED_AMULET_COIN
- goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72
+ 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
@@ -363,13 +359,13 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6CDE:: @ 81B6CDE
lockall
checkplayergender
compare RESULT, 0
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD
compare RESULT, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E28
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E28
applymovement VAR_SPECIAL_9, LittlerootTown_BrendansHouse_1F_Movement_1A0839
waitmovement 0
playse SE_PIN
@@ -379,23 +375,23 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6CDE:: @ 81B6CDE
waitmovement 0
delay 20
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8
+ 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
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE
msgbox LittlerootTown_BrendansHouse_1F_Text_172B5E, 4
closemessage
compare VAR_SPECIAL_8, 0
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9
compare VAR_SPECIAL_8, 1
- call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B
+ call_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B
playse SE_DOOR
removeobject VAR_SPECIAL_9
setflag FLAG_RECEIVED_SS_TICKET
diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc
index 589d4e21c..4b21aa99b 100644
--- a/data/scripts/pokeblocks.inc
+++ b/data/scripts/pokeblocks.inc
@@ -55,7 +55,7 @@ FallarborTown_ContestLobby_EventScript_1B76A1:: @ 81B76A1
msgbox FallarborTown_ContestLobby_Text_1B6E9D, 4
specialvar RESULT, GetFirstFreePokeblockSlot
compare RESULT, -1
- goto_if 5, FallarborTown_ContestLobby_EventScript_1B76EF
+ goto_if_ne FallarborTown_ContestLobby_EventScript_1B76EF
compare RESULT, -1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7776
end
@@ -76,8 +76,7 @@ FallarborTown_ContestLobby_EventScript_1B76EF:: @ 81B76EF
FallarborTown_ContestLobby_EventScript_1B770E:: @ 81B770E
msgbox FallarborTown_ContestLobby_Text_1B6FF0, 4
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_FALLARBOR
- goto_if_eq FallarborTown_ContestLobby_EventScript_1B774F
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_FALLARBOR, FallarborTown_ContestLobby_EventScript_1B774F
goto FallarborTown_ContestLobby_EventScript_1B7759
end
@@ -162,8 +161,7 @@ FallarborTown_ContestLobby_EventScript_1B77DC:: @ 81B77DC
FallarborTown_ContestLobby_EventScript_1B77E6:: @ 81B77E6
dodailyevents
- checkflag FLAG_DAILY_RECEIVED_BERRY_FALLARBOR
- goto_if_eq FallarborTown_ContestLobby_EventScript_1B77F6
+ goto_if_set FLAG_DAILY_RECEIVED_BERRY_FALLARBOR, FallarborTown_ContestLobby_EventScript_1B77F6
goto FallarborTown_ContestLobby_EventScript_1B7800
end
@@ -216,7 +214,7 @@ VerdanturfTown_ContestLobby_EventScript_1B783B:: @ 81B783B
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7942
specialvar RESULT, GetFirstFreePokeblockSlot
compare RESULT, -1
- goto_if 5, FallarborTown_ContestLobby_EventScript_1B7878
+ goto_if_ne FallarborTown_ContestLobby_EventScript_1B7878
compare RESULT, -1
goto_if_eq FallarborTown_ContestLobby_EventScript_1B7938
end
diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc
index f41fd1f8c..d34b357ea 100644
--- a/data/scripts/safari_zone.inc
+++ b/data/scripts/safari_zone.inc
@@ -44,7 +44,7 @@ gUnknown_081C346A:: @ 81C346A
lockall
special SafariZoneGetPokeblockNameInFeeder
compare RESULT, 0xFFFF
- goto_if 5, EventScript_1C34A9
+ goto_if_ne EventScript_1C34A9
msgbox UnknownString_81C354E, MSGBOX_YESNO
compare RESULT, YES
goto_if_eq EventScript_1C348E
@@ -56,7 +56,7 @@ EventScript_1C348E:
special OpenPokeblockCaseOnFeeder
waitstate
compare RESULT, 0xFFFF
- goto_if 5, EventScript_1C34A0
+ goto_if_ne EventScript_1C34A0
end
EventScript_1C34A0:
diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc
index 2a5905191..1f5e074d9 100644
--- a/data/scripts/secret_power_tm.inc
+++ b/data/scripts/secret_power_tm.inc
@@ -17,11 +17,11 @@ Route111_EventScript_1A3877:: @ 81A3877
setflag FLAG_RECEIVED_SECRET_POWER
clearflag FLAG_HIDE_TM_SALESMAN_SLATEPORT
compare FACING, 3
- call_if 1, Route111_EventScript_1A38C3
+ call_if_eq Route111_EventScript_1A38C3
compare FACING, 4
- call_if 1, Route111_EventScript_1A38C3
+ call_if_eq Route111_EventScript_1A38C3
compare FACING, 2
- call_if 1, Route111_EventScript_1A38CE
+ call_if_eq Route111_EventScript_1A38CE
removeobject LAST_TALKED
release
end
diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc
index cf82cf943..5a84a1b48 100644
--- a/data/scripts/tv.inc
+++ b/data/scripts/tv.inc
@@ -7,10 +7,8 @@ Event_TV:: @ 81A6E72
goto_if_eq EventScript_1A6F01
compare RESULT, 1
goto_if_eq EventScript_1A6F0B
- checkflag FLAG_SYS_TV_START
- goto_if 0, EventScript_1A6EF1
- checkflag FLAG_SYS_TV_WATCH
- goto_if_eq EventScript_1A6EF1
+ goto_if_unset FLAG_SYS_TV_START, EventScript_1A6EF1
+ goto_if_set FLAG_SYS_TV_WATCH, EventScript_1A6EF1
specialvar RESULT, IsTVShowInSearchOfTrainersAiring
compare RESULT, 1
goto_if_eq EventScript_1A6F66
@@ -27,7 +25,7 @@ EventScript_1A6EBB:
copyvar VAR_SPECIAL_4, RESULT
specialvar RESULT, GetTVShowType
compare RESULT, 0
- goto_if 5, EventScript_1A6F21
+ goto_if_ne EventScript_1A6F21
end
EventScript_1A6EF1:
@@ -60,7 +58,7 @@ EventScript_1A6F21:
waitmessage
waitbuttonpress
compare RESULT, 1
- goto_if 5, EventScript_1A6F21
+ goto_if_ne EventScript_1A6F21
goto EventScript_1A6F37
end