summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--constants/misc_constants.asm3
-rw-r--r--docs/bugs_and_glitches.md19
-rwxr-xr-xengine/events/halloffame.asm6
3 files changed, 25 insertions, 3 deletions
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index d1423eae0..fa338d81d 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -37,6 +37,9 @@ MAX_LINK_RECORD EQU 9999
; day-care
MAX_DAY_CARE_EXP EQU $500000
+; hall of fame
+HOF_MASTER_COUNT EQU 201
+
; bug-catching contest
BUG_CONTEST_MINUTES EQU 20
BUG_CONTEST_SECONDS EQU 0
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md
index e938dfa67..980c75e62 100644
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -33,6 +33,7 @@ These are known bugs and glitches in the original Pokémon Crystal game: code th
- [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)
+- [A "HOF Master!" title for 201-Time Famers is defined but inaccessible](#a-hof-master-title-for-201-time-famers-is-defined-but-inaccessible)
- [Slot machine payout sound effects cut each other off](#slot-machine-payout-sound-effects-cut-each-other-off)
- [Team Rocket battle music is not used for Executives or Scientists](#team-rocket-battle-music-is-not-used-for-executives-or-scientists)
- [No bump noise if standing on tile `$3E`](#no-bump-noise-if-standing-on-tile-3e)
@@ -897,6 +898,24 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
*To do:* Fix this bug.
+## A "HOF Master!" title for 201-Time Famers is defined but inaccessible
+
+([Video](https://www.youtube.com/watch?v=iHkWubvxmSg))
+
+This is a bug with `HallOfFame` in [engine/events/halloffame.asm](/engine/events/halloffame.asm):
+
+```asm
+ ld hl, wHallOfFameCount
+ ld a, [hl]
+ cp HOF_MASTER_COUNT - 1 ; should be HOF_MASTER_COUNT
+ jr nc, .ok
+ inc [hl]
+.ok
+```
+
+**Fix:** Change `HOF_MASTER_COUNT - 1` to `HOF_MASTER_COUNT`.
+
+
## Slot machine payout sound effects cut each other off
([Video](https://www.youtube.com/watch?v=ojq3xqfRF6I))
diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm
index 8b6f2a62e..5edb1502d 100755
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -18,7 +18,7 @@ HallOfFame:: ; 0x8640e
ld hl, wHallOfFameCount
ld a, [hl]
- cp 200
+ cp HOF_MASTER_COUNT - 1 ; should be HOF_MASTER_COUNT
jr nc, .ok
inc [hl]
.ok
@@ -355,7 +355,7 @@ _HallOfFamePC: ; 86650
.DisplayMonAndStrings:
; Print the number of times the player has entered the Hall of Fame.
-; If that number is above 200, print "HOF Master!" instead.
+; If that number is at least HOF_MASTER_COUNT, print "HOF Master!" instead.
ld a, [wHallOfFameMonCounter]
cp PARTY_LENGTH
jr nc, .fail
@@ -376,7 +376,7 @@ _HallOfFamePC: ; 86650
pop hl
call DisplayHOFMon
ld a, [wHallOfFameTempWinCount]
- cp 200 + 1
+ cp HOF_MASTER_COUNT
jr c, .print_num_hof
ld de, .HOFMaster
hlcoord 1, 2