Skip to content

Fix constants fidelity: add FORMS.INSTANT_DECAY (bit D), rename RIST_L to WRIST_L - #16

Merged
ctoth merged 1 commit into
masterfrom
fix/constants-fidelity-issue-9
Jul 27, 2026
Merged

Fix constants fidelity: add FORMS.INSTANT_DECAY (bit D), rename RIST_L to WRIST_L#16
ctoth merged 1 commit into
masterfrom
fix/constants-fidelity-issue-9

Conversation

@ctoth

@ctoth ctoth commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Fixes #9.

Two fidelity fixes in area_reader/constants.py:

  1. FORMS.INSTANT_DECAY added (BITFLAGS['D'] = 8), matching ROM's FORM_INSTANT_DECAY in merc.h. Previously the enum jumped from MAGICAL (4) to OTHER (16), so bit 8 parsed but rendered unnamed. The enum.auto() members are unaffected: UNUSED1 was and remains 32 (next power of two above OTHER), verified at runtime.
  2. WEAR_LOCATIONS.WRIST_L is now the canonical name for 14; the misspelled RIST_L is kept as a deprecated alias so any external importers keep working. RIST_L had no other references inside this repo.

Verification (commands run locally):

  • repr(FORMS(8))<FORMS.INSTANT_DECAY: 8>; FORMS(12)<FORMS.MAGICAL|INSTANT_DECAY: 12>
  • WEAR_LOCATIONS(14) is WEAR_LOCATIONS.WRIST_LTrue; WEAR_LOCATIONS.RIST_L is WEAR_LOCATIONS.WRIST_LTrue
  • Full suite: 944 passed in 85.94s (942 existing + 2 new regression tests in test_area_reader.py)

🤖 Generated with Claude Code

https://claude.ai/code/session_01F8kWxXQUY73XMXyeUYhkLd

…L to WRIST_L

FORMS skipped bit 8 (ROM's FORM_INSTANT_DECAY in merc.h), so a mob with
that form bit parsed but rendered unnamed. enum.auto() members are
unaffected: UNUSED1 stays at 32 (next power of two above OTHER=16).

WEAR_LOCATIONS.RIST_L was a typo for WRIST_L; the correct name is now
canonical with RIST_L kept as a deprecated alias for any external
importers.

Fixes #9

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8kWxXQUY73XMXyeUYhkLd
@ctoth
ctoth force-pushed the fix/constants-fidelity-issue-9 branch from ee4102b to 323f5b1 Compare July 27, 2026 06:14
@ctoth
ctoth merged commit 59d84cb into master Jul 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constants fidelity: FORMS is missing FORM_INSTANT_DECAY (bit D/8); WEAR_LOCATIONS.RIST_L typo

1 participant