summaryrefslogtreecommitdiff
path: root/engine/battle/trainer_scripts.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/trainer_scripts.asm')
-rw-r--r--engine/battle/trainer_scripts.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/battle/trainer_scripts.asm b/engine/battle/trainer_scripts.asm
new file mode 100644
index 000000000..212cd7f28
--- /dev/null
+++ b/engine/battle/trainer_scripts.asm
@@ -0,0 +1,31 @@
+TalkToTrainerScript:: ; 0xbe66a
+ faceplayer
+ trainerflagaction CHECK_FLAG
+ iftrue AlreadyBeatenTrainerScript
+ loadmemtrainer
+ encountermusic
+ jump StartBattleWithMapTrainerScript
+
+SeenByTrainerScript:: ; 0xbe675
+ loadmemtrainer
+ encountermusic
+ showemote EMOTE_SHOCK, LAST_TALKED, 30
+ callasm TrainerWalkToPlayer
+ applymovement2 MovementBuffer
+ writeobjectxy LAST_TALKED
+ faceobject PLAYER, LAST_TALKED
+ jump StartBattleWithMapTrainerScript
+
+StartBattleWithMapTrainerScript: ; 0xbe68a
+ opentext
+ trainertext $0
+ waitbutton
+ closetext
+ loadmemtrainer
+ startbattle
+ reloadmapafterbattle
+ trainerflagaction SET_FLAG
+ loadvar wRunningTrainerBattleScript, -1
+
+AlreadyBeatenTrainerScript:
+ scripttalkafter