diff options
author | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
commit | c2efe700ac1c5cca88bac710b98388a99665741e (patch) | |
tree | b30d2f676d5ad0d78b959c8ffcf0f8dcfca13943 /engine/battle/moveEffects/pay_day_effect.asm | |
parent | 52add272c6bca00d2ea827ef7fa4611a4bc41b47 (diff) | |
parent | ce9940a2eb89caa9f53507a6d6071f8eaf85ee48 (diff) |
Merge pull request #90 from xCrystal/master
Rename/split battle and move effect files. Battle functions, AI, and attack animations
Diffstat (limited to 'engine/battle/moveEffects/pay_day_effect.asm')
-rw-r--r-- | engine/battle/moveEffects/pay_day_effect.asm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm new file mode 100644 index 00000000..75a005ed --- /dev/null +++ b/engine/battle/moveEffects/pay_day_effect.asm @@ -0,0 +1,43 @@ +PayDayEffect_ ; 2feb8 (b:7eb8) + xor a + ld hl, wcd6d + ld [hli], a + ld a, [H_WHOSETURN] + and a + ld a, [wBattleMonLevel] + jr z, .asm_2fec8 + ld a, [wEnemyMonLevel] +.asm_2fec8 + add a + ld [H_DIVIDEND + 3], a + xor a + ld [H_DIVIDEND], a + ld [H_DIVIDEND + 1], a + ld [H_DIVIDEND + 2], a + ld a, $64 + ld [H_DIVISOR], a + ld b, $4 + call Divide + ld a, [H_QUOTIENT + 3] + ld [hli], a + ld a, [H_REMAINDER] + ld [H_DIVIDEND + 3], a + ld a, $a + ld [H_DIVISOR], a + ld b, $4 + call Divide + ld a, [H_QUOTIENT + 3] + swap a + ld b, a + ld a, [H_REMAINDER] + add b + ld [hl], a + ld de, wTotalPayDayMoney + 2 + ld c, $3 + predef AddBCDPredef + ld hl, CoinsScatteredText + jp PrintText + +CoinsScatteredText: ; 2ff04 (b:7f04) + TX_FAR _CoinsScatteredText + db "@" |