mirror of
https://github.com/pret/pokegold.git
synced 2024-11-26 23:10:41 +00:00
Clean up bugs commented in the source code (#89)
Co-Authored-By: Rangi <35663410+Rangi42@users.noreply.github.com>
This commit is contained in:
parent
f65f723ab4
commit
4c95a9a708
@ -1,6 +1,7 @@
|
||||
; AI_SMART prefers these moves during harsh sunlight.
|
||||
|
||||
SunnyDayMoves:
|
||||
; BUG: "Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day (see docs/bugs_and_glitches.md)
|
||||
db FIRE_PUNCH
|
||||
db EMBER
|
||||
db FLAMETHROWER
|
||||
|
@ -9,4 +9,5 @@ HappinessData_YoungerHaircutBrother:
|
||||
db -1, 4, HAPPINESS_YOUNGCUT3 ; 10% chance
|
||||
|
||||
HappinessData_DaisysGrooming:
|
||||
; BUG: Daisy's grooming doesn't always increase happiness (see docs/bugs_and_glitches.md)
|
||||
db -1, 2, HAPPINESS_GROOMING ; 99.6% chance
|
||||
|
@ -294,6 +294,7 @@ ItemAttributes:
|
||||
item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||
; METAL_COAT
|
||||
item_attribute 100, HELD_STEEL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||
; BUG: Dragon Scale, not Dragon Fang, boosts Dragon-type moves (see docs/bugs_and_glitches.md)
|
||||
; DRAGON_FANG
|
||||
item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||
; ITEM_91
|
||||
|
@ -206,6 +206,7 @@ MapGroup_Cerulean:
|
||||
map CeruleanTradeSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
map CeruleanPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
map CeruleanPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
; BUG: You can fish in the water in Cerulean Gym (see docs/bugs_and_glitches.md)
|
||||
map CeruleanGym, TILESET_PORT, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
map CeruleanMart, TILESET_MART, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
map Route10Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_10, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
|
@ -575,7 +575,8 @@ DefenseDownHit:
|
||||
supereffectivetext
|
||||
checkfaint
|
||||
buildopponentrage
|
||||
effectchance ; bug: duplicate effectchance shouldn't be here
|
||||
; BUG: Moves that lower Defense can do so after breaking a Substitute (see docs/bugs_and_glitches.md)
|
||||
effectchance
|
||||
defensedown
|
||||
statdownmessage
|
||||
endmove
|
||||
@ -706,6 +707,7 @@ DefenseUpHit:
|
||||
applydamage
|
||||
criticaltext
|
||||
supereffectivetext
|
||||
; BUG: Moves that do damage and increase your stats do not increase stats after a KO (see docs/bugs_and_glitches.md)
|
||||
checkfaint
|
||||
buildopponentrage
|
||||
defenseup
|
||||
|
@ -1071,9 +1071,8 @@ BeatUpAttackText:
|
||||
line "attack!"
|
||||
done
|
||||
|
||||
; BUG: Pokémon names 8-10 characters long can overflow the textbox,
|
||||
; printing as "Enemy 1234567890 can't": up to 21 characters, over 18.
|
||||
PresentFailedText:
|
||||
; BUG: Present's text overflows when it fails to heal an enemy Pokémon with a long name (see docs/bugs_and_glitches.md)
|
||||
text "<TARGET> can't"
|
||||
line "receive the gift!"
|
||||
prompt
|
||||
|
@ -333,8 +333,8 @@ Text_PlayedPokeFlute::
|
||||
|
||||
text_end ; unreferenced
|
||||
|
||||
; BUG: "done" is not a valid terminator here, needs to change to "text_end"
|
||||
_CoinCaseCountText::
|
||||
; BUG: Using the Coin Case can cause arbitrary code execution (see docs/bugs_and_glitches.md)
|
||||
text "Coins:"
|
||||
line "@"
|
||||
text_decimal wCoins, 2, 4
|
||||
|
@ -43,6 +43,7 @@ TrainerClassDVs:
|
||||
dn 7, 8, 8, 8 ; SWIMMERF
|
||||
dn 9, 8, 8, 8 ; SAILOR
|
||||
dn 9, 8, 8, 8 ; SUPER_NERD
|
||||
; BUG: RIVAL2 has lower DVs than RIVAL1 (see docs/bugs_and_glitches.md)
|
||||
dn 9, 8, 8, 8 ; RIVAL2
|
||||
dn 9, 8, 8, 8 ; GUITARIST
|
||||
dn 10, 8, 8, 8 ; HIKER
|
||||
|
@ -30,8 +30,8 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `_CoinCaseCountText` in [data/text/common_3.asm](https://github.com/pret/pokegold/blob/master/data/text/common_3.asm):
|
||||
|
||||
```diff
|
||||
-; BUG: "done" is not a valid terminator here, needs to change to "text_end"
|
||||
_CoinCaseCountText::
|
||||
-; BUG: Using the Coin Case can cause arbitrary code execution (see docs/bugs_and_glitches.md)
|
||||
text "Coins:"
|
||||
line "@"
|
||||
text_decimal wCoins, 2, 4
|
||||
@ -47,8 +47,8 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `HallOfFame` in [engine/events/halloffame.asm](https://github.com/pret/pokegold/blob/master/engine/events/halloffame.asm):
|
||||
|
||||
```diff
|
||||
-; Bug: Gold/Silver fail to (conditionally) erase the previous save and
|
||||
-; initialize the current save, if the player did not save on this playthrough.
|
||||
-; BUG: Entering the Hall of Fame without a save file can corrupt the PC boxes (see docs/bugs_and_glitches.md)
|
||||
|
||||
+ ld a, [wSavedAtLeastOnce]
|
||||
+ and a
|
||||
+ jr nz, .saved
|
||||
@ -62,7 +62,7 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `CheckForLuckyNumberWinners` in [engine/events/lucky_number.asm](https://github.com/pret/pokegold/blob/master/engine/events/lucky_number.asm):
|
||||
|
||||
```diff
|
||||
- ; BUG: fails to find winning mon in boxes 10-14 if not the active box
|
||||
- ; BUG: The Lucky Number Show does not find winning ID numbers in inactive boxes 10-14 (see docs/bugs_and_glitches.md)
|
||||
- cp NUM_BOXES_JAPANESE
|
||||
+ cp NUM_BOXES
|
||||
jr c, .BoxesLoop
|
||||
@ -74,9 +74,8 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `PresentFailedText` in [data/text/battle.asm](https://github.com/pret/pokegold/blob/master/data/text/battle.asm):
|
||||
|
||||
```diff
|
||||
-; BUG: Pokémon names 8-10 characters long can overflow the textbox,
|
||||
-; printing as "Enemy 1234567890 can't": up to 21 characters, over 18.
|
||||
PresentFailedText:
|
||||
-; BUG: Present's text overflows when it fails to heal an enemy Pokémon with a long name (see docs/bugs_and_glitches.md)
|
||||
- text "<TARGET> can't"
|
||||
- line "receive the gift!"
|
||||
+ text "<TARGET>"
|
||||
@ -90,6 +89,7 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `MapGroup_Cerulean` in [data/maps/maps.asm](https://github.com/pret/pokegold/blob/master/data/maps/maps.asm):
|
||||
|
||||
```diff
|
||||
-; BUG: You can fish in the water in Cerulean Gym (see docs/bugs_and_glitches.md)
|
||||
- map CeruleanGym, TILESET_PORT, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE
|
||||
+ map CeruleanGym, TILESET_PORT, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_NONE
|
||||
```
|
||||
@ -100,8 +100,14 @@ All the bugs documented here were fixed in Pokémon Crystal. Any that weren't ar
|
||||
**Fix:** Edit `Route15SignText` in [maps/Route15.asm](https://github.com/pret/pokegold/blob/master/maps/Route15.asm):
|
||||
|
||||
```diff
|
||||
- text "Route 15" ; should be "ROUTE 15"
|
||||
Route15SignText:
|
||||
-; BUG: "Route 15" is not capitalized in a signpost (see docs/bugs_and_glitches.md)
|
||||
- text "Route 15"
|
||||
+ text "ROUTE 15"
|
||||
|
||||
para "FUCHSIA CITY -"
|
||||
line "LAVENDER TOWN"
|
||||
done
|
||||
```
|
||||
|
||||
(There are many other text changes between Gold/Silver and Crystal, but they are more subjective edits, not definite corrections.)
|
||||
|
@ -538,6 +538,7 @@ EnemyUsedMaxPotion:
|
||||
jr FullRestoreContinue
|
||||
|
||||
EnemyUsedFullRestore:
|
||||
; BUG: AI use of Full Heal does not cure confusion status (see docs/bugs_and_glitches.md)
|
||||
call AI_HealStatus
|
||||
ld a, FULL_RESTORE
|
||||
ld [wCurEnemyItem], a
|
||||
@ -545,6 +546,7 @@ EnemyUsedFullRestore:
|
||||
res SUBSTATUS_CONFUSED, [hl]
|
||||
xor a
|
||||
ld [wEnemyConfuseCount], a
|
||||
; fallthrough
|
||||
|
||||
FullRestoreContinue:
|
||||
ld de, wCurHPAnimOldHP
|
||||
@ -711,6 +713,7 @@ EnemyUsedFullHealRed: ; unreferenced
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
|
||||
AI_HealStatus:
|
||||
; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurOTMon]
|
||||
ld hl, wOTPartyMon1Status
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
@ -718,14 +721,6 @@ AI_HealStatus:
|
||||
xor a
|
||||
ld [hl], a
|
||||
ld [wEnemyMonStatus], a
|
||||
; Bug: this should reset SUBSTATUS_NIGHTMARE
|
||||
; Uncomment the 2 lines below to fix
|
||||
; ld hl, wEnemySubStatus1
|
||||
; res SUBSTATUS_NIGHTMARE, [hl]
|
||||
; Bug: this should reset SUBSTATUS_CONFUSED
|
||||
; Uncomment the 2 lines below to fix
|
||||
; ld hl, wEnemySubStatus3
|
||||
; res SUBSTATUS_CONFUSED, [hl]
|
||||
ld hl, wEnemySubStatus5
|
||||
res SUBSTATUS_TOXIC, [hl]
|
||||
ret
|
||||
|
@ -176,6 +176,7 @@ AI_Redundant:
|
||||
ret
|
||||
|
||||
.FutureSight:
|
||||
; BUG: AI does not discourage Future Sight when it's already been used (see docs/bugs_and_glitches.md)
|
||||
ld a, [wEnemyScreens]
|
||||
bit 5, a
|
||||
ret
|
||||
|
@ -1652,9 +1652,10 @@ AI_Smart_Thief:
|
||||
ret
|
||||
|
||||
AI_Smart_Conversion2:
|
||||
; BUG: "Smart" AI discourages Conversion2 after the first turn (see docs/bugs_and_glitches.md)
|
||||
ld a, [wLastPlayerMove]
|
||||
and a
|
||||
jr nz, .discourage ; should be jr z
|
||||
jr nz, .discourage
|
||||
|
||||
push hl
|
||||
dec a
|
||||
@ -1730,8 +1731,8 @@ AI_Smart_MeanLook:
|
||||
pop hl
|
||||
jp z, AIDiscourageMove
|
||||
|
||||
; 80% chance to greatly encourage this move if the enemy is badly poisoned (buggy).
|
||||
; Should check wPlayerSubStatus5 instead.
|
||||
; 80% chance to greatly encourage this move if the enemy is badly poisoned.
|
||||
; BUG: "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned (see docs/bugs_and_glitches.md)
|
||||
ld a, [wEnemySubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr nz, .encourage
|
||||
|
@ -179,16 +179,12 @@ LongAnim_UpdateVariables:
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
; This routine is buggy. The result from ComputeHPBarPixels is stored
|
||||
; in e. However, the pop de opcode deletes this result before it is even
|
||||
; used. The game then proceeds as though it never deleted that output.
|
||||
; To fix, uncomment the line below.
|
||||
; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md)
|
||||
call ComputeHPBarPixels
|
||||
; ld a, e
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ld a, e ; Comment or delete this line to fix the above bug.
|
||||
ld a, e
|
||||
ld hl, wCurHPBarPixels
|
||||
cp [hl]
|
||||
jr z, .loop
|
||||
@ -373,17 +369,14 @@ ShortHPBar_CalcPixelFrame:
|
||||
call AddNTimes
|
||||
|
||||
ld b, 0
|
||||
; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is
|
||||
; divisible by HP_BAR_LENGTH_PX, the loop runs one extra time.
|
||||
; To fix, uncomment the line below.
|
||||
.loop
|
||||
; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md)
|
||||
ld a, l
|
||||
sub HP_BAR_LENGTH_PX
|
||||
ld l, a
|
||||
ld a, h
|
||||
sbc $0
|
||||
ld h, a
|
||||
; jr z, .done
|
||||
jr c, .done
|
||||
inc b
|
||||
jr .loop
|
||||
|
@ -164,8 +164,7 @@ DEF TRANS_NO_CAVE_F EQU 1 ; bit set in TRANS_NO_CAVE and TRANS_NO_CAVE_STRONGER
|
||||
StartTrainerBattle_DetermineWhichAnimation:
|
||||
; The screen flashes a different number of times depending on the level of
|
||||
; your lead Pokemon relative to the opponent's.
|
||||
; BUG: wBattleMonLevel and wEnemyMonLevel are not set at this point, so whatever
|
||||
; values happen to be there will determine the animation.
|
||||
; BUG: Battle transitions fail to account for enemy's level (see docs/bugs_and_glitches.md)
|
||||
ld de, 0
|
||||
ld a, [wBattleMonLevel]
|
||||
add 3
|
||||
|
@ -24,6 +24,7 @@ BattleCommand_BeatUp:
|
||||
ld [wCurBeatUpPartyMon], a
|
||||
|
||||
.got_mon
|
||||
; BUG: Beat Up can desynchronize link battles (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurBeatUpPartyMon]
|
||||
ld hl, wPartyMonNicknames
|
||||
call GetNickname
|
||||
@ -35,8 +36,6 @@ BattleCommand_BeatUp:
|
||||
ld a, [wCurBeatUpPartyMon]
|
||||
ld c, a
|
||||
ld a, [wCurBattleMon]
|
||||
; BUG: this can desynchronize link battles
|
||||
; Change "cp [hl]" to "cp c" to fix
|
||||
cp [hl]
|
||||
ld hl, wBattleMonStatus
|
||||
jr z, .active_mon
|
||||
@ -192,6 +191,7 @@ BattleCommand_BeatUp:
|
||||
jp SkipToBattleCommand
|
||||
|
||||
BattleCommand_BeatUpFailText:
|
||||
; BUG: Beat Up may trigger King's Rock even if it failed (see docs/bugs_and_glitches.md)
|
||||
ld a, [wBeatUpHitAtLeastOnce]
|
||||
and a
|
||||
ret nz
|
||||
|
@ -1,7 +1,5 @@
|
||||
BattleCommand_BellyDrum:
|
||||
; This command is buggy because it raises the user's attack
|
||||
; before checking that it has enough HP to use the move.
|
||||
; Swap the order of these two blocks to fix.
|
||||
; BUG: Belly Drum sharply boosts Attack even with under 50% HP (see docs/bugs_and_glitches.md)
|
||||
call BattleCommand_AttackUp2
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
|
@ -34,7 +34,7 @@ BattleCommand_Counter:
|
||||
cp SPECIAL
|
||||
ret nc
|
||||
|
||||
; BUG: Move should fail with all non-damaging battle actions
|
||||
; BUG: Counter and Mirror Coat still work if the opponent uses an item (see docs/bugs_and_glitches.md)
|
||||
ld hl, wCurDamage
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
|
@ -1,4 +1,5 @@
|
||||
BattleCommand_FrustrationPower:
|
||||
; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md)
|
||||
push bc
|
||||
ld hl, wBattleMonHappiness
|
||||
ldh a, [hBattleTurn]
|
||||
|
@ -35,7 +35,7 @@ BattleCommand_MirrorCoat:
|
||||
cp SPECIAL
|
||||
ret c
|
||||
|
||||
; BUG: Move should fail with all non-damaging battle actions
|
||||
; BUG: Counter and Mirror Coat still work if the opponent uses an item (see docs/bugs_and_glitches.md)
|
||||
ld hl, wCurDamage
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
|
@ -1,4 +1,5 @@
|
||||
BattleCommand_HappinessPower:
|
||||
; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md)
|
||||
push bc
|
||||
ld hl, wBattleMonHappiness
|
||||
ldh a, [hBattleTurn]
|
||||
|
@ -12,6 +12,7 @@ BattleCommand_Sketch:
|
||||
call CheckSubstituteOpp
|
||||
jp nz, .fail
|
||||
; If the opponent is transformed, fail.
|
||||
; BUG: A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves (see docs/bugs_and_glitches.md)
|
||||
ld a, BATTLE_VARS_SUBSTATUS5_OPP
|
||||
call GetBattleVarAddr
|
||||
bit SUBSTATUS_TRANSFORMED, [hl]
|
||||
|
@ -62,14 +62,13 @@ BattleCommand_Teleport:
|
||||
inc c
|
||||
; Generate a number less than c
|
||||
.loop_enemy
|
||||
; BUG: Wild Pokémon can always Teleport regardless of level difference (see docs/bugs_and_glitches.md)
|
||||
call BattleRandom
|
||||
cp c
|
||||
jr nc, .loop_enemy
|
||||
; b = player level / 4
|
||||
srl b
|
||||
srl b
|
||||
; This should be "jr c, .failed"
|
||||
; As written, it makes enemy use of Teleport always succeed if able
|
||||
cp b
|
||||
jr nc, .run_away
|
||||
|
||||
|
@ -38,7 +38,7 @@ PlayBattleMusic:
|
||||
cp RED
|
||||
jr z, .done
|
||||
|
||||
; They should have included EXECUTIVEM, EXECUTIVEF, and SCIENTIST too...
|
||||
; BUG: Team Rocket battle music is not used for Executives or Scientists (see docs/bugs_and_glitches.md)
|
||||
ld de, MUSIC_ROCKET_BATTLE
|
||||
cp GRUNTM
|
||||
jr z, .done
|
||||
|
@ -626,9 +626,9 @@ BattleAnimCmd_ResetObp0:
|
||||
ret
|
||||
|
||||
BattleAnimCmd_ClearObjs:
|
||||
; BUG: This function only clears the first 6⅔ objects
|
||||
; BUG: BattleAnimCmd only clears the first 6⅔ objects (see docs/bugs_and_glitches.md)
|
||||
ld hl, wActiveAnimObjects
|
||||
ld a, $a0 ; should be NUM_ANIM_OBJECTS * BATTLEANIMSTRUCT_LENGTH
|
||||
ld a, $a0
|
||||
.loop
|
||||
ld [hl], 0
|
||||
inc hl
|
||||
|
@ -37,13 +37,6 @@ HaircutOrGrooming:
|
||||
call CopyPokemonName_Buffer1_Buffer3
|
||||
pop hl
|
||||
call Random
|
||||
; Bug: Subtracting $ff from $ff fails to set c.
|
||||
; This can result in overflow into the next data array.
|
||||
; In the case of getting a grooming from Daisy, we bleed
|
||||
; into CopyPokemonName_Buffer1_Buffer3, which passes
|
||||
; $d0 to ChangeHappiness and returns $73 to the script.
|
||||
; The end result is that there is a 0.4% chance your
|
||||
; Pokemon's happiness will not change at all.
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
|
@ -14,8 +14,7 @@ HallOfFame::
|
||||
ld hl, wStatusFlags
|
||||
set STATUSFLAGS_HALL_OF_FAME_F, [hl]
|
||||
|
||||
; Bug: Gold/Silver fail to (conditionally) erase the previous save and
|
||||
; initialize the current save, if the player did not save on this playthrough.
|
||||
; BUG: Entering the Hall of Fame without a save file can corrupt the PC boxes (see docs/bugs_and_glitches.md)
|
||||
|
||||
ld hl, wHallOfFameCount
|
||||
ld a, [hl]
|
||||
@ -358,8 +357,9 @@ _HallOfFamePC:
|
||||
call ClearBGPalettes
|
||||
pop hl
|
||||
call DisplayHOFMon
|
||||
; BUG: A "HOF Master!" title for 200-Time Famers is defined but inaccessible (see docs/bugs_and_glitches.md)
|
||||
ld a, [wHallOfFameTempWinCount]
|
||||
cp HOF_MASTER_COUNT + 1 ; should be HOF_MASTER_COUNT
|
||||
cp HOF_MASTER_COUNT + 1
|
||||
jr c, .print_num_hof
|
||||
ld de, .HOFMaster
|
||||
hlcoord 1, 2
|
||||
|
@ -97,7 +97,7 @@ CheckForLuckyNumberWinners:
|
||||
inc c
|
||||
ld a, c
|
||||
|
||||
; BUG: fails to find winning mon in boxes 10-14 if not the active box
|
||||
; BUG: The Lucky Number Show does not find winning ID numbers in inactive boxes 10-14 (see docs/bugs_and_glitches.md)
|
||||
cp NUM_BOXES_JAPANESE
|
||||
jr c, .BoxesLoop
|
||||
|
||||
|
@ -277,12 +277,11 @@ CalcMagikarpLength:
|
||||
ret
|
||||
|
||||
.BCLessThanDE:
|
||||
; Intention: Return bc < de.
|
||||
; Reality: Return b < d.
|
||||
; BUG: Magikarp lengths can be miscalculated (see docs/bugs_and_glitches.md)
|
||||
ld a, b
|
||||
cp d
|
||||
ret c
|
||||
ret nc ; whoops
|
||||
ret nc
|
||||
ld a, c
|
||||
cp e
|
||||
ret
|
||||
|
@ -390,6 +390,7 @@ SurfFromMenuScript:
|
||||
special UpdateTimePals
|
||||
|
||||
UsedSurfScript:
|
||||
; BUG: Surfing directly across a map connection does not load the new map (see docs/bugs_and_glitches.md)
|
||||
writetext UsedSurfText ; "used SURF!"
|
||||
waitbutton
|
||||
closetext
|
||||
|
@ -482,12 +482,13 @@ SlotsAction_PayoutAnim:
|
||||
jr c, .okay
|
||||
inc de
|
||||
.okay
|
||||
; BUG: Slot machine payout sound effects cut each other off (see docs/bugs_and_glitches.md)
|
||||
ld [hl], e
|
||||
dec hl
|
||||
ld [hl], d
|
||||
ld a, [wSlotsDelay]
|
||||
and $7
|
||||
ret z ; ret nz would be more appropriate
|
||||
ret z
|
||||
ld de, SFX_GET_COIN_FROM_SLOTS
|
||||
call PlaySFX
|
||||
ret
|
||||
|
@ -72,6 +72,7 @@ Credits::
|
||||
|
||||
call GetCreditsPalette
|
||||
call SetPalettes
|
||||
; BUG: Credits sequence changes move selection menu behavior (see docs/bugs_and_glitches.md)
|
||||
ldh a, [hVBlank]
|
||||
push af
|
||||
ld a, $5
|
||||
|
@ -542,7 +542,7 @@ TryObjectEvent:
|
||||
ld a, [hl]
|
||||
and %00001111
|
||||
|
||||
; Bug: If IsInArray returns nc, data at bc will be executed as code.
|
||||
; BUG: TryObjectEvent arbitrary code execution (see docs/bugs_and_glitches.md)
|
||||
push bc
|
||||
ld de, 3
|
||||
ld hl, ObjectEventTypeArray
|
||||
@ -557,7 +557,6 @@ TryObjectEvent:
|
||||
jp hl
|
||||
|
||||
.nope
|
||||
; pop bc
|
||||
xor a
|
||||
ret
|
||||
|
||||
|
@ -2629,7 +2629,7 @@ ResetObject::
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp -1
|
||||
jp z, .set_standing ; a jr would have been appropriate here
|
||||
jp z, .set_standing
|
||||
push bc
|
||||
call GetMapObject
|
||||
ld hl, MAPOBJECT_MOVEMENT
|
||||
|
@ -4,10 +4,10 @@ CanObjectMoveInDirection:
|
||||
bit SWIMMING_F, [hl]
|
||||
jr z, .not_swimming
|
||||
|
||||
; BUG: Swimming NPCs aren't limited by their movement radius (see docs/bugs_and_glitches.md)
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
bit NOCLIP_TILES_F, [hl] ; lost, uncomment next line to fix
|
||||
; jr nz, .noclip_tiles
|
||||
bit NOCLIP_TILES_F, [hl]
|
||||
push hl
|
||||
push bc
|
||||
call WillObjectBumpIntoLand
|
||||
|
@ -391,14 +391,9 @@ DoPlayerMovement::
|
||||
db FACE_UP | FACE_LEFT ; COLL_HOP_UP_LEFT
|
||||
|
||||
.CheckWarp:
|
||||
; Bug: Since no case is made for STANDING here, it will check
|
||||
; [.EdgeWarps + $ff]. This resolves to $3e.
|
||||
; This causes wWalkingIntoEdgeWarp to be nonzero when standing on tile $3e,
|
||||
; making bumps silent.
|
||||
; BUG: No bump noise if standing on tile $3E (see docs/bugs_and_glitches.md)
|
||||
|
||||
ld a, [wWalkingDirection]
|
||||
; cp STANDING
|
||||
; jr z, .not_warp
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .EdgeWarps
|
||||
@ -410,7 +405,6 @@ DoPlayerMovement::
|
||||
ld a, TRUE
|
||||
ld [wWalkingIntoEdgeWarp], a
|
||||
ld a, [wWalkingDirection]
|
||||
; This is in the wrong place.
|
||||
cp STANDING
|
||||
jr z, .not_warp
|
||||
|
||||
|
@ -1146,11 +1146,7 @@ Script_memcall:
|
||||
; fallthrough
|
||||
|
||||
ScriptCall:
|
||||
; Bug: The script stack has a capacity of 5 scripts, yet there is
|
||||
; nothing to stop you from pushing a sixth script. The high part
|
||||
; of the script address can then be overwritten by modifications
|
||||
; to wScriptDelay, causing the script to return to the rst/interrupt
|
||||
; space.
|
||||
; BUG: ScriptCall can overflow wScriptStack and crash (see docs/bugs_and_glitches.md)
|
||||
|
||||
push de
|
||||
ld hl, wScriptStackSize
|
||||
|
@ -330,14 +330,14 @@ ChooseWildEncounter:
|
||||
inc b
|
||||
; Store the level
|
||||
.ok
|
||||
; BUG: ChooseWildEncounter doesn't really validate the wild Pokemon species (see docs/bugs_and_glitches.md)
|
||||
ld a, b
|
||||
ld [wCurPartyLevel], a
|
||||
ld b, [hl]
|
||||
; ld a, b
|
||||
call ValidateTempWildMonSpecies
|
||||
jr c, .nowildbattle
|
||||
|
||||
ld a, b ; This is in the wrong place.
|
||||
ld a, b
|
||||
cp UNOWN
|
||||
jr nz, .done
|
||||
|
||||
|
@ -499,6 +499,7 @@ PhoneCall::
|
||||
ld [hl], "☎"
|
||||
inc hl
|
||||
inc hl
|
||||
; BUG: The unused phonecall script command may crash (see docs/bugs_and_glitches.md)
|
||||
ld a, [wPhoneScriptBank]
|
||||
ld b, a
|
||||
ld a, [wPhoneCaller]
|
||||
|
@ -465,6 +465,7 @@ DexEntryScreen_MenuActionJumptable:
|
||||
ret
|
||||
|
||||
.Cry:
|
||||
; BUG: Playing Entei's Pokédex cry can distort Raikou's and Suicune's (see docs/bugs_and_glitches.md)
|
||||
call Pokedex_GetSelectedMon
|
||||
ld a, [wTempSpecies]
|
||||
call GetCryIndex
|
||||
|
@ -618,6 +618,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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -384,6 +384,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
|
||||
@ -398,6 +399,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
|
||||
|
@ -193,7 +193,8 @@ SchoolboyBillyAfterBattleText:
|
||||
done
|
||||
|
||||
Route15SignText:
|
||||
text "Route 15" ; should be "ROUTE 15"
|
||||
; BUG: "Route 15" is not capitalized in a signpost (see docs/bugs_and_glitches.md)
|
||||
text "Route 15"
|
||||
|
||||
para "FUCHSIA CITY -"
|
||||
line "LAVENDER TOWN"
|
||||
|
Loading…
Reference in New Issue
Block a user