Hold Shift when pressing the health percentage key to hear mana instead.
Extract ComputePercentage helper to deduplicate the HP/mana calculation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Guard against MyPlayer being nullptr in IsPlayerDead(),
CycleSpellHotkeys(), RefreshTownNpcOrder(), SpeakSelectedTownNpc(), and
ListTownNpcsKeyPressed() to prevent crashes during early init or after
disconnect. Also reset AutoWalkTrackerTargetId when MyPlayer is null in
the auto-walk tracker to prevent the walk loop from retrying endlessly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix copy-paste comment errors in SpellBookKeyPressed() that referred to
"inventory" instead of "spellbook", and QuestLogKeyPressed() that said
"character quest log" instead of "quest log". Correct a misleading
FindPath comment in town NPC auto-walk, and update a stale SourceX path
reference in diablo.cpp.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move ~4,100 lines of accessibility code from diablo.cpp into 6 new
modules, reducing diablo.cpp from ~7,700 to ~3,660 lines.
New modules:
- controls/accessibility_keys: UI key handlers and guard functions
(IsPlayerDead, IsGameRunning, CanPlayerTakeAction, etc.)
- utils/walk_path_speech: BFS pathfinding, PosOk variants, walk
direction helpers, and path-to-speech formatting
- utils/accessibility_announcements: periodic announcements for low
HP warning sound, durability, boss health, monsters, doors
- controls/town_npc_nav: town NPC selection cycling and auto-walk
- utils/navigation_speech: exit/stairs/portal/unexplored speech and
keyboard walk key handlers
- controls/tracker: target category cycling, candidate finding,
pathfinding navigation, and auto-walk tracker
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>