Skip to content

v0.7.0

Choose a tag to compare

@tapestria tapestria released this 10 Oct 16:52
e187c81

Lockstep release of dnd5e-srd-data, dnd5e-engine and nat20-bridge 0.7.0, a breaking minor release. GridScene is now the only spatial backend, and the grid now has what only the zone graph had: opportunity attacks and monster flee. Areas of effect resolve for every intent kind and for monsters, templated monsters see with their stat-block senses, the remaining SRD 5.2 condition clauses apply, feats work in combat, and the bridge reaches parity with the engine. Upgrade notes: docs/migration/v0.6-to-v0.7.md.

Breaking changes

  • The zone graph is removed (dnd5e-engine). start_combat requires grid_scene=GridScene(...), and scene_zones= raises TypeError. SceneTopology, ZoneEdge and dnd5e_engine.testing.ZoneGraph are gone; dnd5e_engine.orchestrator.__all__ exports GridScene in their place. Every start position must be a cell of the scene. The migration guide has a recipe for porting a zone layout.
  • One event per concentration save (dnd5e-engine). The duplicate SaveRolled(ability="con") that accompanied ConcentrationCheck is removed: read ConcentrationCheck.
  • nat20-bridge refuses unknown intent keys with 422, and an unknown intent_type too; a misspelt field used to be dropped silently.
  • nat20-bridge drops member.attack_bonus from /v1/party/validate. It was always 0; to-hit is per weapon.

A host also has to handle the new AreaTargeted event in the closed CombatEvent union; Background.starting_feat_slug now names the canonical feat (alert) rather than the Foundry id (phbftAlert000000); and dnd5e-engine requires dnd5e-srd-data>=0.7.0, while nat20-bridge requires both at >=0.7.0.

dnd5e-engine

C24 — grid movement and reactions

  • Opportunity attacks fire on the grid for every walk: a character's or a host-driven foe's move, the monster AI's closing walk, and its flee. They are reach-based from both sides; Disengage suppresses them either way, a Charmed reactor spares its charmer, and the walk stops at 0 HP or Speed 0.
  • They resolve through the activity context: the character's weapon (PartyMemberSpec.opportunity_attack_weapon_id, else its first melee weapon, else an Unarmed Strike) or the creature's stat-block attack, with cover, Fighting Styles, Martial Arts, proficiency, enchantments, weapon mastery, Sneak Attack and the target's readied Shield.
  • A move intent's ActorMoved splits at a provoking step. Sneak Attack's once-per-turn use resets at every turn start, so it can land on another creature's turn.
  • Monsters flee on the grid, to the reachable cell farthest from their nearest enemy (GridTopology.reachable_cells).

C25 — the zone graph and the concentration twin removed

  • See Breaking changes. An enemy's concentration check no longer extends Rage, and a failed concentration check no longer stands in for a condition's repeat save. ZoneTransit stays in the event union, never emitted, until a later breaking release.

C26a — areas of effect for every intent kind

  • A feature's or an item's area (a Breath Weapon, the Pipes of Haunting) catches every creature in it, not only the named target. "Each enemy" and "each ally" keep 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 overrides that; "up to N creatures" takes the creatures named. Each placed area emits AreaTargeted.

C26b — monsters aim their own areas

  • A monster's stat-block area action, area spell and area legendary action resolve against the creatures in the area, placed where it affects the most enemies minus allies and never the monster itself (dnd5e_engine.areas.best_aim).
  • A Multiattack honours "if available" and spends a Recharge action when it fires; the Djinni, the Doppelganger, the Aboleth and the Ancient Gold Dragon now follow their stat blocks. A readied Shield no longer fires on a monster's save action.

C27 — monster senses and the condition clauses

  • A templated monster takes its stat block's senses (EncounterMemberSpec.senses overrides them) and, while its spec lists none, its condition immunities.
  • Frightened's Disadvantage on ability checks needs its source in sight, while its "can't willingly move closer" holds either way; Poisoned and Frightened reach Hide and escaping a grapple; Petrified resists Poison damage and is immune to the Poisoned condition; one immunity check covers every path.

