Skip to content

Add the effects system - #366

Open
Lakeyzer wants to merge 74 commits into
developfrom
feature/effects
Open

Lakeyzer wants to merge 74 commits into
developfrom
feature/effects

Conversation

@Lakeyzer

@Lakeyzer Lakeyzer commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the effects system: a single model for conditions, spell effects, features and custom effects that the combat tracker actually runs, instead of only displaying them.

  • Effects engine: SRD and custom effect definitions are applied as instances on creatures. Conditions are now effects, and the old Conditions drawer and legacy condition chips are gone.
  • Automation in the tracker: durations, triggers and prompts, repeat saves, escapes, Concentration, damage over time, stat and roll modifiers, attack and damage modifiers, critical hits, defenses, immunities, restrictions, damage modifiers, rerolls, roll floors and temporary hit points.
  • Authoring: a rebuilt custom effect form that covers the whole schema, copying existing effects, and a documentation page at /documentation/effects. Custom effects are held back for a later release: behind the custom_effects_released flag, My content > Effects shows "coming soon", the form routes redirect there, and the effect lists show a Custom tab that says "Coming soon" (step 14 of .planning/effects-implementation-plan.md).
  • Links: effects can be linked to NPC actions, special abilities (always-active trait effects) and custom spells, with scaling by slot and caster level. They apply from the roll result.
  • Outside combat: apply effects on the set initiative screen and the run campaign screen, with damage, healing and labelled manual bonuses there too.
  • Encounter reminders: reminders live on the encounter, fire on rounds, turns and defeat, and can offer an effect or damage. They replace entity reminders. Personal reminders under My content are deprecated.
  • SRD data: effects and conditions now come from the HK API (/v2/effects/{edition}, /v2/conditions/{edition}), and the local lists are removed.
  • Public initiative: shows effect chips and values calculated by effects, without revealing hidden values.
  • Fix: hit points above 0 clear dead, stable and death saves.

