mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
prevent static wild mon NPCs from refusing to hide after battle
This commit is contained in:
parent
dd71684561
commit
7d13d34093
|
@ -6981,6 +6981,9 @@ PlayMoveAnimation:
|
||||||
predef_jump MoveAnimation
|
predef_jump MoveAnimation
|
||||||
|
|
||||||
InitBattle::
|
InitBattle::
|
||||||
|
xor a
|
||||||
|
ld [wWasTrainerBattle], a ;Remember to clear wWasTrainerBattle from any previous battles,
|
||||||
|
;because this new battle could be a static wild encounter.
|
||||||
ld a, [wCurOpponent]
|
ld a, [wCurOpponent]
|
||||||
and a
|
and a
|
||||||
jr z, DetermineWildOpponent
|
jr z, DetermineWildOpponent
|
||||||
|
|
|
@ -142,20 +142,20 @@ HideObject:
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, FLAG_SET
|
ld b, FLAG_SET
|
||||||
call MissableObjectFlagAction ; set "removed" flag
|
call MissableObjectFlagAction ; set "removed" flag
|
||||||
call VerifyObjectState
|
; call VerifyObjectState
|
||||||
jr z, HideObject
|
; jr z, HideObject
|
||||||
jp UpdateSprites
|
jp UpdateSprites
|
||||||
|
|
||||||
;returns z flag set if shown and z flag cleared if hidden
|
;returns z flag set if shown and z flag cleared if hidden
|
||||||
VerifyObjectState:
|
;VerifyObjectState:
|
||||||
ld hl, wMissableObjectFlags
|
; ld hl, wMissableObjectFlags
|
||||||
ld a, [wMissableObjectIndex]
|
; ld a, [wMissableObjectIndex]
|
||||||
ld c, a
|
; ld c, a
|
||||||
ld b, FLAG_TEST
|
; ld b, FLAG_TEST
|
||||||
call MissableObjectFlagAction
|
; call MissableObjectFlagAction
|
||||||
ld a, c
|
; ld a, c
|
||||||
and a
|
; and a
|
||||||
ret
|
; ret
|
||||||
|
|
||||||
MissableObjectFlagAction:
|
MissableObjectFlagAction:
|
||||||
; identical to FlagAction
|
; identical to FlagAction
|
||||||
|
|
Loading…
Reference in a new issue