fix: add Critical Chance display to Stats tab Combat Stats section
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
This commit is contained in:
@@ -37,6 +37,8 @@ export function StatsTab() {
|
||||
<CombatStatsSection
|
||||
activeSpellDef={combatStats.activeSpellDef}
|
||||
pactMultiplier={combatStats.pactMultiplier}
|
||||
critChance={combatStats.critChance}
|
||||
critDamage={combatStats.critDamage}
|
||||
/>
|
||||
<PactStatusSection
|
||||
pactMultiplier={combatStats.pactMultiplier}
|
||||
|
||||
@@ -9,9 +9,11 @@ import type { SpellDef } from '@/lib/game/types';
|
||||
interface CombatStatsSectionProps {
|
||||
activeSpellDef: SpellDef | null;
|
||||
pactMultiplier: number;
|
||||
critChance: number;
|
||||
critDamage: number;
|
||||
}
|
||||
|
||||
export function CombatStatsSection({ activeSpellDef, pactMultiplier }: CombatStatsSectionProps) {
|
||||
export function CombatStatsSection({ activeSpellDef, pactMultiplier, critChance, critDamage }: CombatStatsSectionProps) {
|
||||
return (
|
||||
<DebugName name="CombatStatsSection">
|
||||
<Card className="bg-[var(--bg-panel)] border-[var(--border-subtle)]">
|
||||
@@ -38,9 +40,13 @@ export function CombatStatsSection({ activeSpellDef, pactMultiplier }: CombatSta
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<div className="flex justify-between text-sm">
|
||||
<span style={{ color: 'var(--text-muted)' }}>Critical Chance:</span>
|
||||
<span style={{ color: 'var(--mana-light)' }}>{fmtDec(critChance * 100, 1)}%</span>
|
||||
</div>
|
||||
<div className="flex justify-between text-sm">
|
||||
<span style={{ color: 'var(--text-muted)' }}>Critical Multiplier:</span>
|
||||
<span style={{ color: 'var(--mana-light)' }}>1.5x</span>
|
||||
<span style={{ color: 'var(--mana-light)' }}>{fmtDec(critDamage, 2)}x</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user