mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Document the Magikarp bug fix from PR #443
This commit is contained in:
parent
97dd40284b
commit
fe605b2fa7
@ -30,7 +30,7 @@ These are known bugs and glitches in the original Pokémon Crystal game: code th
|
||||
- [Dragon Scale, not Dragon Fang, boosts Dragon-type moves](#dragon-scale-not-dragon-fang-boosts-dragon-type-moves)
|
||||
- [Daisy's grooming doesn't always increase happiness](#daisys-grooming-doesnt-always-increase-happiness)
|
||||
- [Magikarp in Lake of Rage are shorter, not longer](#magikarp-in-lake-of-rage-are-shorter-not-longer)
|
||||
- [Magikarp lengths in Lake of Rage have a unit conversion error](#magikarp-lengths-in-lake-of-rage-have-a-unit-conversion-error)
|
||||
- [Magikarp length limits have a unit conversion error](#magikarp-length-limits-have-a-unit-conversion-error)
|
||||
- [Magikarp lengths can be miscalculated](#magikarp-lengths-can-be-miscalculated)
|
||||
- [Battle transitions fail to account for the enemy's level](#battle-transitions-fail-to-account-for-the-enemys-level)
|
||||
- [Slot machine payout sound effects cut each other off](#slot-machine-payout-sound-effects-cut-each-other-off)
|
||||
@ -785,7 +785,7 @@ This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](
|
||||
**Fix:** Change both `jr z, .Happiness` to `jr nz, .Happiness`.
|
||||
|
||||
|
||||
## Magikarp lengths in Lake of Rage have a unit conversion error
|
||||
## Magikarp length limits have a unit conversion error
|
||||
|
||||
This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](/engine/battle/core.asm):
|
||||
|
||||
@ -795,31 +795,31 @@ This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](
|
||||
ld bc, PlayerID
|
||||
callfar CalcMagikarpLength
|
||||
|
||||
; We're clear if the length is < 1536
|
||||
; No reason to keep going if length > 1536 (i.e. if length / 256 != 6)
|
||||
ld a, [wMagikarpLength]
|
||||
cp HIGH(1536)
|
||||
cp HIGH(1536) ; this compares to 6'0'', should be cp 5
|
||||
jr nz, .CheckMagikarpArea
|
||||
|
||||
; 5% chance of skipping both size checks
|
||||
call Random
|
||||
cp 5 percent
|
||||
jr c, .CheckMagikarpArea
|
||||
; Try again if > 1614
|
||||
; Try again if length > 1615
|
||||
ld a, [wMagikarpLength + 1]
|
||||
cp LOW(1616)
|
||||
cp LOW(1616) ; this compares to 6'80'', should be cp 3
|
||||
jr nc, .GenerateDVs
|
||||
|
||||
; 20% chance of skipping this check
|
||||
call Random
|
||||
cp 20 percent - 1
|
||||
jr c, .CheckMagikarpArea
|
||||
; Try again if > 1598
|
||||
; Try again if length > 1599
|
||||
ld a, [wMagikarpLength + 1]
|
||||
cp LOW(1600)
|
||||
cp LOW(1600) ; this compares to 6'64'', should be cp 2
|
||||
jr nc, .GenerateDVs
|
||||
```
|
||||
|
||||
*To do:* Fix this bug.
|
||||
**Fix:** Change the three `cp` instructions to use their commented values.
|
||||
|
||||
|
||||
## Magikarp lengths can be miscalculated
|
||||
|
@ -157,14 +157,14 @@ Modify `GetFrontpicPointer`:
|
||||
cp UNOWN
|
||||
jr z, .unown
|
||||
ld a, [CurPartySpecies]
|
||||
ld d, BANK(PokemonPicPointers)
|
||||
ld hl, PokemonPicPointers
|
||||
ld d, BANK(PokemonPicPointers)
|
||||
jr .ok
|
||||
|
||||
.unown
|
||||
ld a, [UnownLetter]
|
||||
ld d, BANK(UnownPicPointers)
|
||||
ld hl, UnownPicPointers
|
||||
ld d, BANK(UnownPicPointers)
|
||||
|
||||
.ok
|
||||
dec a
|
||||
@ -264,6 +264,7 @@ INCBIN "gfx/footprints/charmeleon.1bpp"
|
||||
INCBIN "gfx/footprints/charizard.1bpp"
|
||||
INCBIN "gfx/footprints/squirtle.1bpp"
|
||||
INCBIN "gfx/footprints/wartortle.1bpp"
|
||||
...
|
||||
```
|
||||
|
||||
Modify `Pokedex_LoadAnyFootprint`:
|
||||
|
Loading…
Reference in New Issue
Block a user