Capability matrix — what Nat20 resolves
Nat20 is a working engine with real gaps. This page is the honest inventory: what it resolves mechanically, what it accepts but treats as a narrative no-op, and what it does not model at all. If a rule is not listed as resolved here, assume it is not enforced.
Anything marked not modelled is tracked in
BACKLOG.md, which is
the authoritative gap ledger. The counts below are measured against the shipped
dnd5e-srd-data corpus and pinned by
packages/dnd5e-engine/tests/test_capability_matrix.py, so they cannot go stale
without failing CI.
The fastest way to check one thing
Content resolves if it carries an activity of a mechanical kind — attack,
damage, save, heal, check, cast, or a utility activity carrying
effect riders. A summon, transform, or enchant activity, or a bare
utility, loads fine and emits no events, unless it belongs to one of
the conjurations the engine resolves itself (C21: Spiritual Weapon, Summon
Dragon, Magic Weapon, Wild Shape).
Combat loop
| Mechanic | Status | Notes |
|---|---|---|
| Initiative order, rounds, turns | ✅ Resolved | Deterministic tie-break (initiative → dex → entity id); one shared turn-advance path, and each boundary is marked in the stream by a TurnPhase event. PartyMemberSpec/EncounterMemberSpec.initiative accepts int | None: None rolls an engine d20 + DEX modifier (in spec order, using the combat's seeded RNG; a templated foe whose spec leaves dexterity at 10 rolls with its template's Dexterity) with Disadvantage when is_surprised or a seeded incapacitated-implying active_effects status applies (C14); a character with Alert adds its Proficiency Bonus to that roll (C28); CombatInstance.initiative takes None too, so a build_party_member character reaches that roll (C29). No "Delay" combat option yet. |
| Turn lifecycle — start/end of turn, top-of-round hooks | ⚠️ Partial | The seam exists (turn_lifecycle.py, run off the single advance path in registration order); the registered hooks are the round-duration tick, the timed-effect expiry (seconds / turns / until-end-of-next-turn), the reaction-effect expiry and Rage's end-of-turn extension check (C20). A driven monster's own turn additionally runs legendary-pool reset, recharge rolls (RechargeRolled) and regeneration at its head (C18, _run_monster_turn_start) — ongoing damage (Acid Arrow, Spirit Guardians) still has no producer |
Effect durations (rounds, turns, seconds, until end of next turn) |
✅ Resolved | rounds and ceil(seconds / 6) tick at the caster's turn end, turns at the target's; flags["until_end_of_next_turn_of"] expires at that actor's next turn end. rounds wins when an effect carries both counters; concentration-flagged effects are exempt (the concentration cascade owns them); a concentration spell's own maximum duration is tracked separately by the engine (caster-keyed rounds counter from the typed spell duration) |
| Attack rolls, crits, damage, resistances/immunities/vulnerabilities | ⚠️ Partial | Advantage/disadvantage is rolled on activity attacks: attacker flags.advantage.attack / flags.disadvantage.attack effects plus the condition-derived sources (Invisible attacker; Blinded/Poisoned/Frightened/Restrained attacker; Paralyzed/Stunned/Unconscious/Blinded target), cancelling per SRD §Advantage and Disadvantage. Opportunity attacks resolve through the same activity context as any other attack (C24), so every source here reaches them. Prone (advantage within 5 ft, disadvantage beyond) and Grappled (disadvantage vs anyone but the grappler) are live (C12); the distance-derived sources are now all live: unseen attacker (C16b), Ranged Attacks in Close Combat (C15) and long-range disadvantage (C15) each append their own AdvantageSource. A Heavy weapon (raw Strength score below 13) rolls with disadvantage (C15) — this and the Vex/Sap mastery riders below all ride the same "trait" source token, so a host cannot distinguish them from the token alone. Attack proficiency is a real gate (C15): a host that never sets PartyMemberSpec.weapon_proficiencies is assumed proficient (legacy behavior, unchanged); an explicit (possibly empty) list enforces proficiency by the weapon's category or slug, omitting Proficiency Bonus (never subtracting it) when unproficient. DamageApplied now carries source_id (weapon slug / synthesized activity id / mastery:<slug>) and is_crit for weapon-attack damage (C15; spell/save/heal damage still reports source_id=None, a C17+ seam); a critical hit against a target already making death saves counts as two failures (SRD §Damage at 0 Hit Points, C15). Magic weapons and spells overcome resistance to nonmagical B/P/S (Weapon.magical; host-authored resistances default to the nonmagical reading via physical_resistances_nonmagical_only). |
| Saving throws, half-on-save, save-for-effect | ✅ Resolved | Every save adds d20 + ability modifier + proficiency bonus (if proficient) for all six abilities, on all three paths (activity saves, the damage-triggered concentration check, the end-of-turn repeat save). Monster ability scores, save proficiencies and proficiency bonus hydrate from the monster_template_slug. The condition projections (auto-fail, Restrained DEX disadvantage, exhaustion's -2 × level) apply on all three paths (C12). Not yet folded in: effect-derived bonuses (Bless/Bane) on the two orchestrator-level paths. |
| Ability & skill checks (in and out of combat) | ✅ Resolved | resolve_check; seed via CheckSpec.rng; CheckSpec.jack_of_all_trades / reliable_talent (C19); in-combat checks do not read them yet (BACKLOG.md) |
| Action economy (action, bonus action, reaction, movement) | ⚠️ Partial | Extra Attack (attacks_remaining per Action, LiveCombatView.turn) and two-weapon fighting (Light-property off-hand Bonus Action) are modelled (C14). Action Surge's extra action (C20: LiveCombatView.turn.extra_actions_remaining; anything but a Magic action, where every cast_spell, use_item and use_feature counts as one; one surge per turn), Flurry of Blows' two Unarmed Strikes (three with Heightened Focus; they are the next unarmed-strike attacks after the committed Flurry, with no flag), Martial Arts' Bonus Unarmed Strike (use_bonus_action=True on an unarmed-strike attack: the Bonus Action, turn kept) and Cunning Action's Bonus-Action Dash and Disengage are modelled too. A use_item whose activity activates as a Bonus Action (a Potion of Healing) spends the Bonus Action and keeps the turn; a Reaction-activated item still spends the Action (BACKLOG.md). A one-attack actor's turn still ends after its Attack action, so a Fighter 2–4's surge, a Monk 1–4's Bonus Unarmed Strike and, from Monk 2, its Flurry of Blows have to come first (BACKLOG.md); strikes a Flurry still owes keep the turn open. Incapacitated blocks action/bonus/reaction intents (C12). |
| Dash, Disengage | ✅ Resolved | The Action by default; the Bonus Action through Cunning Action (use_bonus_action=True), read from the granted features at each class's own level — a Rogue 2 or any build with two Rogue levels, not class_slug == "rogue" (C20) |
| Dodge | ✅ Resolved | Attacker Disadvantage + Dexterity save Advantage until the start of your next turn; lost under Incapacitated or Speed 0. SRD 5.2 "if you can see the attacker" is now enforced (C16b _combatant_can_see) at every attack context site, opportunity attacks included (C24) — a Blinded dodger imposes no attack disadvantage. |
| Help | ✅ Resolved | Assist-an-attack-roll flavor only (the ability-check flavor has no check-advantage producer yet): the next ally attack against a target within 5 ft of the helper rolls with Advantage, consumed by that one attack roll (hit, miss, or cancelled to normal) and otherwise expiring at the start of the helper's own next turn. |
| Hide | ✅ Resolved | Gated on Three-Quarters/Total cover, Heavy obscurement, or Darkness on the hider's own cell (SRD 5.2 glossary: "An area of darkness is Heavily Obscured", GridTopology.light_on_cell); the hider must also be out of every living, non-Incapacitated hostile's line of sight (C16b _combatant_can_see) — skipped only when the hider's own cell already carries Three-Quarters/Total cover, since per-cell cover is omnidirectional and already breaks every line (SRD 5.2 §Cover). On a successful DC 15 Dexterity (Stealth) check grants the Invisible condition, which ends the moment the hider makes an attack roll or casts a spell with a Verbal component. A Poisoned hider, or one Frightened of a creature it can see, rolls the check at Disadvantage (C27), and a templated foe's Darkvision counts: Darkness alone no longer hides a creature from a Goblin Warrior within 60 feet (C27). Touches no Action-economy budget (see BACKLOG.md). |
| Opportunity attacks | ✅ Resolved | Every walk, in both directions (C24): a move intent (a character's or a host-driven foe's), the monster AI's closing walk and its flee. A step provokes when it takes the mover from inside a reactor's reach to outside it, so stepping around inside reach never does; Disengage suppresses it from either side, and a summon makes none (BACKLOG.md). The walk stops where an attack drops the mover to 0 HP or its Speed to 0. The attack resolves through the same activity context as one on the reactor's own turn: a character swings PartyMemberSpec.opportunity_attack_weapon_id, else the first melee weapon in its equipment, else an Unarmed Strike; a monster or a transformed creature makes the first non-ranged attack on its stat block. Cover, Fighting Styles, Martial Arts, proficiency, enchantments, weapon mastery, Sneak Attack, the C16b "can see" trigger and carve-outs, and the target's readied Shield all apply; Cleave, the Light property's extra attack, Loading and Bardic Inspiration do not, and a Versatile weapon always swings its one-handed die — the opportunity-attack path never sets use_versatile_damage, so Great Weapon Fighting doesn't reach it either (BACKLOG.md). Reach is the weapon's (10 ft with the Reach property), a stat-block melee attack's own range, else reach_ft (5 ft by default). A mover a Push mastery hit carries off stops where the push leaves it, keeping its unspent movement, rather than finishing the step the push interrupted |
| Death saves, stabilization | ✅ Resolved | |
| Instant death (massive damage) | ✅ Resolved | A Character whose damage remainder equals or exceeds their Hit Point maximum dies outright — Death(reason="instant_kill") (C12) |
| Concentration, incl. damage-triggered saves and cascade drop | ✅ Resolved | Damage save with real CON modifier + DC clamped to [10, 30]; one-at-a-time (a new concentration cast cascades the old drop); ends on death and Incapacitated-implying conditions; voluntary "drop_concentration" intent (no action cost); maximum-duration expiry from the typed spell duration at the caster's turn end. Every concentration spell concentrates (C21): one that applies no concentration effect of its own (Spiritual Weapon, a Hold Person every target saved against, a Polymorph whose save succeeded) leaves a caster-held anchor effect, effect:<spell> flagged concentration_anchor, whether cast on a turn, by a monster or from a Ready; a spell cast from an item concentrates only through an effect of its own (BACKLOG.md). The earlier concentration ends only after the new spell resolves, so a self-cast Bless's d4 still rides Spiritual Weapon's immediate attack (BACKLOG.md). A pre-armed Legendary Resistance can convert a failed concentration save into a success (C18, resolve_legendary_resistance); Magic Resistance is still not folded into this or the end-of-turn repeat-save path (BACKLOG.md). |
| Temporary HP, healing | ✅ Resolved | |
| Sides (party-side allies) | ✅ Resolved | EncounterMemberSpec.side="party" seats a monster or NPC with the characters (party_ids): every ally rule, opportunity attacks and the monster AI read it as one of theirs, and advance_monster_turn drives it against the encounter side unless the host commands it through submit_player_intent. It dies at 0 Hit Points as a monster does and takes no XP share; a standing ally keeps the party side in the fight for ended_reason. Two sides only, and legendary actions and Legendary Resistance stay encounter-side (BACKLOG.md) |
| Knocking out a creature | ⚠️ Partial | SRD 5.2 Knocking Out a Creature: PlayerIntent.knock_out on an attack whose every attack is a melee attack (else knock_out_not_melee, nothing spent) leaves a creature it would drop at 1 Hit Point and Unconscious (KnockedOut); a creature immune to Unconscious stays conscious at 1 Hit Point, and a summon still leaves at 0. A knocked-out creature is out of the fight (LiveCombatView.knocked_out_ids, no monster targets it, the end reason counts it with the dead) until it regains Hit Points or drops to 0; CombatOutcome.knock_outs lists those still out, and a knocked-out foe is worth its XP. Not modelled: first aid as an action, the Short Rest the rule starts, a melee spell attack's knock-out, and a monster-driven turn choosing one (BACKLOG.md) |
| Conditions (the 15 SRD conditions) | ⚠️ Partial | Applied/removed and gated by immunities on every action and effect path (an immune creature never acquires the condition on either store): an effect's rider, a seeded effect, Grapple, Shove's Prone and Hide's Invisible consult one predicate (is_condition_immune, C27), which also counts the immunity a condition grants — Petrified's to Poisoned, which then imposes nothing — and Weapon-mastery Topple honors condition immunity too (C15: the save still rolls, only the resulting prone is gated). Enforced on the live path: attack-roll advantage/disadvantage for every SRD 5.2 row incl. Prone (distance-aware), Grappled (grappler-aware), Frightened — now gated on line of sight to a known, living, tracked fear source (C16b _fear_source_in_sight; an unknown/dead/untracked source keeps the SRD-conservative disadvantage) — and Invisible — the "can somehow see you" carve-out pierces only via blindsight/truesight in range with line of sight (C16b _pierces_invisibility), which also covers a hidden creature; Poisoned and Frightened Disadvantage on ability checks — a CheckActivity, Hide's Stealth and escaping a grapple — Frightened's under the same line-of-sight gate (C27); Incapacitated (and Paralyzed/Stunned/Petrified/Unconscious) rejects action/bonus/reaction intents with IntentRejectedError("actor_incapacitated") and skips reactions; Speed 0 (MoveFailed(reason="speed_zero")) and Frightened's "can't willingly move closer" rule toward a known, living fear source, seen or not (MoveFailed(reason="frightened"), C27); auto-failed STR/DEX saves and Restrained DEX disadvantage on every save path; Paralyzed/Unconscious auto-crit within 5 ft; Petrified's Resistance to all damage, Poison included (C27); Charmed cannot attack or harmfully target the charmer (a charmed monster will not select them either); Characters fall Unconscious at 0 HP, including a Character hydrated into combat already at 0 HP (massive damage kills). Incapacitated's initiative disadvantage closed in C14 (2026-09-01) — start_combat rolls Initiative at Disadvantage for entities with a seeded incapacitated-implying active_effects status. Partial because an engine-rolled Initiative ignores a seeded Poisoned, Frightened or Invisible status, a condition immunity an active effect grants (Heroes' Feast, Freedom of Movement) is not honoured, and neither are Invisible's "Concealed" or Grappled's "Movable" clauses. Blinded/Deafened sense-based check auto-fail and Charmed's social Advantage touch no check the engine rolls, so they are a host's to apply, by design (recipe). See BACKLOG.md "Conditions — SRD 5.2 rows not enforced". |
| Exhaustion | ✅ Resolved | SRD 5.2: every D20 Test (attacks, saves incl. death saves, checks) is reduced by 2 × level; Speed by 5 ft × level. Long Rest reduces the level by 1 (resolve_long_rest(exhaustion_level=)); level-6 death is still unmodelled. |
| Surprise | ✅ Resolved | is_surprised=True on a party/encounter spec (only consulted when that spec's initiative is None) imposes Disadvantage on the engine-rolled Initiative roll (C14). Host is still responsible for deciding who is surprised. |
| Grapple / Shove | ⚠️ Partial | Unarmed Strike options (C14): the target saves STR or DEX, whichever modifier is higher (tie → STR), vs DC 8 + STR mod + PB (DEX instead of STR when higher, for a creature with Martial Arts active — C20); Grapple applies the Grappled condition with the escape DC stored on it, Shove applies Prone (default) or a 5-ft push per PlayerIntent.shove_push. A creature immune to the condition — a Ghost, to Grappled and Prone — still saves, but the condition never lands (C27); a Shove's push still does. Escaping rolls at Disadvantage while Poisoned, or Frightened of a creature in sight (C27). Size gate, free-hand gate, distance-exceeded auto-release and the grappler's drag are not modelled (BACKLOG.md). |
| Two-weapon fighting | ✅ Resolved | A Light main-hand weapon opens a same-turn off-hand Bonus Action swing with a different Light weapon (C14); the ability modifier is added to that damage only if negative — or always, with the Two-Weapon Fighting style (C20). |
| Cover, line of sight | ✅ Resolved | Walls, blocked cells and interposed creatures — see below |
| Flanking | ❌ Not modelled | Not an SRD rule (optional variant) |
Spatial
| Mechanic | Status | Notes |
|---|---|---|
| 2-D grid, Chebyshev distance | ✅ Resolved | GridScene; one cell = cell_size_ft |
| Blocked cells, difficult terrain | ✅ Resolved | Difficult terrain doubles entry cost |
| Walls / line of sight | ✅ Resolved | Walls and blocked cells block sight and movement |
| Cover (half / three-quarters / total) | ✅ Resolved | Scene cover cells, blocked cells (total) and interposed creatures (half); folds into AC and Dexterity saves; a cover_cells tag on the target's own cell counts (an object it shelters behind); Sacred Flame's ignore_cover strips the Dexterity-save bonus |
| AoE templates (sphere / cone / line / cube / cylinder) | ✅ Resolved | cells_in_template with line of effect from the point of origin (walls / blocked cells exclude cells), for every cast, item use and feature use whose save, damage or heal activity carries a template (C26a), and for an item use whose one activity casts a spell (a Wand of Fireballs places Fireball's Sphere; a Wand of Magic Missiles splits its darts at the level its charges buy); PlayerIntent.direction aims cones, lines and cubes. An "each enemy" or "each ally" area keeps that side; an area "of your choice" spares the actor's side when it harms and the other side when it heals, and PlayerIntent.excluded_target_ids replaces that default; "up to N creatures" takes the creatures target_ids names, else the first N. Each placed area emits AreaTargeted. A choice flag on a utility activity (Spirit Guardians, Holy Aura, Nature's Sanctuary) or a choice save with no template (Rod of Rulership) resolves no area at all, so excluded_target_ids on them is refused. A template the engine can't map (the five wall spells; Confusion, whose size is a formula) affects only its named target (BACKLOG.md). A monster aims its own areas — stat-block actions, spells and legendary actions — where they affect the most enemies minus allies, never itself (C26b; Monsters below) |
| Multi-cell movement in one intent | ✅ Resolved | A "move" intent paths to any reachable cell within budget (allies passable, enemies block, no ending in an occupied cell), going around a wall or blocked corner between adjacent cells; one ActorMoved per intent, or two or more when a step on the way provokes an opportunity attack, which lands between them; MoveFailed reasons unreachable / occupied / blocked_path (an adjacent step with no way around). The monster AI's closing walk keeps the same occupancy rules: it skirts enemy spaces and ends on a free cell in range, or as near as its movement allows |
| Elevation / flying altitude | ❌ Not modelled | The grid is strictly 2-D |
| Multi-tile (Large+) creature footprints | ❌ Not modelled | Every creature occupies one cell, a Large summoned Draconic Spirit included (C21) |
| Threat-aware or cost-aware pathfinding | ❌ Not modelled | shortest_path (every move's route) is fewest-squares BFS; the route's terrain cost is charged but not minimised. Only the flee planner prices routes by cost (GridTopology.reachable_cells, C24) |
| Forced movement (push) | ✅ Resolved | push_combatant → CombatantMoved(forced=True); wired for Thunderwave, Shove's push option (C14), and the Push weapon mastery (C15, always the full 10 ft — the "Large or smaller" size gate is unmodelled, see BACKLOG.md) |
| Vision and light (darkness, darkvision, blindsight, truesight, obscurement) | ⚠️ Partial | GridScene.lighting / obscurement_cells + GridTopology.can_see feed the unseen attack advantage/disadvantage both ways. The composite _combatant_can_see predicate (a Blinded viewer sees only through Blindsight; an Invisible target is seen only through Blindsight or Truesight in range; else the scene model) gates every other SRD "can see" conjunct: the "if you can see the attacker" half of a dodging combatant's attack-disadvantage, Ranged Attacks in Close Combat, the Opportunity Attack trigger (both directions), Hide's "out of any enemy's line of sight" check, and Frightened's line-of-sight gate on its attack rolls and ability checks (its "can't willingly move closer" rule has no sight clause, C27). A dark cell now also satisfies Hide's Heavily Obscured gate. Since C27 a templated monster sees with its stat block's senses — Darkvision, Blindsight, Truesight; EncounterMemberSpec.senses overrides them — so every consumer above applies to it, and its Truesight sees into a Heavily Obscured cell, magical Darkness or not (BACKLOG.md). Still no light sources (torches, Light, Darkness) and no Blinded emission from darkness |
Spells
The engine resolves a spell by walking its typed activities. Spells whose only
activities are summon, transform, enchant, or a rider-less utility load
correctly and emit no events — unless the conjuration allowlist resolves
them (C21: Spiritual Weapon, Summon Dragon and Magic Weapon).
| Count | |
|---|---|
| Spells in the corpus | 339 |
| Resolve to at least one mechanical activity | 234 (69%) |
| Load but resolve to nothing | 105 (31%) |
| …of which are concentration spells | 30 |
Inert concentration spells include staples a combat host will reach for: Blur, Darkness, Fog Cloud, Wall of Force, Silent Image, Globe of Invulnerability, Expeditious Retreat. Each still concentrates when cast (C21), so it ends the caster's earlier concentration and later damage draws the Constitution save. Others in the inert set (Alarm, Augury, Clairvoyance, Create Food and Water) are out of scope for a combat engine by nature.
| Spell mechanic | Status | Notes |
|---|---|---|
| Spell slots, upcasting, at-will/innate casting | ⚠️ Partial — per-class/multiclass/Pact tables derived engine-side (derive_spell_slots, derive_multiclass_slots, derive_pact_slots); rests restore slots; Pact Magic is a second pool; upcasting scales dice AND target count (target.affects.count); attack-kind repeat instances still not scaled |
|
| Spell attack rolls & save DCs (incl. flat overrides) | ✅ Resolved | |
| Concentration | ✅ full lifecycle (C13, C21: every concentration spell concentrates, including one that applies no effect of its own) | |
| Counterspell, Shield, Hellish Rebuke, Magic Missile interactions | ⚠️ Partial | Implemented, but as named special cases rather than data-driven rules; slot-gated and range-gated at drain time |
| Ritual casting | ⚠️ Partial | Out-of-combat via resolve_ritual_cast; in-combat rejected |
| Material components / component pouches | ⚠️ Partial | Metadata on SpellCast, not enforced |
| Dispel Magic | ❌ Not modelled | Inert (no mechanical activity) |
| Summoning / polymorph / enchant-a-weapon | ⚠️ Partial | An allowlist resolves five SRD 5.2 sources (C21). Spiritual Weapon: a caster-owned force placed at target_zone_id (else in the target's space) makes its melee spell attack at once; on later turns an attack naming spell_id moves it up to 20 feet and repeats the attack as a Bonus Action; it ends with its concentration (LiveCombatView.constructs). Magic Weapon: +1, +2 or +3 to hit and damage on the weapon PlayerIntent.weapon_id names, on top of a pinned attack_bonus, and the weapon counts as magical. Wild Shape (Characters, below) and Polymorph: the Beast stat block PlayerIntent.form_id names replaces the creature's statistics, with ordinary Temporary Hit Points (LiveCombatView.transformations); Polymorph's form must be a Beast of Challenge Rating up to the target's (a character's level), a target with neither (a summon, "CR None", included) is refused, and it ends early when its Temporary Hit Points are gone. Summon Dragon: a Draconic Spirit joins the initiative order right after its caster, at the caster's count (CombatantJoined), in an unoccupied space the caster can see within 60 feet (a Blinded caster sees none beyond its Blindsight) — target_zone_id (one of the grid's own col,row ids), else the nearest free cell; with no such space the cast is refused before anything is spent (out_of_range / target_invalid). It has AC 14 + the slot level and HP 50 + 10 per slot level above 5, uses the caster's Proficiency Bonus, and makes half the slot level (round down) of Rends per Attack action, each at the caster's spell attack bonus for 1d6 + 4 + the slot level. Uncommanded, advance_monster_turn has it take the dodge action; a host commands each Rend through stat_block_action_id, and any other attack, Grapple, Shove or spell is refused before anything is spent. It never joins party_ids, and CombatOutcome holds no Hit Points, XP or death of its own, though DeathRecord.killer_id can name it (CombatantJoined.origin_caster_id names its caster); it leaves at 0 Hit Points or when the caster's concentration ends (CombatantLeft; LiveCombatView.summons). Every other summon, transform and enchant — Sacred Weapon, Shillelagh, True Strike, the monster and item summons, Giant Insect, Animate Objects, True Polymorph, Shapechange — stays narrative (BACKLOG.md) |
Monsters
| Mechanic | Status | Notes |
|---|---|---|
| Typed action selection + built-in AI | ✅ Resolved | Targets the lowest-HP enemy still in the fight (a character, a party-side ally or summon; never a knocked-out creature), or the creature the host names with advance_monster_turn(target_id=...), which must be one it could have picked (else target_invalid, nothing spent); closes on its target over a free cell in range, passing through allies but never ending on another creature (Spatial above); aims an area itself (C26b): from where it stands, the placement that affects the most enemies minus allies, never itself — an Emanation from its own cell, a Cone, Cube or Line in one of eight directions, a Sphere or Cylinder on a foe it can see within range — and an action, spell or legendary action whose area affects no enemy is not an option that turn (it never moves first to bring one into reach, BACKLOG.md); three behavior profiles; rank_monster_actions (C18) ranks a live recharge action first, a Spellcasting action with an N/Day offensive spell still unspent second (it casts that spell), multiattack third, then every other offensive action (at-will spells included) in list order — a monster with such actions available no longer defaults to whichever action happened to be listed first |
| Multiattack fan-out | ⚠️ Partial | Multiattacks with named/labelled tokens resolve precisely (C22 labelled every bare sibling token, fixing the five opaque-key monsters — bandit captain, doppelganger, chain devil, scout, ettin); "in any combination" clauses distribute range-aware, and a clause read as alternatives repeats only an attack it names (C26b: the Djinni's Storm Blade or Storm Bolt, never its Create Whirlwind). An action a Multiattack uses "if available" sits out while it isn't (the Doppelganger's spent Unsettling Visage), a Recharge action it uses is spent when it fires, and an area it uses resolves against that area (C26b). Limited-use gating covers N/Day spells only — typed uses_per_day actions are still at will — and a Multiattack's fallback never repeats a Recharge or X/Day action, nor an area that would affect no enemy (C26b); the Aboleth's and the Clay Golem's other conditions are not modelled (BACKLOG.md). |
| Stat-block attack commands | ⚠️ Partial | An attack naming PlayerIntent.stat_block_action_id is one swing of an attack action on the actor's current stat block: a transformed creature's form, or a template monster's own (C21). A transformed creature rolls at its form's real ability scores and Proficiency Bonus (the Wolf's Bite: +4, 1d6 + 2), on its own advance_monster_turn too, and its Attack action takes the form's Multiattack count, the host picking each swing. Only attack-roll actions can be commanded (not a Breath Weapon or other save actions); a template monster that is not transformed still rolls at its spec's attack_bonus, and a ranged natural weapon whose range lives on its item (the Ape's Rock) reads as melee (BACKLOG.md) |
| Monster spellcasting | ✅ Resolved | Stat-block Innate/Spellcasting actions now select and cast (C18): the spell book comes from the compendium uuids already in the data, the save DC and spell attack bonus use the monster's own spellcasting_ability + proficiency bonus (falling back to the flat 8 + attack_bonus / attack_bonus approximation when unresolvable), an N/Day spell with a use left is cast before an at-will one, and N/Day activity uses are tracked per entity; SpellCast is emitted on the monster path; an area spell is aimed like any monster area, and one that would affect no enemy (or the caster) is passed over for the next spell (C26b). Mummy Lord's ability is stated only in trait prose and resolves to None (BACKLOG.md). |
| Flee / retreat behaviour | ✅ Resolved | A monster under its behaviour profile's flee threshold runs as far from its nearest enemy as its movement allows (Chebyshev distance; reachable, unoccupied cells only, never through an enemy's space — GridTopology.reachable_cells, C24), provoking opportunity attacks on the way, and holds when cornered; an Incapacitated monster takes no flee stance. Combatant.has_fled persists across turns and ended_reason is "flee" when every living foe has fled (C18) |
| Legendary actions | ✅ Resolved | 30 monsters carry them in the data; advance_monster_turn(legendary=True, actor_id=...) spends one legendary action from a pool that refills at the start of the creature's own turn (LegendaryActionUsed, C18); the pool size is the typed Monster.legendary_action_uses (3 for all 30). An area legendary action that affects no enemy is passed over for the next one; with none left the request is refused and no use is spent (C26b). Utility-only actions and one costing more than 1 use are never selected by the built-in AI (BACKLOG.md). |
| Lair actions | ❌ Not modelled | Blocked on translator support — the corpus ships zero lair_actions; the initiative-20 pseudo-turn is designed but unimplemented (BACKLOG.md) |
| Recharge (5–6) abilities | ✅ Resolved | A 1d6 rolled at the start of a living bearer's turn for each spent recharge action (RechargeRolled, C18); a live recharge action ranks first in rank_monster_actions while its area, if it has one, affects an enemy, and one a Multiattack uses resolves only while charged and is spent when it fires (C26b). Recharge does not persist across combats (BACKLOG.md). |
| Regeneration | ✅ Resolved | Heals at the start of the bearer's turn up to hp_max while at 1+ HP (C18); unconditional, because the bundled corpus text (one shared trait for the troll, troll limb, oni and shield guardian) carries no suppression clause; a Swarm bearer never regains HP. |
special_abilities |
⚠️ Partial | Typed as MonsterTraitMechanic on 14 trait names (C22); Magic Resistance grants save advantage against spells. C18 adds Pack Tactics (attack advantage from an adjacent, non-Incapacitated ally), Sunlight Sensitivity (attack disadvantage via GridScene.sunlight), Undead Fortitude (a CON save to hold at 1 HP instead of dropping to 0, live-path included), Swarm (no HP or temp HP gain) and Legendary Resistance (a per-day pool from the typed Monster.legendary_resistance_uses — 3, 4 or 6 — armed by the host with resolve_legendary_resistance). Flyby, Nimble Escape, Keen Senses and Aggressive remain unconsumed — untyped or absent from the corpus (BACKLOG.md) |
Dataset categories conditions/ + traits/ |
✅ Resolved | 15 SRD 5.2 conditions with typed effects (AssetLoader.get_condition); de-duplicated monster traits (get_trait). The engine still enforces conditions from its Python registry |
Characters
| Mechanic | Status | Notes |
|---|---|---|
| Class, subclass, level 1–20, species | ✅ Resolved | a subclass is rejected below its class's Subclass advancement level (3 for every SRD 5.2 class), checked at the owning class's level (C19) |
| Background | ⚠️ Partial | background_slug grants the background's skill proficiencies; its +2/+1 or +1/+1/+1 adjustment applies through a background: choice token (C19); its Origin feat joins DerivedSheet.feats (C28). Tool proficiency not applied (BACKLOG.md) |
| HP, AC, hit dice, skill/save proficiencies | ✅ Resolved | HP folds each class's Fixed Hit Points (or recorded rolls) plus the current CON modifier per level, and always-on bonuses such as Dwarven Toughness and Draconic Resilience. AC picks the highest eligible SRD mode — Unarmored Defense, Draconic Resilience, Mage Armor, or default — from worn armor and Shield training when left unset. Save, skill and weapon/armor-training proficiencies come from class, subclass, species and background Trait grants, scoped to the class that grants them. An explicit CombatInstance value always wins |
| Ability scores, proficiency, expertise | ⚠️ Partial | The Ability Score Improvement feat's increases and the background's background: adjustment both apply, each capped at 20; ability_score_method (standard_array or point_buy) is checked against the base scores; Expertise requires proficiency in the skill (C19). Other feats' ability increases and level-20 capstone increases are not applied (BACKLOG.md) |
| Class/species feature activities (Rage, Second Wind, …) | ⚠️ Partial | Data-driven where the corpus carries a typed activity. Extra Attack is read from granted feature slugs (C14: extra-attack / two-extra-attacks / three-extra-attacks, highest tier wins, never summed). Per-rest caps evaluate every corpus uses.max shape — @prof, max(1, @abilities.<ab>.mod), N * @classes.<class>.levels, @scale.* — and each invocation spends its activity's own consumption.targets cost (the free Patient Defense costs nothing, Remove Poison 5); Lay on Hands' Heal draws PlayerIntent.pool_points from its pool (C20). The class mechanics the engine applies itself are in the rows below. Still prose-only, so inert: Divine Smite, Metamagic / Sorcery Points, Eldritch Invocations; Cunning Action's own activities do nothing, and Remove Poison doesn't end Poisoned (BACKLOG.md) |
| Fighting Style feats | ✅ Resolved | The four SRD 5.2 styles, applied by the engine by feat slug (C20): Defense +1 AC in derive_sheet while Light, Medium or Heavy armor is worn (a hand-built PartyMemberSpec's ac is taken as given); Archery +2 to Ranged-weapon attack rolls, on top of a pinned attack_bonus; Great Weapon Fighting treats a 1 or 2 on a damage die as a 3 (a Melee weapon that is Two-Handed, or Versatile held in two hands, with no Shield equipped); Two-Weapon Fighting adds the ability modifier to the Light off-hand swing. Read from DerivedSheet.feats (forwarded by build_party_member) or PartyMemberSpec.feats / fighting_style. Opportunity attacks apply them too (C24), except Great Weapon Fighting with a Versatile weapon: an opportunity attack always swings it one-handed (BACKLOG.md) |
| Martial Arts and Monk's Focus | ⚠️ Partial | While unarmored and without a Shield (armor and Shields in PartyMemberSpec.equipment count as worn), an Unarmed Strike or Monk weapon rolls the Martial Arts die when it beats the weapon's own, and uses DEX when higher — for the Grapple and Shove DC too; the Bonus Unarmed Strike spends the Bonus Action; Flurry of Blows spends 1 Focus Point for the next two Unarmed Strikes, three with Heightened Focus (C20). Patient Defense's dodging status, Step of the Wind's Dash and Stunning Strike's Focus Point are not applied (BACKLOG.md); an opportunity attack gets Martial Arts (C24) |
| Rage | ⚠️ Partial | Lasts until the end of the barbarian's next turn; an attack roll against an enemy, an enemy's saving throw during that turn, or use_feature rage again as a Bonus Action (no use spent) extends it, and the Incapacitated condition ends it at once, however it is applied — EffectExpired with reason="not_extended" or "incapacitated" (C20). A Barbarian 15's Persistent Rage needs no extension, and only Unconscious ends it early; its Rage recovery on rolling Initiative isn't applied. Heavy armor, "No Concentration or Spells" and the 10-minute cap are not modelled; the corpus effect's 10 rounds stay the outer cap (BACKLOG.md) |
| Bardic Inspiration | ⚠️ Partial | A Bonus Action gives another creature one die (the bard's @scale.bard.inspiration); the holder redeems it on an attack with PlayerIntent.redeem_granted_die, and it is rolled only after the attack roll misses, never on a natural 1 (C20). Spell attacks (cast_spell), saves and ability checks can't redeem it, range and sight aren't checked, and a die whose bard has left the combat can't be rolled (BACKLOG.md) |
| Wild Shape | ⚠️ Partial | use_feature wild-shape with PlayerIntent.form_id (a corpus Beast) takes the form as a Bonus Action and grants Temporary Hit Points equal to the Druid level (C21). The Beast Shapes table is checked before a use is spent — Max CR 1/4, 1/2 or 1 at Druid 2, 4 or 8, a Fly Speed only from 8 — and anything else is refused with CastFailed(reason="invalid_form"). The form's AC, Strength, Dexterity, Constitution, speeds, senses, resistances, traits and attacks replace the druid's; its Hit Points, mental scores, class features and running concentration stay. It attacks through stat_block_action_id and can't cast, ready or release a readied spell, or make a weapon attack. The form ends on reuse, the Incapacitated condition, death or use_feature wild-shape without form_id (a Bonus Action, no use) — not when its Temporary Hit Points run out. Known forms are the host's to track; Beast Spells (Druid 18) and item use in form are not modelled (BACKLOG.md) |
| Weapon mastery (2024) | ✅ Resolved | All eight (C15): Graze, Topple, Vex, Sap, Slow, Push, Cleave, Nick. Push ignores the "Large or smaller" size gate (no creature-size attribute yet) |
| Sneak Attack | ✅ Resolved | Once per turn — any creature's turn, so an opportunity attack can deal it (C24) — with the ally-adjacency or advantage trigger |
| Short/long rest, hit dice, feature & item recharge | ✅ Resolved | Long Rest also restores Spellcasting/Pact Magic slots and reduces Exhaustion by 1; Short Rest restores only the Pact Magic pool; recover_slotless_casts restores a spell cast without a slot (Magic Initiate) on a Long Rest only (C28) |
| Multiclassing | ⚠️ Partial | CharacterBuildSpec.classes carrier + multiclass/Pact slot-table derivation (C17); the sheet derives per-class features, HP, hit dice, proficiencies and non-stacking Extra Attack (C19); live combat reads PartyMemberSpec.classes (C20): each class's features and scale values at its own level, a subclass at its class's level, @classes.<class>.levels per class. A host that sends no classes keeps the single-class reading. The spellcasting ability still comes from class_slug unless PartyMemberSpec.spell_abilities names one for the spell (C28), and picked features (Invocations, Blessed Warrior) never reach the live feature gate (BACKLOG.md) |
| Feats | ⚠️ Partial | The four SRD 5.2 Fighting Style feats apply (C20, row above). derive_sheet adds the background's Origin feat, takes a feat once unless it is repeatable (Feat.repeatable: Ability Score Improvement, Magic Initiate, Skilled) and refuses an Epic Boon taken at an Ability Score Improvement below character level 19 (C28). In combat (C28): Alert adds the Proficiency Bonus to an engine-rolled Initiative; Savage Attacker rolls a weapon's damage dice twice on the first weapon hit of each turn — any creature's turn, an opportunity attack included — and keeps the higher roll, never for an Unarmed Strike; a Grappler has Advantage on attack rolls against a creature it grapples; a magic-initiate: choice token casts Magic Initiate's spells with the chosen ability and gives its level 1 spell one cast per Long Rest without a slot. Not applied: Alert's Initiative Swap, Skilled's proficiencies, Grappler's Punch and Grab, Fast Wrestler and +1, every Epic Boon's benefits, and feats' ability increases other than the Ability Score Improvement feat's (C19); Grappler's "Strength or Dexterity 13+" and a Magic Initiate spell's list are not checked (BACKLOG.md) |
Reactions
Reactions work, with one constraint that shapes any host integration:
The engine never pauses mid-resolution to ask whether you want to react. A creature must pre-arm its reaction on its own turn with a
"ready"intent. The engine then fires it automatically when the trigger occurs.
| Reaction | Status |
|---|---|
| Opportunity attack | ✅ Resolved — needs no arming: every walk that leaves an enemy's reach draws it, whoever drives the mover (a move intent, the monster AI's closing walk or its flee); Disengage suppresses it from either side, and a summon makes none (BACKLOG.md) |
| Shield (incl. vs. Magic Missile) | ✅ Resolved — answers an attack roll only: a monster's save action (a Breath Weapon) leaves it readied (C26b) |
| Counterspell | ✅ Resolved — slot-gated at the readied level and 60 ft range/LoS-gated at drain time (an ineligible reactor's armed reaction is skipped, not popped) |
| Readied spell cast | ✅ Resolved — a readied leveled spell (e.g. Shield) needs an unexpended slot at its readied level; an ineligible reactor's armed reaction is skipped, not popped |
| Arbitrary SRD "Ready an action with a custom trigger" | ❌ Not modelled |
Environment & exploration
Deliberately out of scope for a combat engine, and not modelled: falling damage, suffocation, mounted combat, underwater combat, improvised weapons, object interaction, and encumbrance.
Event stream
Every call returns typed CombatEvents.
AttackRolled, SaveRolled, CheckRolled and ConcentrationCheck all
carry the roll breakdown: natural (the die kept after advantage/disadvantage),
modifier (the flat bonus) and sources (which advantage/disadvantage sources
applied) — so a host can render "14 + 5 = 19". Two residual limits:
- The target's effective AC is not reported, so a miss cannot be explained as
"vs AC 16"; and
modifierexcludes Bless/Bane-style bonus DICE, which must be rolled after the d20 to keep the seeded stream stable. DamageAppliednames what dealt it (source_id: a weapon slug, a synthesized activity id ormastery:<slug>) only for weapon-attack damage — spell, save and heal damage reportNone— and never names the attacker. The creature that dealt a kill or a knock-out is named byDeathRecord.killer_idandKnockedOut.attacker_id.
TurnPhase(phase, actor_id, round_number) marks each turn boundary —
round_start / turn_start / turn_end — immediately before the engine runs
that phase's lifecycle hooks, so "top of round 3" and "end of Alice's turn" are
readable directly rather than inferred from TurnStarted/TurnEnded adjacency.
ConcentrationCheck(target_id, dc, roll_total, succeeded, …) is the only event
for the damage-triggered concentration save: no SaveRolled accompanies it, so a
host that counts saves counts both types — see
the v0.6 → v0.7 migration guide.
Every residual limit in that list is tracked in BACKLOG.md.