From 0bd7642344c4bc3c58e4c27dfbb90f6d5357618a Mon Sep 17 00:00:00 2001 From: Hikari Date: Thu, 19 Mar 2026 11:53:35 -0700 Subject: [PATCH] feat: display current party combat power as a persistent stat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a ⚔️ Combat Power entry to the resource bar, always visible, showing the sum of each adventurer's combat power multiplied by their count so players can make informed decisions about boss fights and quests. Closes #58 --- apps/web/src/components/ui/resourceBar.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ui/resourceBar.tsx b/apps/web/src/components/ui/resourceBar.tsx index d4d4ae0..0a20d27 100644 --- a/apps/web/src/components/ui/resourceBar.tsx +++ b/apps/web/src/components/ui/resourceBar.tsx @@ -77,8 +77,15 @@ const ResourceBar = ({ isSyncing, onForceSync, }: ResourceBarProperties): JSX.Element => { - const { formatNumber, syncError } = useGame(); + const { formatNumber, syncError, state } = useGame(); const { gold, essence, crystals } = resources; + let partyCombatPower = 0; + if (state !== null) { + for (const adventurer of state.adventurers) { + const contribution = adventurer.combatPower * adventurer.count; + partyCombatPower = partyCombatPower + contribution; + } + } const resourceValues = [ gold, essence, crystals ]; const anyFull = resourceValues.some((v) => { return v >= RESOURCE_CAP; @@ -135,6 +142,13 @@ const ResourceBar = ({ {formatNumber(runestones)} {"Runestones"} +
+ {"⚔️"} + + {formatNumber(partyCombatPower)} + + {"Combat Power"} +
{apotheosisCount > 0 &&
{"✨ Apotheosis "}