Specs are in openspec/specs/effects-* and openspec/specs/encounter-reminders. The history is in openspec/changes/archive/*-effects-*.

Before deploying

  • Deploy the effects branch of firebase_rules before this. Without it, writes of effects, bonuses, reminders and links are rejected.
  • HK API /v2/effects and /v2/conditions are live.

Effects saved during testing with retired SRD urls (shield-of-faith, acid-absorption…) stay as unresolved references: they show by name with no mechanics.

Test plan

Checks are grouped by feature. Each line is action → expected result. Unless a section says otherwise, test in the normal tracker layout with a signed-in user.

Custom effects are held back, so the checks that need a custom effect created on this branch were moved to .planning/custom-effects-test-plan.md, for the release PR. Section 21 now checks the coming-soon state.

Numbers in the checks (AC 16, 12/30 hit points…) are examples: use your creatures' own values.

Examples use current SRD data. Some older specs name Shield of Faith or Aid, which are no longer SRD effects, so this plan uses Armor Class Bonus and Hit Point Maximum Bonus instead.

Start here: two checks are still unticked in the step tasks, marked Open in section 2: converting an old surprised reminder and converting old entity reminders. The "API down" checks in section 3 were optional in step 12, so they may not have been run.

0. Static checks

  • npm run lint passes
  • node scripts/validate-effects-data/validate.mjs passes against the live API
  • node scripts/validate-effects-data/check-constants.mjs passes against the schema, the API and the rules

1. Test setup

Legacy data: create this on develop, before switching to this branch

  • Encounter with an NPC with conditions (poisoned, prone, an unknown key) and a player with Exhaustion 2
  • Reminders on an NPC: start of turn, timed with 3 rounds left, damage trigger, Concentrating, Reaction used, and the surprised reminder from the set initiative screen
  • NPC and player with ac_bonus and maxHpMod
  • A personal reminder under My content
  • An untouched encounter that still has legacy conditions, to test Reset

On this branch

  • Campaigns: one 5e, one 5.5e
  • Players: any three, called Player A, B and C below; Player A is a spellcaster with a spell save DC, and one of them has a companion
  • NPCs: 3 Goblins, Ogre, Skeleton (immune to Poisoned), Archmage (Intelligence 20, spellcasting Intelligence), a clay golem and a zombie
  • Custom spells: Hold Person, Magic Weapon, Bless, an area spell, Hex with duration tiers, Bestow Curse, and an "Aid" with only an Always link
  • A second browser or incognito window for the public initiative

2. Legacy conversion

  • Load the encounter with legacy conditions → NPC has Poisoned and Prone as "until removed" effects, stored on the encounter; its conditions map is deleted
  • The unknown condition key → creates nothing, and the map is still deleted
  • Player with conditions: { exhaustion: 2 } → Exhaustion level 2 stored on the campaign player; encounter entity map deleted
  • Entity with prone in the map and already a Prone effect → no second Prone
  • Legacy unconscious → no prompt to apply Prone during conversion
  • Open: entity reminders → start and end of turn convert to entity reminders on the encounter, with title, text, color and variables kept
  • "Remove on trigger" converts to once; "notify" converts to repeating
  • Timed reminder with 3 rounds left in round 2 → once reminder at the start of its turn in round 5
  • Open: damage reminders → gone, nothing replaces them, and the entity has no reminders
  • Encounter with the premade Concentrating reminder → entity has Concentration (caster itself, until removed) and no reminders; an entity that already has Concentration gets no second one
  • Encounter with the premade Reaction used reminder → entity has Reaction Used until the start of its next turn and no reminders; no second one if it already has it
  • Open: encounter with reminders.surprised → entity has the Surprised effect and no surprised reminder (5e and 5.5e)
  • Reload after conversion → nothing changes or duplicates
  • ac_bonus: 2 → tooltip lists "Manual: +2", and nothing is written on load
  • Add "Cover" +2 to that entity → bonuses.ac holds both, and ac_bonus is removed
  • maxHpMod → same as ac_bonus, under max_hp
  • Reset the untouched legacy encounter → its conditions map is removed
  • Demo: player with legacy Exhaustion 1 → shows level 1, nothing written
  • Test run of a legacy encounter → no conversion written

3. SRD data from the API

  • Fresh session, start a 5.5e encounter with Bless and Prone on an NPC → both resolve to the 5.5e definitions
  • Network tab: open the Effects drawer, then an effect picker → no second request for that edition
  • Open the Effects drawer while the fetch is running → SRD groups fill in without reopening
  • API down (never tested): block api.harmlesskey.com and start an encounter → it loads, Bless and Prone keep their stored names, Prone keeps its icon, an error is logged
  • API down: Effects drawer → SRD group omitted, says the effects couldn't be loaded
  • API down: conditions mode → says the conditions couldn't be loaded
  • API back: unblock and open the Effects drawer → definitions fetched again and listed
  • 5e and 5.5e each list the 15 conditions; Dying and per-level Exhaustion are not listed
  • Burning, Hex, Alert and Enthrall are in 5.5e only, and no effect is listed twice in either edition
  • Basic effects (Armor Class Bonus, Reaction Used…) are listed in both editions
  • Shield of Faith, Aid, Barkskin, Fly, Longstrider, Gauntlets of Ogre Power, Ioun Stone and Robe of the Archmagi are not listed
  • Stored instance of a retired url (shield-of-faith) → shows its name, has no mechanics, encounter loads
  • Instance of the other edition's effect (Burning in a 5e campaign) → unresolved, encounter loads
  • Change a campaign from 5e to 5.5e → Exhaustion resolves to the 5.5e rules at the next encounter start

4. Compendium and condition selects

  • 5.5e conditions compendium, search "blin" → Blinded listed; the request is /v2/conditions/5.5e
  • Condition page → description, one line per sub-effect, icon
  • Exhaustion page, both editions → that edition's level table
  • Unknown condition url → says it couldn't be found
  • Condition page's meta description comes from its description
  • Campaign resources compendium lists conditions
  • NPC form's condition immunities on a 5.5e NPC → the 15 conditions, each with its icon
  • No requests to the old /conditions endpoints

5. Effects drawer

Opening

  • Options bar with two targets, Effects (F) → both listed as targets
  • Entity target menu → only that entity, whatever is targeted
  • Mobile menu → opens for that entity
  • Conditions (C) → drawer in conditions mode with only the 15 conditions
  • Conditions from an entity's target menu and the mobile menu → conditions mode for that entity
  • No targets → prompt to select targets, nothing can be applied

Lists

  • Without a mode → tabs Effects (with its count) and Custom ("Coming soon"), no conditions
  • Lists are sorted by name and show at most 10 per page, with pagination
  • 5e → Concentration has the 2014 text; 5.5e → the 2024 text and Exhaustion has 2024 text
  • /demo → 5.5e definitions, no Custom tab

Search

  • "BLESS" → Bless in Effects, and the Custom tab still says "Coming soon"
  • No match → "no effects match", no empty groups and no Custom tab
  • Empty search → whole list; no requests while typing
  • Conditions mode has a search
  • Search exists in: campaign Effects drawer, NPC and spell form pickers, reminder form

Details

  • Expand Prone → description and one line per sub-effect, no apply form
  • Expand Exhaustion → per-level table of the campaign's edition

Apply form

  • Apply button opens a modal and applies nothing yet
  • Apply from the modal with 2 rounds → both targets get it and the modal closes
  • Cancel, or the close button → nothing applied; clicking outside or Escape doesn't close the modal
  • Shift+click on Prone → applied until removed, no modal
  • Shift+click on an effect with a choice → modal opens
  • Shift+click Damage Reduction → modal opens (damage type and value)
  • Shift+click Exhaustion on a level 2 target → level 3, no modal

Duration

  • Default is Until removed
  • Time 10 rounds → badge 10
  • Time 1 minute → counts as 10 rounds
  • Time 0 or empty → can't apply
  • Concentration with an optional "up to" value
  • Until next turn: caster or target, start or end
  • Until the end of this turn

Caster

  • Caster select lists everyone in the encounter plus None
  • Defaults to the active entity; before combat, None
  • Choosing Player A during a goblin's turn → caster is Player A
  • Shift+click uses the default caster

Choices

  • Blinded → no choice inputs
  • Skill Bonus → skill and number inputs; can't apply until both are filled
  • Armor Class Bonus accepts a negative value; empty blocks applying
  • Damage type choice limited by the effect's list only offers those types
  • One kind used by several sub-effects is asked once

End effect select

  • Options: Repeat save to end, Escape, Ends early when, with a tab per selected option and no + buttons
  • Selecting an option opens its tab; removing it removes the tab and its values
  • Ends early when offers only: takes damage, deals damage, hits with an attack, regains hit points, becomes Bloodied
  • Ends early when with no event → can't apply
  • Unconscious, 1 minute, Ends early when "Takes damage" → ends when it takes damage
  • Repeat save: ability, positive DC, timing (default end of target's turn; also start of turn, when it takes damage)
  • Repeat save extras: successes needed, escalate after failures to a condition, automatic success after a time
  • Extras left at their defaults are not stored
  • Escape: DC, checks (Athletics and Acrobatics by default), who may attempt it

Exhaustion and duplicates

  • New target → level 1, one instance
  • Target at 2 → default 3, same instance and key
  • Target at 6 → default 6, nothing higher possible
  • Different levels on several targets → the chosen level is set on each; drawer shows each target's level
  • Prone on a target that has it and one that doesn't → only the second gets it, nothing is written for the first

Removing

  • Drawer shows whether all, some or none of the targets have an effect
  • Remove from the drawer → removed from all targets
  • Exhaustion at any level is removed

6. Chips and detail view

Chips

  • Condition → condition icon; other effect → generic icon and first letter
  • Reminder chips come first, then effect chips
  • Shown in the target list, entity card, legacy current-turn pane and drawer target lists
  • Effects drawer's target list shows only effect chips; the Reminders drawer shows only reminders
  • Overflow goes into the "+N" menu, effect chips included
  • Badges: Exhaustion level and rounds left; no badge for others
  • Tooltips: "Until removed", "N rounds left", "Concentration, up to 1 hour", "Until the start of Goblin's next turn", "Until the end of this turn"
  • Tooltip "from "; caster gone → "from Goblin (not in this encounter)"

Detail view

  • Shows entity, name, icon, duration, rounds left, round applied, caster and choices ("Ability: Wisdom")
  • Repeat save → "Wisdom save DC 15, at the end of the target's turn"
  • Paralyzed → own sub-effects, plus Incapacitated's labelled "from Incapacitated"
  • Caster gone without a stored name → "Not in this encounter"; with one → "Goblin (not in this encounter)"
  • Remove is always shown, and removes only that instance
  • Exhaustion table marks the current level; choosing 4 sets it and the badge
  • Lowering Exhaustion below 1 removes it

7. Storage

  • NPC effect is stored on the encounter entity, nothing on the campaign
  • Player and companion effects are stored on the campaign, nothing on the entity
  • A stored instance has no sub_effects or description
  • Conditions write no conditions map; applying effects doesn't write reminders
  • Exhaustion from 2 to 3 changes only level
  • Reload → NPC effects remain under the same key
  • Leave and reopen without reloading → NPC and player effects remain
  • Next encounter of the campaign → player effects carry over; re-applying Exhaustion doesn't duplicate
  • Demo and test run → effects work, nothing is written
  • Test run of an encounter with stored NPC effects → starts empty
  • Reset → NPC effects, bonuses, ac_bonus and maxHpMod removed; player effects stay; reminders stay and can fire again
  • Rejected write for one of two targets → that target unchanged, the other updated, error logged
  • Exports leave out bonuses

8. Durations and ending

  • 10-round effect → counts down at the end of the caster's turn, badge updates and is saved
  • Last round → removed with a notice ("10 rounds passed")
  • Caster absent, or no caster → counts down on the holder's own turn
  • Next turn, caster, start → removed at the start of the caster's next turn, not before
  • Next turn, target, end, applied on its own turn → survives that turn, ends after the following one
  • Next turn, target, end, applied by someone else → ends at the end of the target's turn
  • Reaction on the target's turn (caster Player A, on Goblin, during Goblin's turn in round 2) → ends at the end of Goblin's turn in round 3
  • Caster's next turn, cast out of turn → ends at that end of the caster's turn in the same round
  • End of this turn → removed as the turn ends
  • Until removed stays through many rounds
  • Cancel trigger (ends on damage) → removed with a notice
  • Filter that can't be checked ("caster or its allies") → stays, prompt says it may have ended
  • Previous turn → changes nothing, and expired effects stay gone
  • Grappled removed → Restrained with its parent_id ends too
  • Automatic ends show a notice that disappears by itself; manual removal shows none
  • End-of-effect prompt lists on-expire sub-effects (Haste ending) and stays until dismissed; nothing is applied
  • Effect without on-expire → no prompt

Carried-over review

  • Start an encounter with a player's timed effect from an NPC not present → notice with Review, listing holder, name, duration and caster
  • Keep → caster reference removed, not listed next time, ticks on the player's turn
  • Remove → removed, with the cascade
  • Nothing to review → no notice

9. Triggers and prompts

  • Prompt: "Goblin: Burning, at the start of its turn", listing the sub-effects, with Details and Dismiss, staying until dismissed
  • Details opens the effect's detail view
  • A trigger only prompts for the right creature: the holder, not another one with the same effect
  • Next turn order: end caster, end target, then start caster, start target
  • Start encounter → combat start for all, then start of turn for the first
  • Previous turn fires nothing
  • Caster-turn sub-effects fire on the caster's turn when present, on the holder's turn when absent or None
  • 12 damage to a 20 HP NPC → damage taken, damage dealt and Bloodied fire
  • Already Bloodied → no second Bloodied
  • Drop to 0 → on zero HP fires
  • Healing fires on heal; an amount of 0 or undo fires nothing
  • Natural 20 hit → hit, crit, hit taken and crit taken fire
  • Save action → save success or save failure fires for the target
  • Miss → none of these fire
  • Skill or ability check from the card, or a check from the targeted panel → on check fires, only for that entity
  • Saving throw from the card → on check doesn't fire
  • Unconscious applied → on-apply prompt for Prone; re-applying a condition fires nothing
  • Filters: damage type mismatch doesn't fire; a filter that can't be checked shows in the prompt ("within 5 ft")
  • by: caster: a hit by someone else doesn't fire
  • Firing a trigger by itself changes no HP, effect or database value

10. Repeat saves and escapes

  • Paralyzed with a Wisdom save at end of turn → prompt "Goblin: Paralyzed — Wisdom save DC 15" with Roll, Succeeded and Failed
  • Roll → rolls the holder's save and resolves against the DC
  • "with Advantage" and "costs its action" show when set; Advantage is rolled
  • Single success → "Paralyzed ended (saved)"
  • 3 successes needed → counter rises, effect stays until the third
  • Failure counts; on-fail sub-effects are shown
  • Restrained with 3 failures to Petrified → "Restrained became Petrified", same caster, no end-of-effect prompt
  • Escalate with lock → stays, no more prompts
  • Immune creature on escalation → not given the condition
  • Auto success after 1 minute → in round 11, succeeds without a prompt, announced
  • Paralyzed creature's Dexterity repeat save, Roll → fails automatically, no roll
  • Grappled with escape DC 14 → detail view shows DC, checks, who and cost
  • Roll Athletics, total 15 → "Grappled ended (escaped)"
  • Failed attempt → nothing changes
  • Mark an attempt Succeeded or Failed by hand

11. Damage and healing from effects

  • Burning prompt has Roll; a prompt with no damage has no Roll
  • Roll → 1d4 fire, roll dialog opens on the holder, prompt closes
  • Nothing is applied until the DM applies it in the dialog
  • In the dialog: defenses, save result and total can be changed
  • Applying logs it, updates meters and fires HP triggers; a creature with resistance takes half
  • Repeat-save failure and end-of-effect prompts also offer Roll
  • Chosen damage type: 1d6 cold when cold was chosen
  • Two damage sub-effects on one prompt → one roll with two parts
  • Formula 2 * level at level 3 → 6
  • Effect damage is never a critical hit
  • Damage with neither roll nor value → 0 damage, named " (amount not set)"; total can be entered
  • Caster modifier: caster.wis_mod with Wisdom 16 → +3
  • Spellcasting mod: Archmage caster → 5; Player A as caster → its spell save DC − 8 − its proficiency bonus (DC 15 at level 5 → 4)
  • Unknown variable → contributes 0, and the roll's name says what was left out
  • Formula alert(1) or constructor → nothing runs, contributes 0
  • Minimum: caster.cha_mod with min 1 and Charisma 8 → 1
  • Recipient self → holder; caster → caster; trigger_source on a hit → attacker
  • No recipient known (trigger_source on a turn trigger) → listed, no Roll; caster gone → no Roll
  • Dealer: caster in the encounter is logged and gets meters; no caster → the holder; trigger_source → the holder
  • Sub-effect save for half → dialog shows save with DC, success halves
  • Save with no known DC → shown without a DC, damage follows the marked result

12. Stat modifiers

  • Armor Class Bonus +2 on AC 16 → 18 marked, tooltip "Armor Class Bonus: +2", stored AC unchanged
  • Grappled → walking and fly Speed 0, back after removal
  • Old-format Speed text with Restrained → 0 ft.
  • Ability Score Minimum 19 on Strength 10 → 19 (+4); on 20 stays 20
  • Includes count: Stunned applies Incapacitated's parts
  • Unresolved definition contributes nothing
  • 5.5e Exhaustion 3 on Speed 30 → 15; 5e Exhaustion 2 → 15, level 1 not halved
  • Speed Bonus 10 plus Grappled → 0 (fixed wins)
  • Armor Class Minimum 16: AC 12 → 16, AC 18 stays
  • Base beats stored value: Mage Armor 13 + dex_mod
  • Two different effects → both count
  • Armor Class Bonus chosen as 1 and 3 on two creatures → each uses its own; -1 is a penalty
  • Values are shown on the card (stats, scores, saves, skills, passive, spellcasting), targeted panel, target rows and health bar
  • Quick edits show and edit stored values
  • An attack of 17 against AC 15 with +2 → miss
  • Strength save from the card with Strength set to 19 → uses +4
  • NPC initiative with Initiative Bonus 5 and modifier +2 → +7
  • Spell save DC and spell attack changes are used when an NPC casts
  • Hit point maximum: 40/40 reaches 5e Exhaustion 4 → 20/20
  • Healing 10/20 by 15 → stops at 20
  • Hit Point Maximum Bonus 5 at 12/30 → 17/35
  • Effect that lowered the maximum ends → maximum back, current HP unchanged
  • Transformed pool doesn't follow max_hp effects

Temporary hit points

  • False Life applied → prompt with Grant temp HP; choosing it rolls 1d4+4 and sets it
  • Nothing is granted without the button
  • 8 temporary, granted 5 → keeps 8, nothing recorded
  • Heroism each turn → start-of-turn prompt offers Grant temp HP
  • Heroism with an Archmage caster on another's turn → 5
  • Effect with expires_with_effect ends → loses them, with " loses temporary hit points from "
  • Ends through the cascade → also loses them
  • 12 temporary with temp_hp_granted 5 → keeps 12
  • Escalation replacing the effect doesn't remove them

13. Manual bonuses and bonuses drawer

  • Clicking AC, max HP, Speed, initiative, a score, passive Perception, spell DC or spell attack on the card opens the drawer for it
  • Score drawer shows the score, its checks and its saves; add form can target any of the three
  • Roll bonuses button by the skills → attacks, damage, all checks, all saves, death saves, Concentration saves, every skill
  • Drawer shows stored value, effect modifiers (read-only, with link to details), manual bonuses (editable, removable) and effective value
  • Attacks and damage show no stored or effective value
  • Add form: value, label (default "Manual"), and target value
  • "Boots of Striding" +10 → saved, listed, Speed rises
  • "Gloves of Thievery" +2 Sleight of Hand → stored as skill_sleight_of_hand, card rises
  • Two AC bonuses → both stored and listed in the tooltip
  • AC 16 with Armor Class Bonus +2 and Cover +2 → 20, tooltip lists both
  • Manual Speed +10 and Grappled → 0
  • AC and HP quick edits have a button that opens the drawer instead of a bonus field
  • Transformed: HP quick edit keeps the transformed pool's modifier
  • Entity edit drawer for one entity → opens the drawer; for several → fields set "Manual", 0 removes it
  • Max HP bonus at 20/30 +5 → 25/35; removed at 33/35 → 30/30; at 25/35 → 25/30
  • Max can't go below 0
  • Drain attack of 7 → -7 max HP bonus, labelled with the attack
  • Players and companions save on the campaign, NPCs on the encounter

Effects in bonus drawers

  • AC drawer, 5.5e → Armor Class Bonus, Armor Class Minimum, Mage Armor, Haste, Slow, Warding Bond; not Bless
  • Max HP → Hit Point Maximum Bonus and Reduction; no Armor Class Bonus
  • Roll bonuses → Bless, Bane, Skill Bonus, no conditions
  • Prone and Reaction Used are never listed
  • Effect is listed once per drawer
  • List has tabs, 10 per page, expandable details, and search; "armor" finds only the three armor effects
  • Armor Class Bonus 2 from a goblin's AC drawer → appears under effect modifiers, not manual bonuses
  • Ability Check Bonus 2 from the Dexterity drawer → ability isn't asked, Dexterity checks +2
  • Skill Bonus from roll bonuses → asks for skill and value
  • Caster defaults to None in the tracker; the campaign drawers list players and None
  • Haste from Player B's AC drawer with Player A as caster and Concentration → all of Haste, linked to Player A's Concentration
  • Shift+click applies until removed

Outside the tracker

  • Campaign overview: AC 15 with +1 and +2 → 18 with both in a tooltip, ignoring effects
  • Rest dialog "Manual bonuses" reset removes bonuses, ac_bonus and maxHpMod

14. Concentration

  • Apply Bless, Concentration up to 1 minute, Player A as caster, 3 targets → option " concentrates on it" is on; one Concentration (10 rounds), all 3 linked
  • No "up to" time → Concentration until removed, still linked
  • Option off → no Concentration and no link
  • Caster None → no Concentration options
  • Caster is the only target → both effects, linked
  • A fourth Bless target → shares the Concentration; its duration doesn't change
  • Different effect → warning " is concentrating on …", button "Replace and apply"
  • Replacing → old ends with "started concentrating on Hex", linked effects end with notices, new one starts
  • Concentration applied by hand → choose "Link to 's current Concentration" (default) or "Replace it"
  • Other duration with a caster that concentrates → "Ends with 's Concentration", off by default; on links it
  • Caster without Concentration → option not shown
  • Runs out after 10 of the caster's turns → "1 minute passed", linked effects end
  • Unlinked Concentration duration with a time → counts down and ends; without a time → stays
  • Removing Concentration by hand → no notice for it, one for each linked effect
  • Applying Stunned or Incapacitated to the holder → Concentration ends
  • Prone on the holder → Concentration stays

Saves

  • 5.5e, 23 damage → ": Concentration save DC 11", "Took 23 damage.", "Constitution saving throw, DC 11."
  • DC: 7 → 10; 70 in 5.5e → 30; 70 in 5e → 35; 80 in 5e → 40
  • Roll includes Bless, concentration_save bonuses, Constitution save bonuses and Exhaustion, all named
  • Succeeded keeps it; Failed → "failed its Concentration save", linked effects end
  • Each damage event gets its own prompt
  • Other sub-effects of the same trigger keep their normal prompt
  • Drop to 0 → Concentration and linked effects end with a notice, no save prompt

15. Roll modifiers

Checks, saves and initiative

  • Poisoned: ability check and Perception have Disadvantage
  • Restrained Strength save is not affected; its Dexterity save is
  • Blinded's attacks-against modifier doesn't affect its own saves
  • Haste Dexterity save → Advantage, named in the result; button shows it
  • Haste and Restrained → one d20; Haste with Ctrl+click → one d20
  • Slow on a +2 Dexterity save → +0, result names "Slow −2", card marked, tooltip "Slow: −2"
  • 5.5e Exhaustion 2 → -4 on checks, saves and initiative
  • Bless with +3, d20 12 and d4 2 → 17, "Bless +1d4: 2"
  • Bane subtracts its die
  • Unknown formula → left out and named
  • Paralyzed Strength save from the card → "fails automatically (Paralyzed)", no dice
  • Stunned target's Dexterity save in the roll dialog → failed, reason Stunned
  • Automatic fail wins over automatic success
  • Frightened check → rolled normally, listed as a reminder
  • Magic Resistance on a target save against a spell → Advantage; from the card → reminder
  • Single-use modifier → used by the roll, effect ends with "used"
  • Other consume types apply and only remind
  • Targeted panel MOD and SAVE use the same modifiers and marks
  • Roll dialog: +5 save, d20 9, DC 13 → 14, success
  • 5.5e Invisible NPC initiative → Advantage; group initiative unchanged
  • Skill Bonus: Stealth +5, Athletics unchanged; missing value does nothing
  • Saving Throw Bonus (One Ability) Wisdom only; Advantage on Skill Checks for Arcana only
  • save_all +1 "Cloak of Protection" → every save +1, in the tooltip
  • skill_stealth +2 and check_dexterity +1 → Stealth +3, Acrobatics +1
  • Death save bonuses show only in the drawer

Attacks

  • Poisoned attacker → Disadvantage; Blinded target → Advantage; both → one d20, sources named
  • Bless +4, d20 11, d4 3 → 18
  • Guiding Bolt in a multiattack → first attack has Advantage and ends it ("used"), second is normal
  • Magic Weapon with a spell attack → no +1
  • Unknown attack type → reminder
  • Area attack → only the attacker's modifiers
  • 5.5e Grappled attacking the grappler → no Disadvantage; attacking someone else → Disadvantage
  • 5.5e Invisible attacker → reminder, rolled normally
  • Prone target: melee → Advantage with "melee: assumed within 5 ft"; ranged → Disadvantage; spell attack → reminders
  • Dodge → rolled normally, with a reminder

Critical hits

  • Melee hit on Paralyzed (14 against AC 12) → critical, damage follows the setting, on_crit fires
  • Setting Max + Roll, 1d6+2, d6 3 → 11
  • Settings Roll, Double and Disabled behave as for a natural 20
  • Ranged hit on Paralyzed → not critical; a miss → no damage
  • Crit range 19 → natural 19 crits and hits

Damage bonuses

  • Divine Favor → separate 1d4 radiant, named; defenses apply per type
  • Magic Weapon → +1 to hit, +1 of the first damage type
  • Critical with Divine Favor: bonus dice follow the setting
  • Saves and misses get no damage bonuses
  • Manual attack +1 and damage +2 → applied and named
  • Hex (5.5e): the caster's hit adds a separate 1d6 necrotic, no prompt afterwards
  • Hex: someone else's hit adds nothing; a miss adds nothing
  • Hunter's Mark (5e): separate 1d6 of the first damage type; with a spell attack, nothing
  • 2d8 fire to the attacker → not in the attack; prompt after applying
  • Manual damage by Hex's caster → prompt "Goblin: Hex, when it is hit", "if it was a hit with an attack roll", with Roll

Roll floors and rerolls

  • Reliable Talent: die 7 → 10, named; die 14 unchanged and not named
  • Saves are not affected; skills are marked "Reliable Talent: die at least 10"
  • A natural 1 still counts as a natural 1
  • Luck: natural 1 from the card → Reroll (Luck) button, new roll kept; a 2 → no button
  • Reroll with consume is used up by the button
  • Natural 1 on an attack in the roll dialog → note "Luck: reroll the 1"

16. Actor panel and restrictions

Details bar

  • Order: red Reaction Used, restrictions, extra actions, then A/D, to hit, crit, damage, reminders
  • Blessed player against a Blinded goblin → green A and "To hit +1d4"
  • Haste → "Extra action", with allowed actions in the tooltip
  • compel sub-effect counts in reminders, named in the tooltip
  • Only target is hexed → Damage chip "+1d6 necrotic", tooltip "Hex: +1d6 necrotic (against Goblin)"
  • Hexed creature not targeted → reminder "Hex on Goblin: +1d6 necrotic when you hit it"
  • No target → only own modifiers; nothing to show → empty
  • Long lines are cut off

Restrictions

  • Stunned goblin rolls → "Goblin is Stunned: can't take actions. Roll anyway?"
  • Roll anyway rolls; Cancel uses nothing up and shows no Reaction Used prompt
  • Slowed creature attacking out of turn → names Slow and "can't take reactions"
  • Charmed by Player A, attacking Player A → "can't attack "; attacking another → no confirmation
  • Charmed with no caster → a possible restriction
  • Manual damage by a Stunned actor → "Apply anyway"; Cancel keeps the entered 8
  • Manual healing by a Charmed actor → no confirmation
  • Top bar apply button and legacy actions panel are checked too
  • Chips: "Can't take actions", "Can't move" (Frightened), possible restriction shows "May not move"
  • Haste's lethargy doesn't count while Haste is active

Reaction Used

  • Goblin 2 rolls on Goblin 1's turn → "Goblin 2: Reaction used?" with Apply and Dismiss
  • Apply → gets the effect, shown as a tag and marked in Select Actor
  • Dismiss → gets nothing
  • Starts its next turn → removed with no notice
  • Also from: spell from the card, manual damage, legacy actions panel
  • One prompt for several targets; none while one is open
  • No prompt: own turn, legendary action, already used, before combat, damage from an effect prompt
  • Legacy actions panel shows the "Reaction used" warning
  • Reaction Used changes no values or rolls; can be applied by hand from the drawer

17. Defenses and damage modifiers

Defenses

  • Petrified → resists every type; card lists it, marked, tooltip "Petrified"
  • Stoneskin → nonmagical slashing halved, magical not
  • Protection from Energy with fire → fire only
  • Damage Resistance fire: 10 fire → 5, 10 cold → 10
  • Vulnerable creature with fire resistance → normal damage, listed in neither
  • Immune to poison and Petrified → 0
  • Roll dialog: 7 slashing on Petrified → R active, 3 applied; turning R off → full
  • Manual damage: 10 fire with resistance → R active, 5 applied (actor panel and legacy panel)
  • silvered or adamantine bypass → applied, with a reminder

Condition immunities

  • Poisoned on Skeleton and Goblin → only Goblin, notice "Skeleton is immune to Poisoned"
  • Frightened on a creature with Heroism → not applied
  • Heroism on a Frightened creature → Frightened ends, "immune to Frightened"
  • Poisoned creature becomes Petrified → Poisoned ends
  • Immunity to a condition doesn't block one that includes it

Damage modifiers

  • 5.5e Resistance with fire, 7 fire, toggle on, rolled 3 → 4; toggle off → 7
  • Toggle is off by default, and hidden for other damage types
  • Toggle names the effect, amount, types and frequency
  • Result shows "(7) − 3 = 4 fire"
  • Damage without a type shows all toggles
  • Damage Reduction slashing 3, 10 slashing → 7
  • Uncanny Dodge and resistance, 15 slashing → 7, then 3
  • Negate → 0
  • Manual damage: dialog per target and toggle, all unchecked; checked reductions roll; Cancel keeps the value; no dialog when no toggle applies
  • Evasion, 28 damage Dexterity save for half: success → 0, failure → 14, named
  • Other saves unchanged; 5.5e Evasion while Incapacitated doesn't apply
  • Absorption acid, 10 acid → heals 10, named (roll dialog and manual damage)
  • Death Ward: 6 HP takes 20 → 1 HP, notice, Death Ward ends
  • Undead Fortitude: 9 slashing at 5 HP → stays at 1, prompt with Constitution DC 14, Roll, Success and Failure
  • Failure → 0 and zero-HP triggers fire; success → stays at 1
  • 9 radiant → drops to 0, no prompt
  • While held at 1, no massive damage death for a player
  • Warding Bond → reminder in the roll dialog, damage unchanged, shown in the details bar
  • No Healing at 10/30, healed 8 → stays 10, notification names it; without it → 18
  • Undoing a heal isn't limited

Outcomes

  • Exhaustion 6 → ": Exhaustion 6 — dies"; Mark dead → 0 HP, 0 temporary, marked dead, no health bar
  • NPC Exhaustion 6, Mark dead → 0 HP
  • Dismiss changes nothing

18. Basic and SRD effects

  • Armor Class Bonus, Attack Roll Bonus, Damage Roll Bonus, Saving Throw Bonus, Initiative Bonus, Spell Save DC Bonus, Spell Attack Bonus and Passive Perception Bonus each change their value
  • Speed Bonus -10 on Speed 30 → 20; Speed Halved → 15
  • Ability Score Bonus changes the score and modifier
  • Hit Point Maximum Bonus 5 at 20/20 → 25/25; -5 → max 15, no healing
  • Hit Point Maximum Reduction lowers the maximum
  • Fly Speed sets Fly Speed
  • No Reactions shows the restriction
  • Damage Over Time asks damage type and value, and prompts at the start of the turn
  • Advantage and Disadvantage on Saving Throws, Ability Checks and Attack Rolls ask their choices and apply
  • Attacks Against Have Advantage and Disadvantage apply to attackers
  • Damage Vulnerability and Immunity work
  • Rage with value 2 → Strength attacks +2, resistances, ends on Incapacitated (5.5e) or Unconscious (5e)
  • Rage restricts spellcasting and Concentration
  • Hex (5.5e) with Wisdom → Disadvantage on Wisdom checks
  • Warding Bond → +1 AC and saves, resistance to all
  • Unconscious leaves Prone after it ends; Grappled ends when the grappler is Incapacitated

19. Set initiative screen

  • Click targets one; shift or ctrl+click adds and removes; targets are marked
  • Surprised, hide and inactive row buttons don't change targets
  • Start combat with two targets → still targeted
  • Header shows Conditions, Reminders, Effects, Transform (one target), Hide/Show, Edit, Untarget, no out of turn damage
  • Shortcuts C, M, F, T, H, E work; mobile Overview tab has the same actions
  • The tracker's Targeted pane is unchanged
  • Invisible on an assassin before round 1 → still there when combat starts
  • 5e Set surprised (and S) → Surprised, icon and chip, first turn restricted, ends after that turn
  • 5e start of its turn → notification that it's surprised
  • 5.5e Set surprised → initiative with Disadvantage, restricts nothing, removed when combat starts
  • Remove surprised → effect and icon gone
  • The premade surprised reminder no longer exists

20. Run campaign screen

Effects

  • Players show chips with level, rounds left and tooltips
  • Clicking a chip offers details and Remove
  • Remove → gone here and in the next encounter
  • Removing a Concentration ends its linked effects on other players
  • Effects button → drawer with conditions, effects and a Custom tab saying "Coming soon", with the same apply form and search
  • Caster lists the campaign's players and None
  • Bless with Player A as caster on Player B → Player A concentrates; removing its Concentration removes Player B's Bless
  • Poisoned on an immune player → notice, not applied
  • Round-based durations start counting in the next encounter
  • Armor Class Bonus +2 on AC 15 → 17 in green, tooltip
  • Hit Point Maximum Bonus → max changes, HP color follows; a lower value shows red
  • Manual +1 and an effect → both in the tooltip
  • Transformed player keeps its transformed AC and HP
  • Hit Point Maximum Bonus 5 at 12/30 → 17/35; removing at 35/35 → 30/30
  • Gaining an immunity ends the condition, with a notice
  • Removing an effect removes the temporary HP it granted
  • False Life, on-apply and on-expire sub-effects, and Exhaustion 6 → notice says what to do

Damage and healing

  • Clicking HP opens a popover with amount, damage type, Magical, Damage and Heal
  • The Edit drawer opened from this screen has the same
  • 20/30 with 5 temporary takes 8 → 17/30, no temporary HP
  • Fire Resistance effect: 10 fire → 5
  • 28/30 healed 10 → 30/30; No Healing limits it
  • Heal from 0 → death saves reset
  • Overkill of at least the maximum → dead
  • Concentrating player takes 14 → prompt DC 10 with Succeeded and Failed, no Roll
  • Failed ends it and linked Bless on others
  • Damage to 0 → Concentration ends with a notice, no save
  • Nothing is logged and no triggers fire

Bonuses

  • Edit drawer: add, change and remove AC and max HP bonuses with labels; saved at once and Save doesn't undo them
  • Group Health: a bonus to selected players; "Heroes' Feast" +5 raises max and current HP
  • Click AC → drawer with stored AC, AC with bonuses, effects, add form and rows
  • Transformed player's AC there is its transformed AC with bonuses
  • Override: Cur HP 45 with base 30, bonus 5, effect 5 → 40
  • Override within the bonus maximum is kept; changing only the base maximum moves current HP with it
  • Effects list in the AC, Edit and Group Health drawers
  • Group Health: Hit Point Maximum Bonus 5 on three players → each gets it on the campaign
  • Group Health without a selection → can't apply, says to select players

21. Custom effects held back

The custom effect form's checks are in .planning/custom-effects-test-plan.md, for the release.

  • Sidebar → My content → Effects opens the page; it shows "Custom effects are coming soon", no search, no list and no create or "Get more effect slots" button
  • Its header shows the slot count and no New effect button
  • /content/effects/add-effect → redirected to My content → Effects
  • An existing effect's page (/content/effects/<id>) → redirected to My content → Effects
  • Signed in: the tracker's Effects drawer, the run campaign screen's Effects drawer and the AC bonus drawer's effects each have a Custom tab that says only "Coming soon", without a count
  • Custom effects you already have are not listed in those drawers
  • Conditions mode and /demo → no Custom tab
  • Effects that are already applied still show and resolve as before

22. NPC links

Form

  • Expanded ability shows Actions with Add action; entries are collapse items with one-line headers ("Melee weapon · +4 to hit · 1 roll, 1 effect")
  • Add action adds a save entry, opened, up to 5
  • First entry has no remove button; removing an entry removes its rolls and links
  • Every entry has an Effects list, also type other; empty shows that
  • A link line shows name, outcome and summary (full text in a tooltip)
  • Edit and Remove work; removing shows unsaved changes
  • Dialog order: When, Effect, Choices, Level, Duration, Magical
  • When: attacks → hit, miss, Always; save → failed, successful, Always; others → Always
  • Changing the action type keeps the link with a warning; it can be edited
  • Choices follow the effect; an empty field shows "Chosen when applied"; clearing saves no choices
  • Changing the effect drops fixed choices it doesn't ask for
  • Level only for an effect with a level track
  • Definitions are read in the NPC's edition
  • Without an account only SRD definitions are offered
  • Duration matches the drawer; clearing it shows "Without a duration, it's asked when the effect is applied." and hides End effect
  • New repeat save on a save entry starts with its ability and DC
  • Editing a stored link restores all tabs; saving without changes keeps it
  • Time without a value, or a repeat save without a DC, disables Save
  • Cancel leaves the NPC unchanged
  • Saved links hold only set fields; removing the last link removes effects
  • Existing NPCs open, save and run as before

Import

  • Link without effect → listed invalid with the schema error

Trait effects

  • Every special ability has Trait effects; empty shows "No trait effects"
  • Dialog has Effect, Choices, Level and Magical; no When or Duration
  • Open choice disables Save ("required")
  • Clay golem with Absorption acid: list shows "Absorption · Damage Type: Acid"; 10 acid heals it with nothing applied by hand
  • Magic Resistance trait → Advantage on saves against spells
  • Undead Fortitude trait → drop to 1 prompt names the ability
  • Evasion trait works on a companion; players get no trait effects
  • Not stored in effects; no duration; never expires; not in the effects list, drawer or public initiative
  • Ability shows an automated marker with "Absorption (acid)" in its tooltip
  • Changing trait links changes them at the next load
  • Evasion trait while Incapacitated doesn't apply
  • 3/day trait with a consume effect → counts in limited uses, stops at 3 of 3; resetting restores it
  • No limit → never used up

23. Spell links

Form

  • Every spell action has an Effects list, with the same dialog
  • Header reads "Paralyze · Save · WIS · 1 effect"
  • "Action type" field; Save ability only for saves; rolls header matches NPCs
  • New spell link starts Magical; Concentration spell starts with its duration
  • New repeat save uses the action's save ability; empty DC shows "Caster's spell save DC" and can save
  • Scaling field only when the spell scales, labelled by its type
  • Spell duration button: Concentration, Time, and Until dispelled → Until removed; keeps End effect options
  • No button for Instantaneous or Special
  • Duration by slot level: tiers, Add tier, remove, From slot level
  • Missing slot level, or Time without a value, blocks saving; slot not above the spell's level, or above 9, is an error
  • Clearing the duration hides the tiers and saves none
  • Tiers work on a spell without scaling
  • Import: link without effect is listed invalid
  • Existing spells open, save and cast as before

Casting

  • Magic Weapon spell_level: slot 2 → 1, slot 4 → 2, slot 7 → 3
  • Magic Weapon spell_scale: slot 4 → 2, slot 6 → 3
  • character_level cantrip, 12th-level caster → 3
  • Hex tiers: slot 1 → 1 hour, slot 3 → 8 hours, slot 4 → 8 hours, slot 6 → 24 hours
  • Bestow Curse: slot 5 → 8 hours with the repeat save and no Concentration; slot 9 → until removed
  • Hold Person repeat save has save_dc 15 from the caster
  • Innate spells use their cast level

24. Applying linked effects from rolls

  • Bite hit → "Grappled · On a hit · Applies"; applying gives Grappled with the biter as caster
  • Unchecking applies only the damage
  • Save not chosen → "Fail or save?"; choosing Save → "Doesn't apply"
  • Attack not chosen → "Hit or miss?"
  • Several actions in one roll are separated by a divider
  • Attack then save: miss → "Attack missed", not applied; hit and failed → Applies
  • Full, Half, Double and Missed all apply checked effects once
  • Hold Person, target fails → one Apply button gives Paralyzed
  • Area spell: each card applies only to its own target
  • Immune target → damage applied, effect skipped with a notice
  • Fixed choice → no select; instance has it
  • Open choice → select shown, Apply disabled with a note
  • No link duration → field starting at Until removed
  • Fields show only for checked lines that apply
  • Bite with attack and poison save entries → both results shown
  • Save entry with no rolls → no error
  • First entry "other", second attack → roll button exists
  • Action list and card captions show both entries, separated by " · "
  • Rolling also works from the compendium and the NPC form

Concentration on spells

  • Magic Weapon's two effects → one Concentration for Magic Weapon, both linked
  • Hold Person on two cards → the second shares it
  • Hold Person while concentrating on Bless → Bless ends with "started concentrating on Hold Person"
  • Concentration of unknown origin → new effects link to it

Apply without a roll

  • Always-only spell (custom Aid, Bless) → Apply instead of the roll button
  • Apply on three allies → slot used, no roll card, each gets it
  • Needs a target; confirms restrictions; uses the reaction out of turn
  • Bless → one Concentration, three linked
  • Open choice or no duration → falls back to the roll card
  • Spell with a save or a roll keeps the roll button
  • Magic Resistance on the repeat save of a magical Paralyzed → Advantage

25. Encounter reminders

Tracker

  • Reminders button sits between the progress bar and turn buttons, also before combat, with a count of open ones
  • Targets' Reminders (M) → for those entities; the button → for the encounter; no choice in the drawer
  • Add "Boss may flee" at the start of round 3 → listed, button shows 1
  • Two goblins targeted → each gets its own reminder and chip
  • Form: title, color (palette picker), trigger, text, and nothing, effect or damage; stays open
  • No personal reminders offered, and no once/repeating choice
  • Encounter triggers: combat start, start of round N, every N rounds from M, with an optional turn
  • Entity triggers: start or end of turn with an optional round, in N rounds, defeated or removed
  • Chips show undone reminders only; clicking opens the reminder
  • Reload keeps reminders and whether they fired
  • A player's reminder is stored on the encounter
  • Demo and test runs write nothing

Firing

  • Round 3 prompt shows as round 3 starts
  • Every 2 from 1 → rounds 1, 3 and 5; every 1 from 2 → every round from 2
  • Turn 4 every round → before the 4th entity's own reminders; with 3 left, at the 3rd
  • Back and forward → a fired once reminder doesn't fire again
  • Start of turn fires; end of turn in round 2 fires only then
  • Inactive entity's turn reminders don't fire
  • NPC to 0 HP, player or companion marked dead, set inactive, or removed → defeated reminder fires once
  • Removing an entity removes its reminders after firing
  • Set inactive before combat → nothing
  • In 3 rounds, set in round 2 → start of its turn in round 5

Prompts

  • Titles "Goblin: burning" and "Round 3: the boss may flee"; text with variables filled in
  • Once → Dismiss; repeating → Keep and Remove
  • Done once reminder: no chip, listed as done, can be re-armed
  • Several at once → each its own prompt
  • Apply Blinded → apply form with everyone in combat or the current targets
  • Entity reminder's Apply → form for that entity
  • Deleted effect → named, no button
  • Damage: "2d6+3 fire damage"; Damage targets rolls once and opens for each target
  • No targets → message
  • Dealt by the Environment: logged, not in meters; defenses and Concentration work
  • Damage isn't offered for an entity reminder; switching Blinded to Damage clears Blinded
  • Legacy layout and mobile show the prompts; no old notifications appear
  • Reset → reminders stay and fire again

Edit encounter screen

  • Reminders tab lists encounter reminders first, then per creature, with title, trigger, repeat, offer and done
  • No tab in the demo builder
  • For: The encounter or a creature; triggers and offers follow
  • Switching to a creature clears a trigger that doesn't fit, and damage
  • "In 2 rounds" at round 0 → stored at the start of its turn in round 2
  • Edit changes the same reminder; Cancel leaves it; form is empty after adding
  • Re-arm a done reminder → fires again
  • Removing a creature removes its reminders, keeps others, shows no prompt
  • Ghost entity on load → it and its reminders are removed
  • Reminders set here fire in the tracker and test runs

My content

  • List has view and delete, no New button, and the deprecation notice, which says building your own effects is coming soon (no Effects link)
  • The old add route shows the notice
  • An existing reminder opens disabled, Deprecated in the header, no save, "Start of its turn" shown

26. Public initiative

Use a second browser as a player.

  • Chips match the tracker: icon or letter, badge and "+N" menu
  • NPC effects come from the encounter, player and companion effects from the campaign
  • Exhaustion 3 → badge 3; 7 rounds left → badge 7 and tooltip
  • 5.5e names; no effects → empty cell
  • Clicking a chip opens nothing
  • Tooltip names a player caster, and not a hidden NPC
  • Haste NPC with visible AC 15 → 17; manual +1 and Armor Class Bonus +2 on 16 → 19
  • Hit Point Maximum Bonus +5 on 30 → max 35, health bar follows
  • Mage Armor on a Dexterity 14 SRD NPC → 15
  • Current-turn bar shows the same values
  • Effects visible → tooltip "Haste: +2"; hidden → "Armor Class +2"
  • Hidden AC stays hidden, unmarked and unnamed
  • Hide effects for NPCs → NPC rows show none, player rows do
  • Setting reads "Conditions and effects", with the matching description
  • The viewer's session writes nothing

27. Hit points clear dead

  • Dead player healed in the tracker → alive with HP
  • Dead player given a max HP bonus → alive
  • Same in Group Health and with campaign effects
  • Also clears stable and death saves
  • Transformed pool doesn't revive

28. Database rules

Use the Rules Playground, on the deployed effects rules.

  • Valid instance accepted for NPC, player and companion
  • Caster name, Concentration fields, concentration_for with source: "spell", and magical: true accepted
  • Rejected: sub_effects, missing source, duration.type: "forever", magical: "yes", invalid concentration_for
  • Non-owner writes rejected
  • Bonuses: valid accepted; rejected without a label, or under luck, skill_luck, attack_melee
  • NPC links: accepted; rejected with save, on_crit, or scaling
  • Trait links: accepted; rejected with duration
  • Spell links with scaling and duration_scaling: accepted; effects on a spell's roll rejected
  • Encounter reminders: valid accepted, invalid rejected

29. Documentation and regression

  • /documentation/effects renders with its text in the server's response
  • Documentation page links to it
  • Every label in the link dialogs is explained there
  • Sections match what's built: action effects, spell effects, traits, reminders

Without effects

  • Encounter with no effects runs as before: damage, healing, temporary HP, transform, overkill, death saves
  • Multi-target rolls, area rolls, undo, the log and damage meters work
  • Spell slots and limited uses work
  • Legacy layout works
  • Mobile layout: drawers, prompts and popovers fit
  • Demo tutorial still follows its steps, including Conditions and Reminders
  • Campaign copy, encounter copy and NPC or spell copy work
  • 5e and 5.5e spell and monster compendiums still work

Lakeyzer added 30 commits June 13, 2026 12:50
Overhauls the step-by-step roadmap for the Effects system, providing a more detailed and robust strategy.

Key changes include:
- Realigning effect duration as an application-time property, not part of the definition.
- Detailing active effect instance shape and lifecycle.
- Prioritizing core tracking (triggers, durations, display) ahead of UI forms.
Moves 5e and 5.5e SRD conditions from `effects.js` to new `conditions.js` files. This distinction helps to better categorize SRD rule data.

Updates the `effects-implementation-plan.md` to reflect this separation and explicitly defer the full integration and UI replacement of conditions to a later, distinct step. This clarifies the scope for the initial implementation of the core effects system.
Enables triggered damage and healing sub-effects to target either the effect holder or the entity that caused the trigger. This addresses the need to model retaliatory effects, such as a creature taking damage when it hits a Black Pudding.
Performed a comprehensive compatibility check of the effect schema against a live monster corpus (325 monsters, 1430 action/trait entries). This analysis identified several new gaps in the schema's ability to model common monster mechanics.

This commit proposes new fields and types (Gaps 20-28) to cover these patterns, including multiplicative modifiers, healing prevention, forced movement, structured escape DCs, and more granular duration units. A new document `monster-actions-effect-scan.md` details the full scan data and findings.
# Conflicts:
#	src/boot/hk-components.js
Introduce consistent 'store selection' across all `opsx` commands. Add `opsx:sync` for agent-driven intelligent merging of delta specs. Update `opsx:archive` to integrate `opsx:sync` and improve integrity checks for artifact completion and capability retirement. Refine `opsx:apply`, `opsx:explore`, and `opsx:propose` for more robust, context-aware artifact management and explicit confirmation for writing actions. Explicitly declare `Bash(openspec:*)` tool usage for all workflows.
- Concentration (5e and 5.5e): structured Constitution save on damage_taken
  (DC max(10, damage/2), capped at 30 in 5.5e), ends_when Incapacitated,
  on_zero_hp break, 2024 description wording
- scripts/monster-effect-scan/scan.mjs: re-runnable scan of /monsters/5.5e;
  results added as a 5.5e section to monster-actions-effect-scan.md and
  plan section 0a counts corrected
- Archive OpenSpec change effects-0-55e-alignment, add effects-srd-data spec,
  mark plan step 0 done
- Remove SRD PDFs from the repo
- CLAUDE.md: no Claude attribution in commits/PRs, no end-to-end testing
… by url

- Schema: root `key` renamed to `url` (the HK API identifier, not its uuid
  _id); Concentration in both effects.js files switches to `url`. Instances
  keep `source_key`, which holds the definition's url
- Conditions (5e and 5.5e): url + category on every entry, no definition
  durations, Exhaustion as one leveled entry (2014 min_level rows, 2024
  -2/-5 per level scaling), Paralyzed/Petrified/Stunned/Unconscious include
  Incapacitated, Unconscious applies Prone on apply, Grappled ends when the
  grappler is Incapacitated, canonical v2 spellings
- 5.5e conditions corrected against SRD 5.2.1 (Incapacitated breaks
  Concentration and gives Initiative Disadvantage, Invisible, Grappled,
  Stunned); Dying and Surprised removed
- scripts/validate-effects-data/validate.mjs: schema and cross-file checks
  for all SRD data files
- Archive OpenSpec change effects-1b-srd-conditions-data, sync the
  effects-srd-data spec, mark plan step 1b done and update plan/catalogue
  wording from key to url
Implements steps 2a-2i of the effects implementation plan:
- Effects drawer to apply SRD conditions, SRD effects and custom effects,
  with an application form (duration, choices, repeat save, escape,
  Concentration link) and shift+click to apply until removed
- Effect instances persisted per entity type (encounter for NPCs,
  campaign for players and companions) and resolved to their definitions
- Effect chips and a detail view on combatants
- Trigger dispatcher with prompts, duration ticking and expiry, end
  conditions, cascades, repeat saves with escalation, escape attempts and
  on-expire notices
- Conditions now run only through effects: the Conditions option opens the
  drawer in conditions mode, legacy conditions maps are converted on load,
  and the player live view shows active effects

Adds the OpenSpec specs and archived changes for these steps.
Step 3 of the effects plan, as OpenSpec changes 3a-3e (archived), 2j, 2k and 3g (open, being tested):
- 3a: damage and healing sub-effects rolled from prompts
- 3b: numeric stat modifiers and labelled manual bonuses
- 3c1/3c2: roll modifiers on checks, saves, attacks and damage
- 2j/2k: Concentration on the caster, Reaction Used as an effect
- 3d: damage defenses and condition immunity
- 3e: restrictions, death outcome, automatic Concentration break
- 3g: damage modifiers, drop to 1, roll floors, offered rerolls, extra actions
The Effects drawer now defaults the caster to the actor selected out of
turn, falling back to the entity whose turn it is. The Environment acts
without a caster.
Fixes found while testing 3g in the running app:
- the roll dialog only shows damage toggles that match a damage type in
  the roll, and each damage result shows the reduction before defenses
- a switched-on toggle also applies to damage without a type
- the damage modifier and restriction prompts use primary instead of
  Quasar's dark-mode amber, with a neutral Cancel button
- roll floors (Reliable Talent) mark the value on the card as changed

Archives effects-3g-tier-p-hooks and syncs its specs (new spec
effects-damage-modifiers). The effects plan marks 3g done and adds
two directions for later steps: generic effects with choices set when
linked or applied, and trait effects on NPC special abilities (6b).
…ffects step 3h)

The public initiative now matches the DM's tracker:
- effects are shown with the tracker's chip component, read-only, with the
  caster named only when players can see it
- AC, maximum hit points and the health bar use the tracker's calculation
  (stored values, manual bonuses and effects), marked when changed; the
  tooltip lists the sources only when the creature's effects are visible
- custom effect definitions are read from the DM's effects, SRD monsters
  are fetched for the stats formulas need
- share settings still hide values and effects

Adds effectChipItems and effectSubject as pure helpers, makes the chip
component usable without the tracker store, and removes effectDisplayItems.

Archives effects-3h-public-initiative and syncs its specs. The effects plan
marks 3h done and adds the generic-effects direction and trait effects on
NPC special abilities (6b).
…tep 4)

- Rewrite effectsConstants.js from the v2 schema, with type, sub-type and field rules, and
  add a check that keeps it in sync with the schema, the SRD data and the database rules
- Rebuild hk-effects-form from smaller editors: sub-effects whose fields follow their type
  and Applies to, a configuration list with summaries and an edit dialog, condition sets,
  amounts, durations, saves, effect references and choices (including a chosen value)
- Make definitions generic: remove category, spell level, magical, tags, removed by,
  cancelable, area and scaling from the schema, the SRD data and the engine; 5.5e Exhaustion
  uses level formulas, and conditions are recognized by the SRD conditions list
- Use a chosen value in the combat tracker and ask for it in the Effects drawer
- Validate custom effects against the schema before saving and save only set fields
- Add the "How effects work" documentation page (/documentation/effects)
- Fix the custom effects overview table
- Archive the OpenSpec change, sync its specs and mark step 4 done in the plan
- src/data/effects.js replaces the per-edition effect files. Entries that
  follow one edition's rules carry `edition`; entries without it are used
  in both editions.
- Basic effects without an edition, completed by choices when applied:
  bonuses, minimums, Advantage/Disadvantage, defenses, Absorption, and
  generics for monster actions (No Healing, Damage Over Time, Speed
  Halved, No Reactions, Magic Resistance, Hit Point Maximum Reduction).
  Items and plain-bonus spells are removed in favour of these.
- A sub-effect's `choice` can be a list of kinds (Skill Bonus: skill and
  value), in the schema, the engine and the custom effect form.
- Healing is limited by a `healing_received` cap (No Healing).
- Adds Surprised, Hex, Hunter's Mark, Warding Bond and Rage.
- fixChoices fills a definition's choices, ready for links in step 6.
- Validation scripts check each edition set; docs and specs updated,
  change archived.
…s step 6)

- Effects schema: $defs/effect_link (effect, duration, choices, level, magical);
  action_effects lists links per outcome and uses the action's own save.
- NPC schema: every action_list entry can carry effects; up to 5 entries per ability.
- NPC form: actions as collapse items with a one-line header, an Effects list per
  action and a link dialog (When, Effect, Choices, Level, Duration, Magical).
- Shared ApplicationDuration for the Effects drawer and links, with an End effect
  select (repeat save, escape, ends early when).
- Rolling: every action of an ability rolls, roll buttons check all actions, and the
  roll result lists linked effects and whether they apply.
- Import resolves the effects schema; saving cleans links.
- No dense inputs in the effects form.
- Docs, plan and OpenSpec specs updated; change archived.
…p 6b)

- NPC schema: special abilities carry effects, effect links without a duration
  with every choice fixed.
- NPC form: a Trait effects list on special abilities (link dialog without When
  and Duration, all choices required), with an info popover.
- Engine: traitInstances builds trait effects for NPCs and companions at runtime;
  effectEntries (applied + trait) feeds the collectors; effectLabel names them by
  their ability in modifiers, notes and prompts.
- Tracker: trait definitions resolved when a creature is added; a used-up trait
  effect counts a use on the ability's limit (off until reset); trait keys are
  never stored, ticked or removed.
- Display: not in the effects lists; an automated marker on the ability; the
  public initiative's effective values include trait effects.
- Basic effects: Advantage and Disadvantage on Skill Checks (skill choice).
- Docs, plan and OpenSpec specs updated; change archived.
…l (effects step 6c)

- Spell actions carry effects like NPC actions; the spell form uses the same Effects list,
  with one-line action headers, "Action type" and Save ability only for saves
- Links scale with the spell's scaling type (value and level), and can last longer with a
  higher slot (Duration by slot level), applied by scaledLink in step 7
- New spell links are Magical with the spell's Concentration duration; a Spell duration
  button sets the link's duration to the spell's; a repeat save's DC may be left empty for
  the caster's spell save DC
- Schemas, docs and the new effects-spell-links spec; NPC links reject scaling
- Fixed: missing deleteRoll in the spell form, and non-reactive lists for new actions and
  rolls in the spell and NPC forms
- Damage a creature's effects deal when its caster (or anyone) hits it, like Hex and
  Hunter's Mark, is rolled with the attack as its own damage roll, and no longer prompted
  for after the roll is applied
- The details bar shows it in the Damage chip for the targeted creature, and as a reminder
  for creatures that aren't targeted
- Manual damage prompts for it with Roll, "if it was a hit with an attack roll"
- Damage type icons in the roll result have their type's color and a gap to the label
- The roll result applies the checked linked effects that apply with the roll's Apply
  buttons; rolls without damage get a single Apply button; open choices and a missing
  duration are asked inline in the roll card
- A save after a missed attack in the same ability shows "Attack missed" (ghoul's claws)
- Spell casts scale their links (value, level, duration by slot level), fill in the
  caster's spell save DC, and concentrate on the spell: shared by its effects and targets,
  replacing another Concentration spell
- Spells that only apply effects (Aid, Bless) get an Apply button instead of a roll
- Applied effects store magical; their repeat saves count as saves against magic
- The tracker's action list and the entity card show every action of an ability
- Concentration code moved from the Effects drawer to the store (concentrate_on)
…ers (effects step 8)

- Target entities on the set initiative screen; the Overview header shares the Targeted
  pane's actions (TargetActions), without out of turn damage
- Surprised is the SRD Surprised effect per edition; old surprised reminders convert on load
- Run campaign screen: player effect chips with the ActiveEffect drawer, an Effects drawer
  per player, AC and max HP with effects and bonuses, and an AC bonuses drawer
- Effects change campaign players' hit points as in the tracker, through shared pure
  functions (damageResult, healingResult, hpAfterEffects), with notices
- Manual damage and healing per player (popover and Edit player drawer), with the tracker's
  Concentration save prompt
- Manual bonuses with labels in Edit player and Group Health, sharing the tracker's
  bonus form and rows (withBonus, withoutBonus)
- Fixes found while testing: Edit player death saves, Override HP within the effective
  maximum, initiative advantage on the card, death save slots on the run campaign screen
- Plan: step 8 done; new step 12 (fetch effects from the API, search, bonus effects);
  import effects moves to step 13
- Reminders live on the encounter, about the encounter or one creature, with pure helpers
  in reminderFunctions.js (matching, wording, cleaning, conversion)
- Triggers: combat start, round N or every N rounds (optionally at a turn of the round),
  a creature's turn start/end (optionally in round N), defeated or removed; the trigger
  decides whether a reminder repeats
- Fired from the store (fire_reminders) only when combat moves forward; a reminder prompt
  with Dismiss or Keep/Remove, Apply <effect>, or Damage targets (encounter reminders,
  dealt by the Environment)
- Two buttons open the Reminders drawer: the targets' option and an encounter button in
  the progress bar; the drawer lists the reminders above a form to add one
- Reminder color as an NPC's color label; bell icon for reminders; colored bell chips
- Old entity reminders convert on load (damage and retired premade ones dropped); reset
  keeps reminders and re-arms them
- Retired remindersMixin, the turn watchers' checks, set_targetReminder and the entity
  reminder writes; personal reminders under My content are deprecated (view and delete)
- Card initiative unaffected; docs, plan and specs updated; change archived
- Drop duration_type, duration_value and cancel_trigger from definitions
- Drop the legacy triggers (failed_save, success_save, zero_hp), condition
  checks (attacker_*, target_*), durations (action_removed, long_rest),
  grant_advantage/grant_disadvantage, the roll/fixed_value sub-types and
  the non_magical_* damage types
- Remove the alias handling from the effects code and the legacy options
  from the effects form
- Update the effects specs
- Reminders tab on the edit encounter screen (not in the demo): the
  encounter's reminders to edit, re-arm or remove, and the reminder form
  with a For choice (the encounter or one of its creatures)
- save_encounter_reminder makes the id when none is given
- Removing an entity outside combat removes its reminders, also for
  ghost entities removed when an encounter loads
- Docs, plan and the encounter-reminders spec updated; change archived
…s in the bonus drawers (effects step 12)

- SRD effects and conditions come from the HK API v2 (/v2/effects/{edition}) through the
  api_effects store module, started by a client-only boot file; the local data files are removed
- The tracker and the live view wait for the fetch; without the API, effects show by name and
  conditions keep their icon (srd_condition_urls)
- Validation and constants scripts read the API or saved responses (--from)
- Name search (case and accents) on every effect list
- Bonus drawers list and apply the effects that change their values (tracker, campaign AC,
  Edit player, Group Health), through shared apply mixins
- One shared EffectList for the Effects and bonus drawers: details, apply popover,
  shift+click, tabs per group and 10 per page
- The compendium and condition selects read /v2/conditions; a condition page shows its
  mechanics
- Effects schema: edition "generic" as served by the API
- OpenSpec change archived and synced to the main specs
A player or companion marked dead stayed dead after healing or a higher maximum, showing as
dead with hit points.

- Writing current hit points above 0 to the campaign also removes dead, stable and the death
  saves, in the same update (every campaign path: tracker, Group Health, Edit player,
  campaign effects)
- The tracker's set_hp clears them in the store too
- set_dead "unset" removes dead from the store, and skips Firebase in demo and test runs
- Healing from 0 only resets saves and dead when hit points are regained (not with No Healing)
The schema committed with step 12 was an older copy from the API project: it dropped the
step 7 instance fields (active_instance.magical, "spell" as a concentration_for source) and
brought back the legacy aliases removed in bdffe9f.

- Back to the schema from before step 12
- Added from the API project: edition "generic" and its descriptions
- check-constants: "generic" needs no campaign edition constant (NOT_IN_CONSTANTS)
- A new effect opens "Copy existing effect / Create from scratch", and Copy shows in the
  form's header while the effect is new, as for NPCs and spells
- CopyContent type "effect": the user's custom effects, and the SRD effects and conditions
  of an edition, searched (case and accents) and paged over the fetched lists
- copyableEffect: a cleaned deep copy without url, edition and ids, so the SRD lists and
  cached custom effects are never changed; references to other effects are kept
- A copied condition becomes a custom effect
- Removed the unused api_effects action mapping from EditEffect
- Docs: copying an effect, and the Effects / Custom tabs
- OpenSpec change archived and synced to the main specs
HarmlessHarm and others added 29 commits November 20, 2026 15:39
An option of an NPC ability can have its own action list (option_actions), so a breath weapon's
options can have different saves and effects, and a charge attack can add damage and Prone.
Found in the monster action review (step 11c of .planning/effects-implementation-plan.md).
…ice, teach the monster action skill rolls, and archive the roll choice OpenSpec change
Regains a fixed number of Hit Points at the start of each turn with at least 1 Hit Point, and
stops for a turn after damage of chosen types (a Regeneration Suppressed marker the DM applies
from the prompt). Adds optional and multiple choices. Found in the monster action review (step
11c of .planning/effects-implementation-plan.md).
The roll choice change rewrote the effect link requirement; keep its roll choice and scenario
next to the list of damage types.
…ject-thread-45cdog

# Conflicts:
#	src/components/drawers/encounter/effects/ActiveEffect.vue
#	src/components/hk-components/hk-effects-form/SubEffect.vue
#	src/components/hk-components/hk-effects-form/SubEffectField.vue
#	src/components/hk-components/hk-rolls/hk-single-roll.vue
#	src/docs/effects.md
#	src/store/modules/runEncounter.js
#	src/utils/effectFunctions.js
Harm's call of 2026-11-20: Regeneration becomes Healing Over Time, the inverse of Damage Over
Time (healing on start_turn_target with a roll choice). The at least 1 Hit Point rule and the
damage types that stop it stay in the trait's description, so the proposal needs no optional
or multiple choices, no Apply button and no marker effect.
… in its trailing slot; click the result to reroll
…c roll

At the start of a creature's turn each spent dice-recharge ability queues a
recharge prompt, shown like the Concentration save. Rest recharges stay spent.
Archived the recharge-prompt spec.
…speeds on hover

Monsters without a walk speed show their first other speed (swim, fly, burrow, climb),
with a label and icon per speed type. Hovering the Speed stat lists the other speeds,
marked when effects changed them, and clicking it opens the bonuses of every speed.
Archived the card-monster-speeds OpenSpec change.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants