mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
Update Magikarp length documentation
This commit is contained in:
parent
333524f0be
commit
731311cb15
@ -6371,8 +6371,14 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
jr c, .GenerateDVs ; try again
|
jr c, .GenerateDVs ; try again
|
||||||
|
|
||||||
.Magikarp:
|
.Magikarp:
|
||||||
; Skimming this part recommended
|
; These filters are untranslated
|
||||||
|
; They expect at wMagikarpLength a 2-byte value in mm,
|
||||||
|
; but the value is at ft and in (one byte each)
|
||||||
|
|
||||||
|
; The first filter is supposed to make very large Magikarp even rarer,
|
||||||
|
; by targeting those 1600 mm or larger.
|
||||||
|
; After the conversion to feet, they are unable to target any,
|
||||||
|
; as the largest possible Magikarp is 5'3'', which reads as 1283.
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
cp MAGIKARP
|
cp MAGIKARP
|
||||||
jr nz, .Happiness
|
jr nz, .Happiness
|
||||||
@ -6393,7 +6399,7 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
jr c, .CheckMagikarpArea
|
jr c, .CheckMagikarpArea
|
||||||
; Try again if > 1614
|
; Try again if > 1614
|
||||||
ld a, [wMagikarpLength + 1]
|
ld a, [wMagikarpLength + 1]
|
||||||
cp LOW(1614) + 2
|
cp LOW(1616)
|
||||||
jr nc, .GenerateDVs
|
jr nc, .GenerateDVs
|
||||||
|
|
||||||
; 20% chance of skipping this check
|
; 20% chance of skipping this check
|
||||||
@ -6402,7 +6408,7 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
jr c, .CheckMagikarpArea
|
jr c, .CheckMagikarpArea
|
||||||
; Try again if > 1598
|
; Try again if > 1598
|
||||||
ld a, [wMagikarpLength + 1]
|
ld a, [wMagikarpLength + 1]
|
||||||
cp LOW(1598) + 2
|
cp LOW(1600)
|
||||||
jr nc, .GenerateDVs
|
jr nc, .GenerateDVs
|
||||||
|
|
||||||
.CheckMagikarpArea:
|
.CheckMagikarpArea:
|
||||||
@ -6415,6 +6421,9 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
|
|
||||||
; Intended behavior enforces a minimum size at Lake of Rage
|
; Intended behavior enforces a minimum size at Lake of Rage
|
||||||
; The real behavior prevents size flooring in the Lake of Rage area
|
; The real behavior prevents size flooring in the Lake of Rage area
|
||||||
|
|
||||||
|
; Moreover, due to the check not being translated to feet, all Magikarp
|
||||||
|
; smaller than 4'0'' may be caught by the filter, a lot more than intended
|
||||||
ld a, [MapGroup]
|
ld a, [MapGroup]
|
||||||
cp GROUP_LAKE_OF_RAGE
|
cp GROUP_LAKE_OF_RAGE
|
||||||
jr z, .Happiness
|
jr z, .Happiness
|
||||||
|
@ -108,7 +108,7 @@ PrintMagikarpLength: ; fbbdb
|
|||||||
; fbbfc
|
; fbbfc
|
||||||
|
|
||||||
CalcMagikarpLength: ; fbbfc
|
CalcMagikarpLength: ; fbbfc
|
||||||
; Return Magikarp's length (in mm) at wMagikarpLength (big endian).
|
; Return Magikarp's length (in feet and inches) at wMagikarpLength (big endian).
|
||||||
;
|
;
|
||||||
; input:
|
; input:
|
||||||
; de: EnemyMonDVs
|
; de: EnemyMonDVs
|
||||||
@ -247,6 +247,10 @@ CalcMagikarpLength: ; fbbfc
|
|||||||
ld e, l
|
ld e, l
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
; convert from mm to feet and inches
|
||||||
|
; in = mm / 25.4
|
||||||
|
; ft = in / 12
|
||||||
|
|
||||||
; hl = de × 10
|
; hl = de × 10
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
@ -275,9 +279,9 @@ CalcMagikarpLength: ; fbbfc
|
|||||||
ld e, a
|
ld e, a
|
||||||
|
|
||||||
ld hl, wMagikarpLength
|
ld hl, wMagikarpLength
|
||||||
ld [hl], d
|
ld [hl], d ; ft
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], e
|
ld [hl], e ; in
|
||||||
ret
|
ret
|
||||||
; fbc9a
|
; fbc9a
|
||||||
|
|
||||||
@ -305,8 +309,11 @@ CalcMagikarpLength: ; fbbfc
|
|||||||
; fbca8
|
; fbca8
|
||||||
|
|
||||||
.Lengths: ; fbca8
|
.Lengths: ; fbca8
|
||||||
; ????, divisor
|
; [wMagikarpLength] = z * 100 + (bc - x) / y
|
||||||
dwb 110, 1
|
; First argument is the bc threshold as well as x.
|
||||||
|
; Second argument is y.
|
||||||
|
; In reality, due to the bug at .BCLessThanDE, the threshold is determined by only register b.
|
||||||
|
dwb 110, 1 ; not used unless the bug is fixed
|
||||||
dwb 310, 2
|
dwb 310, 2
|
||||||
dwb 710, 4
|
dwb 710, 4
|
||||||
dwb 2710, 20
|
dwb 2710, 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user