From 56d963dc906526f5c5aab115ac02b43884a177f1 Mon Sep 17 00:00:00 2001 From: Hikari Date: Wed, 25 Mar 2026 17:07:13 -0700 Subject: [PATCH] fix: clarify combat power vs boss damage distinction (#153) Expands the JSDoc on computePartyCombatPower to explicitly document that the companion bossDamage multiplier is intentionally included in all combat-power calculations (boss panel, resource bar, quest gating), matching server-side behaviour and resolving labelling ambiguity. --- apps/web/src/engine/tick.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/src/engine/tick.ts b/apps/web/src/engine/tick.ts index c8b42a4..240edab 100644 --- a/apps/web/src/engine/tick.ts +++ b/apps/web/src/engine/tick.ts @@ -246,7 +246,14 @@ export const computeEssencePerSecond = (state: GameState): number => { /** * Computes the party's total combat power, applying all active multipliers * (upgrades, prestige, equipment, set bonuses, echo, crafted, companion). - * This mirrors the server-side calculatePartyStats in boss.ts. + * This mirrors the server-side calculatePartyStats in boss.ts and is the + * single source of truth for all combat-power checks in the client: + * - Displayed as "Combat Power" in the resource bar + * - Displayed as "Party DPS" in the boss panel + * - Used to gate quest availability + * Note: the active companion's bossDamage bonus is intentionally included + * here, as it applies to the full combat power calculation (boss fights and + * quest gating alike), matching the server-side behaviour. * @param state - The current game state. * @returns The total party combat power. */