Move BattleSideCopy to transform.asm

This commit is contained in:
mid-kid
2018-11-21 14:14:34 +01:00
parent 725cee7371
commit c210f052a8
2 changed files with 15 additions and 16 deletions

View File

@@ -6220,21 +6220,6 @@ BattleCommand_Heal:
INCLUDE "engine/battle/move_effects/transform.asm" 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: BattleEffect_ButItFailed:
call AnimateFailedMove call AnimateFailedMove
jp PrintButItFailed jp PrintButItFailed

View File

@@ -1,4 +1,3 @@
BattleCommand_Transform: BattleCommand_Transform:
; transform ; transform
@@ -137,3 +136,18 @@ BattleCommand_Transform:
call nz, LoadAnim call nz, LoadAnim
ld hl, TransformedText ld hl, TransformedText
jp StdBattleTextBox 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