ref: e9767dcfa8e91559787d1a97d5c831d12b346fe0
parent: 51352aaa4da0e6fc219740415db2f02b6e17129b
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Sep 27 08:31:59 EDT 2020
More optimal fix for the experience underflow bug
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -839,10 +839,9 @@
CalcExpAtLevel:
; (a/b)*n**3 + c*n**2 + d*n - e
+ ld a, d
-+ cp 1
++ dec a
+ jr nz, .UseExpFormula
+; Pokémon have 0 experience at level 1
-+ xor a
+ ld hl, hProduct
+ ld [hli], a
+ ld [hli], a