Document object lock and some trainer approach

This commit is contained in:
GriffinR
2021-01-26 04:41:13 -05:00
parent 0064333e4a
commit 9e59581220
22 changed files with 209 additions and 155 deletions

View File

@@ -217,7 +217,7 @@ gScriptCmdTable:: @ 81DB67C
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
.4byte ScrCmd_warpmossdeepgym @ 0xd7
.4byte ScrCmd_selectapproachingtrainer @ 0xd8
.4byte ScrCmd_cmdD9 @ 0xd9
.4byte ScrCmd_lockfortrainer @ 0xd9
.4byte ScrCmd_closebraillemessage @ 0xda
.4byte ScrCmd_messageinstant @ 0xdb
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc

View File

@@ -1,10 +1,9 @@
EventScript_271354:: @ 8271354
EventScript_StartTrainerApproach:: @ 8271354
selectapproachingtrainer
cmdD9
EventScript_ShowSecondTrainerIntro:: @ 8271356
special SetUpTrainerEncounterMusic
special EndTrainerApproach
lockfortrainer
EventScript_TrainerApproach:: @ 8271356
special PlayTrainerEncounterMusic
special DoTrainerApproach
waitstate
goto EventScript_ShowTrainerIntroMsg
@@ -14,11 +13,12 @@ EventScript_TryDoNormalTrainerBattle:: @ 8271362
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
specialvar VAR_RESULT, GetTrainerFlag
compare VAR_RESULT, 0
compare VAR_RESULT, FALSE
goto_if_ne EventScript_NoNormalTrainerBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
goto EventScript_ShowTrainerIntroMsg
EventScript_NoNormalTrainerBattle:: @ 8271389
gotopostbattlescript
@@ -27,27 +27,29 @@ EventScript_TryDoDoubleTrainerBattle:: @ 827138A
faceplayer
call EventScript_RevealTrainer
specialvar VAR_RESULT, GetTrainerFlag
compare VAR_RESULT, 0
compare VAR_RESULT, FALSE
goto_if_ne EventScript_NoDoubleTrainerBattle
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
goto EventScript_ShowTrainerIntroMsg
EventScript_NotEnoughMonsForDoubleBattle:: @ 82713BA
special ShowTrainerCantBattleSpeech
waitmessage
waitbuttonpress
release
end
EventScript_NoDoubleTrainerBattle:: @ 82713C1
gotopostbattlescript
EventScript_DoNoIntroTrainerBattle:: @ 82713C2
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
special SetUpTrainerEncounterMusic
special PlayTrainerEncounterMusic
trainerbattlebegin
gotopostbattlescript
@@ -56,8 +58,8 @@ EventScript_TryDoRematchBattle:: @ 82713D1
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, FALSE
goto_if_eq EventScript_NoRematchTrainerBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
@@ -65,6 +67,7 @@ EventScript_TryDoRematchBattle:: @ 82713D1
waitstate
releaseall
end
EventScript_NoRematchTrainerBattle:: @ 82713F7
gotopostbattlescript
@@ -75,8 +78,8 @@ EventScript_TryDoDoubleRematchBattle:: @ 82713F8
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
special SetUpTrainerEncounterMusic
special SetUpTrainerMovement
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
@@ -84,8 +87,10 @@ EventScript_TryDoDoubleRematchBattle:: @ 82713F8
waitstate
releaseall
end
EventScript_NoDoubleRematchTrainerBattle:: @ 8271427
gotopostbattlescript
EventScript_NotEnoughMonsForDoubleRematchBattle:: @ 8271428
special ShowTrainerCantBattleSpeech
waitmessage
@@ -108,7 +113,7 @@ EventScript_ShowTrainerIntroMsg:: @ 827143C
waitbuttonpress
special TryPrepareSecondApproachingTrainer
compare VAR_RESULT, TRUE
goto_if_eq EventScript_ShowSecondTrainerIntro
goto_if_eq EventScript_TrainerApproach
goto EventScript_DoTrainerBattle
EventScript_DoTrainerBattle:: @ 8271454

View File

@@ -66,8 +66,8 @@ gSpecials:: @ 81DBA64
def_special ShowTrainerIntroSpeech
def_special ShowTrainerCantBattleSpeech
def_special GetTrainerFlag
def_special EndTrainerApproach
def_special SetUpTrainerEncounterMusic
def_special DoTrainerApproach
def_special PlayTrainerEncounterMusic
def_special ShouldTryRematchBattle
def_special IsTrainerReadyForRematch
def_special BattleSetup_StartRematchBattle
@@ -324,7 +324,7 @@ gSpecials:: @ 81DBA64
def_special StartGroudonKyogreBattle
def_special BattleSetup_StartLegendaryBattle
def_special StartRegiBattle
def_special SetUpTrainerMovement
def_special SetTrainerFacingDirection
def_special DoSealedChamberShakingEffect2
def_special FoundBlackGlasses
def_special StartDroughtWeatherBlend