summaryrefslogtreecommitdiff
path: root/engine/events/trainer_scripts.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-12-28 01:30:36 -0500
committerGitHub <noreply@github.com>2017-12-28 01:30:36 -0500
commitda28d1a84b0499bead314e17ae2ff0d13eb03196 (patch)
treec212adfc53d1996c06f2e4be1d6e480e687a2ad8 /engine/events/trainer_scripts.asm
parentbad9e33530af8cdc29ce5629df682fc7915bfff0 (diff)
parent2c4777f3363cd64d05fb00084fd83dff8ac31674 (diff)
Merge pull request #437 from roukaour/master
Reorganize battle/; rename most "header" misnomers; gfx/pics → gfx/pokemon
Diffstat (limited to 'engine/events/trainer_scripts.asm')
-rw-r--r--engine/events/trainer_scripts.asm31
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/events/trainer_scripts.asm b/engine/events/trainer_scripts.asm
new file mode 100644
index 000000000..212cd7f28
--- /dev/null
+++ b/engine/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