Skip to content

Add Stat Damage ring monogram and effective damage breakdown UI#56

Open
derivagral wants to merge 3 commits into
mainfrom
claude/add-effective-damage-display-JSQli
Open

Add Stat Damage ring monogram and effective damage breakdown UI#56
derivagral wants to merge 3 commits into
mainfrom
claude/add-effective-damage-display-JSQli

Conversation

@derivagral

Copy link
Copy Markdown
Owner

Summary

This PR adds support for the Stat Damage ring monogram (Ring Monogram: Damage for Stat) and introduces rich breakdown tooltips for effective damage calculations. The changes include a new derived stat for flat damage scaling with highest attribute, integration into the eDPS calculation chain, and UI enhancements to display damage formulas and toggle between boss/normal damage targets.

Key Changes

  • New Derived Stat: statDamageFlatBonus calculates +15 flat damage per 150 of highest stat, configurable and disabled by default
  • eDPS Integration: Added statDamageFlatBonus to the edpsFlat dependency chain so ring monogram damage feeds into total flat damage
  • Effective Damage Headlines: Introduced two new derived stats with configurable breakdown formulas:
    • edpsEffective: Main damage output (boss by default, toggleable to normal)
    • edpsEffectiveOffhand: Offhand ability damage with separate boss/normal calculations
  • Boss/Normal Toggle: Added UI button in StatsPanel to switch effective damage target between boss and normal enemies
  • Breakdown Tooltips: Enhanced StatTooltip component to display formula breakdowns with operators, labels, and formatted values
  • Styling: Added CSS for toggle button and formula breakdown display with monospace fonts and visual hierarchy
  • Hook Enhancement: Updated useDerivedStats to accept edpsTarget option and merge it into config overrides; pinned headline stats to top of eDPS section
  • Monogram Config: Updated DamageForStat.Highest monogram config to reference the new statDamageFlatBonus stat

Implementation Details

  • The statDamageFlatBonus calculation uses Math.floor(highest / statInterval) * damagePerInterval for consistent scaling
  • Breakdown formulas support both percentage and integer formatting with proper localization
  • The toggle state is managed locally in StatsPanel and passed through useDerivedStats options
  • Headline stats (effective damage) are sorted and pinned above other eDPS stats for prominence
  • All new stats include proper dependencies, descriptions, and formatting functions

https://claude.ai/code/session_012qP9bZZPb7YSxS1tsPd1AW

claude added 3 commits April 16, 2026 21:38
Pin two eDPS headline stats (Effective Damage + Effective Damage (Offhand))
to the top of the Character tab's eDPS section. Each shows the fully
computed per-hit number and exposes a structured breakdown
(FLAT × (CHD+DB+SD) × SCHD × WAD × EMulti × BD, then × (AD+AFFIN) × ED
for offhand) via an extended StatTooltip, making the whole damage formula
debuggable from hover.

Defaults to boss damage with a small toggle in the eDPS section header to
flip both headlines between Boss and Normal. The existing Hit/Offhand DD
component lines remain below.

Fixes the ring 'Stat Damage' monogram (DamageForStat.Highest): adds a new
statDamageFlatBonus derived stat (+15 flat per 150 highest stat) wired
into edpsFlat, and repoints the monogram config off the placeholder
monogramValueFromStrength. Previously the ring had no visible effect on
damage.

https://claude.ai/code/session_012qP9bZZPb7YSxS1tsPd1AW
- Move eDPS to the top of the Character stats panel
- Drop the boss/normal toggle; always show boss damage
- Merge weapon-hit and offhand into one Effective Damage line; the tooltip
  walks the full formula (FLAT → … → BD → Weapon Hit subtotal → AD+AFFIN →
  ED → Offhand Hit total) in a single breakdown
- Hide the intermediate edpsDDNormal/edpsDDBoss/edpsOffhandNormal/edpsOffhandBoss
  display rows since those values are now surfaced inside the tooltip
- Add a `fullName` field on each breakdown term, rendered as muted subtext
  and exposed via title attribute so users can read the acronym's meaning
  without leaving the tooltip

https://claude.ai/code/session_012qP9bZZPb7YSxS1tsPd1AW
Each of the eight eDPS component stats (edpsFlat, edpsAdditiveMulti,
edpsSCHD, edpsWAD, edpsEMulti, edpsBD, edpsED, edpsAD) now exposes its own
formula breakdown so hovering any sub-stat shows exactly which stat IDs
contributed to the bucket, mirroring the Effective Damage headline's
tooltip. The legacy Damage row was a partial snapshot (weapon flat × 1 +
damageBonus%) that never reflected monogram flats like the Stat Damage
ring or flatDamageMonogramBonus, so it's dropped from the offense section
in favour of the fuller Effective Damage number. Its base/bonus affixes
stay consumed so they don't surface as raw rows. Monogram-sourced terms
and source entries now render in purple via a shared --monogram-purple
token so users can visually separate gear affixes from monogram effects
in the tooltip.

https://claude.ai/code/session_012qP9bZZPb7YSxS1tsPd1AW
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.

2 participants