Skip to content

dndbeyond: versatile weapon incorrect damage calculations #1372

@dmportella

Description

@dmportella

Describe the bug
When rolling versatile weapons (like Long Sword) with spells like Booming Blade or Green-Flame Blade, the damage totals were incorrectly calculated and displayed. Specifically:

  1. Versatile 2-handed damage was incorrectly marked as conditional damage
  2. Combined totals didn't account for versatile weapon variations - they combined 1-handed and 2-handed damages together incorrectly
  3. When a critical hit occurred with a spell, the combined totals were calculated incorrectly

To Reproduce

  1. Create a character with a versatile weapon (e.g., Long Sword)
  2. Add Booming Blade or Green-Flame Blade spell to the character
  3. Roll an attack with the weapon + spell (ideally as a critical hit)
  4. View the damage totals in the VTT output
  5. Observe incorrect combined totals and 2-handed damage being marked as conditional

Expected behavior

  • 1-handed and 2-handed damage should be displayed and totaled separately
  • 2-handed damage should NOT be marked as conditional
  • Combined totals should be calculated separately for 1-handed and 2-handed variations:
    • Total Combined 1 Handed = 1-hand damage + critical 1-hand + conditional
    • Total Combined 2 Handed = 2-hand damage + critical 2-hand + conditional

Screenshots
See attached roll data showing the issue - the 2-handed damage was incorrectly marked with beyond20-conditional-damage class and totals were incorrect.

Image

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

  1. Lines 316-320 incorrectly disabled all totals for versatile weapons
  2. Lines 707-712 incorrectly treated any damage with parentheses (including "(1-Hand)" and "(2-Hand)") as conditional damage
  3. Combined total calculation didn't account for separate 1-hand/2-hand variations

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions