summaryrefslogtreecommitdiff
path: root/engine/pokemon
diff options
context:
space:
mode:
Diffstat (limited to 'engine/pokemon')
-rw-r--r--engine/pokemon/experience.asm4
-rw-r--r--engine/pokemon/health.asm2
-rw-r--r--engine/pokemon/mon_menu.asm4
-rw-r--r--engine/pokemon/move_mon.asm12
-rw-r--r--engine/pokemon/stats_screen.asm6
5 files changed, 14 insertions, 14 deletions
diff --git a/engine/pokemon/experience.asm b/engine/pokemon/experience.asm
index 1dae3bb61..43eb77a4e 100644
--- a/engine/pokemon/experience.asm
+++ b/engine/pokemon/experience.asm
@@ -58,12 +58,12 @@ CalcExpAtLevel:
ld b, 4
call Divide
; Push the cubic term to the stack
- ldh a, [hQuotient + 0]
- push af
ldh a, [hQuotient + 1]
push af
ldh a, [hQuotient + 2]
push af
+ ldh a, [hQuotient + 3]
+ push af
; Square the level and multiply by the lower 7 bits of c
call .LevelSquared
ld a, [hl]
diff --git a/engine/pokemon/health.asm b/engine/pokemon/health.asm
index 53b7ebb3f..d11a073b5 100644
--- a/engine/pokemon/health.asm
+++ b/engine/pokemon/health.asm
@@ -91,7 +91,7 @@ ComputeHPBarPixels:
ldh [hDivisor], a
ld b, 4
call Divide
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
ld e, a
pop hl
and a
diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm
index de3e0f382..de9548189 100644
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -766,10 +766,10 @@ MonMenu_Softboiled_MilkDrink:
call Divide
ld a, MON_HP + 1
call GetPartyParamLocation
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
sub [hl]
dec hl
- ldh a, [hQuotient + 1]
+ ldh a, [hQuotient + 2]
sbc [hl]
ret
diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm
index 82f063aae..6e9d90d36 100644
--- a/engine/pokemon/move_mon.asm
+++ b/engine/pokemon/move_mon.asm
@@ -1570,11 +1570,11 @@ CalcMonStatC:
jr nz, .not_hp
ld a, [wCurPartyLevel]
ld b, a
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
add b
ldh [hMultiplicand + 2], a
jr nc, .no_overflow_3
- ldh a, [hQuotient + 1]
+ ldh a, [hQuotient + 2]
inc a
ldh [hMultiplicand + 1], a
@@ -1583,21 +1583,21 @@ CalcMonStatC:
.not_hp
ld b, a
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
add b
ldh [hMultiplicand + 2], a
jr nc, .no_overflow_4
- ldh a, [hQuotient + 1]
+ ldh a, [hQuotient + 2]
inc a
ldh [hMultiplicand + 1], a
.no_overflow_4
- ldh a, [hQuotient + 1]
+ ldh a, [hQuotient + 2]
cp HIGH(MAX_STAT_VALUE + 1) + 1
jr nc, .max_stat
cp HIGH(MAX_STAT_VALUE + 1)
jr c, .stat_value_okay
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
cp LOW(MAX_STAT_VALUE + 1)
jr c, .stat_value_okay
diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm
index d0004a47a..84af2bf49 100644
--- a/engine/pokemon/stats_screen.asm
+++ b/engine/pokemon/stats_screen.asm
@@ -636,15 +636,15 @@ StatsScreen_LoadGFX:
farcall CalcExpAtLevel
ld hl, wTempMonExp + 2
ld hl, wTempMonExp + 2
- ldh a, [hQuotient + 2]
+ ldh a, [hQuotient + 3]
sub [hl]
dec hl
ld [wBuffer3], a
- ldh a, [hQuotient + 1]
+ ldh a, [hQuotient + 2]
sbc [hl]
dec hl
ld [wBuffer2], a
- ldh a, [hQuotient]
+ ldh a, [hQuotient + 1]
sbc [hl]
ld [wBuffer1], a
ret