Implement simulated actions. More...
#include "ai/simulated_actions.hpp"
#include "game_board.hpp"
#include "game_config.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "recall_list_manager.hpp"
#include "resources.hpp"
#include "team.hpp"
#include "units/unit.hpp"
#include "units/helper.hpp"
#include "units/ptr.hpp"
#include "units/types.hpp"
Go to the source code of this file.
Namespaces | |
ai | |
A small explanation about what's going on here: Each action has access to two game_info objects First is 'info' - real information Second is 'subjective info' - AIs perception of what's going on So, when we check_before action, we use 'subjective info' and don't touch real 'info' at all. | |
Macros | |
#define | DBG_AI_SIM_ACTIONS LOG_STREAM(debug, log_ai_sim_actions) |
#define | LOG_AI_SIM_ACTIONS LOG_STREAM(info, log_ai_sim_actions) |
#define | WRN_AI_SIM_ACTIONS LOG_STREAM(warn, log_ai_sim_actions) |
#define | ERR_AI_SIM_ACTIONS LOG_STREAM(err, log_ai_sim_actions) |
Functions | |
void | ai::helper_check_village (const map_location &loc, int side) |
void | ai::helper_place_unit (const unit &u, const map_location &loc) |
void | ai::helper_advance_unit (const map_location &loc) |
bool | ai::simulated_attack (const map_location &attacker_loc, const map_location &defender_loc, double attacker_hp, double defender_hp) |
bool | ai::simulated_move (int side, const map_location &from, const map_location &to, int steps, map_location &unit_location) |
bool | ai::simulated_recall (int side, const std::string &unit_id, const map_location &recall_location) |
bool | ai::simulated_recruit (int side, const unit_type *u, const map_location &recruit_location) |
bool | ai::simulated_stopunit (const map_location &unit_location, bool remove_movement, bool remove_attacks) |
bool | ai::simulated_synced_command () |
Variables | |
static lg::log_domain | ai::log_ai_sim_actions ("ai/sim_actions") |
Implement simulated actions.
Definition in file simulated_actions.cpp.
#define DBG_AI_SIM_ACTIONS LOG_STREAM(debug, log_ai_sim_actions) |
Definition at line 37 of file simulated_actions.cpp.
Referenced by ai::helper_check_village(), and ai::simulated_synced_command().
#define ERR_AI_SIM_ACTIONS LOG_STREAM(err, log_ai_sim_actions) |
Definition at line 40 of file simulated_actions.cpp.
Referenced by ai::helper_advance_unit().
#define LOG_AI_SIM_ACTIONS LOG_STREAM(info, log_ai_sim_actions) |
Definition at line 38 of file simulated_actions.cpp.
Referenced by ai::helper_advance_unit(), ai::simulated_attack(), ai::simulated_move(), ai::simulated_recall(), ai::simulated_recruit(), ai::simulated_stopunit(), and ai::simulated_synced_command().
#define WRN_AI_SIM_ACTIONS LOG_STREAM(warn, log_ai_sim_actions) |
Definition at line 39 of file simulated_actions.cpp.