No more W_

This commit is contained in:
dannye 2015-08-30 21:38:41 -05:00
parent 1ee9fb408c
commit 38065a744d
190 changed files with 2202 additions and 2202 deletions

View file

@ -3,13 +3,13 @@ ConversionEffect_: ; 139a3 (4:79a3)
ld de, wBattleMonType1
ld a, [H_WHOSETURN]
and a
ld a, [W_ENEMYBATTSTATUS1]
ld a, [wEnemyBattleStatus1]
jr z, .conversionEffect
push hl
ld h, d
ld l, e
pop de
ld a, [W_PLAYERBATTSTATUS1]
ld a, [wPlayerBattleStatus1]
.conversionEffect
bit Invulnerable, a ; is mon immune to typical attacks (dig/fly)
jr nz, PrintButItFailedText

View file

@ -1,5 +1,5 @@
DrainHPEffect_: ; 783f (1:783f)
ld hl, W_DAMAGE
ld hl, wDamage
ld a, [hl]
srl a ; divide damage by 2
ld [hli], a
@ -36,12 +36,12 @@ DrainHPEffect_: ; 783f (1:783f)
dec bc
ld [bc], a
; add damage to attacker's HP and copy new HP to wHPBarNewHP
ld a, [W_DAMAGE + 1]
ld a, [wDamage + 1]
ld b, [hl]
add b
ld [hld], a
ld [wHPBarNewHP], a
ld a, [W_DAMAGE]
ld a, [wDamage]
ld b, [hl]
adc b
ld [hli], a
@ -85,9 +85,9 @@ DrainHPEffect_: ; 783f (1:783f)
ld hl, SuckedHealthText
ld a, [H_WHOSETURN]
and a
ld a, [W_PLAYERMOVEEFFECT]
ld a, [wPlayerMoveEffect]
jr z, .next3
ld a, [W_ENEMYMOVEEFFECT]
ld a, [wEnemyMoveEffect]
.next3
cp DREAM_EATER_EFFECT
jr nz, .printText

View file

@ -1,9 +1,9 @@
FocusEnergyEffect_: ; 27f86 (9:7f86)
ld hl, W_PLAYERBATTSTATUS2
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .notEnemy
ld hl, W_ENEMYBATTSTATUS2
ld hl, wEnemyBattleStatus2
.notEnemy
bit GettingPumped, [hl] ; is mon already using focus energy?
jr nz, .alreadyUsing

View file

@ -31,14 +31,14 @@ HazeEffect_: ; 139da (4:79da)
.cureVolatileStatuses
xor a
ld [W_PLAYERDISABLEDMOVE], a
ld [W_ENEMYDISABLEDMOVE], a
ld [wPlayerDisabledMove], a
ld [wEnemyDisabledMove], a
ld hl, wPlayerDisabledMoveNumber
ld [hli], a
ld [hl], a
ld hl, W_PLAYERBATTSTATUS1
ld hl, wPlayerBattleStatus1
call CureVolatileStatuses
ld hl, W_ENEMYBATTSTATUS1
ld hl, wEnemyBattleStatus1
call CureVolatileStatuses
ld hl, PlayCurrentMoveAnimation
call CallBankF

View file

@ -3,11 +3,11 @@ HealEffect_: ; 3b9ec (e:79ec)
and a
ld de, wBattleMonHP
ld hl, wBattleMonMaxHP
ld a, [W_PLAYERMOVENUM]
ld a, [wPlayerMoveNum]
jr z, .healEffect
ld de, wEnemyMonHP
ld hl, wEnemyMonMaxHP
ld a, [W_ENEMYMOVENUM]
ld a, [wEnemyMoveNum]
.healEffect
ld b, a
ld a, [de]

View file

@ -1,14 +1,14 @@
LeechSeedEffect_: ; 2bea9 (a:7ea9)
callab MoveHitTest
ld a, [W_MOVEMISSED]
ld a, [wMoveMissed]
and a
jr nz, .moveMissed
ld hl, W_ENEMYBATTSTATUS2
ld hl, wEnemyBattleStatus2
ld de, wEnemyMonType1
ld a, [H_WHOSETURN]
and a
jr z, .leechSeedEffect
ld hl, W_PLAYERBATTSTATUS2
ld hl, wPlayerBattleStatus2
ld de, wBattleMonType1
.leechSeedEffect
; miss if the target is grass-type or already seeded

View file

@ -1,9 +1,9 @@
MistEffect_: ; 33f2b (c:7f2b)
ld hl, W_PLAYERBATTSTATUS2
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .mistEffect
ld hl, W_ENEMYBATTSTATUS2
ld hl, wEnemyBattleStatus2
.mistEffect
bit ProtectedByMist, [hl] ; is mon protected by mist?
jr nz, .mistAlreadyInUse

