engine/calculators/source/ParalysisCalculator.cpp
// Calculate the chance that this creature gets paralyzed.
Calculate the chance that this creature gets paralyzed.
Calculate the chance that this creature gets paralyzed .
int ParalysisCalculator::calculate_pct_chance_effect(CreaturePtr creature) const
{
  int pct_chance = BASE_PARALYSIS_PCT_CHANCE;
  if (creature)
  {
    int health_bonus = (creature->get_health().get_current() / BASE_PARALYSIS_CHANCE_HEALTH_MODIFIER);
    double lightning_multiplier = std::max<double>(0, creature->get_resistances().get_resistance_value(DamageType::DAMAGE_TYPE_LIGHTNING));
    pct_chance -= health_bonus;
    pct_chance = static_cast<int>(pct_chance * lightning_multiplier);
  }
  return pct_chance;
}
int ParalysisCalculator :: calculate_pct_chance_effect ( CreaturePtr creature ) const { int pct_chance = BASE_PARALYSIS_PCT_CHANCE ; if ( creature ) { int health_bonus = ( creature -> get_health ( ) . get_current ( ) / BASE_PARALYSIS_CHANCE_HEALTH_MODIFIER ) ; double lightning_multiplier = std :: max < double > ( 0 , creature -> get_resistances ( ) . get_resistance_value ( DamageType :: DAMAGE_TYPE_LIGHTNING ) ) ; pct_chance -= health_bonus ; pct_chance = static_cast < int > ( pct_chance * lightning_multiplier ) ; } return pct_chance ; }
Calculate the chance that this creature gets paralyzed.
Calculate the chance that this creature gets paralyzed .
// More charismatic and shock-resistance creatures are resistant to being  // paralyzed via electricity.