ref: 9eefed45f7ff3b9ee6023fb0829528e34aa0729a
parent: fee52c53a40f8e36dfccfbe73668bfc2858c2a95
author: U-Fish-PC\Daniel <corrnondacqb@yahoo.com>
date: Tue Jun 10 13:06:30 EDT 2014
Use MAX_LEVEL instead of 100/$64
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -7,3 +7,4 @@
D_UP EQU %01000000
D_DOWN EQU %10000000
+MAX_LEVEL EQU 100
--- a/engine/battle/15.asm
+++ b/engine/battle/15.asm
@@ -115,7 +115,7 @@
ld a, [hl]
ld [wd0b5], a
call GetMonHeader
- ld d, $64
+ ld d, MAX_LEVEL
callab CalcExperience
ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
ld b, a
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -1214,7 +1214,7 @@
ld bc,33
add hl,bc ; hl now points to level
ld a,[hl] ; a = level
- cp a,100
+ cp a, MAX_LEVEL
jr z,.vitaminNoEffect ; can't raise level above 100
inc a
ld [hl],a ; store incremented level
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -352,7 +352,7 @@
call PlaceString
ld a, [wcfb9] ; level
push af
- cp 100
+ cp MAX_LEVEL
jr z, .Level100 ; 0x12c20 $4
inc a
ld [wcfb9], a ; Increase temporarily if not 100
@@ -402,7 +402,7 @@
jp ClearScreen
.asm_12c86 ; This does some magic with lvl/exp?
ld a, [wcfb9] ; Load level
- cp $64
+ cp MAX_LEVEL
jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100
inc a
ld d, a