diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-03-03 15:56:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 15:56:28 -0500 |
commit | 0eae6d0d07997b8a3f7c8b68ddc4077534a814a6 (patch) | |
tree | abb1db3ebe216e2bcfbc4687f082ae3d316f9024 | |
parent | 07da4225c3b911c511d055ac1c14feee995eda26 (diff) | |
parent | b6c9ad505ddac0936aa3365dfdd2f834b7aeda51 (diff) |
Merge pull request #992 from GriffinRichards/fix-trainerbattle
Minor fixes in trainer_battle.inc
-rw-r--r-- | data/scripts/trainer_battle.inc | 9 | ||||
-rw-r--r-- | include/event_scripts.h | 2 | ||||
-rw-r--r-- | 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 d609fcc93..aa96e7b35 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 a56ab89e0..d147dd4f1 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 eff57eae3..b44c7b9ec 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(); |