@@ -12,21 +12,26 @@ import {
1212 HoverCardTrigger ,
1313} from "@/components/ui/hover-card" ;
1414import { useLanguage } from "@/contexts/LanguageContext" ;
15- import { artifactsById , maxSubstatRolls } from "@/data/constants" ;
15+ import {
16+ AVERAGE_ROLL_MULTIPLIER ,
17+ artifactsById ,
18+ maxSubstatRolls ,
19+ } from "@/data/constants" ;
1620import type { ArtifactData , Rarity , Slot , SubStat } from "@/data/types" ;
1721import { useMediaQuery } from "@/hooks/useMediaQuery" ;
1822import { cn , getRarityColor } from "@/lib/utils" ;
1923import { ArrowRight , CircleHelp } from "lucide-react" ;
2024import { type ReactNode , useEffect , useRef , useState } from "react" ;
2125
2226// -----------------------------------------------------------------------------
23- // Utility: Calculate roll count for a substat
27+ // Utility: Calculate roll count for a substat (average roll = 0.85 × max roll)
2428// -----------------------------------------------------------------------------
2529function getRollCount ( statKey : SubStat , value : number , rarity : Rarity ) : number {
2630 const maxRolls = maxSubstatRolls [ rarity as 4 | 5 ] ;
2731 const maxValue = maxRolls ?. [ statKey ] ;
2832 if ( ! maxValue ) return 0 ;
29- return value / maxValue ;
33+ const avgRollValue = AVERAGE_ROLL_MULTIPLIER * maxValue ;
34+ return value / avgRollValue ;
3035}
3136
3237// -----------------------------------------------------------------------------
0 commit comments