mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Use MAX_LEVEL instead of 100/$64
This commit is contained in:
parent
fee52c53a4
commit
9eefed45f7
|
@ -7,3 +7,4 @@ D_LEFT EQU %00100000
|
|||
D_UP EQU %01000000
|
||||
D_DOWN EQU %10000000
|
||||
|
||||
MAX_LEVEL EQU 100
|
||||
|
|
|
@ -115,7 +115,7 @@ Func_5525f: ; 5525f (15:525f)
|
|||
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
|
||||
|
|
|
@ -1214,7 +1214,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
|||
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
|
||||
|
|
|
@ -352,7 +352,7 @@ StatusScreen2: ; 12b57 (4:6b57)
|
|||
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 @@ StatusScreen2: ; 12b57 (4:6b57)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue