Merge branch 'mistress' into renewables

This commit is contained in:
Thorn Avery 2024-01-20 12:35:08 +13:00
commit 467432e564
2 changed files with 14 additions and 11 deletions

View file

@ -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

View file

@ -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