52 double average_hp(
unsigned int healing = 0)
const;
54 #if defined(BENCHMARK) || defined(CHECK)
56 void print(
const char label[],
unsigned int battle,
unsigned int fighter)
const;
67 std::array<std::vector<double>, 2>
summary;
static void print(std::stringstream &sstr, const std::string &queue, const std::string &id)
std::string label
What to show in the filter's drop-down list.
Structure describing the statistics of a unit involved in the battle.
double slowed
Resulting chance we are slowed.
combatant & operator=(const combatant &)=delete
combatant(const combatant &that)=delete
std::vector< double > hp_dist
Resulting probability distribution (might be not as large as max_hp)
double poisoned
Resulting chance we are poisoned.
static const unsigned int MONTE_CARLO_SIMULATION_THRESHOLD
const battle_context_unit_stats & u_
std::array< std::vector< double >, 2 > summary
Summary of matrix used to calculate last battle (unslowed & slowed).
double average_hp(unsigned int healing=0) const
What's the average hp (weighted average of hp_dist).
void fight(combatant &opponent, bool levelup_considered=true)
Simulate a fight! Can be called multiple times for cumulative calculations.
combatant(const battle_context_unit_stats &u, const combatant *prev=nullptr)
Construct a combatant.
double untouched
Resulting chance we were not hit by this opponent (important if it poisons)