summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/pay_day.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-07 19:48:22 -0400
committerGitHub <noreply@github.com>2020-07-07 19:48:22 -0400
commit9571c550b6a0dcb3a4f54513c881661a87271024 (patch)
treed73507228a57e4f3cece2fb93fe7df3a9439553f /engine/battle/move_effects/pay_day.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
parentbbf2f51a02b2544f1bef32a5868503b474ae2fef (diff)
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'engine/battle/move_effects/pay_day.asm')
-rw-r--r--engine/battle/move_effects/pay_day.asm24
1 files changed, 12 insertions, 12 deletions
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
index 11140ec2..fa373038 100644
--- a/engine/battle/move_effects/pay_day.asm
+++ b/engine/battle/move_effects/pay_day.asm
@@ -2,7 +2,7 @@ PayDayEffect_:
xor a
ld hl, wcd6d
ld [hli], a
- ld a, [hWhoseTurn]
+ ldh a, [hWhoseTurn]
and a
ld a, [wBattleMonLevel]
jr z, .payDayEffect
@@ -10,28 +10,28 @@ PayDayEffect_:
.payDayEffect
; level * 2
add a
- ld [hDividend + 3], a
+ ldh [hDividend + 3], a
xor a
- ld [hDividend], a
- ld [hDividend + 1], a
- ld [hDividend + 2], a
+ ldh [hDividend], a
+ ldh [hDividend + 1], a
+ ldh [hDividend + 2], a
; convert to BCD
ld a, 100
- ld [hDivisor], a
+ ldh [hDivisor], a
ld b, $4
call Divide
- ld a, [hQuotient + 3]
+ ldh a, [hQuotient + 3]
ld [hli], a
- ld a, [hRemainder]
- ld [hDividend + 3], a
+ ldh a, [hRemainder]
+ ldh [hDividend + 3], a
ld a, 10
- ld [hDivisor], a
+ ldh [hDivisor], a
ld b, $4
call Divide
- ld a, [hQuotient + 3]
+ ldh a, [hQuotient + 3]
swap a
ld b, a
- ld a, [hRemainder]
+ ldh a, [hRemainder]
add b
ld [hl], a
ld de, wTotalPayDayMoney + 2