You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Implement talker events [commit 2] (#30)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
TalkToTrainerScript::
|
||||
faceplayer
|
||||
trainerflagaction CHECK_FLAG
|
||||
trainerortalkerflagaction CHECK_FLAG
|
||||
iftrue AlreadyBeatenTrainerScript
|
||||
loadtemptrainer
|
||||
encountermusic
|
||||
@@ -25,7 +25,7 @@ StartBattleWithMapTrainerScript:
|
||||
loadtemptrainer
|
||||
startbattle
|
||||
reloadmapafterbattle
|
||||
trainerflagaction SET_FLAG
|
||||
trainerortalkerflagaction SET_FLAG
|
||||
loadmem wRunningTrainerBattleScript, -1
|
||||
|
||||
AlreadyBeatenTrainerScript:
|
||||
@@ -34,8 +34,30 @@ AlreadyBeatenTrainerScript:
|
||||
SeenByTalkerScript::
|
||||
waitsfx ; wait for any pending space-related sfx
|
||||
showemote EMOTE_TALK, LAST_TALKED, 20
|
||||
callasm .TalkOrSkipTalker
|
||||
iffalse .skipped
|
||||
callasm TrainerOrTalkerWalkToPlayer
|
||||
applymovementlasttalked wMovementBuffer
|
||||
writeobjectxy LAST_TALKED
|
||||
faceobject PLAYER, LAST_TALKED
|
||||
.skipped
|
||||
end
|
||||
|
||||
.TalkOrSkipTalker:
|
||||
ld a, [wTempTalkerType]
|
||||
and %1
|
||||
cp TALKEREVENTTYPE_MANDATORY
|
||||
jr z, .skip
|
||||
call WaitButton
|
||||
call PlayClickSFX
|
||||
call WaitSFX
|
||||
ldh a, [hJoyPressed]
|
||||
bit A_BUTTON_F, a
|
||||
jr z, .skip ; jump if b was pressed
|
||||
ld a, TRUE
|
||||
jr .done
|
||||
.skip
|
||||
xor a ; FALSE
|
||||
.done
|
||||
ld [hScriptVar], a
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user