Rename SLP to SLP_MASK (#361)

Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
This commit is contained in:
vulcandth 2022-06-17 21:25:52 -05:00 committed by GitHub
parent 6c945a6b6a
commit edb55e00f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View file

@ -308,7 +308,7 @@ MainInBattleLoop:
and a
ret nz ; return if pokedoll was used to escape from battle
ld a, [wBattleMonStatus]
and (1 << FRZ) | SLP ; is mon frozen or asleep?
and (1 << FRZ) | SLP_MASK
jr nz, .selectEnemyMove ; if so, jump
ld a, [wPlayerBattleStatus1]
and (1 << STORING_ENERGY) | (1 << USING_TRAPPING_MOVE) ; check player is using Bide or using a multi-turn attack like wrap
@ -2934,7 +2934,7 @@ SelectEnemyMove:
and (1 << CHARGING_UP) | (1 << THRASHING_ABOUT) ; using a charging move or thrash/petal dance
ret nz
ld a, [wEnemyMonStatus]
and SLP | 1 << FRZ ; sleeping or frozen
and (1 << FRZ) | SLP_MASK
ret nz
ld a, [wEnemyBattleStatus1]
and (1 << USING_TRAPPING_MOVE) | (1 << STORING_ENERGY) ; using a trapping move like wrap or bide
@ -3275,7 +3275,7 @@ PrintGhostText:
and a
jr nz, .Ghost
ld a, [wBattleMonStatus] ; player's turn
and SLP | (1 << FRZ)
and (1 << FRZ) | SLP_MASK
ret nz
ld hl, ScaredText
call PrintText
@ -3317,7 +3317,7 @@ IsGhostBattle:
CheckPlayerStatusConditions:
ld hl, wBattleMonStatus
ld a, [hl]
and SLP ; sleep mask
and SLP_MASK
jr z, .FrozenCheck
; sleeping
dec a
@ -4029,7 +4029,7 @@ CheckForDisobedience:
call BattleRandom
add a
swap a
and SLP ; sleep mask
and SLP_MASK
jr z, .monNaps ; keep trying until we get at least 1 turn of sleep
ld [wBattleMonStatus], a
ld hl, BeganToNapText
@ -5362,7 +5362,7 @@ MoveHitTest:
cp DREAM_EATER_EFFECT
jr nz, .swiftCheck
ld a, [bc]
and SLP ; is the target pokemon sleeping?
and SLP_MASK
jp z, .moveMissed
.swiftCheck
ld a, [de]
@ -5796,7 +5796,7 @@ ExecuteEnemyMoveDone:
CheckEnemyStatusConditions:
ld hl, wEnemyMonStatus
ld a, [hl]
and SLP ; sleep mask
and SLP_MASK
jr z, .checkIfFrozen
dec a ; decrement number of turns left
ld [wEnemyMonStatus], a

View file

@ -24,7 +24,7 @@ HazeEffect_:
.cureStatuses
ld a, [hl]
ld [hl], $0
and SLP | (1 << FRZ)
and (1 << FRZ) | SLP_MASK
jr z, .cureVolatileStatuses
; prevent the Pokemon from executing a move if it was asleep or frozen
ld a, $ff