engine/calculators/source/WandCalculator.cpp
// The number of charges that a caster can actually force into a knobby bit of
// wood is based half on intelligence, half on wandcraft - 1 charge (always),
// with +1 per 15 int and +1 per 15 wandcraft.

The number of charges that a caster can actually force into a knobby bit of
wood is based half on intelligence, half on wandcraft - 1 charge (always),
with +1 per 15 int and +1 per 15 wandcraft.
The number of charges that a caster can actually force into a knobby bit of wood is based half on intelligence half on wandcraft - 1 charge ( always ) with + 1 per 15 int and + 1 per 15 wandcraft .
int WandCalculator::calc_num_charges(CreaturePtr creature)
{
  int num_charges = 1;
  if (creature != nullptr)
  {
    int int_val = creature->get_intelligence().get_current();
    int wandcraft_val = creature->get_skills().get_value(SkillType::SKILL_GENERAL_WANDCRAFT);
    num_charges += (int_val / NUM_CHARGE_DIVISOR);
    num_charges += (wandcraft_val / NUM_CHARGE_DIVISOR);
  }
  return num_charges;
}
int WandCalculator :: calc_num_charges ( CreaturePtr creature ) { int num_charges = 1 ; if ( creature != nullptr ) { int int_val = creature -> get_intelligence ( ) . get_current ( ) ; int wandcraft_val = creature -> get_skills ( ) . get_value ( SkillType :: SKILL_GENERAL_WANDCRAFT ) ; num_charges += ( int_val / NUM_CHARGE_DIVISOR ) ; num_charges += ( wandcraft_val / NUM_CHARGE_DIVISOR ) ; } return num_charges ; }
The number of charges that a caster can actually force into a knobby bit of
wood is based half on intelligence, half on wandcraft - 1 charge (always),
with +1 per 15 int and +1 per 15 wandcraft.
The number of charges that a caster can actually force into a knobby bit of wood is based half on intelligence half on wandcraft - 1 charge ( always ) with + 1 per 15 int and + 1 per 15 wandcraft .