summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/pay_day.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/move_effects/pay_day.asm')
-rw-r--r--engine/battle/move_effects/pay_day.asm28
1 files changed, 28 insertions, 0 deletions
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
new file mode 100644
index 000000000..a5d2fed0d
--- /dev/null
+++ b/engine/battle/move_effects/pay_day.asm
@@ -0,0 +1,28 @@
+BattleCommand_PayDay: ; 3705c
+; payday
+
+ xor a
+ ld hl, wStringBuffer1
+ ld [hli], a
+
+ ld a, [hBattleTurn]
+ and a
+ ld a, [wBattleMonLevel]
+ jr z, .ok
+ ld a, [wEnemyMonLevel]
+.ok
+
+ add a
+ ld hl, wPayDayMoney + 2
+ add [hl]
+ ld [hld], a
+ jr nc, .done
+ inc [hl]
+ dec hl
+ jr nz, .done
+ inc [hl]
+.done
+ ld hl, CoinsScatteredText
+ jp StdBattleTextBox
+
+; 3707f