Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -7,10 +7,8 @@ SootopolisCity_MysteryEventsHouse_1F_MapScripts::
|
||||
|
||||
SootopolisCity_MysteryEventsHouse_1F_OnTransition:
|
||||
frontier_checkvisittrainer
|
||||
compare VAR_RESULT, 0
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout
|
||||
compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
|
||||
call_if_ne SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor
|
||||
call_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout
|
||||
call_if_ne VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_MoveOldManToDoor
|
||||
end
|
||||
|
||||
SootopolisCity_MysteryEventsHouse_1F_EventScript_SetTrainerVisitingLayout::
|
||||
@@ -40,12 +38,9 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldManCommentOnBattle::
|
||||
copyobjectxytoperm LOCALID_OLD_MAN
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
|
||||
waitmovement 0
|
||||
compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment
|
||||
compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment
|
||||
compare VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment
|
||||
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleWonComment
|
||||
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 2, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleLostComment
|
||||
call_if_eq VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 3, SootopolisCity_MysteryEventsHouse_1F_EventScript_BattleTiedComment
|
||||
special LoadPlayerParty
|
||||
setvar VAR_SOOTOPOLIS_MYSTERY_EVENTS_STATE, 0
|
||||
releaseall
|
||||
@@ -76,10 +71,8 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_OldMan::
|
||||
lock
|
||||
faceplayer
|
||||
frontier_checkvisittrainer
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer
|
||||
compare VAR_TEMP_1, 1
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting
|
||||
goto_if_eq VAR_RESULT, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_InvalidVisitingTrainer
|
||||
goto_if_eq VAR_TEMP_1, 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting
|
||||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_OnlyAmusementWatchingBattles, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -93,28 +86,21 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting::
|
||||
special SavePlayerParty
|
||||
special BufferEReaderTrainerName
|
||||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_ChallengeVisitingTrainer, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
call SootopolisCity_MysteryEventsHouse_1F_EventScript_ChooseParty
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
goto_if_eq VAR_RESULT, 0, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_SaveProgressBeforeBattle, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
goto_if_eq VAR_RESULT, NO, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
special LoadPlayerParty
|
||||
call Common_EventScript_SaveGame
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
goto_if_eq VAR_RESULT, FALSE, SootopolisCity_MysteryEventsHouse_1F_EventScript_DeclineBattle
|
||||
special SavePlayerParty
|
||||
special ReducePlayerPartyToSelectedMons
|
||||
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_HopeToSeeGoodMatch, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest
|
||||
call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementNorth
|
||||
call_if_eq VAR_FACING, DIR_EAST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast
|
||||
call_if_eq VAR_FACING, DIR_WEST, SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest
|
||||
warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1
|
||||
waitstate
|
||||
release
|
||||
|
||||
Reference in New Issue
Block a user