fix(backend): a Foundry creature keeps its defences, its prose, and its format (#553) #562
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/553-foundry-pf2e-body"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three gaps in the Foundry adapter (#559) found by wiring the pf2e starter build onto it. Part of #553; branched from #560's head, so the diff is one commit.
Defences were dropped. The pf2e and dnd5e body maps rendered strikes, abilities and spells but left saves, skills, senses, languages and immunities/weaknesses/resistances buried in
extra["system"], which nothing renders. Both maps now emit Statistics (perception and senses, languages, skills) and Defences (AC and saves, HP with immunities/weaknesses/resistances) before the strikes, in Monster Core order. For dnd5e, saves and skills are listed as proficiencies rather than bonuses, because the 5e system stores the proficiency flag and not the computed number; inventing a figure the file does not contain would be a policy change, not a fix.Bare enrichers read as data.
@Check[fortitude|dc:26|basic:true]came out as "fortitude, dc:26, basic:true". The enricher pass is now a per-form renderer with balanced-bracket reading: "DC 26 basic Fortitude", "30-foot emanation", "4d6 fire", "DC 11 flat check", plus[[/r …]]{label}inline rolls and the pre-remastertype:spelling. Sixteen parametrised cases and an end-to-end fixture assertion.A kilobyte-record Open5e array still detected as native. The bare-array gate only declined on a positive signal (
_id), so any array whose first record overflows the 512-byte sniff window and has no_idstayed with the native reader and imported as empty records with no error. The rule is now closed rather than a list of other formats' fingerprints: a truncated first element is native only ifkindis inside the window. That rests on a promise about our own writer, which is verified (export_serviceemitskindfirst) and pinned by a test, and the one cost — a hand-written array that burieskindpast byte 512 gets "could not tell what format" and needsformat=questboard— is tested and documented next to the bare-array example indocs/CONTENT-PACKS.md.Tests: 228 across the Foundry, detection, import, search, 5etools and orcbrew suites. Fixtures remain invented.
🤖 Generated with Claude Code
kind(#553)