[GH-ISSUE #6728] [Feature]: Game Mode ruleset combat: a moment after an attack hits, and creatures that react #3771

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

Originally created by @kolacheee on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6728

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Some of the most common reactions in tabletop combat are taken after an attack has hit and before its damage lands:

  • Shield (5e): when you are hit, +5 Armor Class until the start of your next turn, including against the attack that triggered it, so it can turn that hit into a miss.
  • Parry (many 5e creatures): add 2 to its Armor Class against one attack that would hit it.
  • Uncanny Dodge (5e rogues): when an attacker hits you, halve that attack's damage.

A ruleset fight has no such moment. The windows it opens are before something is used (used), before something lands (aimed) and after it has hurt (harmed). An answer taken on aimed has to be spent before anyone knows whether the attack will hit, so a Shield written that way is wasted on every attack that would have missed. And a creature written in plain numbers cannot hold a reaction at all, so the 5e package keeps every printed Parry as a trait.

The conditions slice (#6719) gave conditions the numbers these answers need (a defense bonus, a condition that lasts one attack, one that ends at the start of its holder's turn). What is missing is the moment to take them in.

Proposed solution

One slice of real ruleset combat, one new Capability API minor. None of it names one game's words.

  • A hit moment. mechanics.reaction.on: "hit": an attack roll has just hit the holder, and its damage has not been dealt. The window opens only for the one who was hit, and only when they hold an answer for it; against narrows it by catalog as on every moment. It cannot cancel (the roll has happened), but what the answer does counts for the attack it answers: the roll is checked again against the holder's defense as it now stands, and a hit that no longer reaches it misses. A natural roll that always hits still hits.
  • Held, not re-rolled. The attack is held after its roll, and picks up exactly where it was: the same roll, the same target, the rest of its targets and, for an action made of other actions, the rest of its parts. A fight saved while the window is open comes back the same way. Nothing opened inside a window opens another, so an attack made inside one (a strike at somebody walking away, a signature action, an answer) is not held.
  • Creatures that react. A creature's action may carry the same reaction object a catalog entry does, and self: true for one that lands on the creature itself, so a Parry is a creature's own action on the hit moment that puts a defense bonus on it for one attack.
  • Opponents the Engine plays take an answer on the hit moment only when it turns the hit into a miss, and otherwise let it land.
  • Log. The window says who hit whom with what and by how much, and a checked-again roll says whether it now misses or still hits.
  • Examples on both example rulesets, the install gate, the published schema, docs and the CHANGELOG. The 5e package's release then adopts Shield, Parry and Uncanny Dodge with everything #6712 and #6719 added.

Not in this slice: a moment for being hit by something that makes no attack roll (Shield against Magic Missile), and reducing damage by a rolled amount (Deflect Missiles).

Alternatives considered

  • Taking Shield on aimed. It works, but spends the reaction on attacks that would have missed, which is not the rule.
  • Re-rolling the attack after the answer. The roll is a fact the table already saw; the answer changes the number it is compared against, not the dice.

Additional context

Next slice of real ruleset combat after #6719, per the plan doc's § Real ruleset combat. After it: the 5e package release, then a Storyteller combat kind last.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6728 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Some of the most common reactions in tabletop combat are taken after an attack has hit and before its damage lands: - **Shield** (5e): when you are hit, +5 Armor Class until the start of your next turn, including against the attack that triggered it, so it can turn that hit into a miss. - **Parry** (many 5e creatures): add 2 to its Armor Class against one attack that would hit it. - **Uncanny Dodge** (5e rogues): when an attacker hits you, halve that attack's damage. A ruleset fight has no such moment. The windows it opens are before something is used (`used`), before something lands (`aimed`) and after it has hurt (`harmed`). An answer taken on `aimed` has to be spent before anyone knows whether the attack will hit, so a Shield written that way is wasted on every attack that would have missed. And a creature written in plain numbers cannot hold a reaction at all, so the 5e package keeps every printed Parry as a trait. The conditions slice (#6719) gave conditions the numbers these answers need (a defense bonus, a condition that lasts one attack, one that ends at the start of its holder's turn). What is missing is the moment to take them in. ## Proposed solution One slice of real ruleset combat, one new Capability API minor. None of it names one game's words. - **A `hit` moment.** `mechanics.reaction.on: "hit"`: an attack roll has just hit the holder, and its damage has not been dealt. The window opens only for the one who was hit, and only when they hold an answer for it; `against` narrows it by catalog as on every moment. It cannot cancel (the roll has happened), but what the answer does counts for the attack it answers: the roll is checked again against the holder's defense as it now stands, and a hit that no longer reaches it misses. A natural roll that always hits still hits. - **Held, not re-rolled.** The attack is held after its roll, and picks up exactly where it was: the same roll, the same target, the rest of its targets and, for an action made of other actions, the rest of its parts. A fight saved while the window is open comes back the same way. Nothing opened inside a window opens another, so an attack made inside one (a strike at somebody walking away, a signature action, an answer) is not held. - **Creatures that react.** A creature's action may carry the same `reaction` object a catalog entry does, and `self: true` for one that lands on the creature itself, so a Parry is a creature's own action on the `hit` moment that puts a defense bonus on it for one attack. - **Opponents the Engine plays** take an answer on the `hit` moment only when it turns the hit into a miss, and otherwise let it land. - **Log.** The window says who hit whom with what and by how much, and a checked-again roll says whether it now misses or still hits. - **Examples** on both example rulesets, the install gate, the published schema, docs and the CHANGELOG. The 5e package's release then adopts Shield, Parry and Uncanny Dodge with everything #6712 and #6719 added. Not in this slice: a moment for being hit by something that makes no attack roll (Shield against Magic Missile), and reducing damage by a rolled amount (Deflect Missiles). ## Alternatives considered - Taking Shield on `aimed`. It works, but spends the reaction on attacks that would have missed, which is not the rule. - Re-rolling the attack after the answer. The roll is a fact the table already saw; the answer changes the number it is compared against, not the dice. ## Additional context Next slice of real ruleset combat after #6719, per the plan doc's § Real ruleset combat. After it: the 5e package release, then a Storyteller combat kind last. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
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-Engine#3771
No description provided.