Clean up bugs commented in the source code (#912)

Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
vulcandth
2022-07-09 16:12:02 -05:00
committed by GitHub
parent bd27c0d8dc
commit ef9b9bb437
49 changed files with 267 additions and 324 deletions

View File

@@ -620,6 +620,7 @@ GetBreedmonMovePointer:
ret
GetEggFrontpic:
; BUG: A hatching Unown egg would not show the right letter (see docs/bugs_and_glitches.md)
push de
ld [wCurPartySpecies], a
ld [wCurSpecies], a

View File

@@ -32,6 +32,7 @@ CalcLevel:
CalcExpAtLevel:
; (a/b)*n**3 + c*n**2 + d*n - e
; BUG: Experience underflow for level 1 Pokémon with Medium-Slow growth rate (see docs/bugs_and_glitches.md)
ld a, [wBaseGrowthRate]
add a
add a

View File

@@ -879,6 +879,7 @@ RetrieveBreedmon:
ld a, TRUE
ld [wSkipMovesBeforeLevelUp], a
predef FillMoves
; BUG: Pokémon deposited in the Day-Care might lose experience (see docs/bugs_and_glitches.md)
ld a, [wPartyCount]
dec a
ld [wCurPartyMon], a

View File

@@ -385,6 +385,7 @@ PlacePartyMonEvoStoneCompatibility:
ret
.DetermineCompatibility:
; BUG: Only the first three evolution entries can have Stone compatibility reported correctly (see docs/bugs_and_glitches.md)
ld de, wStringBuffer1
ld a, BANK(EvosAttacksPointers)
ld bc, 2
@@ -399,6 +400,7 @@ PlacePartyMonEvoStoneCompatibility:
call FarCopyBytes
ld hl, wStringBuffer1
.loop2
; BUG: EVOLVE_STAT can break Stone compatibility reporting (see docs/bugs_and_glitches.md)
ld a, [hli]
and a
jr z, .nope

View File

@@ -56,6 +56,7 @@ CheckOwnMonAnywhere:
and a
ret z
; BUG: CheckOwnMon does not check the Day-Care (see docs/bugs_and_glitches.md)
ld d, a
ld e, 0
ld hl, wPartyMon1Species
@@ -221,7 +222,8 @@ CheckOwnMon:
ld hl, wPlayerName
rept NAME_LENGTH_JAPANESE - 2 ; should be PLAYER_NAME_LENGTH - 2
; BUG: CheckOwnMon only checks the first five letters of OT names (see docs/bugs_and_glitches.md)
rept NAME_LENGTH_JAPANESE - 2
ld a, [de]
cp [hl]
jr nz, .notfound