2021-01-26 10:41:13 +01:00
|
|
|
EventScript_StartTrainerApproach:: @ 8271354
|
2021-01-26 08:16:26 +01:00
|
|
|
selectapproachingtrainer
|
2021-01-26 10:41:13 +01:00
|
|
|
lockfortrainer
|
|
|
|
EventScript_TrainerApproach:: @ 8271356
|
|
|
|
special PlayTrainerEncounterMusic
|
|
|
|
special DoTrainerApproach
|
2018-12-07 23:50:56 +01:00
|
|
|
waitstate
|
|
|
|
goto EventScript_ShowTrainerIntroMsg
|
|
|
|
|
|
|
|
EventScript_TryDoNormalTrainerBattle:: @ 8271362
|
|
|
|
lock
|
|
|
|
faceplayer
|
|
|
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
|
|
|
waitmovement 0
|
|
|
|
specialvar VAR_RESULT, GetTrainerFlag
|
2021-01-26 10:41:13 +01:00
|
|
|
compare VAR_RESULT, FALSE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_ne EventScript_NoNormalTrainerBattle
|
2021-01-26 10:41:13 +01:00
|
|
|
special PlayTrainerEncounterMusic
|
|
|
|
special SetTrainerFacingDirection
|
2018-12-07 23:50:56 +01:00
|
|
|
goto EventScript_ShowTrainerIntroMsg
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NoNormalTrainerBattle:: @ 8271389
|
|
|
|
gotopostbattlescript
|
|
|
|
|
|
|
|
EventScript_TryDoDoubleTrainerBattle:: @ 827138A
|
|
|
|
lock
|
|
|
|
faceplayer
|
|
|
|
call EventScript_RevealTrainer
|
|
|
|
specialvar VAR_RESULT, GetTrainerFlag
|
2021-01-26 10:41:13 +01:00
|
|
|
compare VAR_RESULT, FALSE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_ne EventScript_NoDoubleTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
special HasEnoughMonsForDoubleBattle
|
2019-09-17 21:24:44 +02:00
|
|
|
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
|
2021-01-26 10:41:13 +01:00
|
|
|
special PlayTrainerEncounterMusic
|
|
|
|
special SetTrainerFacingDirection
|
2018-12-07 23:50:56 +01:00
|
|
|
goto EventScript_ShowTrainerIntroMsg
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NotEnoughMonsForDoubleBattle:: @ 82713BA
|
|
|
|
special ShowTrainerCantBattleSpeech
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
release
|
|
|
|
end
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NoDoubleTrainerBattle:: @ 82713C1
|
|
|
|
gotopostbattlescript
|
|
|
|
|
2020-03-03 20:47:14 +01:00
|
|
|
EventScript_DoNoIntroTrainerBattle:: @ 82713C2
|
2018-12-07 23:50:56 +01:00
|
|
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
|
|
|
waitmovement 0
|
2021-01-26 10:41:13 +01:00
|
|
|
special PlayTrainerEncounterMusic
|
2018-12-07 23:50:56 +01:00
|
|
|
trainerbattlebegin
|
|
|
|
gotopostbattlescript
|
|
|
|
|
|
|
|
EventScript_TryDoRematchBattle:: @ 82713D1
|
|
|
|
call EventScript_RevealTrainer
|
|
|
|
specialvar VAR_RESULT, IsTrainerReadyForRematch
|
2020-03-03 20:47:14 +01:00
|
|
|
compare VAR_RESULT, FALSE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_NoRematchTrainerBattle
|
2021-01-26 10:41:13 +01:00
|
|
|
special PlayTrainerEncounterMusic
|
|
|
|
special SetTrainerFacingDirection
|
2018-12-07 23:50:56 +01:00
|
|
|
special ShowTrainerIntroSpeech
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
special BattleSetup_StartRematchBattle
|
|
|
|
waitstate
|
|
|
|
releaseall
|
|
|
|
end
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NoRematchTrainerBattle:: @ 82713F7
|
|
|
|
gotopostbattlescript
|
|
|
|
|
|
|
|
EventScript_TryDoDoubleRematchBattle:: @ 82713F8
|
|
|
|
specialvar VAR_RESULT, IsTrainerReadyForRematch
|
2020-03-03 20:47:14 +01:00
|
|
|
compare VAR_RESULT, FALSE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_NoDoubleRematchTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
special HasEnoughMonsForDoubleBattle
|
2019-09-17 21:24:44 +02:00
|
|
|
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
|
2021-01-26 10:41:13 +01:00
|
|
|
special PlayTrainerEncounterMusic
|
|
|
|
special SetTrainerFacingDirection
|
2018-12-07 23:50:56 +01:00
|
|
|
special ShowTrainerIntroSpeech
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
special BattleSetup_StartRematchBattle
|
|
|
|
waitstate
|
|
|
|
releaseall
|
|
|
|
end
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NoDoubleRematchTrainerBattle:: @ 8271427
|
|
|
|
gotopostbattlescript
|
2021-01-26 10:41:13 +01:00
|
|
|
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_NotEnoughMonsForDoubleRematchBattle:: @ 8271428
|
|
|
|
special ShowTrainerCantBattleSpeech
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
release
|
|
|
|
end
|
|
|
|
|
|
|
|
EventScript_RevealTrainer:: @ 827142F
|
|
|
|
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
|
|
|
waitmovement 0
|
|
|
|
return
|
|
|
|
|
|
|
|
Movement_RevealTrainer: @ 827143A
|
|
|
|
reveal_trainer
|
|
|
|
step_end
|
|
|
|
|
|
|
|
EventScript_ShowTrainerIntroMsg:: @ 827143C
|
|
|
|
special ShowTrainerIntroSpeech
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
special TryPrepareSecondApproachingTrainer
|
|
|
|
compare VAR_RESULT, TRUE
|
2021-01-26 10:41:13 +01:00
|
|
|
goto_if_eq EventScript_TrainerApproach
|
2018-12-07 23:50:56 +01:00
|
|
|
goto EventScript_DoTrainerBattle
|
|
|
|
|
|
|
|
EventScript_DoTrainerBattle:: @ 8271454
|
|
|
|
trainerbattlebegin
|
2020-03-03 20:47:14 +01:00
|
|
|
@ Below battle mode check only needed in FRLG
|
2018-12-07 23:50:56 +01:00
|
|
|
specialvar VAR_RESULT, GetTrainerBattleMode
|
|
|
|
compare VAR_RESULT, TRAINER_BATTLE_SINGLE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_EndTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_EndTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_EndTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_EndTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC
|
2018-12-22 02:28:24 +01:00
|
|
|
goto_if_eq EventScript_EndTrainerBattle
|
2018-12-07 23:50:56 +01:00
|
|
|
EventScript_EndTrainerBattle:: @ 8271491
|
|
|
|
gotobeatenscript
|
|
|
|
releaseall
|
|
|
|
end
|
2020-01-11 18:02:58 +01:00
|
|
|
|
|
|
|
Std_MsgboxAutoclose:: @ 8271494
|
|
|
|
message 0x0
|
|
|
|
waitmessage
|
|
|
|
waitbuttonpress
|
|
|
|
release
|
|
|
|
return
|