ref: 2db54ecb9b2ec41dd40318395f69814af64f6f7b
dir: /engine/battle/move_effects/pay_day.asm/
PayDayEffect_: xor a ld hl, wcd6d ld [hli], a ldh a, [hWhoseTurn] and a ld a, [wBattleMonLevel] jr z, .payDayEffect ld a, [wEnemyMonLevel] .payDayEffect ; level * 2 add a ldh [hDividend + 3], a xor a ldh [hDividend], a ldh [hDividend + 1], a ldh [hDividend + 2], a ; convert to BCD ld a, 100 ldh [hDivisor], a ld b, $4 call Divide ldh a, [hQuotient + 3] ld [hli], a ldh a, [hRemainder] ldh [hDividend + 3], a ld a, 10 ldh [hDivisor], a ld b, $4 call Divide ldh a, [hQuotient + 3] swap a ld b, a ldh a, [hRemainder] add b ld [hl], a ld de, wTotalPayDayMoney + 2 ld c, $3 predef AddBCDPredef ld hl, CoinsScatteredText jp PrintText CoinsScatteredText: text_far _CoinsScatteredText text_end