17 #ifndef ATTACK_PREDICTION_H_INCLUDED
18 #define ATTACK_PREDICTION_H_INCLUDED
54 double average_hp(
unsigned int healing = 0)
const;
56 #if defined(BENCHMARK) || defined(CHECK)
58 void print(
const char label[],
unsigned int battle,
unsigned int fighter)
const;
double untouched
Resulting chance we were not hit by this opponent (important if it poisons)
std::vector< double > hp_dist
Resulting probability distribution (might be not as large as max_hp)
std::vector< combat_slice > split_summary() const
Split the combat by number of attacks per combatant (for swarm).
const battle_context_unit_stats & u_
A struct to describe one possible combat scenario.
combatant(const battle_context_unit_stats &u, const combatant *prev=nullptr)
Construct a combatant.
void fight(combatant &opponent, bool levelup_considered=true)
Simulate a fight! Can be called multiple times for cumulative calculations.
Structure describing the statistics of a unit involved in the battle.
double slowed
Resulting chance we are slowed.
static void print(std::stringstream &sstr, const std::string &queue, const std::string &id)
combatant & operator=(const combatant &)
double average_hp(unsigned int healing=0) const
What's the average hp (weighted average of hp_dist).
double poisoned
Resulting chance we are poisoned.
std::vector< double > summary[2]
Summary of matrix used to calculate last battle (unslowed & slowed).