diff options
Diffstat (limited to 'engine/battle/experience.asm')
-rw-r--r-- | engine/battle/experience.asm | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index 6bc0a019..2e21d874 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -55,15 +55,15 @@ GainExperience: jr .gainStatExpLoop .statExpDone xor a - ld [hMultiplicand], a - ld [hMultiplicand + 1], a + ldh [hMultiplicand], a + ldh [hMultiplicand + 1], a ld a, [wEnemyMonBaseExp] - ld [hMultiplicand + 2], a + ldh [hMultiplicand + 2], a ld a, [wEnemyMonLevel] - ld [hMultiplier], a + ldh [hMultiplier], a call Multiply ld a, 7 - ld [hDivisor], a + ldh [hDivisor], a ld b, 4 call Divide ld hl, wPartyMon1OTID - (wPartyMon1DVs - 1) @@ -91,12 +91,12 @@ GainExperience: inc hl ; add the gained exp to the party mon's exp ld b, [hl] - ld a, [hQuotient + 3] + ldh a, [hQuotient + 3] ld [wExpAmountGained + 1], a add b ld [hld], a ld b, [hl] - ld a, [hQuotient + 2] + ldh a, [hQuotient + 2] ld [wExpAmountGained], a adc b ld [hl], a @@ -119,11 +119,11 @@ GainExperience: ld d, MAX_LEVEL callab CalcExperience ; get max exp ; compare max exp with current exp - ld a, [hExperience] + ldh a, [hExperience] ld b, a - ld a, [hExperience + 1] + ldh a, [hExperience + 1] ld c, a - ld a, [hExperience + 2] + ldh a, [hExperience + 2] ld d, a pop hl ld a, [hld] @@ -311,14 +311,14 @@ DivideExpDataByNumMonsGainingExp: ld c, wEnemyMonBaseExp + 1 - wEnemyMonBaseStats .divideLoop xor a - ld [hDividend], a + ldh [hDividend], a ld a, [hl] - ld [hDividend + 1], a + ldh [hDividend + 1], a ld a, [wd11e] - ld [hDivisor], a + ldh [hDivisor], a ld b, $2 call Divide ; divide value by number of mons gaining exp - ld a, [hQuotient + 3] + ldh a, [hQuotient + 3] ld [hli], a dec c jr nz, .divideLoop @@ -326,17 +326,17 @@ DivideExpDataByNumMonsGainingExp: ; multiplies exp by 1.5 BoostExp: - ld a, [hQuotient + 2] + ldh a, [hQuotient + 2] ld b, a - ld a, [hQuotient + 3] + ldh a, [hQuotient + 3] ld c, a srl b rr c add c - ld [hQuotient + 3], a - ld a, [hQuotient + 2] + ldh [hQuotient + 3], a + ldh a, [hQuotient + 2] adc b - ld [hQuotient + 2], a + ldh [hQuotient + 2], a ret GainedText: |