summaryrefslogtreecommitdiff
path: root/data/maps/Route111/scripts.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/maps/Route111/scripts.inc')
-rw-r--r--data/maps/Route111/scripts.inc108
1 files changed, 43 insertions, 65 deletions
diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc
index 72e30958a..6cb83b452 100644
--- a/data/maps/Route111/scripts.inc
+++ b/data/maps/Route111/scripts.inc
@@ -15,45 +15,42 @@ Route111_MapScripts::
Route111_OnLoad:
call_if_unset FLAG_REGI_DOORS_OPENED, Route111_EventScript_CloseDesertRuins
- compare VAR_MIRAGE_TOWER_STATE, 1
- call_if_eq Route111_EventScript_ShowTemporaryMirageTower
+ call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_ShowTemporaryMirageTower
end
Route111_EventScript_CloseDesertRuins::
- setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1
- setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1
+ setmetatile 29, 86, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 29, 87, METATILE_General_RockWall_SandBase, TRUE
return
@ Show Mirage Tower just prior to disintegration. Mirage Tower is otherwise handled by the map layout
Route111_EventScript_ShowTemporaryMirageTower::
- setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, 0
- setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, 0
- setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, 0
- setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, 0
- setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, 0
- setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, 0
- setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, 0
- setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, 0
- setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, 0
- setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, 0
- setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, 0
- setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, 0
- setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, 0
- setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, 0
- setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, 0
- setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, 0
- setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, 0
- setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, 0
+ setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, FALSE
+ setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, FALSE
+ setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, FALSE
+ setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, FALSE
+ setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, FALSE
+ setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, FALSE
+ setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, FALSE
+ setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, FALSE
+ setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, FALSE
+ setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, FALSE
+ setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, FALSE
+ setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, FALSE
+ setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, FALSE
+ setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, FALSE
+ setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, FALSE
+ setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, FALSE
+ setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, FALSE
+ setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, FALSE
return
Route111_OnTransition:
setvar VAR_TRAINER_HILL_IS_ACTIVE, 0
special SetMirageTowerVisibility
call_if_unset FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_SetLayoutNoMirageTower
- compare VAR_MIRAGE_TOWER_STATE, 1
- call_if_eq Route111_EventScript_SetFallingPlayerGfx
- compare VAR_MIRAGE_TOWER_STATE, 2
- call_if_eq Route111_EventScript_SetMirageTowerGone
+ call_if_eq VAR_MIRAGE_TOWER_STATE, 1, Route111_EventScript_SetFallingPlayerGfx
+ call_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_SetMirageTowerGone
call Route111_EventScript_CheckSetSandstorm
call GabbyAndTy_EventScript_UpdateLocation
goto_if_not_defeated TRAINER_VICKY, Route111_EventScript_SetWinstratesNotDefeated
@@ -61,10 +58,8 @@ Route111_OnTransition:
Route111_EventScript_SetFallingPlayerGfx::
checkplayergender
- compare VAR_RESULT, MALE
- goto_if_eq Route111_EventScript_SetFallingPlayerGfxMale
- compare VAR_RESULT, FEMALE
- goto_if_eq Route111_EventScript_SetFallingPlayerGfxFemale
+ goto_if_eq VAR_RESULT, MALE, Route111_EventScript_SetFallingPlayerGfxMale
+ goto_if_eq VAR_RESULT, FEMALE, Route111_EventScript_SetFallingPlayerGfxFemale
return
Route111_EventScript_SetFallingPlayerGfxMale::
@@ -77,16 +72,11 @@ Route111_EventScript_SetFallingPlayerGfxFemale::
Route111_EventScript_CheckSetSandstorm::
getplayerxy VAR_TEMP_0, VAR_TEMP_1
- compare VAR_TEMP_1, 34
- goto_if_lt Route111_EventScript_EndCheckSetSandstorm
- compare VAR_TEMP_1, 107
- goto_if_gt Route111_EventScript_EndCheckSetSandstorm
- compare VAR_TEMP_1, 72
- goto_if_gt Route111_EventScript_SetSandstorm
- compare VAR_TEMP_0, 2000
- goto_if_gt Route111_EventScript_EndCheckSetSandstorm
- compare VAR_TEMP_0, 8
- goto_if_lt Route111_EventScript_EndCheckSetSandstorm
+ goto_if_lt VAR_TEMP_1, 34, Route111_EventScript_EndCheckSetSandstorm
+ goto_if_gt VAR_TEMP_1, 107, Route111_EventScript_EndCheckSetSandstorm
+ goto_if_gt VAR_TEMP_1, 72, Route111_EventScript_SetSandstorm
+ goto_if_gt VAR_TEMP_0, 2000, Route111_EventScript_EndCheckSetSandstorm
+ goto_if_lt VAR_TEMP_0, 8, Route111_EventScript_EndCheckSetSandstorm
Route111_EventScript_SetSandstorm::
setweather WEATHER_SANDSTORM
Route111_EventScript_EndCheckSetSandstorm::
@@ -170,8 +160,7 @@ Route111_EventScript_Girl::
goto_if_set FLAG_DAILY_ROUTE_111_RECEIVED_BERRY, Route111_EventScript_ReceivedBerry
msgbox Route111_Text_WateredPlantsEveryDayTakeBerry, MSGBOX_DEFAULT
giveitem ITEM_RAZZ_BERRY
- compare VAR_RESULT, FALSE
- goto_if_eq Common_EventScript_ShowBagIsFull
+ goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_DAILY_ROUTE_111_RECEIVED_BERRY
special GetPlayerBigGuyGirlString
msgbox Route111_Text_GoingToTryToMakeDifferentColorBerries, MSGBOX_DEFAULT
@@ -210,9 +199,8 @@ Route111_EventScript_ViciousSandstormTriggerRight::
end
Route111_EventScript_ViciousSandstormTrigger::
- checkitem ITEM_GO_GOGGLES, 1
- compare VAR_RESULT, FALSE
- goto_if_eq Route111_EventScript_PreventRouteAccess
+ checkitem ITEM_GO_GOGGLES
+ goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_PreventRouteAccess
setvar VAR_TEMP_3, 1
releaseall
end
@@ -220,14 +208,10 @@ Route111_EventScript_ViciousSandstormTrigger::
Route111_EventScript_PreventRouteAccess::
msgbox gText_SandstormIsVicious, MSGBOX_DEFAULT
closemessage
- compare VAR_0x8004, 0
- call_if_eq Route111_EventScript_PushUpFromRoute
- compare VAR_0x8004, 1
- call_if_eq Route111_EventScript_PushDownFromRoute
- compare VAR_0x8004, 2
- call_if_eq Route111_EventScript_PushLeftFromRoute
- compare VAR_0x8004, 3
- call_if_eq Route111_EventScript_PushRightFromRoute
+ call_if_eq VAR_0x8004, 0, Route111_EventScript_PushUpFromRoute
+ call_if_eq VAR_0x8004, 1, Route111_EventScript_PushDownFromRoute
+ call_if_eq VAR_0x8004, 2, Route111_EventScript_PushLeftFromRoute
+ call_if_eq VAR_0x8004, 3, Route111_EventScript_PushRightFromRoute
releaseall
end
@@ -285,8 +269,7 @@ Route111_EventScript_Victor::
faceplayer
setflag FLAG_LANDMARK_WINSTRATE_FAMILY
msgbox Route111_Text_BattleOurFamily, MSGBOX_YESNO
- compare VAR_RESULT, YES
- goto_if_eq Route111_EventScript_BattleWinstrates
+ goto_if_eq VAR_RESULT, YES, Route111_EventScript_BattleWinstrates
msgbox Route111_Text_IsThatSo, MSGBOX_DEFAULT
release
end
@@ -420,10 +403,8 @@ Route111_EventScript_Man2::
Route111_EventScript_Hiker::
lock
faceplayer
- compare VAR_MIRAGE_TOWER_STATE, 3
- goto_if_eq Route111_EventScript_HikerMirageTowerGone
- compare VAR_MIRAGE_TOWER_STATE, 2
- goto_if_eq Route111_EventScript_HikerMirageTowerDisintegrated
+ goto_if_eq VAR_MIRAGE_TOWER_STATE, 3, Route111_EventScript_HikerMirageTowerGone
+ goto_if_eq VAR_MIRAGE_TOWER_STATE, 2, Route111_EventScript_HikerMirageTowerDisintegrated
goto_if_set FLAG_MIRAGE_TOWER_VISIBLE, Route111_EventScript_HikerMirageTowerVisible
msgbox Route111_Text_ShouldBeMirageTowerAroundHere, MSGBOX_DEFAULT
release
@@ -478,8 +459,7 @@ Route111_EventScript_Becky::
Route111_EventScript_Dusty::
trainerbattle_single TRAINER_DUSTY_1, Route111_Text_DustyIntro, Route111_Text_DustyDefeat, Route111_EventScript_RegisterDusty
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, TRUE
- goto_if_eq Route111_EventScript_RematchDusty
+ goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchDusty
msgbox Route111_Text_DustyPostBattle, MSGBOX_DEFAULT
release
end
@@ -515,8 +495,7 @@ Route111_EventScript_Daisuke::
Route111_EventScript_Wilton::
trainerbattle_single TRAINER_WILTON_1, Route111_Text_WiltonIntro, Route111_Text_WiltonDefeat, Route111_EventScript_RegisterWilton
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, TRUE
- goto_if_eq Route111_EventScript_RematchWilton
+ goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchWilton
msgbox Route111_Text_WiltonPostBattle, MSGBOX_DEFAULT
release
end
@@ -537,8 +516,7 @@ Route111_EventScript_RematchWilton::
Route111_EventScript_Brooke::
trainerbattle_single TRAINER_BROOKE_1, Route111_Text_BrookeIntro, Route111_Text_BrookeDefeat, Route111_EventScript_RegisterBrooke
specialvar VAR_RESULT, ShouldTryRematchBattle
- compare VAR_RESULT, TRUE
- goto_if_eq Route111_EventScript_RematchBrooke
+ goto_if_eq VAR_RESULT, TRUE, Route111_EventScript_RematchBrooke
msgbox Route111_Text_BrookePostBattle, MSGBOX_DEFAULT
release
end