engine/calculators/source/MutenessCalculator.cpp
// Calculate the chance that this creature gets muted.
Calculate the chance that this creature gets muted.
Calculate the chance that this creature gets muted .
int MutenessCalculator::calculate_pct_chance_effect(CreaturePtr creature) const
{
  int pct_chance = BASE_MUTENESS_PCT_CHANCE;
  if (creature)
  {
    int charisma_bonus = creature->get_charisma().get_current() / BASE_MUTENESS_CHANCE_CHARISMA_MODIFIER;
    double holiness_multiplier = std::max<double>(0.0, creature->get_resistances().get_resistance_value(DamageType::DAMAGE_TYPE_HOLY));
    pct_chance -= charisma_bonus;
    pct_chance = static_cast<int>(pct_chance * holiness_multiplier);
  }
  return pct_chance;
}
int MutenessCalculator :: calculate_pct_chance_effect ( CreaturePtr creature ) const { int pct_chance = BASE_MUTENESS_PCT_CHANCE ; if ( creature ) { int charisma_bonus = creature -> get_charisma ( ) . get_current ( ) / BASE_MUTENESS_CHANCE_CHARISMA_MODIFIER ; double holiness_multiplier = std :: max < double > ( 0.0 , creature -> get_resistances ( ) . get_resistance_value ( DamageType :: DAMAGE_TYPE_HOLY ) ) ; pct_chance -= charisma_bonus ; pct_chance = static_cast < int > ( pct_chance * holiness_multiplier ) ; } return pct_chance ; }
Calculate the chance that this creature gets muted.
Calculate the chance that this creature gets muted .
// More charismatic and holy creature are resistant to being dumbstruck by // divine beings.