You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Rename SLP
to SLP_MASK
(#918)
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
This commit is contained in:
@@ -319,7 +319,7 @@ AI_Items:
|
||||
jp c, .Use
|
||||
.FailToxicCheck:
|
||||
ld a, [wEnemyMonStatus]
|
||||
and 1 << FRZ | SLP
|
||||
and 1 << FRZ | SLP_MASK
|
||||
jp z, .DontUse
|
||||
jp .Use
|
||||
|
||||
|
@@ -102,7 +102,7 @@ AI_Redundant:
|
||||
.Snore:
|
||||
.SleepTalk:
|
||||
ld a, [wEnemyMonStatus]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
@@ -166,7 +166,7 @@ AI_Redundant:
|
||||
|
||||
.DreamEater:
|
||||
ld a, [wBattleMonStatus]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .Redundant
|
||||
jr .NotRedundant
|
||||
|
||||
|
@@ -1472,7 +1472,7 @@ AI_Smart_SleepTalk:
|
||||
; Greatly discourage this move otherwise.
|
||||
|
||||
ld a, [wEnemyMonStatus]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
cp 1
|
||||
jr z, .discourage
|
||||
|
||||
@@ -1610,7 +1610,7 @@ AI_Smart_HealBell:
|
||||
jr z, .ok
|
||||
dec [hl]
|
||||
.ok
|
||||
and 1 << FRZ | SLP
|
||||
and 1 << FRZ | SLP_MASK
|
||||
ret z
|
||||
call AI_50_50
|
||||
ret c
|
||||
|
@@ -765,7 +765,7 @@ TryEnemyFlee:
|
||||
jr nz, .Stay
|
||||
|
||||
ld a, [wEnemyMonStatus]
|
||||
and 1 << FRZ | SLP
|
||||
and 1 << FRZ | SLP_MASK
|
||||
jr nz, .Stay
|
||||
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
|
@@ -147,12 +147,12 @@ BattleCommand_CheckTurn:
|
||||
|
||||
ld hl, wBattleMonStatus
|
||||
ld a, [hl]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .not_asleep
|
||||
|
||||
dec a
|
||||
ld [wBattleMonStatus], a
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .woke_up
|
||||
|
||||
xor a
|
||||
@@ -376,7 +376,7 @@ CheckEnemyTurn:
|
||||
|
||||
ld hl, wEnemyMonStatus
|
||||
ld a, [hl]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .not_asleep
|
||||
|
||||
dec a
|
||||
@@ -772,7 +772,7 @@ BattleCommand_CheckObedience:
|
||||
call BattleRandom
|
||||
add a
|
||||
swap a
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .Nap
|
||||
|
||||
ld [wBattleMonStatus], a
|
||||
@@ -925,7 +925,7 @@ IgnoreSleepOnly:
|
||||
.CheckSleep:
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ret z
|
||||
|
||||
; 'ignored orders…sleeping!'
|
||||
@@ -1636,7 +1636,7 @@ BattleCommand_CheckHit:
|
||||
|
||||
ld a, BATTLE_VARS_STATUS_OPP
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ret
|
||||
|
||||
.Protect:
|
||||
@@ -3589,7 +3589,7 @@ BattleCommand_SleepTarget:
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld a, [de]
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ld hl, AlreadyAsleepText
|
||||
jr nz, .fail
|
||||
|
||||
@@ -3609,7 +3609,7 @@ BattleCommand_SleepTarget:
|
||||
jr nz, .fail
|
||||
|
||||
call AnimateCurrentMove
|
||||
ld b, SLP
|
||||
ld b, SLP_MASK
|
||||
ld a, [wInBattleTowerBattle]
|
||||
and a
|
||||
jr z, .random_loop
|
||||
@@ -3619,7 +3619,7 @@ BattleCommand_SleepTarget:
|
||||
call BattleRandom
|
||||
and b
|
||||
jr z, .random_loop
|
||||
cp SLP
|
||||
cp SLP_MASK
|
||||
jr z, .random_loop
|
||||
inc a
|
||||
ld [de], a
|
||||
@@ -4926,7 +4926,7 @@ BattleCommand_Rampage:
|
||||
; No rampage during Sleep Talk.
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ret nz
|
||||
|
||||
ld de, wPlayerRolloutCount
|
||||
@@ -5344,7 +5344,7 @@ BattleCommand_FakeOut:
|
||||
|
||||
ld a, BATTLE_VARS_STATUS_OPP
|
||||
call GetBattleVar
|
||||
and 1 << FRZ | SLP
|
||||
and 1 << FRZ | SLP_MASK
|
||||
jr nz, .fail
|
||||
|
||||
call CheckOpponentWentFirst
|
||||
@@ -5361,7 +5361,7 @@ BattleCommand_FlinchTarget:
|
||||
|
||||
ld a, BATTLE_VARS_STATUS_OPP
|
||||
call GetBattleVar
|
||||
and 1 << FRZ | SLP
|
||||
and 1 << FRZ | SLP_MASK
|
||||
ret nz
|
||||
|
||||
call CheckOpponentWentFirst
|
||||
@@ -5477,7 +5477,7 @@ BattleCommand_Charge:
|
||||
call BattleCommand_ClearText
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .awake
|
||||
|
||||
call BattleCommand_MoveDelay
|
||||
|
@@ -128,7 +128,7 @@ ResetBatonPassStatus:
|
||||
; Nightmare isn't passed.
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr nz, .ok
|
||||
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
|
@@ -13,7 +13,7 @@ BattleCommand_Nightmare:
|
||||
|
||||
ld a, BATTLE_VARS_STATUS_OPP
|
||||
call GetBattleVarAddr
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .failed
|
||||
|
||||
; Bail if the opponent is already having a nightmare.
|
||||
|
@@ -23,7 +23,7 @@ BattleCommand_CheckCurl:
|
||||
BattleCommand_RolloutPower:
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ret nz
|
||||
|
||||
ld hl, wPlayerRolloutCount
|
||||
|
@@ -15,7 +15,7 @@ BattleCommand_SleepTalk:
|
||||
.got_moves
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
jr z, .fail
|
||||
ld a, [hl]
|
||||
and a
|
||||
|
@@ -1,7 +1,7 @@
|
||||
BattleCommand_Snore:
|
||||
ld a, BATTLE_VARS_STATUS
|
||||
call GetBattleVar
|
||||
and SLP
|
||||
and SLP_MASK
|
||||
ret nz
|
||||
call ResetDamage
|
||||
ld a, $1
|
||||
|
Reference in New Issue
Block a user