Document trainer battle scripts (#430)

This commit is contained in:
DizzyEggg
2018-12-07 23:50:56 +01:00
committed by Marcus Huderle
parent fe06bbe3f6
commit 6068495619
17 changed files with 1283 additions and 1291 deletions
+6 -1254
View File
File diff suppressed because it is too large Load Diff
@@ -153,7 +153,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252C45:: @ 8252C45
end
BattleFrontier_BattlePyramidEmptySquare_EventScript_252C4F:: @ 8252C4F
trainerbattle TRAINER_BATTLE_9, TRAINER_PHILLIP, 0, BattleFrontier_BattlePyramidEmptySquare_Text_252C8D, BattleFrontier_BattlePyramidEmptySquare_Text_252C8D
trainerbattle TRAINER_BATTLE_PYRAMID, TRAINER_PHILLIP, 0, BattleFrontier_BattlePyramidEmptySquare_Text_252C8D, BattleFrontier_BattlePyramidEmptySquare_Text_252C8D
setvar VAR_0x8004, 10
special CallBattlePyramidFunction
waitmessage
File diff suppressed because it is too large Load Diff
+128
View File
@@ -0,0 +1,128 @@
EventScript_ShowSecondTrainerIntro:: @ 8271356
special SetUpTrainerEncounterMusic
special EndTrainerApproach
waitstate
goto EventScript_ShowTrainerIntroMsg
EventScript_TryDoNormalTrainerBattle:: @ 8271362
lock
faceplayer
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
specialvar VAR_RESULT, GetTrainerFlag
compare VAR_RESULT, 0
goto_if 5, EventScript_NoNormalTrainerBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
goto EventScript_ShowTrainerIntroMsg
EventScript_NoNormalTrainerBattle:: @ 8271389
gotopostbattlescript
EventScript_TryDoDoubleTrainerBattle:: @ 827138A
lock
faceplayer
call EventScript_RevealTrainer
specialvar VAR_RESULT, GetTrainerFlag
compare VAR_RESULT, 0
goto_if 5, EventScript_NoDoubleTrainerBattle
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, 0
goto_if 5, EventScript_NotEnoughMonsForDoubleBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
goto EventScript_ShowTrainerIntroMsg
EventScript_NotEnoughMonsForDoubleBattle:: @ 82713BA
special ShowTrainerCantBattleSpeech
waitmessage
waitbuttonpress
release
end
EventScript_NoDoubleTrainerBattle:: @ 82713C1
gotopostbattlescript
EventScript_DoTainerBattle:: @ 82713C2
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
special SetUpTrainerEncounterMusic
trainerbattlebegin
gotopostbattlescript
EventScript_TryDoRematchBattle:: @ 82713D1
call EventScript_RevealTrainer
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, 0
goto_eq EventScript_NoRematchTrainerBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
special BattleSetup_StartRematchBattle
waitstate
releaseall
end
EventScript_NoRematchTrainerBattle:: @ 82713F7
gotopostbattlescript
EventScript_TryDoDoubleRematchBattle:: @ 82713F8
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, 0
goto_eq EventScript_NoDoubleRematchTrainerBattle
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, 0
goto_if 5, EventScript_NotEnoughMonsForDoubleRematchBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
special BattleSetup_StartRematchBattle
waitstate
releaseall
end
EventScript_NoDoubleRematchTrainerBattle:: @ 8271427
gotopostbattlescript
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
goto_eq EventScript_ShowSecondTrainerIntro
goto EventScript_DoTrainerBattle
EventScript_DoTrainerBattle:: @ 8271454
trainerbattlebegin
@ Pointless check, possibly used for debugging?
specialvar VAR_RESULT, GetTrainerBattleMode
compare VAR_RESULT, TRAINER_BATTLE_SINGLE
goto_eq EventScript_EndTrainerBattle
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT
goto_eq EventScript_EndTrainerBattle
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC
goto_eq EventScript_EndTrainerBattle
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE
goto_eq EventScript_EndTrainerBattle
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC
goto_eq EventScript_EndTrainerBattle
EventScript_EndTrainerBattle:: @ 8271491
gotobeatenscript
releaseall
end
+2 -2
View File
@@ -324,7 +324,7 @@ gSpecials:: @ 81DBA64
def_special StartGroudonKyogreBattle
def_special BattleSetup_StartLegendaryBattle
def_special StartRegiBattle
def_special sub_80B16D8
def_special SetUpTrainerMovement
def_special DoSealedChamberShakingEffect2
def_special FoundBlackGlasses
def_special sub_80AC81C
@@ -531,7 +531,7 @@ gSpecials:: @ 81DBA64
def_special sub_813B9A0
def_special sub_81B9918
def_special sub_80722E0
def_special sub_80B45D0
def_special TryPrepareSecondApproachingTrainer
def_special RemoveRecordsWindow
def_special sub_8139C10
def_special sub_80B3BC4