summaryrefslogtreecommitdiff
path: root/engine/battle/experience.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/experience.asm')
-rw-r--r--engine/battle/experience.asm26
1 files changed, 18 insertions, 8 deletions
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index c1914806..9946c6c6 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -43,17 +43,17 @@ GainExperience:
inc de
jr .nextBaseStat
.maxStatExp ; if the upper byte also overflowed, then we have hit the max stat exp
- ld a, $ff
+ dec a ; a is 0 from previous check
ld [de], a
inc de
ld [de], a
.nextBaseStat
dec c
- jr z, .asm_552a1
+ jr z, .statExpDone
inc de
inc de
jr .gainStatExpLoop
-.asm_552a1
+.statExpDone
xor a
ld [H_MULTIPLICAND], a
ld [H_MULTIPLICAND + 1], a
@@ -233,13 +233,19 @@ GainExperience:
.recalcStatChanges
xor a ; battle mon
ld [wCalculateWhoseStats], a
- callab CalculateModifiedStats
- callab ApplyBurnAndParalysisPenaltiesToPlayer
- callab ApplyBadgeStatBoosts
- callab DrawPlayerHUDAndHPBar
- callab PrintEmptyString
+ ld hl, CalculateModifiedStats
+ call Bankswitch15ToF
+ ld hl, ApplyBurnAndParalysisPenaltiesToPlayer
+ call Bankswitch15ToF
+ ld hl, ApplyBadgeStatBoosts
+ call Bankswitch15ToF
+ ld hl, DrawPlayerHUDAndHPBar
+ call Bankswitch15ToF
+ ld hl, PrintEmptyString
+ call Bankswitch15ToF
call SaveScreenTilesToBuffer1
.printGrewLevelText
+ callabd_ModifyPikachuHappiness PIKAHAPPY_LEVELUP
ld hl, GrewLevelText
call PrintText
xor a ; PLAYER_PARTY_DATA
@@ -339,6 +345,10 @@ BoostExp:
ld [H_QUOTIENT + 2], a
ret
+Bankswitch15ToF:
+ ld b, BANK(BattleCore)
+ jp Bankswitch
+
GainedText:
TX_FAR _GainedText
TX_ASM