Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -6,28 +6,23 @@ LittlerootTown_BrendansHouse_2F_MapScripts::
|
||||
.byte 0
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_OnTransition:
|
||||
compare VAR_LITTLEROOT_RIVAL_STATE, 2
|
||||
call_if_lt LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan
|
||||
compare VAR_LITTLEROOT_RIVAL_STATE, 3
|
||||
call_if_ge LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos
|
||||
compare VAR_LITTLEROOT_INTRO_STATE, 4
|
||||
call_if_eq PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
|
||||
call_if_lt VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan
|
||||
call_if_ge VAR_LITTLEROOT_RIVAL_STATE, 3, LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos
|
||||
call_if_eq VAR_LITTLEROOT_INTRO_STATE, 4, PlayersHouse_2F_EventScript_BlockStairsUntilClockIsSet
|
||||
call SecretBase_EventScript_SetDecorationFlags
|
||||
setvar VAR_SECRET_BASE_INITIALIZED, 0
|
||||
end
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_CheckShouldUpdateBrendanPos::
|
||||
goto_if_set FLAG_MET_RIVAL_LILYCOVE, LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos
|
||||
compare VAR_BIRCH_LAB_STATE, 2
|
||||
goto_if_ge LittlerootTown_BrendansHouse_2F_EventScript_Ret
|
||||
goto_if_ge VAR_BIRCH_LAB_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_Ret
|
||||
goto LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_TryUpdateBrendanPos::
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_Ret
|
||||
compare VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2
|
||||
goto_if_ge LittlerootTown_MaysHouse_2F_EventScript_Ret @ Odd that the MaysHouse equivalent was used here instead
|
||||
goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_Ret
|
||||
@ Odd that the MaysHouse equivalent was used below instead
|
||||
goto_if_ge VAR_DEX_UPGRADE_JOHTO_STARTER_STATE, 2 LittlerootTown_MaysHouse_2F_EventScript_Ret
|
||||
setobjectxyperm LOCALID_RIVAL, 0, 2
|
||||
setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_UP
|
||||
return
|
||||
@@ -37,8 +32,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_Ret::
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_CheckSetReadyToMeetBrendan::
|
||||
checkplayergender
|
||||
compare VAR_RESULT, FEMALE
|
||||
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan
|
||||
goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan
|
||||
return
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_SetReadyToMeetBrendan::
|
||||
@@ -51,14 +45,12 @@ LittlerootTown_BrendansHouse_2F_OnWarp:
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_CheckInitDecor::
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
goto_if_eq SecretBase_EventScript_InitDecorations
|
||||
goto_if_eq VAR_RESULT, MALE, SecretBase_EventScript_InitDecorations
|
||||
end
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_RivalsPokeBall::
|
||||
lockall
|
||||
compare VAR_LITTLEROOT_RIVAL_STATE, 2
|
||||
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan
|
||||
goto_if_eq VAR_LITTLEROOT_RIVAL_STATE, 2, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan
|
||||
msgbox RivalsHouse_2F_Text_ItsRivalsPokeBall, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
@@ -75,14 +67,10 @@ LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendan::
|
||||
waitmovement 0
|
||||
delay 10
|
||||
playbgm MUS_ENCOUNTER_BRENDAN, TRUE
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast
|
||||
call_if_eq VAR_FACING, DIR_NORTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanNorth
|
||||
call_if_eq VAR_FACING, DIR_SOUTH, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanSouth
|
||||
call_if_eq VAR_FACING, DIR_WEST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanWest
|
||||
call_if_eq VAR_FACING, DIR_EAST, LittlerootTown_BrendansHouse_2F_EventScript_MeetBrendanEast
|
||||
setvar VAR_LITTLEROOT_RIVAL_STATE, 3
|
||||
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
|
||||
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_BEDROOM
|
||||
@@ -250,10 +238,8 @@ LittlerootTown_BrendansHouse_2F_Movement_PlayerWatchBrendanEast:
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_PC::
|
||||
lockall
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC
|
||||
compare VAR_RESULT, FEMALE
|
||||
goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC
|
||||
goto_if_eq VAR_RESULT, MALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC
|
||||
goto_if_eq VAR_RESULT, FEMALE, LittlerootTown_BrendansHouse_2F_EventScript_CheckRivalsPC
|
||||
end
|
||||
|
||||
LittlerootTown_BrendansHouse_2F_EventScript_CheckPlayersPC::
|
||||
|
||||
Reference in New Issue
Block a user