Repository navigation
v0.3.2
Lockstep release of dnd5e-engine, dnd5e-srd-data and nat20-bridge 0.3.2. Purely additive — no public name removed or changed shape. PR #12.
dnd5e-engine
Additive maturity pass from an independent review of the packages as a
standalone engine. No public name is removed or changed shape.
Fixed
- Multiattack fan-out resolved the wrong attack mix for most monsters. The
prose parser only matched[[/item .id]]{label}, but the corpus mostly ships
[[/item Name]]or bare mnemonic ids, so 174 of 180 multiattacks fell back to
"repeat one sibling N times" — silently wrong for every heterogeneous
multiattacker. The parser now reads per-token counts from the multiattack's
first sentence (excluding "It can replace one attack with …" riders) and
recovers names from Foundry's mnemonic ids. Precise joins: 6/180 → 119/180.
Chuul, Otyugh, Cloaker, Unicorn, Mummy, Pit Fiend, Xorn and Marilith now make
their correct attack sequences. Behaviour change for consumers: affected
monsters deal their correct (higher) damage per round and consume more of the
dice stream, so combat transcripts seeded against 0.3.x will diverge. __version__now derives from installed package metadata instead of a
hand-maintained literal, so it cannot drift frompyproject.toml(0.3.0 shipped
reporting0.2.0). Pinned bytests/test_determinism_contract.py.
Added
CheckSpec.rng—resolve_checkpreviously drew its d20 from the
process-globalrandommodule with no way to inject a generator,
contradicting the documented determinism guarantee. Pass a seeded
random.Randomfor a reproducible standalone check;Nonepreserves the old
behaviour.rules.dice,rules.skillsandroll_dice_str/
apply_changes_to_checkgain matching optionalrngparameters. Combat
resolution was already seeded and is unchanged.docs/capabilities.md— a per-mechanic matrix of what the engine
resolves, what loads but produces no events, and what is not modelled. Its
published counts are recomputed from the corpus by
tests/test_capability_matrix.py.- Concept pages for reactions (the pre-armed model) and monsters (the built-in
AI, multiattack join rate, absent legendary actions). tests/test_docstrings_are_host_agnostic.py— fails the build on a docstring
that names a private downstream application, retired tooling, or a doc path
that does not exist in this repo. 104 such references were rendered onto the
public API site; all removed.
Changed
CONDITION_EFFECTS[EXHAUSTION]/[PRONE]descriptive strings corrected from
2014 to SRD 5.2 wording and labelled as not-enforced; the enforced exhaustion
rule is still the 2014 one (tracked inBACKLOG.md).- Sphinx cross-reference roles in docstrings, which rendered as literal markup
on the API site, converted to inline code. - Monkeypatching
roll_dice_strnow requires a two-parameter double
(lambda expr, rng=None: …).
dnd5e-srd-data
No schema or canonical-content changes.
Fixed
__version__derives from installed package metadata (0.3.0 shipped reporting
0.2.0).
Added
- Oracle coverage floors (
tests/test_oracle_coverage_floor.py). The
fidelity suite compares canonical entries only against slugs the oracle
contains, silently skipping the rest — so it reported green while the monster
oracle covered 3 of 341 monsters. Coverage is now a tested property with a
per-category floor pinned at today's ratio, to be ratcheted upward. - Corpus prose integrity gate (
tests/test_corpus_prose_integrity.py).
Fails on unsubstituted template placeholders in shipped descriptions. It found
monsters/ancient-gold-dragonshipping"makes {count} [[/item]] attacks";
registered as an upstream defect intests/oracle/known_prose_defects.json
rather than hand-edited (the corpus is translator output).
Changed
- Coverage floor raised 90 → 96 (actual 96.2%).