C28 — feats

  • derive_sheet adds the background's Origin feat to the sheet, and refuses a non-repeatable feat taken twice and an Epic Boon below character level 19.
  • 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 and keeps the higher roll; a Grappler has Advantage against a creature it grapples; Magic Initiate casts its spells with the chosen ability and its level 1 spell once without a slot (recover_slotless_casts restores it after a Long Rest).

C29 — bridge parity, the engine side

  • CombatInstance.initiative takes None, so a character build_party_member builds reaches the engine-rolled Initiative, Alert included.

Full details: CHANGELOG.

dnd5e-srd-data

  • Who an area affects follows the SRD 5.2 text (C26a): target.affects.choice on Sleep, Slow, Mass Cure Wounds and the Mace of Terror's Wave of Terror, and affects.count: "6" on Slow and Mass Cure Wounds.
  • Monster area actions follow their stat blocks (C26a): Recharge 5–6 on six dragons' breaths and the Centaur Trooper's Trampling Charge (those dragons never breathed), the Tarrasque's Thunderous Bellow on 5–6, the gold dragons' and the magma mephit's Fire Breath as Cones, corrected breath sizes, and "each creature" on the green dragons' and the iron golem's Poison Breath.
  • Feat.repeatable, and Background.starting_feat_slug names the canonical feat (alert, magic-initiate, savage-attacker) (C28).

Full details: CHANGELOG.

nat20-bridge

  • The intent body takes every PlayerIntent field and the build every make_build_spec keyword; the view reports seed, turn, summons, transformations, constructs and each row's initiative (C29).
  • The engine rolls a combat's Initiative from the combat's own generator, so the first attacks no longer repeat the Initiative d20s; /v1/roll, /v1/check and /v1/combat no longer reseed the process-global random, which concurrent requests raced (C29).
  • At most 16 combats stay live (--max-combats): starting one more ends the least recently used, which then answers 404 (C29).
  • An intent the engine can't resolve, an empty side, or a side the grid can't seat answers 422 rather than 500 (C29).
  • Narration: a concentration save is its own line (C25); an area names whom it catches and spares (C26a, C26b); a summon narrates by its name, with its joining and leaving (C29).
  • A foe the bridge builds sees with its stat-block senses (C27).

Moved seeded pins

  • C24 moved the streams its rules reach, each listed with its reason in the migration guide: the grapple-and-shove and flee scenarios, four flee unit tests, the opportunity-attack and vision tests ported to the grid, and the demo's hold-the-line and goblin-ambush. Every assertion still holds.
  • C29: a seeded bridge /v1/combat keeps its Initiative and turn order, but every later roll moves. No engine or demo pin moved.
  • C25, C26a, C26b, C27, C28 and the closeout moved none.

Upgrading

  1. Upgrade dnd5e-srd-data, dnd5e-engine and nat20-bridge together: dnd5e-engine requires dnd5e-srd-data>=0.7.0, and nat20-bridge requires both at >=0.7.0.
  2. Pass a GridScene to every start_combat, with every start position one of its cells. A host still on zones fails loudly there: scene_zones= raises TypeError, and a start position that is not a cell raises ValueError naming the combatant and the cell — the empty CombatInstance.zone_id default of a character built with build_party_member included.
  3. Read a concentration save from ConcentrationCheck.
  4. Handle AreaTargeted, on monster turns too.
  5. Expect opportunity attacks and monster flee on the grid, and give a character whose spec carries no equipment an opportunity_attack_weapon_id.
  6. Decide whom an area "of your choice" spares with excluded_target_ids.
  7. Expect templated monsters to see with their stat-block senses and keep their condition immunities.
  8. Match a background's feat by its canonical slug.
  9. nat20-bridge clients: send only PlayerIntent fields, stop reading member.attack_bonus, and end the combats you are done with.

Every step, with its detail: docs/migration/v0.6-to-v0.7.md.