From b6c9ad505ddac0936aa3365dfdd2f834b7aeda51 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 3 Mar 2020 14:47:14 -0500 Subject: [PATCH] Minor fixes in trainer_battle.inc --- data/scripts/trainer_battle.inc | 9 ++++----- include/event_scripts.h | 2 +- src/battle_setup.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc index d609fcc932..aa96e7b35f 100644 --- a/data/scripts/trainer_battle.inc +++ b/data/scripts/trainer_battle.inc @@ -44,7 +44,7 @@ EventScript_NotEnoughMonsForDoubleBattle:: @ 82713BA EventScript_NoDoubleTrainerBattle:: @ 82713C1 gotopostbattlescript -EventScript_DoTainerBattle:: @ 82713C2 +EventScript_DoNoIntroTrainerBattle:: @ 82713C2 applymovement VAR_LAST_TALKED, Movement_RevealTrainer waitmovement 0 special SetUpTrainerEncounterMusic @@ -54,7 +54,7 @@ EventScript_DoTainerBattle:: @ 82713C2 EventScript_TryDoRematchBattle:: @ 82713D1 call EventScript_RevealTrainer specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, 0 + compare VAR_RESULT, FALSE goto_if_eq EventScript_NoRematchTrainerBattle special SetUpTrainerEncounterMusic special SetUpTrainerMovement @@ -70,7 +70,7 @@ EventScript_NoRematchTrainerBattle:: @ 82713F7 EventScript_TryDoDoubleRematchBattle:: @ 82713F8 specialvar VAR_RESULT, IsTrainerReadyForRematch - compare VAR_RESULT, 0 + compare VAR_RESULT, FALSE goto_if_eq EventScript_NoDoubleRematchTrainerBattle special HasEnoughMonsForDoubleBattle compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS @@ -113,7 +113,7 @@ EventScript_ShowTrainerIntroMsg:: @ 827143C EventScript_DoTrainerBattle:: @ 8271454 trainerbattlebegin - @ Pointless check, possibly used for debugging? + @ Below battle mode check only needed in FRLG specialvar VAR_RESULT, GetTrainerBattleMode compare VAR_RESULT, TRAINER_BATTLE_SINGLE goto_if_eq EventScript_EndTrainerBattle @@ -125,7 +125,6 @@ EventScript_DoTrainerBattle:: @ 8271454 goto_if_eq EventScript_EndTrainerBattle compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC goto_if_eq EventScript_EndTrainerBattle - EventScript_EndTrainerBattle:: @ 8271491 gotobeatenscript releaseall diff --git a/include/event_scripts.h b/include/event_scripts.h index a56ab89e02..d147dd4f1d 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -4,7 +4,7 @@ extern const u8 EventScript_TestSignpostMsg[]; extern const u8 EventScript_TryGetTrainerScript[]; extern const u8 EventScript_271354[]; -extern const u8 EventScript_DoTainerBattle[]; +extern const u8 EventScript_DoNoIntroTrainerBattle[]; extern const u8 EventScript_TryDoDoubleTrainerBattle[]; extern const u8 EventScript_TryDoNormalTrainerBattle[]; extern const u8 EventScript_TryDoDoubleRematchBattle[]; diff --git a/src/battle_setup.c b/src/battle_setup.c index eff57eae34..b44c7b9ec9 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1087,7 +1087,7 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) { case TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT: TrainerBattleLoadArgs(sOrdinaryNoIntroBattleParams, data); - return EventScript_DoTainerBattle; + return EventScript_DoNoIntroTrainerBattle; case TRAINER_BATTLE_DOUBLE: TrainerBattleLoadArgs(sDoubleBattleParams, data); SetMapVarsToTrainer();