engine/calculators/source/WandCalculator.cpp
// -1 usage per 10 points of Wandcraft, though the minimum of 2 castings/charge
// is enforced.

1 usage per 10 points of Wandcraft, though the minimum of 2 castings/charge
is enforced.
1 usage per 10 points of Wandcraft though the minimum of 2 castings / charge is enforced .
int WandCalculator::calc_spell_castings_per_charge(CreaturePtr creature)
{
  int castings = DEFAULT_SPELL_CASTINGS_PER_CHARGE;
  if (creature != nullptr)
  {
    int wandcraft_val = creature->get_skills().get_value(SkillType::SKILL_GENERAL_WANDCRAFT);
    castings -= (wandcraft_val / 10);
    castings = std::max<int>(castings, MIN_SPELL_CASTINGS_PER_CHARGE);
  }
  return castings;
}
int WandCalculator :: calc_spell_castings_per_charge ( CreaturePtr creature ) { int castings = DEFAULT_SPELL_CASTINGS_PER_CHARGE ; if ( creature != nullptr ) { int wandcraft_val = creature -> get_skills ( ) . get_value ( SkillType :: SKILL_GENERAL_WANDCRAFT ) ; castings -= ( wandcraft_val / 10 ) ; castings = std :: max < int > ( castings , MIN_SPELL_CASTINGS_PER_CHARGE ) ; } return castings ; }
1 usage per 10 points of Wandcraft, though the minimum of 2 castings/charge
is enforced.
1 usage per 10 points of Wandcraft though the minimum of 2 castings / charge is enforced .