The Battle for Wesnoth  1.19.0-dev
Namespaces | Macros | Functions | Variables
actions.cpp File Reference

Managing the AI-Game interaction - AI actions and their results. More...

#include "actions/undo.hpp"
#include "ai/actions.hpp"
#include "ai/manager.hpp"
#include "ai/simulated_actions.hpp"
#include "actions/attack.hpp"
#include "actions/create.hpp"
#include "attack_prediction.hpp"
#include "preferences/game.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "mouse_handler_base.hpp"
#include "pathfind/teleport.hpp"
#include "play_controller.hpp"
#include "recall_list_manager.hpp"
#include "replay_helper.hpp"
#include "resources.hpp"
#include "synced_context.hpp"
#include "team.hpp"
#include "units/unit.hpp"
#include "units/ptr.hpp"
#include "units/types.hpp"
Include dependency graph for actions.cpp:

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_ACTIONS   LOG_STREAM(debug, log_ai_actions)
 
#define LOG_AI_ACTIONS   LOG_STREAM(info, log_ai_actions)
 
#define WRN_AI_ACTIONS   LOG_STREAM(warn, log_ai_actions)
 
#define ERR_AI_ACTIONS   LOG_STREAM(err, log_ai_actions)
 

Functions

static void ai::execute_or_check (action_result &action, bool execute)
 
void ai::sim_gamestate_changed (action_result *result, bool gamestate_changed)
 
std::ostream & operator<< (std::ostream &s, const ai::attack_result &r)
 
std::ostream & operator<< (std::ostream &s, const ai::move_result &r)
 
std::ostream & operator<< (std::ostream &s, const ai::recall_result &r)
 
std::ostream & operator<< (std::ostream &s, const ai::recruit_result &r)
 
std::ostream & operator<< (std::ostream &s, const ai::stopunit_result &r)
 
std::ostream & operator<< (std::ostream &s, const ai::synced_command_result &r)
 

Variables

static lg::log_domain ai::log_ai_actions ("ai/actions")
 

Detailed Description

Managing the AI-Game interaction - AI actions and their results.

Definition in file actions.cpp.

Macro Definition Documentation

◆ DBG_AI_ACTIONS

#define DBG_AI_ACTIONS   LOG_STREAM(debug, log_ai_actions)

Definition at line 62 of file actions.cpp.

◆ ERR_AI_ACTIONS

#define ERR_AI_ACTIONS   LOG_STREAM(err, log_ai_actions)

Definition at line 65 of file actions.cpp.

◆ LOG_AI_ACTIONS

#define LOG_AI_ACTIONS   LOG_STREAM(info, log_ai_actions)

Definition at line 63 of file actions.cpp.

◆ WRN_AI_ACTIONS

#define WRN_AI_ACTIONS   LOG_STREAM(warn, log_ai_actions)

Definition at line 64 of file actions.cpp.

Function Documentation

◆ operator<<() [1/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::attack_result r 
)

Definition at line 1132 of file actions.cpp.

References ai::attack_result::do_describe(), and s.

Referenced by std::operator<<().

◆ operator<<() [2/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::move_result r 
)

Definition at line 1137 of file actions.cpp.

References ai::move_result::do_describe(), and s.

◆ operator<<() [3/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::recall_result r 
)

Definition at line 1142 of file actions.cpp.

References ai::recall_result::do_describe(), and s.

◆ operator<<() [4/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::recruit_result r 
)

Definition at line 1147 of file actions.cpp.

References ai::recruit_result::do_describe(), and s.

◆ operator<<() [5/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::stopunit_result r 
)

Definition at line 1152 of file actions.cpp.

References ai::stopunit_result::do_describe(), and s.

◆ operator<<() [6/6]

std::ostream& operator<< ( std::ostream &  s,
const ai::synced_command_result r 
)

Definition at line 1157 of file actions.cpp.

References ai::synced_command_result::do_describe(), and s.