Sync trainer_battle.inc

This commit is contained in:
GriffinR
2020-03-03 14:42:15 -05:00
parent 4c4b19da7e
commit 1aa1f18972
9 changed files with 83 additions and 85 deletions
+59 -60
View File
@@ -1,143 +1,142 @@
gUnknown_81A4EB4:: @ 81A4EB4
EventScript_DoTrainerBattleFromApproach:: @ 81A4EB4
lock
special PlayTrainerEncounterMusic
special ScrSpecial_EndTrainerApproach
special EndTrainerApproach
waitstate
goto EventScript_1A4FC7
goto EventScript_DoTrainerBattle
EventScript_TryDoNormalTrainerBattle:: @ 81A4EC1
lock
faceplayer
applymovement VAR_LAST_TALKED, Movement_1A4FC5
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
compare VAR_RESULT, 0
goto_if_ne EventScript_1A4EE8
compare VAR_RESULT, FALSE
goto_if_ne EventScript_NoTrainerBattle
special PlayTrainerEncounterMusic
special SetUpTrainerMovement
goto EventScript_1A4FC7
goto EventScript_DoTrainerBattle
EventScript_1A4EE8:: @ 81A4EE8
EventScript_NoTrainerBattle:: @ 81A4EE8
ontrainerbattleend
EventScript_TryDoDoubleTrainerBattle:: @ 81A4EE9
lock
faceplayer
call EventScript_1A4FBA
call EventScript_RevealTrainer
specialvar VAR_RESULT, ScrSpecial_HasTrainerBeenFought
compare VAR_RESULT, 0
goto_if_ne EventScript_1A4F20
compare VAR_RESULT, FALSE
goto_if_ne EventScript_NoDoubleTrainerBattle
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_1A4F19
goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
special PlayTrainerEncounterMusic
special SetUpTrainerMovement
goto EventScript_1A4FC7
goto EventScript_DoTrainerBattle
EventScript_1A4F19:: @ 81A4F19
special ScrSpecial_ShowTrainerNonBattlingSpeech
EventScript_NotEnoughMonsForDoubleBattle:: @ 81A4F19
special ShowTrainerCantBattleSpeech
waitmessage
waitbuttonpress
release
end
EventScript_1A4F20:: @ 81A4F20
EventScript_NoDoubleTrainerBattle:: @ 81A4F20
ontrainerbattleend
EventScript_DoTrainerBattle:: @ 81A4F21
applymovement VAR_LAST_TALKED, Movement_1A4FC5
EventScript_DoNoIntroTrainerBattle:: @ 81A4F21
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
special PlayTrainerEncounterMusic
goto_if_questlog EventScript_1A501A
goto_if_questlog EventScript_EndQuestLogBattle
battlebegin
ontrainerbattleend
EventScript_TryDoRematchBattle:: @ 81A4F3E
call EventScript_1A4FBA
specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
compare VAR_RESULT, 0
goto_if_eq EventScript_1A4F72
call EventScript_RevealTrainer
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, FALSE
goto_if_eq EventScript_NoRematchBattle
special PlayTrainerEncounterMusic
special SetUpTrainerMovement
special ScrSpecial_ShowTrainerIntroSpeech
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
goto_if_questlog EventScript_1A4FB8
special ScrSpecial_StartTrainerEyeRematch
goto_if_questlog EventScript_EndQuestLogRematch
special BattleSetup_StartRematchBattle
waitstate
releaseall
end
EventScript_1A4F72:: @ 81A4F72
EventScript_NoRematchBattle:: @ 81A4F72
ontrainerbattleend
EventScript_TryDoDoubleRematchBattle:: @ 81A4F73
specialvar VAR_RESULT, ScrSpecial_GetTrainerEyeRematchFlag
compare VAR_RESULT, 0
goto_if_eq EventScript_1A4FB0
specialvar VAR_RESULT, IsTrainerReadyForRematch
compare VAR_RESULT, FALSE
goto_if_eq EventScript_NoDoubleRematchBattle
special HasEnoughMonsForDoubleBattle
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
goto_if_ne EventScript_1A4FB1
goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
special PlayTrainerEncounterMusic
special SetUpTrainerMovement
special ScrSpecial_ShowTrainerIntroSpeech
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
goto_if_questlog EventScript_1A4FB8
special ScrSpecial_StartTrainerEyeRematch
goto_if_questlog EventScript_EndQuestLogRematch
special BattleSetup_StartRematchBattle
waitstate
releaseall
end
EventScript_1A4FB0:: @ 81A4FB0
EventScript_NoDoubleRematchBattle:: @ 81A4FB0
ontrainerbattleend
EventScript_1A4FB1:: @ 81A4FB1
special ScrSpecial_ShowTrainerNonBattlingSpeech
EventScript_NotEnoughMonsForDoubleRematchBattle:: @ 81A4FB1
special ShowTrainerCantBattleSpeech
waitmessage
waitbuttonpress
release
end
EventScript_1A4FB8:: @ 81A4FB8
EventScript_EndQuestLogRematch:: @ 81A4FB8
releaseall
end
EventScript_1A4FBA:: @ 81A4FBA
applymovement VAR_LAST_TALKED, Movement_1A4FC5
EventScript_RevealTrainer:: @ 81A4FBA
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
return
Movement_1A4FC5:: @ 81A4FC5
step_67
Movement_RevealTrainer:: @ 81A4FC5
reveal_trainer
step_end
EventScript_1A4FC7:: @ 81A4FC7
special ScrSpecial_ShowTrainerIntroSpeech
EventScript_DoTrainerBattle:: @ 81A4FC7
special ShowTrainerIntroSpeech
waitmessage
waitbuttonpress
goto_if_questlog EventScript_1A501A
goto_if_questlog EventScript_EndQuestLogBattle
battlebegin
specialvar VAR_RESULT, ScrSpecial_GetTrainerBattleMode
compare VAR_RESULT, 0
goto_if_eq EventScript_1A5017
compare VAR_RESULT, 2
goto_if_eq EventScript_1A5019
compare VAR_RESULT, 1
goto_if_eq EventScript_1A5019
compare VAR_RESULT, 6
goto_if_eq EventScript_1A5019
compare VAR_RESULT, 8
goto_if_eq EventScript_1A5019
EventScript_1A5017:: @ 81A5017
specialvar VAR_RESULT, GetTrainerBattleMode
compare VAR_RESULT, TRAINER_BATTLE_SINGLE
goto_if_eq EventScript_EndTrainerBattle
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT
goto_if_eq EventScript_EndTrainerBattleContinueScript
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC
goto_if_eq EventScript_EndTrainerBattleContinueScript
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE
goto_if_eq EventScript_EndTrainerBattleContinueScript
compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC
goto_if_eq EventScript_EndTrainerBattleContinueScript
EventScript_EndTrainerBattle:: @ 81A5017
releaseall
end
EventScript_1A5019:: @ 81A5019
EventScript_EndTrainerBattleContinueScript:: @ 81A5019
ontrainerbattleendgoto
EventScript_1A501A:: @ 81A501A
EventScript_EndQuestLogBattle:: @ 81A501A
special SetBattledTrainerFlag
releaseall
end
+6 -6
View File
@@ -59,15 +59,15 @@ gSpecials:: @ 815FD60
def_special NullFieldSpecial
def_special NullFieldSpecial
def_special IsEnigmaBerryValid
def_special ScrSpecial_GetTrainerBattleMode
def_special ScrSpecial_ShowTrainerIntroSpeech
def_special ScrSpecial_ShowTrainerNonBattlingSpeech
def_special GetTrainerBattleMode
def_special ShowTrainerIntroSpeech
def_special ShowTrainerCantBattleSpeech
def_special ScrSpecial_HasTrainerBeenFought
def_special ScrSpecial_EndTrainerApproach
def_special EndTrainerApproach
def_special PlayTrainerEncounterMusic
def_special ShouldTryRematchBattle
def_special ScrSpecial_GetTrainerEyeRematchFlag
def_special ScrSpecial_StartTrainerEyeRematch
def_special IsTrainerReadyForRematch
def_special BattleSetup_StartRematchBattle
def_special ShowPokemonStorageSystem
def_special HasEnoughMonsForDoubleBattle
def_special NullFieldSpecial