summaryrefslogtreecommitdiff
path: root/data/scripts/trainer_battle.inc
diff options
context:
space:
mode:
Diffstat (limited to 'data/scripts/trainer_battle.inc')
-rw-r--r--data/scripts/trainer_battle.inc36
1 files changed, 12 insertions, 24 deletions
diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc
index 38cf63281..bbbcaf3ba 100644
--- a/data/scripts/trainer_battle.inc
+++ b/data/scripts/trainer_battle.inc
@@ -13,8 +13,7 @@ EventScript_TryDoNormalTrainerBattle::
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
waitmovement 0
specialvar VAR_RESULT, GetTrainerFlag
- compare VAR_RESULT, FALSE
- goto_if_ne EventScript_NoNormalTrainerBattle
+ goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
goto EventScript_ShowTrainerIntroMsg
@@ -27,11 +26,9 @@ EventScript_TryDoDoubleTrainerBattle::
faceplayer
call EventScript_RevealTrainer
specialvar VAR_RESULT, GetTrainerFlag
- compare VAR_RESULT, FALSE
- goto_if_ne EventScript_NoDoubleTrainerBattle
+ goto_if_ne VAR_RESULT, FALSE, EventScript_NoDoubleTrainerBattle
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
- goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
+ goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleBattle
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
goto EventScript_ShowTrainerIntroMsg
@@ -56,8 +53,7 @@ EventScript_DoNoIntroTrainerBattle::
EventScript_TryDoRematchBattle::
call EventScript_RevealTrainer
specialvar VAR_RESULT, IsTrainerReadyForRematch
- compare VAR_RESULT, FALSE
- goto_if_eq EventScript_NoRematchTrainerBattle
+ goto_if_eq VAR_RESULT, FALSE, EventScript_NoRematchTrainerBattle
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
special ShowTrainerIntroSpeech
@@ -73,11 +69,9 @@ EventScript_NoRematchTrainerBattle::
EventScript_TryDoDoubleRematchBattle::
specialvar VAR_RESULT, IsTrainerReadyForRematch
- compare VAR_RESULT, FALSE
- goto_if_eq EventScript_NoDoubleRematchTrainerBattle
+ goto_if_eq VAR_RESULT, FALSE, EventScript_NoDoubleRematchTrainerBattle
special HasEnoughMonsForDoubleBattle
- compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
- goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
+ goto_if_ne VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS, EventScript_NotEnoughMonsForDoubleRematchBattle
special PlayTrainerEncounterMusic
special SetTrainerFacingDirection
special ShowTrainerIntroSpeech
@@ -112,24 +106,18 @@ EventScript_ShowTrainerIntroMsg::
waitmessage
waitbuttonpress
special TryPrepareSecondApproachingTrainer
- compare VAR_RESULT, TRUE
- goto_if_eq EventScript_TrainerApproach
+ goto_if_eq VAR_RESULT, TRUE, EventScript_TrainerApproach
goto EventScript_DoTrainerBattle
EventScript_DoTrainerBattle::
dotrainerbattle
@ Below battle mode check only needed in FRLG
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_EndTrainerBattle
- compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC
- goto_if_eq EventScript_EndTrainerBattle
- compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE
- goto_if_eq EventScript_EndTrainerBattle
- compare VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC
- goto_if_eq EventScript_EndTrainerBattle
+ goto_if_eq VAR_RESULT, TRAINER_BATTLE_SINGLE, EventScript_EndTrainerBattle
+ goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT, EventScript_EndTrainerBattle
+ goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC, EventScript_EndTrainerBattle
+ goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE, EventScript_EndTrainerBattle
+ goto_if_eq VAR_RESULT, TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC, EventScript_EndTrainerBattle
EventScript_EndTrainerBattle::
gotobeatenscript
releaseall