diff options
| author | vulcandth <vulcandth@gmail.com> | 2022-06-17 21:25:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-17 22:25:53 -0400 |
| commit | 10cfe0903414a572baa48e3d5a0b091ce512a4f4 (patch) | |
| tree | 0fd4c3548ef164a8454ed459d8b73ab48e96aeca /engine | |
| parent | Mention WildDataPointers in map_constants.asm (diff) | |
| download | pokeyellow-10cfe0903414a572baa48e3d5a0b091ce512a4f4.tar.gz pokeyellow-10cfe0903414a572baa48e3d5a0b091ce512a4f4.tar.xz pokeyellow-10cfe0903414a572baa48e3d5a0b091ce512a4f4.zip | |
Rename `SLP` to `SLP_MASK` (#89)
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/battle/core.asm | 14 | ||||
| -rw-r--r-- | engine/battle/move_effects/haze.asm | 2 | ||||
| -rw-r--r-- | engine/items/item_effects.asm | 12 | ||||
| -rw-r--r-- | engine/pikachu/pikachu_emotions.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/status_ailments.asm | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a4c06f58..5a2ee2af 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -317,7 +317,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 @@ -3103,7 +3103,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 @@ -3444,7 +3444,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 @@ -3486,7 +3486,7 @@ IsGhostBattle: CheckPlayerStatusConditions: ld hl, wBattleMonStatus ld a, [hl] - and SLP ; sleep mask + and SLP_MASK jr z, .FrozenCheck ; sleeping dec a @@ -4198,7 +4198,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 @@ -5542,7 +5542,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] @@ -5976,7 +5976,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 diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm index c15c848b..76722d0e 100644 --- a/engine/battle/move_effects/haze.asm +++ b/engine/battle/move_effects/haze.asm @@ -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 diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index bfb6c96e..66f7832b 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -237,7 +237,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skipAilmentValueSubtraction ; no ailments - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld c, 12 jr z, .notFrozenOrAsleep ld c, 25 @@ -394,7 +394,7 @@ ItemUseBall: ld a, [wEnemyMonStatus] and a jr z, .skip5 - and 1 << FRZ | SLP + and (1 << FRZ) | SLP_MASK ld b, 5 jr z, .addAilmentValue ld b, 10 @@ -977,7 +977,7 @@ ItemUseMedicine: lb bc, ICE_HEAL_MSG, 1 << FRZ cp ICE_HEAL jr z, .checkMonStatus - lb bc, AWAKENING_MSG, SLP + lb bc, AWAKENING_MSG, SLP_MASK cp AWAKENING jr z, .checkMonStatus lb bc, PARALYZ_HEAL_MSG, 1 << PAR @@ -1894,7 +1894,7 @@ ItemUsePokeflute: .inBattle xor a ld [wWereAnyMonsAsleep], a - ld b, ~SLP & $ff + ld b, ~SLP_MASK ld hl, wPartyMon1Status call WakeUpEntireParty ld a, [wIsInBattle] @@ -1914,7 +1914,7 @@ ItemUsePokeflute: and b ; remove Sleep status ld [hl], a ld a, c - and SLP + and SLP_MASK jr z, .asm_e063 ld a, $1 ld [wWereAnyMonsAsleep], a @@ -1953,7 +1953,7 @@ WakeUpEntireParty: .loop ld a, [hl] push af - and SLP ; is pokemon asleep? + and SLP_MASK jr z, .notAsleep ld a, 1 ld [wWereAnyMonsAsleep], a ; indicate that a pokemon had to be woken up diff --git a/engine/pikachu/pikachu_emotions.asm b/engine/pikachu/pikachu_emotions.asm index 03717916..ae5d662e 100644 --- a/engine/pikachu/pikachu_emotions.asm +++ b/engine/pikachu/pikachu_emotions.asm @@ -390,7 +390,7 @@ IsPlayerPikachuAsleepInParty: ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hl] - and SLP + and SLP_MASK jr z, .done jr .curMonSleepingPikachu diff --git a/engine/pokemon/status_ailments.asm b/engine/pokemon/status_ailments.asm index 3da1fc43..05205a34 100644 --- a/engine/pokemon/status_ailments.asm +++ b/engine/pokemon/status_ailments.asm @@ -8,7 +8,7 @@ PrintStatusAilment:: jr nz, .frz bit PAR, a jr nz, .par - and SLP + and SLP_MASK ret z ld a, "S" ld [hli], a |
