Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -16,8 +16,7 @@ Route110_OnResume:
|
||||
Route110_OnTransition:
|
||||
call Common_EventScript_SetupRivalGfxId
|
||||
call Common_EventScript_SetupRivalOnBikeGfxId
|
||||
compare VAR_CYCLING_CHALLENGE_STATE, 1
|
||||
call_if_eq Route110_EventScript_SaveCyclingMusic
|
||||
call_if_eq VAR_CYCLING_CHALLENGE_STATE, 1, Route110_EventScript_SaveCyclingMusic
|
||||
end
|
||||
|
||||
Route110_EventScript_SaveCyclingMusic::
|
||||
@@ -136,8 +135,7 @@ Route110_EventScript_TrickHouseSign::
|
||||
Route110_EventScript_CyclingRoadResultsSign::
|
||||
lockall
|
||||
specialvar VAR_RESULT, GetRecordedCyclingRoadResults
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Route110_EventScript_NoRecordSet
|
||||
goto_if_eq VAR_RESULT, FALSE, Route110_EventScript_NoRecordSet
|
||||
msgbox Route110_Text_BestRecord, MSGBOX_DEFAULT
|
||||
releaseall
|
||||
end
|
||||
@@ -151,10 +149,8 @@ Route110_EventScript_ChallengeGuy::
|
||||
lock
|
||||
faceplayer
|
||||
specialvar VAR_RESULT, GetPlayerAvatarBike
|
||||
compare VAR_RESULT, 1
|
||||
goto_if_eq Route110_EventScript_PlayerRidingAcroBike
|
||||
compare VAR_CYCLING_CHALLENGE_STATE, 0
|
||||
goto_if_eq Route110_EventScript_PlayerNotRidingBike
|
||||
goto_if_eq VAR_RESULT, 1, Route110_EventScript_PlayerRidingAcroBike
|
||||
goto_if_eq VAR_CYCLING_CHALLENGE_STATE, 0, Route110_EventScript_PlayerNotRidingBike
|
||||
msgbox Route110_Text_AlwaysAimHigher, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -182,8 +178,7 @@ Route110_EventScript_Jaclyn::
|
||||
Route110_EventScript_Edwin::
|
||||
trainerbattle_single TRAINER_EDWIN_1, Route110_Text_EdwinIntro, Route110_Text_EdwinDefeated, Route110_EventScript_EdwinRegisterMatchCallAfterBattle
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq Route110_EventScript_EdwinRematch
|
||||
goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_EdwinRematch
|
||||
msgbox Route110_Text_EdwinPostBattle, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -219,8 +214,7 @@ Route110_EventScript_Anthony::
|
||||
Route110_EventScript_Benjamin::
|
||||
trainerbattle_single TRAINER_BENJAMIN_1, Route110_Text_BenjaminIntro, Route110_Text_BenjaminDefeated, Route110_EventScript_BenjaminRegisterMatchCallAfterBattle
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq Route110_EventScript_BenjaminRematch
|
||||
goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_BenjaminRematch
|
||||
msgbox Route110_Text_BenjaminPostBattle, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -246,8 +240,7 @@ Route110_EventScript_Jasmine::
|
||||
Route110_EventScript_Abigail::
|
||||
trainerbattle_single TRAINER_ABIGAIL_1, Route110_Text_AbigailIntro, Route110_Text_AbigailDefeated, Route110_EventScript_AbigailRegisterMatchCallAfterBattle
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq Route110_EventScript_AbigailRematch
|
||||
goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_AbigailRematch
|
||||
msgbox Route110_Text_AbigailPostBattle, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -268,8 +261,7 @@ Route110_EventScript_AbigailRematch::
|
||||
Route110_EventScript_Isabel::
|
||||
trainerbattle_single TRAINER_ISABEL_1, Route110_Text_IsabelIntro, Route110_Text_IsabelDefeated, Route110_EventScript_IsabelRegisterMatchCallAfterBattle
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq Route110_EventScript_IsabelRematch
|
||||
goto_if_eq VAR_RESULT, TRUE, Route110_EventScript_IsabelRematch
|
||||
msgbox Route110_Text_IsabelPostBattle, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -384,10 +376,8 @@ Route110_EventScript_RivalTrigger3::
|
||||
Route110_EventScript_RivalScene::
|
||||
lockall
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
call_if_eq Route110_EventScript_PlayMayMusic
|
||||
compare VAR_RESULT, FEMALE
|
||||
call_if_eq Route110_EventScript_PlayBrendanMusic
|
||||
call_if_eq VAR_RESULT, MALE, Route110_EventScript_PlayMayMusic
|
||||
call_if_eq VAR_RESULT, FEMALE, Route110_EventScript_PlayBrendanMusic
|
||||
applymovement LOCALID_RIVAL, Common_Movement_WalkInPlaceFasterDown
|
||||
waitmovement 0
|
||||
applymovement LOCALID_RIVAL, Common_Movement_ExclamationMark
|
||||
@@ -395,17 +385,12 @@ Route110_EventScript_RivalScene::
|
||||
applymovement LOCALID_RIVAL, Common_Movement_Delay48
|
||||
waitmovement 0
|
||||
delay 30
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq Route110_EventScript_RivalApproachPlayer1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq Route110_EventScript_RivalApproachPlayer2
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq Route110_EventScript_RivalApproachPlayer3
|
||||
call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalApproachPlayer1
|
||||
call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalApproachPlayer2
|
||||
call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalApproachPlayer3
|
||||
checkplayergender
|
||||
compare VAR_RESULT, MALE
|
||||
goto_if_eq Route110_EventScript_MayBattle
|
||||
compare VAR_RESULT, FEMALE
|
||||
goto_if_eq Route110_EventScript_BrendanBattle
|
||||
goto_if_eq VAR_RESULT, MALE, Route110_EventScript_MayBattle
|
||||
goto_if_eq VAR_RESULT, FEMALE, Route110_EventScript_BrendanBattle
|
||||
releaseall
|
||||
end
|
||||
|
||||
@@ -483,23 +468,17 @@ Route110_EventScript_GiveItemfinder::
|
||||
|
||||
Route110_EventScript_RivalExit::
|
||||
closemessage
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq Route110_EventScript_MoveRival1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq Route110_EventScript_MoveRival2
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq Route110_EventScript_MoveRival3
|
||||
call_if_eq VAR_0x8008, 1, Route110_EventScript_MoveRival1
|
||||
call_if_eq VAR_0x8008, 2, Route110_EventScript_MoveRival2
|
||||
call_if_eq VAR_0x8008, 3, Route110_EventScript_MoveRival3
|
||||
setobjectmovementtype LOCALID_RIVAL, MOVEMENT_TYPE_FACE_RIGHT
|
||||
setobjectmovementtype LOCALID_RIVAL_ON_BIKE, MOVEMENT_TYPE_FACE_RIGHT
|
||||
removeobject LOCALID_RIVAL
|
||||
addobject LOCALID_RIVAL_ON_BIKE
|
||||
delay 45
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq Route110_EventScript_RivalExit1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq Route110_EventScript_RivalExit2
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq Route110_EventScript_RivalExit3
|
||||
call_if_eq VAR_0x8008, 1, Route110_EventScript_RivalExit1
|
||||
call_if_eq VAR_0x8008, 2, Route110_EventScript_RivalExit2
|
||||
call_if_eq VAR_0x8008, 3, Route110_EventScript_RivalExit3
|
||||
removeobject LOCALID_RIVAL_ON_BIKE
|
||||
setvar VAR_ROUTE110_STATE, 1
|
||||
savebgm MUS_DUMMY
|
||||
@@ -625,14 +604,10 @@ Route110_EventScript_BirchScene::
|
||||
waitmovement 0
|
||||
applymovement LOCALID_BIRCH, Common_Movement_Delay48
|
||||
waitmovement 0
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq Route110_EventScript_BirchApproachPlayer1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq Route110_EventScript_BirchApproachPlayer2
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq Route110_EventScript_BirchApproachPlayer3
|
||||
compare VAR_0x8008, 4
|
||||
call_if_eq Route110_EventScript_BirchApproachPlayer4
|
||||
call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchApproachPlayer1
|
||||
call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchApproachPlayer2
|
||||
call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchApproachPlayer3
|
||||
call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchApproachPlayer4
|
||||
msgbox Route110_Text_ImagineSeeingYouHere, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
delay 20
|
||||
@@ -656,14 +631,10 @@ Route110_EventScript_BirchScene::
|
||||
setflag FLAG_ENABLE_PROF_BIRCH_MATCH_CALL
|
||||
msgbox Route110_Text_KeepAnEyeOutForRival, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
compare VAR_0x8008, 1
|
||||
call_if_eq Route110_EventScript_BirchExit1
|
||||
compare VAR_0x8008, 2
|
||||
call_if_eq Route110_EventScript_BirchExit2
|
||||
compare VAR_0x8008, 3
|
||||
call_if_eq Route110_EventScript_BirchExit3
|
||||
compare VAR_0x8008, 4
|
||||
call_if_eq Route110_EventScript_BirchExit4
|
||||
call_if_eq VAR_0x8008, 1, Route110_EventScript_BirchExit1
|
||||
call_if_eq VAR_0x8008, 2, Route110_EventScript_BirchExit2
|
||||
call_if_eq VAR_0x8008, 3, Route110_EventScript_BirchExit3
|
||||
call_if_eq VAR_0x8008, 4, Route110_EventScript_BirchExit4
|
||||
removeobject LOCALID_BIRCH
|
||||
setvar VAR_REGISTER_BIRCH_STATE, 2
|
||||
releaseall
|
||||
|
||||
Reference in New Issue
Block a user