View file

@ -1,5 +1,5 @@
OneHitKOEffect_: ; 33f57 (c:7f57)
ld hl, W_DAMAGE
ld hl, wDamage
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
@ -24,7 +24,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld a, [hl]
sbc b
jr c, .userIsSlower
ld hl, W_DAMAGE
ld hl, wDamage
ld a, $ff
ld [hli], a
ld [hl], a
@ -34,5 +34,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
.userIsSlower
; keep damage at 0 and set move missed flag if target's current speed is higher instead
ld a, $1
ld [W_MOVEMISSED], a
ld [wMoveMissed], a
ret

View file

@ -1,11 +1,11 @@
ParalyzeEffect_: ; 52601 (14:6601)
ld hl, wEnemyMonStatus
ld de, W_PLAYERMOVETYPE
ld de, wPlayerMoveType
ld a, [H_WHOSETURN]
and a
jp z, .next
ld hl, wBattleMonStatus
ld de, W_ENEMYMOVETYPE
ld de, wEnemyMoveType
.next
ld a, [hl]
and a ; does the target already have a status ailment?
@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
push hl
callab MoveHitTest
pop hl
ld a, [W_MOVEMISSED]
ld a, [wMoveMissed]
and a
jr nz, .didntAffect
set PAR, [hl]

View file

@ -1,16 +1,16 @@
RecoilEffect_: ; 1392c (4:792c)
ld a, [H_WHOSETURN]
and a
ld a, [W_PLAYERMOVENUM]
ld a, [wPlayerMoveNum]
ld hl, wBattleMonMaxHP
jr z, .recoilEffect
ld a, [W_ENEMYMOVENUM]
ld a, [wEnemyMoveNum]
ld hl, wEnemyMonMaxHP
.recoilEffect
ld d, a
ld a, [W_DAMAGE]
ld a, [wDamage]
ld b, a
ld a, [W_DAMAGE + 1]
ld a, [wDamage + 1]
ld c, a
srl b
rr c

View file

@ -1,11 +1,11 @@
ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
ld hl, W_PLAYERBATTSTATUS3
ld de, W_PLAYERMOVEEFFECT
ld hl, wPlayerBattleStatus3
ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .reflectLightScreenEffect
ld hl, W_ENEMYBATTSTATUS3
ld de, W_ENEMYMOVEEFFECT
ld hl, wEnemyBattleStatus3
ld de, wEnemyMoveEffect
.reflectLightScreenEffect
ld a, [de]
cp LIGHT_SCREEN_EFFECT

View file

@ -3,13 +3,13 @@ SubstituteEffect_: ; 17dad (5:7dad)
call DelayFrames
ld hl, wBattleMonMaxHP
ld de, wPlayerSubstituteHP
ld bc, W_PLAYERBATTSTATUS2
ld bc, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .notEnemy
ld hl, wEnemyMonMaxHP
ld de, wEnemySubstituteHP
ld bc, W_ENEMYBATTSTATUS2
ld bc, wEnemyBattleStatus2
.notEnemy
ld a, [bc]
bit HasSubstituteUp, a ; user already has substitute?
@ -44,7 +44,7 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld h, b
ld l, c
set HasSubstituteUp, [hl]
ld a, [W_OPTIONS]
ld a, [wOptions]
bit 7, a ; battle animation is enabled?
ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)

View file

@ -1,27 +1,27 @@
TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, wBattleMonSpecies
ld de, wEnemyMonSpecies
ld bc, W_ENEMYBATTSTATUS3
ld a, [W_ENEMYBATTSTATUS1]
ld bc, wEnemyBattleStatus3
ld a, [wEnemyBattleStatus1]
ld a, [H_WHOSETURN]
and a
jr nz, .hitTest
ld hl, wEnemyMonSpecies
ld de, wBattleMonSpecies
ld bc, W_PLAYERBATTSTATUS3
ld bc, wPlayerBattleStatus3
ld [wPlayerMoveListIndex], a
ld a, [W_PLAYERBATTSTATUS1]
ld a, [wPlayerBattleStatus1]
.hitTest
bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig)
jp nz, .failed
push hl
push de
push bc
ld hl, W_PLAYERBATTSTATUS2
ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .transformEffect
ld hl, W_ENEMYBATTSTATUS2
ld hl, wEnemyBattleStatus2
.transformEffect
; animation(s) played are different if target has Substitute up
bit HasSubstituteUp, [hl]
@ -29,7 +29,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
call nz, Bankswitch
ld a, [W_OPTIONS]
ld a, [wOptions]
add a
ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)