prevent static wild mon NPCs from refusing to hide after battle

This commit is contained in:
jojobear13 2024-01-14 23:57:43 -06:00
parent dd71684561
commit 7d13d34093
2 changed files with 14 additions and 11 deletions

View file

@ -142,20 +142,20 @@ HideObject:
ld c, a
ld b, FLAG_SET
call MissableObjectFlagAction ; set "removed" flag
call VerifyObjectState
jr z, HideObject
; call VerifyObjectState
; jr z, HideObject
jp UpdateSprites
;returns z flag set if shown and z flag cleared if hidden
VerifyObjectState:
ld hl, wMissableObjectFlags
ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_TEST
call MissableObjectFlagAction
ld a, c
and a
ret
;VerifyObjectState:
; ld hl, wMissableObjectFlags
; ld a, [wMissableObjectIndex]
; ld c, a
; ld b, FLAG_TEST
; call MissableObjectFlagAction
; ld a, c
; and a
; ret
MissableObjectFlagAction:
; identical to FlagAction