pokecrystal/engine/events/trainer_scripts.asm

32 lines
671 B
NASM
Raw Normal View History

TalkToTrainerScript::
faceplayer
trainerflagaction CHECK_FLAG
iftrue AlreadyBeatenTrainerScript
loadmemtrainer
encountermusic
jump StartBattleWithMapTrainerScript
SeenByTrainerScript::
loadmemtrainer
encountermusic
showemote EMOTE_SHOCK, LAST_TALKED, 30
callasm TrainerWalkToPlayer
2018-01-23 22:39:09 +00:00
applymovement2 wMovementBuffer
writeobjectxy LAST_TALKED
faceobject PLAYER, LAST_TALKED
jump StartBattleWithMapTrainerScript
StartBattleWithMapTrainerScript:
opentext
trainertext $0
waitbutton
closetext
loadmemtrainer
startbattle
reloadmapafterbattle
trainerflagaction SET_FLAG
loadvar wRunningTrainerBattleScript, -1
AlreadyBeatenTrainerScript:
scripttalkafter