summaryrefslogtreecommitdiff
path: root/engine/trainer_scripts.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-12-23 13:17:46 -0500
committerGitHub <noreply@github.com>2017-12-23 13:17:46 -0500
commit878092004956418bfd77bfdb9fc9dd7f640f80d2 (patch)
tree3a97e3eb15d5c545977038e67589f92158e5bf23 /engine/trainer_scripts.asm
parenta6656a986bf9dde51561cab090648e0117b173ad (diff)
parent3c37bfc6fa2570a0a77c1230673910257ecf32df (diff)
Merge pull request #419 from roukaour/master
More reorganization and documentation
Diffstat (limited to 'engine/trainer_scripts.asm')
-rw-r--r--engine/trainer_scripts.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/trainer_scripts.asm b/engine/trainer_scripts.asm
new file mode 100644
index 000000000..33dab3b9e
--- /dev/null
+++ b/engine/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
+ writepersonxy LAST_TALKED
+ faceperson PLAYER, LAST_TALKED
+ jump StartBattleWithMapTrainerScript
+
+StartBattleWithMapTrainerScript: ; 0xbe68a
+ opentext
+ trainertext $0
+ waitbutton
+ closetext
+ loadmemtrainer
+ startbattle
+ reloadmapafterbattle
+ trainerflagaction SET_FLAG
+ loadvar wRunningTrainerBattleScript, -1
+
+AlreadyBeatenTrainerScript:
+ scripttalkafter