[PR #1082] [MERGED] feat(ruleset-5e): SRD spellcasters cast from their own sheets, and Hellish Rebuke answers harm (0.8.0, Capability API 1.34) #1285

Closed
opened 2026-10-21 05:07:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1082
Author: @kolacheee
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/25/2026
Merged by: @kolacheee

Base: staging ← Head: feat/ruleset-5e-moments


📝 Commits (5)

  • 515b23c feat(ruleset-5e): spellcasters as sheet creatures and Hellish Rebuke's moment (0.8.0)
  • cbefa44 docs(ruleset-5e): the Gynosphinx does not cast, and document the 1.33 and 1.34 gates
  • 73604af fix(ruleset-5e): the Priest's printed Religion, and text held only to a declared length
  • d2ee33d docs(ruleset-5e): call the five spells' stated roll their base damage roll
  • 256abda docs(ruleset-5e): a sheet creature needs no actions but may keep printed ones

📊 Changes

21 files changed (+3036 additions, -182 deletions)

View changed files

📝 CONTRIBUTING.md (+2 -0)
📝 README.md (+1 -1)
➕ artifacts/ruleset-5e-2014-0.8.0.zip (+0 -0)
📝 catalog/preview/catalog.json (+13 -13)
📝 catalog/preview/notes.json (+6 -0)
📝 catalog/preview/v2/catalog.json (+13 -13)
📝 catalog/preview/v2/notes.json (+6 -0)
📝 catalog/preview/v3/catalog.json (+13 -13)
📝 catalog/preview/v3/notes.json (+6 -0)
📝 packages/ruleset-5e-2014/CHANGELOG.md (+8 -0)
📝 packages/ruleset-5e-2014/README.md (+54 -18)
📝 packages/ruleset-5e-2014/catalogs/creatures.json (+1893 -67)
📝 packages/ruleset-5e-2014/catalogs/spells.json (+68 -6)
📝 packages/ruleset-5e-2014/locales/en.json (+1 -1)
📝 packages/ruleset-5e-2014/manifest.json (+10 -10)
📝 packages/ruleset-5e-2014/ruleset.json (+37 -3)
📝 scripts/build-5e-srd-catalogs.mjs (+394 -18)
📝 scripts/build-ruleset-packages.mjs (+3 -0)
📝 scripts/ruleset-package-checks.mjs (+228 -19)
📝 scripts/tests/ruleset-package.regression.mjs (+278 -0)

...and 1 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1081

Why this change

  • SRD spellcasters cast nothing in a fight. The Mage, the Lich, the Priest and the rest kept their spells only as a prose trait, so a battle offered them a dagger. Engine Capability API 1.34 (https://github.com/Pasta-Devs/Marinara-Engine/pull/6613) lets a bestiary creature carry a sheet with its own slots and spells, and this package did not use it yet.
  • Reaction spells never fired. Every one was reaction: true, which the Engine puts on no menu. Capability API 1.33 (https://github.com/Pasta-Devs/Marinara-Engine/pull/6608) lets an entry name its moment.
  • Five spells were never offered to anybody, players included. The source data leaves out the damage roll of Sacred Flame, Acid Splash, Poison Spray, Vicious Mockery and Spiritual Weapon, so they shipped as utility. Sacred Flame and Spiritual Weapon are the SRD clerics' main attacks, so the new casters needed them.
  • The package checker had no gate for either key, so a package using them under an older declaration was not refused here as the Engine would refuse it.
  • Stale text. The README, manifest and combat block said reactions, the opportunity-attack choice and the legendary action window were missing. The Engine has had all three since https://github.com/Pasta-Devs/Marinara-Engine/pull/6525 and https://github.com/Pasta-Devs/Marinara-Engine/pull/6608.

What changed

ruleset-5e-2014 0.8.0: Capability API 1.34, ruleset version 8, sheet version 3. Built against Engine staging e15c9e558.

  • Twelve slot casters are sheet creatures: Acolyte, Priest, Cult Fanatic, Druid, Mage, Archmage, Lich, Mummy Lord, Guardian Naga, Spirit Naga, Androsphinx, Gynosphinx. The converter reads each Spellcasting trait (caster level, ability, DC, to-hit, slots per level, prepared spells) and writes a sheet with its abilities, AC, printed hit points, speed and one spell row per prepared spell, linked to the package's own spell catalog. Printed attacks stay as actions and the trait stays for the Game Master.
  • Printed numbers are held exactly. A monster's proficiency follows challenge rating and a sheet's follows level, so the difference goes into two new sheet fields (Spell attack: other bonus, Spell save DC: other bonus, range -5 to 5, default 0) and into a bonus on each printed save and skill. The converter restates the Engine's sheet arithmetic and fails the build if any spell attack, spell DC, save or skill differs from the stat block, or if a correction is out of range. An unknown formula piece also fails the build.
  • Hellish Rebuke is { "on": "harmed", "at": "source" }. The converter copies each reaction spell's trigger sentence from the source and fails if a reaction spell is in neither table or its trigger changes.
  • Different from the issue: Counterspell stays reaction: true. The issue proposed { "on": "aimed", "cancels": true }, but the Engine's aimed moment opens for any action aimed at the holder, a sword swing as much as a spell, so Counterspell would parry weapons. It needs an Engine filter on what an aimed moment answers. That filter is planned with the Engine's remaining combat work. Shield (an Armor Class number) and Feather Fall (nothing falls) also stay true, and the README says why.
  • Five spell damage rows in the existing hand-checked SPELL_RIDERS table, each citing its own text. The four cantrips keep the source's own per-level scaling.
  • Innate Spellcasting and hag coven Shared Spellcasting stay traits, and the README says why.
  • One fixture correction. The Open5e data gives the Priest Religion +5, and SRD 5.1 prints +4. A hand-checked row carries +4 and stops the build if the fixture is ever fixed.
  • Threat scale unchanged: it now reads each creature's printed hit points and AC whichever shape the creature took. The generated threat block is byte-identical to 0.7.0.
  • Package checker (scripts/ruleset-package-checks.mjs): assertRulesetReactions (1.33) and the creature-sheet branch of assertRulesetCreatures (1.34), restating the Engine's rules and never stricter. Wired into build-ruleset-packages.mjs, build-5e-srd-catalogs.mjs and validate-catalog.mjs.
  • Docs: package README, package CHANGELOG, manifest description, root README row (also stale at 1.28), CONTRIBUTING (the two new gates). The stale opportunity-attack comment in the combat block is rewritten.
  • Generated: catalogs/*.json, ruleset.json, manifest hashes, locales/en.json, artifacts/ruleset-5e-2014-0.8.0.zip, and the preview catalog lanes.

Package and security impact

  • Affected package IDs: ruleset-5e-2014 (staging-only tier).
  • Engine compatibility impact: needs Capability API 1.34 (was 1.32), which is on Engine staging today. An older Engine refuses the install.
  • New or changed permissions/entrypoints: none. Pure data.
  • Restart, storage, update, or uninstall impact: no restart. The sheet version bump only changes the version recorded when a sheet is next saved; the Engine runs no migration on it. Existing characters gain the two new fields at 0, so their spell attack and DC are unchanged.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Run locally by the agent, all exit 0: npm run check, npm run test:security, node scripts/test-catalog-lanes.mjs, node scripts/tests/ui-translation-retention.regression.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-package-locale-keys.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node scripts/tests/catalog-release-notes.regression.mjs, node scripts/tests/ruleset-package.regression.mjs, git diff --check. A second converter run left every generated file byte-identical.

  • Against the old build, only the 12 casters changed in creatures.json, only Hellish Rebuke and the five damage spells changed in spells.json, and the threat block is identical.
  • All twelve casters' ability scores, AC, hit points, saves, skills, caster level, spell DC, spell attack and slots were compared against the SRD 5.1 API at https://www.dnd5eapi.co. The Priest's Religion was the only difference, now corrected.
  • Deliberately breaking five of the new checker rules (the 1.34 gate, cancel-only-on-aimed, the replaced keys, the catalog entry lookup, text held only to a declared length) each fails the regression test.
  • Against Engine staging e15c9e558 (scratch script, not committed): ruleset.json and all three catalog files parse with the Engine's own parser. Each of the 12 casters enters a fight through createRulesetEncounter with the printed AC, hit points and all six saves, and every spell attack and spell DC equals the printed numbers. The Gynosphinx prepares nothing a fight resolves, so it offers no spell, as the README says.
  • Live fight, same Engine: the SRD Mage casts Fireball and its own 3rd-level slots go from 3 to 2. A warlock holding Hellish Rebuke who takes that damage is asked, the rebuke hits the Mage (40 to 30 hit points), and it costs the warlock a 1st-level slot.

Local CodeRabbit, three passes, five findings. Fixed four: the release note counted the Gynosphinx among the casters that cast, the Priest's Religion fixture error, the checker holding text to an undeclared length (stricter than the Engine), and "1st-level roll" reworded to "base damage roll". Declined one: setting the Lich's Arcana bonus to 8 would make it +19, the Monster Manual's number. SRD 5.1, the fixture and the SRD API all print +18, which the sheet computes (5 + 6 + 7), and the build fails if it ever does not.

NOT done: a real install through the Engine.

Still to verify by hand, after this merges to staging:

  • On an Engine running from staging, update 5e (SRD 5.1) to 0.8.0 and confirm no restart is asked for.
  • In a Game Mode game on 5e, have the Game Master name an SRD Mage as an opponent. Confirm it casts spells in the fight and its spell slots go down.
  • Give a character Hellish Rebuke and a free 1st-level slot, take damage, and confirm the fight asks whether to cast it.
  • Open a character sheet made on 0.7.0 and confirm the two new spellcasting fields read 0 and Spell save DC and Spell attack bonus are unchanged.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

Updated: the package README and CHANGELOG, the root README row and CONTRIBUTING. No Engine documentation changes.

UI evidence (if applicable)

None. The package has no UI of its own.

Summary by CodeRabbit

  • New Features

    • Spellcasting monsters now use their own spell slots, with their combat statistics represented on character-style sheets.
    • Added damage mechanics for several spells and cantrips, including level-based cantrip scaling.
    • Hellish Rebuke can trigger when its caster is harmed.
    • Opportunity attacks now prompt the eligible combatant instead of resolving automatically.
    • Added optional spell attack and spell save DC bonuses to character sheets.
  • Updates

    • Updated the 5e ruleset to version 0.8.0; it now requires Engine Capability API 1.34.
    • Counterspell, Shield, and Feather Fall remain unavailable as timed reactions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1082 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/25/2026 **Status:** ✅ Merged **Merged:** 9/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `feat/ruleset-5e-moments` --- ### 📝 Commits (5) - [`515b23c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/515b23c7616866cc0f9dc31c53245ee893c8c06c) feat(ruleset-5e): spellcasters as sheet creatures and Hellish Rebuke's moment (0.8.0) - [`cbefa44`](https://github.com/Pasta-Devs/Marinara-Agents/commit/cbefa44ced5a35a1cd8bb241e22fc4d91ec939c3) docs(ruleset-5e): the Gynosphinx does not cast, and document the 1.33 and 1.34 gates - [`73604af`](https://github.com/Pasta-Devs/Marinara-Agents/commit/73604af3fd0a736ac026f96ac7f37028e8302afd) fix(ruleset-5e): the Priest's printed Religion, and text held only to a declared length - [`d2ee33d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d2ee33d51cc37820a098c21cfd3608855e4b884a) docs(ruleset-5e): call the five spells' stated roll their base damage roll - [`256abda`](https://github.com/Pasta-Devs/Marinara-Agents/commit/256abda14c4aa474a88781b88486941cb56af8bc) docs(ruleset-5e): a sheet creature needs no actions but may keep printed ones ### 📊 Changes **21 files changed** (+3036 additions, -182 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTING.md` (+2 -0) 📝 `README.md` (+1 -1) ➕ `artifacts/ruleset-5e-2014-0.8.0.zip` (+0 -0) 📝 `catalog/preview/catalog.json` (+13 -13) 📝 `catalog/preview/notes.json` (+6 -0) 📝 `catalog/preview/v2/catalog.json` (+13 -13) 📝 `catalog/preview/v2/notes.json` (+6 -0) 📝 `catalog/preview/v3/catalog.json` (+13 -13) 📝 `catalog/preview/v3/notes.json` (+6 -0) 📝 `packages/ruleset-5e-2014/CHANGELOG.md` (+8 -0) 📝 `packages/ruleset-5e-2014/README.md` (+54 -18) 📝 `packages/ruleset-5e-2014/catalogs/creatures.json` (+1893 -67) 📝 `packages/ruleset-5e-2014/catalogs/spells.json` (+68 -6) 📝 `packages/ruleset-5e-2014/locales/en.json` (+1 -1) 📝 `packages/ruleset-5e-2014/manifest.json` (+10 -10) 📝 `packages/ruleset-5e-2014/ruleset.json` (+37 -3) 📝 `scripts/build-5e-srd-catalogs.mjs` (+394 -18) 📝 `scripts/build-ruleset-packages.mjs` (+3 -0) 📝 `scripts/ruleset-package-checks.mjs` (+228 -19) 📝 `scripts/tests/ruleset-package.regression.mjs` (+278 -0) _...and 1 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1081 ## Why this change - **SRD spellcasters cast nothing in a fight.** The Mage, the Lich, the Priest and the rest kept their spells only as a prose trait, so a battle offered them a dagger. Engine Capability API 1.34 (https://github.com/Pasta-Devs/Marinara-Engine/pull/6613) lets a bestiary creature carry a sheet with its own slots and spells, and this package did not use it yet. - **Reaction spells never fired.** Every one was `reaction: true`, which the Engine puts on no menu. Capability API 1.33 (https://github.com/Pasta-Devs/Marinara-Engine/pull/6608) lets an entry name its moment. - **Five spells were never offered to anybody**, players included. The source data leaves out the damage roll of Sacred Flame, Acid Splash, Poison Spray, Vicious Mockery and Spiritual Weapon, so they shipped as utility. Sacred Flame and Spiritual Weapon are the SRD clerics' main attacks, so the new casters needed them. - **The package checker had no gate** for either key, so a package using them under an older declaration was not refused here as the Engine would refuse it. - **Stale text.** The README, manifest and combat block said reactions, the opportunity-attack choice and the legendary action window were missing. The Engine has had all three since https://github.com/Pasta-Devs/Marinara-Engine/pull/6525 and https://github.com/Pasta-Devs/Marinara-Engine/pull/6608. ## What changed `ruleset-5e-2014` 0.8.0: Capability API 1.34, ruleset version 8, sheet version 3. Built against Engine `staging` e15c9e558. - **Twelve slot casters are sheet creatures:** Acolyte, Priest, Cult Fanatic, Druid, Mage, Archmage, Lich, Mummy Lord, Guardian Naga, Spirit Naga, Androsphinx, Gynosphinx. The converter reads each Spellcasting trait (caster level, ability, DC, to-hit, slots per level, prepared spells) and writes a sheet with its abilities, AC, printed hit points, speed and one spell row per prepared spell, linked to the package's own spell catalog. Printed attacks stay as actions and the trait stays for the Game Master. - **Printed numbers are held exactly.** A monster's proficiency follows challenge rating and a sheet's follows level, so the difference goes into two new sheet fields (**Spell attack: other bonus**, **Spell save DC: other bonus**, range -5 to 5, default 0) and into a bonus on each printed save and skill. The converter restates the Engine's sheet arithmetic and **fails the build** if any spell attack, spell DC, save or skill differs from the stat block, or if a correction is out of range. An unknown formula piece also fails the build. - **Hellish Rebuke** is `{ "on": "harmed", "at": "source" }`. The converter copies each reaction spell's trigger sentence from the source and fails if a reaction spell is in neither table or its trigger changes. - **Different from the issue: Counterspell stays `reaction: true`.** The issue proposed `{ "on": "aimed", "cancels": true }`, but the Engine's aimed moment opens for any action aimed at the holder, a sword swing as much as a spell, so Counterspell would parry weapons. It needs an Engine filter on what an aimed moment answers. That filter is planned with the Engine's remaining combat work. Shield (an Armor Class number) and Feather Fall (nothing falls) also stay `true`, and the README says why. - **Five spell damage rows** in the existing hand-checked `SPELL_RIDERS` table, each citing its own text. The four cantrips keep the source's own per-level scaling. - **Innate Spellcasting and hag coven Shared Spellcasting stay traits**, and the README says why. - **One fixture correction.** The Open5e data gives the Priest Religion +5, and SRD 5.1 prints +4. A hand-checked row carries +4 and stops the build if the fixture is ever fixed. - **Threat scale unchanged:** it now reads each creature's printed hit points and AC whichever shape the creature took. The generated `threat` block is byte-identical to 0.7.0. - **Package checker** (`scripts/ruleset-package-checks.mjs`): `assertRulesetReactions` (1.33) and the creature-sheet branch of `assertRulesetCreatures` (1.34), restating the Engine's rules and never stricter. Wired into `build-ruleset-packages.mjs`, `build-5e-srd-catalogs.mjs` and `validate-catalog.mjs`. - **Docs:** package README, package CHANGELOG, manifest description, root README row (also stale at 1.28), CONTRIBUTING (the two new gates). The stale opportunity-attack comment in the combat block is rewritten. - Generated: `catalogs/*.json`, `ruleset.json`, manifest hashes, `locales/en.json`, `artifacts/ruleset-5e-2014-0.8.0.zip`, and the preview catalog lanes. ## Package and security impact - Affected package IDs: `ruleset-5e-2014` (staging-only tier). - Engine compatibility impact: needs Capability API 1.34 (was 1.32), which is on Engine `staging` today. An older Engine refuses the install. - New or changed permissions/entrypoints: none. Pure data. - Restart, storage, update, or uninstall impact: no restart. The sheet version bump only changes the version recorded when a sheet is next saved; the Engine runs no migration on it. Existing characters gain the two new fields at 0, so their spell attack and DC are unchanged. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Run locally by the agent, all exit 0: `npm run check`, `npm run test:security`, `node scripts/test-catalog-lanes.mjs`, `node scripts/tests/ui-translation-retention.regression.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-package-locale-keys.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-generatedat-determinism.regression.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `node scripts/tests/ruleset-package.regression.mjs`, `git diff --check`. A second converter run left every generated file byte-identical. - Against the old build, only the 12 casters changed in `creatures.json`, only Hellish Rebuke and the five damage spells changed in `spells.json`, and the `threat` block is identical. - All twelve casters' ability scores, AC, hit points, saves, skills, caster level, spell DC, spell attack and slots were compared against the SRD 5.1 API at https://www.dnd5eapi.co. The Priest's Religion was the only difference, now corrected. - Deliberately breaking five of the new checker rules (the 1.34 gate, cancel-only-on-aimed, the replaced keys, the catalog entry lookup, text held only to a declared length) each fails the regression test. - Against Engine `staging` e15c9e558 (scratch script, not committed): `ruleset.json` and all three catalog files parse with the Engine's own parser. Each of the 12 casters enters a fight through `createRulesetEncounter` with the printed AC, hit points and all six saves, and every spell attack and spell DC equals the printed numbers. The Gynosphinx prepares nothing a fight resolves, so it offers no spell, as the README says. - Live fight, same Engine: the SRD Mage casts Fireball and its own 3rd-level slots go from 3 to 2. A warlock holding Hellish Rebuke who takes that damage is asked, the rebuke hits the Mage (40 to 30 hit points), and it costs the warlock a 1st-level slot. Local CodeRabbit, three passes, five findings. Fixed four: the release note counted the Gynosphinx among the casters that cast, the Priest's Religion fixture error, the checker holding text to an undeclared length (stricter than the Engine), and "1st-level roll" reworded to "base damage roll". Declined one: setting the Lich's Arcana bonus to 8 would make it +19, the Monster Manual's number. SRD 5.1, the fixture and the SRD API all print +18, which the sheet computes (5 + 6 + 7), and the build fails if it ever does not. NOT done: a real install through the Engine. Still to verify by hand, after this merges to `staging`: - On an Engine running from `staging`, update **5e (SRD 5.1)** to 0.8.0 and confirm no restart is asked for. - In a Game Mode game on 5e, have the Game Master name an SRD **Mage** as an opponent. Confirm it casts spells in the fight and its spell slots go down. - Give a character Hellish Rebuke and a free 1st-level slot, take damage, and confirm the fight asks whether to cast it. - Open a character sheet made on 0.7.0 and confirm the two new spellcasting fields read 0 and Spell save DC and Spell attack bonus are unchanged. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Updated: the package README and CHANGELOG, the root README row and CONTRIBUTING. No Engine documentation changes. ## UI evidence (if applicable) None. The package has no UI of its own. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Spellcasting monsters now use their own spell slots, with their combat statistics represented on character-style sheets. * Added damage mechanics for several spells and cantrips, including level-based cantrip scaling. * Hellish Rebuke can trigger when its caster is harmed. * Opportunity attacks now prompt the eligible combatant instead of resolving automatically. * Added optional spell attack and spell save DC bonuses to character sheets. * **Updates** * Updated the 5e ruleset to version 0.8.0; it now requires Engine Capability API 1.34. * Counterspell, Shield, and Feather Fall remain unavailable as timed reactions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:07:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1285
No description provided.