Skip to content

dndbeyond: toll the dead display incorrectly as conditional damage #1373

@dmportella

Description

@dmportella

Describe the bug
Toll the Dead spell was incorrectly displaying its damage as conditional and creating invalid combined totals when users forced critical hits via the setting, even though Toll the Dead is a save-based spell that cannot normally crit.

To Reproduce

  1. Set Toll the Dead to roll both damage types ("both") in settings
  2. Enable "force crit" or roll with a setting that forces critical hits
  3. Roll Toll the Dead
  4. Observe that "Necrotic (Full HP) Damage" and "Necrotic (Missing HP) Damage" were incorrectly marked as conditional
  5. Observe combined totals were incorrectly calculated

Expected behavior

  • "(Full HP)" and "(Missing HP)" variants should NOT be marked as conditional - they represent different damage options based on target's HP status, not conditional rider effects
  • For spells without attack rolls (save-only spells like Toll the Dead), no "Combined" totals should be created even when forced to crit - these are for versatile weapons with actual attack rolls only

Screenshots
Toll the Dead was incorrectly showing:

  • "Necrotic (Full HP) Damage" marked as conditional
  • "Necrotic (Missing HP) Damage" marked as conditional
  • "Total Combined 1 Handed" and "Total Combined 2 Handed" totals appearing
Image

Additional context
Root cause was in src/common/roll_renderer.js:

  1. Lines checking for conditional damage incorrectly matched "(Full HP)" and "(Missing HP)" variants as conditional because they contain parentheses
  2. Combined totals logic didn't check if the roll had actual attack rolls - it applied versatile weapon logic to any roll with both regular and critical damages

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions