improve goto_if macros
This commit is contained in:
@@ -19,9 +19,8 @@ FortreeCity_Gym_EventScript_2165C8:: @ 82165C8
|
||||
trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_216D75, FortreeCity_Gym_Text_216E60, FortreeCity_Gym_EventScript_2165FD, NO_MUSIC
|
||||
specialvar VAR_RESULT, ShouldTryRematchBattle
|
||||
compare VAR_RESULT, 1
|
||||
goto_eq FortreeCity_Gym_EventScript_21668D
|
||||
checkflag FLAG_0x0AA
|
||||
goto_if 0, FortreeCity_Gym_EventScript_216646
|
||||
goto_if_eq FortreeCity_Gym_EventScript_21668D
|
||||
goto_if_unset FLAG_0x0AA, FortreeCity_Gym_EventScript_216646
|
||||
msgbox FortreeCity_Gym_Text_217071, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -52,7 +51,7 @@ FortreeCity_Gym_EventScript_2165FD:: @ 82165FD
|
||||
FortreeCity_Gym_EventScript_216646:: @ 8216646
|
||||
giveitem_std ITEM_TM40
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq FortreeCity_Gym_EventScript_272054
|
||||
goto_if_eq FortreeCity_Gym_EventScript_272054
|
||||
msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
|
||||
setflag FLAG_0x0AA
|
||||
release
|
||||
@@ -61,7 +60,7 @@ FortreeCity_Gym_EventScript_216646:: @ 8216646
|
||||
FortreeCity_Gym_EventScript_21666A:: @ 821666A
|
||||
giveitem_std ITEM_TM40
|
||||
compare VAR_RESULT, 0
|
||||
goto_eq FortreeCity_Gym_EventScript_27205E
|
||||
goto_if_eq FortreeCity_Gym_EventScript_27205E
|
||||
msgbox FortreeCity_Gym_Text_216FEC, MSGBOX_DEFAULT
|
||||
setflag FLAG_0x0AA
|
||||
return
|
||||
@@ -104,8 +103,7 @@ FortreeCity_Gym_EventScript_21671B:: @ 821671B
|
||||
FortreeCity_Gym_EventScript_216732:: @ 8216732
|
||||
lock
|
||||
faceplayer
|
||||
checkflag FLAG_0x4F5
|
||||
goto_eq FortreeCity_Gym_EventScript_216747
|
||||
goto_if_set FLAG_0x4F5, FortreeCity_Gym_EventScript_216747
|
||||
msgbox FortreeCity_Gym_Text_216785, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
@@ -117,15 +115,13 @@ FortreeCity_Gym_EventScript_216747:: @ 8216747
|
||||
|
||||
FortreeCity_Gym_EventScript_216751:: @ 8216751
|
||||
lockall
|
||||
checkflag FLAG_BADGE06_GET
|
||||
goto_eq FortreeCity_Gym_EventScript_216771
|
||||
goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_216771
|
||||
goto FortreeCity_Gym_EventScript_21677B
|
||||
end
|
||||
|
||||
FortreeCity_Gym_EventScript_216761:: @ 8216761
|
||||
lockall
|
||||
checkflag FLAG_BADGE06_GET
|
||||
goto_eq FortreeCity_Gym_EventScript_216771
|
||||
goto_if_set FLAG_BADGE06_GET, FortreeCity_Gym_EventScript_216771
|
||||
goto FortreeCity_Gym_EventScript_21677B
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user