summaryrefslogtreecommitdiff
path: root/engine/battle/moveEffects
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-10-29 14:23:30 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-10-29 14:23:30 -0400
commitcb414f1480e9117e5d6ee0ab5cb81903e83cde9a (patch)
treee44bd6299c61335a9a0476db57b565aadcd0b4d7 /engine/battle/moveEffects
parent2ea331ebb341505df1cd8429b140c52e345a5af4 (diff)
overworld item & movement code, cable club code, remove more instances of W_, add PIKAHAPPY_TRADE
Also make replace.sh take args
Diffstat (limited to 'engine/battle/moveEffects')
-rw-r--r--engine/battle/moveEffects/drain_hp_effect.asm6
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm4
-rw-r--r--engine/battle/moveEffects/recoil_effect.asm4
-rw-r--r--engine/battle/moveEffects/substitute_effect.asm2
-rw-r--r--engine/battle/moveEffects/transform_effect.asm2
5 files changed, 9 insertions, 9 deletions
diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm
index 1096794f..e977af32 100644
--- a/engine/battle/moveEffects/drain_hp_effect.asm
+++ b/engine/battle/moveEffects/drain_hp_effect.asm
@@ -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
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index c1dde6ff..12f70b90 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -1,5 +1,5 @@
OneHitKOEffect_: ; f64db (3d:64db)
- 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_: ; f64db (3d:64db)
ld a, [hl]
sbc b
jr c, .userIsSlower
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld a, $ff
ld [hli], a
ld [hl], a
diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm
index 51232af6..9b165932 100644
--- a/engine/battle/moveEffects/recoil_effect.asm
+++ b/engine/battle/moveEffects/recoil_effect.asm
@@ -8,9 +8,9 @@ RecoilEffect_: ; 1392c (4:792c)
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
diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm
index c72fffbe..54b752ef 100644
--- a/engine/battle/moveEffects/substitute_effect.asm
+++ b/engine/battle/moveEffects/substitute_effect.asm
@@ -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)
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
index fef6f7aa..bf252600 100644
--- a/engine/battle/moveEffects/transform_effect.asm
+++ b/engine/battle/moveEffects/transform_effect.asm
@@ -29,7 +29,7 @@ TransformEffect_: ; f637f (3d:637f)
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)