engine/calculators/source/SwimmingCalculator.cpp
// Swimming damage is always 10% of total HP.
Swimming damage is always 10% of total HP.
Swimming damage is always 10% of total HP .
int SwimmingCalculator::calculate_swimming_damage(CreaturePtr creature, const bool is_incorporeal) const
{
  int swimming_damage = 0;
  if (creature && !is_incorporeal)
  {
    Statistic hit_points = creature->get_hit_points();    
    swimming_damage = static_cast<int>(std::max(1.0f, static_cast<float>(hit_points.get_base()) * SWIMMING_DAMAGE_MAX_HP_MULTIPLIER));
  }
  return swimming_damage;
}
int SwimmingCalculator :: calculate_swimming_damage ( CreaturePtr creature , const bool is_incorporeal ) const { int swimming_damage = 0 ; if ( creature && ! is_incorporeal ) { Statistic hit_points = creature -> get_hit_points ( ) ; swimming_damage = static_cast < int > ( std :: max ( 1.0f , static_cast < float > ( hit_points . get_base ( ) ) * SWIMMING_DAMAGE_MAX_HP_MULTIPLIER ) ) ; } return swimming_damage ; }
Swimming damage is always 10% of total HP.
Swimming damage is always 10% of total HP .