summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2015-04-09 11:30:04 +0200
committerxCrystal <rgr.crystal@gmail.com>2015-04-09 11:35:37 +0200
commit9c93ef3bff67f0f3ded2856b612ec632f22b2d46 (patch)
tree2a73987b952797013e9f93c0c3d2b1db8037c94e
parent61edd43974bf53aaacf96a355ebf2d1e35b59c91 (diff)
user xor operator for clearing status flags
use xor operator for clearing status flags
-rwxr-xr-xengine/battle/core.asm10
-rw-r--r--engine/battle/moveEffects/haze_effect.asm2
2 files changed, 6 insertions, 6 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index f81e60d8..905c649c 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3509,7 +3509,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld hl,W_PLAYERBATTSTATUS1
ld a,[hl]
; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage)
- and a, (1 << AttackingMultipleTimes) | (1 << Flinched) | (1 << Invulnerable) | (1 << Confused)
+ and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl],a
ld a,[W_PLAYERMOVEEFFECT]
cp a,FLY_EFFECT
@@ -3585,12 +3585,12 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld hl,ThrashingAboutText
call PrintText
ld hl,wPlayerNumAttacksLeft
- dec [hl] ; did Trashing About counter hit 0?
+ dec [hl] ; did Thrashing About counter hit 0?
ld hl,PlayerCalcMoveDamage ; skip DecrementPP
jp nz,.returnToHL
push hl
ld hl,W_PLAYERBATTSTATUS1
- res ThrashingAbout,[hl] ; no longer trashing about
+ res ThrashingAbout,[hl] ; no longer thrashing about
set Confused,[hl] ; confused
call BattleRandom
and a,3
@@ -6023,7 +6023,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, W_ENEMYBATTSTATUS1
ld a, [hl]
; clear bide, thrashing about, charging up, and multi-turn moves such as warp
- and (1 << AttackingMultipleTimes) | (1 << Flinched) | (1 << Invulnerable) | (1 << Confused)
+ and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl], a
ld a, [W_ENEMYMOVEEFFECT]
cp FLY_EFFECT
@@ -6097,7 +6097,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ThrashingAboutText
call PrintText
ld hl, wEnemyNumAttacksLeft
- dec [hl] ; did Trashing About counter hit 0?
+ dec [hl] ; did Thrashing About counter hit 0?
ld hl, EnemyCalcMoveDamage ; skip DecrementPP
jp nz, .enemyReturnToHL
push hl
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm
index bf6d4ad2..14b5f5dd 100644
--- a/engine/battle/moveEffects/haze_effect.asm
+++ b/engine/battle/moveEffects/haze_effect.asm
@@ -51,7 +51,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
inc hl ; BATTSTATUS2
ld a, [hl]
; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses
- and (1 << UsingRage) | (1 << NeedsToRecharge) | (1 << HasSubstituteUp) | (1 << 3)
+ and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
ld [hli], a ; BATTSTATUS3
ld a, [hl]
and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses