summaryrefslogtreecommitdiff
path: root/events/trainer_scripts.asm
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-26 21:55:57 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-26 21:55:57 -0500
commitdae16acd6f4e2e2c177e3776be6ed549af070c4f (patch)
tree2577502f3ccc185e772ef121ba52fa3fddfd95c2 /events/trainer_scripts.asm
parent2a565f747ccb8099f4057548a6d598d538e6b991 (diff)
event/ → events/, and move some appropriate engine/ files there
Diffstat (limited to 'events/trainer_scripts.asm')
-rw-r--r--events/trainer_scripts.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/events/trainer_scripts.asm b/events/trainer_scripts.asm
new file mode 100644
index 000000000..212cd7f28
--- /dev/null
+++ b/events/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