You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Growth rate data.
This commit is contained in:
@@ -3579,7 +3579,7 @@ Function3d6ca: ; 3d6ca
|
|||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
call LoadEnemyMon
|
call LoadEnemyMon
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp $c9
|
cp UNOWN
|
||||||
jr nz, .asm_3d708
|
jr nz, .asm_3d708
|
||||||
ld a, [$def4]
|
ld a, [$def4]
|
||||||
and a
|
and a
|
||||||
@@ -7827,7 +7827,7 @@ Function3f136: ; 3f136
|
|||||||
|
|
||||||
.asm_3f1b7
|
.asm_3f1b7
|
||||||
ld a, e
|
ld a, e
|
||||||
cp $64
|
cp MAX_LEVEL
|
||||||
jr nc, .asm_3f1ff
|
jr nc, .asm_3f1ff
|
||||||
cp d
|
cp d
|
||||||
jr z, .asm_3f1ff
|
jr z, .asm_3f1ff
|
||||||
|
37
main.asm
37
main.asm
@@ -59869,38 +59869,44 @@ Function50e1b: ; 50e1b
|
|||||||
|
|
||||||
|
|
||||||
Function50e47: ; 50e47
|
Function50e47: ; 50e47
|
||||||
|
|
||||||
ld a, [BaseGrowthRate]
|
ld a, [BaseGrowthRate]
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld hl, $4efa
|
ld hl, GrowthRates
|
||||||
add hl, bc
|
add hl, bc
|
||||||
call Function50eed
|
call Function50eed
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f0
|
and $f0
|
||||||
swap a
|
swap a
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and $f
|
and $f
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
ld b, $4
|
ld b, $4
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hMultiplicand]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb5]
|
ld a, [$ffb5]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
call Function50eed
|
call Function50eed
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $7f
|
and $7f
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld a, [hMultiplicand]
|
ld a, [hMultiplicand]
|
||||||
push af
|
push af
|
||||||
ld a, [$ffb5]
|
ld a, [$ffb5]
|
||||||
@@ -59909,6 +59915,7 @@ Function50e47: ; 50e47
|
|||||||
push af
|
push af
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
ld [$ffb5], a
|
ld [$ffb5], a
|
||||||
@@ -59917,6 +59924,7 @@ Function50e47: ; 50e47
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
|
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
sub b
|
sub b
|
||||||
@@ -59928,9 +59936,11 @@ Function50e47: ; 50e47
|
|||||||
ld a, [hMultiplicand]
|
ld a, [hMultiplicand]
|
||||||
sbc b
|
sbc b
|
||||||
ld [hMultiplicand], a
|
ld [hMultiplicand], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
and $80
|
and $80
|
||||||
jr nz, .asm_50ec8
|
jr nz, .asm_50ec8
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [$ffb6]
|
ld a, [$ffb6]
|
||||||
add b
|
add b
|
||||||
@@ -59985,7 +59995,26 @@ Function50eed: ; 50eed
|
|||||||
jp Multiply
|
jp Multiply
|
||||||
; 50efa
|
; 50efa
|
||||||
|
|
||||||
INCBIN "baserom.gbc",$50efa,$50f12 - $50efa
|
GrowthRates: ; 50efa
|
||||||
|
|
||||||
|
growth_rate: MACRO
|
||||||
|
; [1]/[2]*n^3 + [3]*n^2 + [4]*n - [5]
|
||||||
|
dn \1, \2
|
||||||
|
IF \3 & $80 ; signed
|
||||||
|
db ((\3 ^ $ff) + 1) | $80
|
||||||
|
ELSE
|
||||||
|
db \3
|
||||||
|
ENDC
|
||||||
|
db \4, \5
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
growth_rate 1, 1, 0, 0, 0 ; Medium Fast
|
||||||
|
growth_rate 3, 4, 10, 0, 30
|
||||||
|
growth_rate 3, 4, 20, 0, 70
|
||||||
|
growth_rate 6, 5, -15, 100, 140 ; Medium Slow
|
||||||
|
growth_rate 4, 5, 0, 0, 0 ; Fast
|
||||||
|
growth_rate 5, 4, 0, 0, 0 ; Slow
|
||||||
|
; 50f12
|
||||||
|
|
||||||
Function50f12:
|
Function50f12:
|
||||||
ld a, [$d0e3]
|
ld a, [$d0e3]
|
||||||
@@ -60025,7 +60054,7 @@ Function50f34: ; 50f34 (14:4f34)
|
|||||||
add hl, de
|
add hl, de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_50f55
|
jr nz, .asm_50f55
|
||||||
ld de, $20
|
ld de, SFX_SWITCH_POKEMON
|
||||||
call WaitPlaySFX
|
call WaitPlaySFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user