Beispiel #1
0
    def survivability_mult(surv):
        """
        Parameters
        ----------
        surv : int, float
            Amount of survivability.

        Returns
        -------
        float
        """
        return SpecialStats.special_stat_multiplier(surv, 8e-4)
    def dominance_mult_diff(cls, dom):
        """
        Parameters
        ----------
        dom : int, float
            Amount of dominance.

        Returns
        -------
        float
        """
        return SpecialStats.special_stat_multiplier_diff(
            dom, cls.dominance_coefficient)
 def _analytical_solution_check(self, lb, ub):
     n = self.stats_number()
     th = SpecialStats.get_diminishing_threshold()
     if lb is not None:
         for i in range(n):
             if self.stats[i] < lb[i] - EPSILON:
                 return False
     if ub is not None:
         for i in range(n):
             if self.stats[i] > ub[i] + EPSILON:
                 return False
     if self.fortune > th + EPSILON or self.dominance > th + EPSILON:
         return False
     return True
Beispiel #4
0
    def crit_chance_diff(fort):
        """
        Calculates the derivative of the crit chance.

        Parameters
        ----------
        fort : int, float
            Amount of fortune.

        Returns
        -------
        float
        """
        return SpecialStats.special_stat_multiplier_diff(fort, 8e-4)
Beispiel #5
0
    def crit_chance_calculate(fort):
        """
        Calculates the probability (from [0, 1]) of critical damage.

        Parameters
        ----------
        fort : int, float
            Amount of fortune.

        Returns
        -------
        float
        """
        return 8e-4 * SpecialStats.spline(fort) * fort
Beispiel #6
0
    def instinct_mult(inst):
        """
        The multiplier represents the critical damage damage reduction factor.

        Parameters
        ----------
        inst : int, float
            Amount of instinct.

        Returns
        -------
        float
        """
        return SpecialStats.special_stat_multiplier(inst, -4e-4)
Beispiel #7
0
    def caution_mult(caut):
        """
        The multiplier represents damage reduction factor at 40% and less hp.

        Parameters
        ----------
        caut : int, float
            Amount of caution.

        Returns
        -------
        float
        """
        return SpecialStats.special_stat_multiplier(caut, -4e-4)