mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Uppercase battle status constants
This commit is contained in:
parent
9dc48a1be7
commit
94b9a86c8b
14 changed files with 158 additions and 158 deletions
|
|
@ -11,7 +11,7 @@ ConversionEffect_:
|
|||
pop de
|
||||
ld a, [wPlayerBattleStatus1]
|
||||
.conversionEffect
|
||||
bit Invulnerable, a ; is mon immune to typical attacks (dig/fly)
|
||||
bit INVULNERABLE, a ; is mon immune to typical attacks (dig/fly)
|
||||
jr nz, PrintButItFailedText
|
||||
; copy target's types to user
|
||||
ld a, [hli]
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ FocusEnergyEffect_:
|
|||
jr z, .notEnemy
|
||||
ld hl, wEnemyBattleStatus2
|
||||
.notEnemy
|
||||
bit GettingPumped, [hl] ; is mon already using focus energy?
|
||||
bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
|
||||
jr nz, .alreadyUsing
|
||||
set GettingPumped, [hl] ; mon is now using focus energy
|
||||
set GETTING_PUMPED, [hl] ; mon is now using focus energy
|
||||
callab PlayCurrentMoveAnimation
|
||||
ld hl, GettingPumpedText
|
||||
jp PrintText
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ HazeEffect_:
|
|||
jp PrintText
|
||||
|
||||
CureVolatileStatuses:
|
||||
res Confused, [hl]
|
||||
res CONFUSED, [hl]
|
||||
inc hl ; BATTSTATUS2
|
||||
ld a, [hl]
|
||||
; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses
|
||||
and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
|
||||
; clear USING_X_ACCURACY, PROTECTED_BY_MIST, GETTING_PUMPED, and SEEDED statuses
|
||||
and $ff ^((1 << USING_X_ACCURACY) | (1 << PROTECTED_BY_MIST) | (1 << GETTING_PUMPED) | (1 << SEEDED))
|
||||
ld [hli], a ; BATTSTATUS3
|
||||
ld a, [hl]
|
||||
and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses
|
||||
and %11110000 | (1 << TRANSFORMED) ; clear Bad Poison, Reflect and Light Screen statuses
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ LeechSeedEffect_:
|
|||
ld a, [de]
|
||||
cp GRASS
|
||||
jr z, .moveMissed
|
||||
bit Seeded, [hl]
|
||||
bit SEEDED, [hl]
|
||||
jr nz, .moveMissed
|
||||
set Seeded, [hl]
|
||||
set SEEDED, [hl]
|
||||
callab PlayCurrentMoveAnimation
|
||||
ld hl, WasSeededText
|
||||
jp PrintText
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ MistEffect_:
|
|||
jr z, .mistEffect
|
||||
ld hl, wEnemyBattleStatus2
|
||||
.mistEffect
|
||||
bit ProtectedByMist, [hl] ; is mon protected by mist?
|
||||
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
|
||||
jr nz, .mistAlreadyInUse
|
||||
set ProtectedByMist, [hl] ; mon is now protected by mist
|
||||
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
|
||||
callab PlayCurrentMoveAnimation
|
||||
ld hl, ShroudedInMistText
|
||||
jp PrintText
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ ReflectLightScreenEffect_:
|
|||
ld a, [de]
|
||||
cp LIGHT_SCREEN_EFFECT
|
||||
jr nz, .reflect
|
||||
bit HasLightScreenUp, [hl] ; is mon already protected by light screen?
|
||||
bit HAS_LIGHT_SCREEN_UP, [hl] ; is mon already protected by light screen?
|
||||
jr nz, .moveFailed
|
||||
set HasLightScreenUp, [hl] ; mon is now protected by light screen
|
||||
set HAS_LIGHT_SCREEN_UP, [hl] ; mon is now protected by light screen
|
||||
ld hl, LightScreenProtectedText
|
||||
jr .playAnim
|
||||
.reflect
|
||||
bit HasReflectUp, [hl] ; is mon already protected by reflect?
|
||||
bit HAS_REFLECT_UP, [hl] ; is mon already protected by reflect?
|
||||
jr nz, .moveFailed
|
||||
set HasReflectUp, [hl] ; mon is now protected by reflect
|
||||
set HAS_REFLECT_UP, [hl] ; mon is now protected by reflect
|
||||
ld hl, ReflectGainedArmorText
|
||||
.playAnim
|
||||
push hl
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ SubstituteEffect_:
|
|||
ld bc, wEnemyBattleStatus2
|
||||
.notEnemy
|
||||
ld a, [bc]
|
||||
bit HasSubstituteUp, a ; user already has substitute?
|
||||
bit HAS_SUBSTITUTE_UP, a ; user already has substitute?
|
||||
jr nz, .alreadyHasSubstitute
|
||||
; quarter health to remove from user
|
||||
; assumes max HP is 1023 or lower
|
||||
|
|
@ -43,7 +43,7 @@ SubstituteEffect_:
|
|||
ld [hl], d
|
||||
ld h, b
|
||||
ld l, c
|
||||
set HasSubstituteUp, [hl]
|
||||
set HAS_SUBSTITUTE_UP, [hl]
|
||||
ld a, [wOptions]
|
||||
bit 7, a ; battle animation is enabled?
|
||||
ld hl, PlayCurrentMoveAnimation
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ TransformEffect_:
|
|||
ld [wPlayerMoveListIndex], a
|
||||
ld a, [wPlayerBattleStatus1]
|
||||
.hitTest
|
||||
bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig)
|
||||
bit INVULNERABLE, a ; is mon invulnerable to typical attacks? (fly/dig)
|
||||
jp nz, .failed
|
||||
push hl
|
||||
push de
|
||||
|
|
@ -24,7 +24,7 @@ TransformEffect_:
|
|||
ld hl, wEnemyBattleStatus2
|
||||
.transformEffect
|
||||
; animation(s) played are different if target has Substitute up
|
||||
bit HasSubstituteUp, [hl]
|
||||
bit HAS_SUBSTITUTE_UP, [hl]
|
||||
push af
|
||||
ld hl, HideSubstituteShowMonAnim
|
||||
ld b, BANK(HideSubstituteShowMonAnim)
|
||||
|
|
@ -44,7 +44,7 @@ TransformEffect_:
|
|||
call nz, Bankswitch
|
||||
pop bc
|
||||
ld a, [bc]
|
||||
set Transformed, a ; mon is now Transformed
|
||||
set TRANSFORMED, a ; mon is now transformed
|
||||
ld [bc], a
|
||||
pop de
|
||||
pop hl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue