Simulate combat to calculate attacks. More...
#include "attack_prediction.hpp"
#include "actions/attack.hpp"
#include "game_config.hpp"
#include "log.hpp"
#include "preferences/general.hpp"
#include "random.hpp"
#include "serialization/string_utils.hpp"
#include <array>
#include <cfloat>
#include <cmath>
#include <memory>
#include <numeric>
#include <sstream>
Go to the source code of this file.
Macros | |
#define | debug(x) |
Enumerations | |
enum | attack_prediction_mode |
Simulate combat to calculate attacks.
This can be compiled as a stand-alone program to either verify correctness or to benchmark performance.
Compile with -O3 -DBENCHMARK for speed testing, and with -DCHECK for testing correctness (redirect the output to a file, then compile utils/wesnoth-attack-sim.c and run that with the arguments –check <file name>). For either option, use -DHUMAN_READABLE if you want to see the results from each combat displayed in a prettier format (but no longer suitable for wesnoth-attack-sim.c).
Definition in file attack_prediction.cpp.
#define debug | ( | x | ) |
Definition at line 56 of file attack_prediction.cpp.
Referenced by ai::typesafe_known_aspect< T >::add_facet(), combatant::average_hp(), gui2::circle_shape::circle_shape(), config::clear_children(), wfl::function_symbol_table::get_builtins(), gui2::image_shape::image_shape(), game_lua_kernel::intf_find_cost_map(), intf_log(), gui2::line_shape::line_shape(), gui2::rectangle_shape::rectangle_shape(), gui2::round_rectangle_shape::round_rectangle_shape(), ai::typesafe_known_aspect< T >::set(), ai::standard_aspect< config >::standard_aspect(), and gui2::text_shape::text_shape().
|
strong |
Definition at line 1714 of file attack_prediction.cpp.