Replace magic number $7 with SLP_MASK constant (#555)

This commit is contained in:
Jordan Moore 2025-12-26 12:20:49 -05:00 committed by GitHub
parent d79c578abd
commit 0555b42dc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,7 @@ SleepEffect:
; including the event where the target already has another status
ld a, [de]
ld b, a
and $7
and SLP_MASK
jr z, .notAlreadySleeping ; can't affect a mon that is already asleep
ld hl, AlreadyAsleepText
jp PrintText
@ -58,7 +58,7 @@ SleepEffect:
.setSleepCounter
; set target's sleep counter to a random number between 1 and 7
call BattleRandom
and $7
and SLP_MASK
jr z, .setSleepCounter
ld [de], a
call PlayCurrentMoveAnimation2