예제 #1
0
        public static double SimpleMetric(State state)
        {
            if (state.Status == SynthesisStatus.BUSTED)
            {
                return(0.0);
            }

            double psucc = state.SuccessProbability;
            double pfail = 1.0 - psucc;

            double turnsRemaining = Math.Ceiling((double)state.Durability / 10.0);

            double q    = (double)state.Quality;
            double qmax = (double)state.MaxQuality;
            double c    = (double)state.CP;
            double cmax = (double)state.MaxCP;

            double cpct = c / cmax;
            double qpct = q / qmax;

            double BasicTouchCP      = 18;
            double BasicTouchQuality = Compute.RawQuality(Condition.Normal, Compute.Control(state), 100, Compute.LevelSurplus(state));
            double dQdC = (BasicTouchQuality / qmax) / (BasicTouchCP / cmax);

            return(psucc * (cpct * dQdC + qpct));
        }