For Combat Analysis. More...
Public Member Functions | |
attack_simulation (const unit_type *attacker, const unit_type *defender, double attacker_defense, double defender_defense, const_attack_ptr att_weapon, const_attack_ptr def_weapon, int average_lawful_bonus) | |
bool | better_result (const attack_simulation *other, bool for_defender) |
double | get_avg_hp_of_defender () const |
double | get_avg_hp_of_attacker () const |
double | get_avg_hp_of_combatant (bool attacker) const |
Public Attributes | |
const unit_type * | attacker_type |
const unit_type * | defender_type |
const battle_context_unit_stats | attacker_stats |
const battle_context_unit_stats | defender_stats |
combatant | attacker_combatant |
combatant | defender_combatant |
For Combat Analysis.
This struct encapsulates all information for one attack simulation. One attack simulation is defined by the unit-types, the weapons and the units defenses.
Definition at line 1086 of file recruitment.cpp.
|
inline |
Definition at line 1094 of file recruitment.cpp.
References attacker_combatant, defender_combatant, and combatant::fight().
|
inline |
Definition at line 1110 of file recruitment.cpp.
References attacker_combatant, battle_context::better_combat(), and defender_combatant.
|
inline |
Definition at line 1127 of file recruitment.cpp.
References get_avg_hp_of_combatant().
|
inline |
Definition at line 1130 of file recruitment.cpp.
References attacker_combatant, attacker_type, combatant::average_hp(), defender_combatant, defender_type, unit_type::hitpoints(), game_config::poison_amount, and combatant::poisoned.
Referenced by get_avg_hp_of_attacker(), and get_avg_hp_of_defender().
|
inline |
Definition at line 1123 of file recruitment.cpp.
References get_avg_hp_of_combatant().
combatant ai::default_recruitment::attack_simulation::attacker_combatant |
Definition at line 1091 of file recruitment.cpp.
Referenced by attack_simulation(), better_result(), and get_avg_hp_of_combatant().
const battle_context_unit_stats ai::default_recruitment::attack_simulation::attacker_stats |
Definition at line 1089 of file recruitment.cpp.
const unit_type* ai::default_recruitment::attack_simulation::attacker_type |
Definition at line 1087 of file recruitment.cpp.
Referenced by get_avg_hp_of_combatant().
combatant ai::default_recruitment::attack_simulation::defender_combatant |
Definition at line 1092 of file recruitment.cpp.
Referenced by attack_simulation(), better_result(), and get_avg_hp_of_combatant().
const battle_context_unit_stats ai::default_recruitment::attack_simulation::defender_stats |
Definition at line 1090 of file recruitment.cpp.
const unit_type* ai::default_recruitment::attack_simulation::defender_type |
Definition at line 1088 of file recruitment.cpp.
Referenced by get_avg_hp_of_combatant().