summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/effect_commands.asm21
-rw-r--r--engine/battle/move_effects/transform.asm16
2 files changed, 18 insertions, 19 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 9adf90c82..76d6ee375 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -4854,7 +4854,7 @@ CalcPlayerStats:
ld bc, wBattleMonAttack
ld a, 5
- call CalcStats
+ call CalcBattleStats
ld hl, BadgeStatBoosts
call CallBattleCore
@@ -4875,7 +4875,7 @@ CalcEnemyStats:
ld bc, wEnemyMonAttack
ld a, 5
- call CalcStats
+ call CalcBattleStats
call BattleCommand_SwitchTurn
@@ -4887,7 +4887,7 @@ CalcEnemyStats:
jp BattleCommand_SwitchTurn
-CalcStats:
+CalcBattleStats:
.loop
push af
ld a, [hli]
@@ -6221,21 +6221,6 @@ BattleCommand_Heal:
INCLUDE "engine/battle/move_effects/transform.asm"
-BattleSideCopy:
-; Copy bc bytes from hl to de if it's the player's turn.
-; Copy bc bytes from de to hl if it's the enemy's turn.
- ldh a, [hBattleTurn]
- and a
- jr z, .copy
-
-; Swap hl and de
- push hl
- ld h, d
- ld l, e
- pop de
-.copy
- jp CopyBytes
-
BattleEffect_ButItFailed:
call AnimateFailedMove
jp PrintButItFailed
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
index ab94da79c..509a8d03f 100644
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm
@@ -1,4 +1,3 @@
-
BattleCommand_Transform:
; transform
@@ -137,3 +136,18 @@ BattleCommand_Transform:
call nz, LoadAnim
ld hl, TransformedText
jp StdBattleTextBox
+
+BattleSideCopy:
+; Copy bc bytes from hl to de if it's the player's turn.
+; Copy bc bytes from de to hl if it's the enemy's turn.
+ ldh a, [hBattleTurn]
+ and a
+ jr z, .copy
+
+; Swap hl and de
+ push hl
+ ld h, d
+ ld l, e
+ pop de
+.copy
+ jp CopyBytes