File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,18 +125,20 @@ export default function GachaCalc({ location }: { location: string }) {
125125 { banner . guaranteedPity && < NumberInput label = "Epitomized Path" set = { setGuaranteedPity } value = { guaranteedPity } min = { 0 } max = { banner . guaranteedPity - 1 } /> }
126126
127127 < h3 className = "text-lg font-bold pt-1" id = "resistance" > Results:</ h3 >
128- < table className = { `table-auto w-64 ${ styles . table } ${ styles . stattable } mb-2 sm:text-base text-sm` } >
128+ < table className = { `table-auto w-80 ${ styles . table } ${ styles . stattable } mb-2 sm:text-base text-sm` } >
129129 < thead >
130130 < tr className = "divide-x divide-gray-200 dark:divide-gray-500" >
131131 < th > { banner . constName } </ th >
132132 < th > Rate</ th >
133+ < th > Cumulative rate</ th >
133134 </ tr >
134135 </ thead >
135136 < tbody className = "divide-y divide-gray-200 dark:divide-gray-500" >
136137 { calculated
137- . map ( ( c ) => < tr className = { `pr-1 divide-x divide-gray-200 dark:divide-gray-500 ${ c . rate < 0.0005 ? "opacity-60" : "" } ` } key = { c . const } >
138+ . map ( ( c , i , a ) => < tr className = { `pr-1 divide-x divide-gray-200 dark:divide-gray-500 ${ c . rate < 0.0005 ? "opacity-60" : "" } ` } key = { c . const } >
138139 < td > { c . const == banner . minConst ? "Not owned" : `${ banner . constFormat } ${ c . const } ` } </ td >
139140 < td > { ( c . rate * 100 ) . toFixed ( 3 ) } %</ td >
141+ < td > { ( a . slice ( i , a . length ) . reduce ( ( p , c ) => p + c . rate , 0 ) * 100 ) . toFixed ( 2 ) } %</ td >
140142 </ tr > ) }
141143 </ tbody >
142144 </ table >
You can’t perform that action at this time.
0 commit comments