From a486ec76576409c3c5cd53acbf846dd96972f77d Mon Sep 17 00:00:00 2001 From: Martha Schilling Date: Thu, 4 Jan 2024 22:49:02 +0000 Subject: [PATCH] Update LancesRoom.asm this always bugged me so I'm importing this small change from PureRGB --- scripts/LancesRoom.asm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm index 020923ba..e50a3cae 100644 --- a/scripts/LancesRoom.asm +++ b/scripts/LancesRoom.asm @@ -61,6 +61,7 @@ LanceScript0: ld a, [wCoordIndex] cp $3 ; Is player standing next to Lance's sprite? jr nc, .notStandingNextToLance + call DoFacings ld a, $1 ldh [hSpriteIndexOrTextID], a jp DisplayTextID @@ -179,3 +180,19 @@ LanceRematchAfterBattleText: text_asm SetEvent EVENT_BEAT_LANCE jp TextScriptEnd + +DoFacings: ; PureRGBnote: ADDED: when about to fight Lance, lance and the player will face each other properly to talk. + ld a, [wYCoord] + cp 1 + jr z, .leftOfLance + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + ret +.leftOfLance + ld a, PLAYER_DIR_RIGHT + ld [wPlayerMovingDirection], a + ld a, 1 + ldh [hSpriteIndex], a + ld a, SPRITE_FACING_LEFT + ldh [hSpriteFacingDirection], a + jp SetSpriteFacingDirection