engine/calculators/source/WeaponDifficultyCalculator.cpp
// Get the "total" difficulty for the weapon.  This is not directly used in
// game, but is useful for players because they can see the character's
// to-hit reflected by the lower difficulty.
Get the "total" difficulty for the weapon.  This is not directly used in
game, but is useful for players because they can see the character's
to-hit reflected by the lower difficulty.
Get the " total " difficulty for the weapon . This is not directly used in game but is useful for players because they can see the character ' s to - hit reflected by the lower difficulty .
int WeaponDifficultyCalculator::calculate_total_difficulty_for_display(CreaturePtr creature, const AttackType attack_type)
{
  ToHitCalculatorPtr th_calculator = ToHitCalculatorFactory::create_to_hit_calculator(creature, attack_type);
  int base_difficulty = calculate_base_difficulty(creature, attack_type);
  int total_difficulty = base_difficulty - th_calculator->calculate(creature);
  return total_difficulty;
}
int WeaponDifficultyCalculator :: calculate_total_difficulty_for_display ( CreaturePtr creature , const AttackType attack_type ) { ToHitCalculatorPtr th_calculator = ToHitCalculatorFactory :: create_to_hit_calculator ( creature , attack_type ) ; int base_difficulty = calculate_base_difficulty ( creature , attack_type ) ; int total_difficulty = base_difficulty - th_calculator -> calculate ( creature ) ; return total_difficulty ; }
Get the "total" difficulty for the weapon.
Get the " total " difficulty for the weapon .
// "Total difficulty" as a concept is only used here. // The CombatManager uses base_roll + to_hit, instead of "weapon_difficulty - to_hit".