engine/calculators/source/SlownessCalculator.cpp
// Calculate the chance that this creature is slowed.
Calculate the chance that this creature is slowed.
Calculate the chance that this creature is slowed .
int SlownessCalculator::calculate_pct_chance_effect(CreaturePtr creature) const
{
  int pct_chance = BASE_SLOWNESS_PCT_CHANCE;
  if (creature)
  {
    int agility_bonus = (creature->get_agility().get_current() / BASE_SLOWNESS_CHANCE_AGILITY_MODIFIER);
    double cold_multiplier = std::max<double>(0, creature->get_resistances().get_resistance_value(DamageType::DAMAGE_TYPE_COLD));
    pct_chance -= agility_bonus;
    pct_chance = static_cast<int>(pct_chance * cold_multiplier);
  }
  return pct_chance;
}
int SlownessCalculator :: calculate_pct_chance_effect ( CreaturePtr creature ) const { int pct_chance = BASE_SLOWNESS_PCT_CHANCE ; if ( creature ) { int agility_bonus = ( creature -> get_agility ( ) . get_current ( ) / BASE_SLOWNESS_CHANCE_AGILITY_MODIFIER ) ; double cold_multiplier = std :: max < double > ( 0 , creature -> get_resistances ( ) . get_resistance_value ( DamageType :: DAMAGE_TYPE_COLD ) ) ; pct_chance -= agility_bonus ; pct_chance = static_cast < int > ( pct_chance * cold_multiplier ) ; } return pct_chance ; }
Calculate the chance that this creature is slowed.
Calculate the chance that this creature is slowed .
// More nimble and cold resistant creatures are resistant to being  // slowed by the cold.