pokecrystal-board/engine/trainer_scripts.asm
Remy Oukaour c05b7f41dd Renaming: (fix #412)
- MapTriggers / maptrigger → SceneScripts / scene_script
- XYTriggers / xy_trigger → CoordEvents / coord_event
- Signposts / signpost → BGEvents / bg_event
- PersonEvents / person_event → ObjectEvents / object_event
2017-12-24 14:33:17 -05:00

32 lines
700 B
NASM

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