The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
simulated_actions.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2017 by Guorui Xi <kevin.xgr@gmail.com>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * Implement simulated actions
17  * @file
18  */
19 
20 #pragma once
21 
22 #include "ai/game_info.hpp"
23 
25 
26 class unit_type;
27 
28 namespace ai{
29 
30 bool simulated_attack(const map_location& attacker_loc, const map_location& defender_loc, double attacker_hp, double defender_hp);
31 
32 bool simulated_move(int side, const map_location& from, const map_location& to, int steps, map_location& unit_location);
33 
34 bool simulated_recall(int side, const std::string& unit_id, const map_location& recall_location);
35 
36 bool simulated_recruit(int side, const unit_type* u, const map_location& recruit_location);
37 
38 bool simulated_stopunit(const map_location& unit_location, bool remove_movement, bool remove_attacks);
39 
41 
42 }
bool simulated_synced_command()
std::vector< char_t > string
bool simulated_attack(const map_location &attacker_loc, const map_location &defender_loc, double attacker_hp, double defender_hp)
A single unit type that the player may recruit.
Definition: types.hpp:43
A small explanation about what's going on here: Each action has access to two game_info objects First...
Definition: actions.cpp:58
bool simulated_recall(int side, const std::string &unit_id, const map_location &recall_location)
Encapsulates the map of the game.
Definition: location.hpp:40
Game information for the AI.
bool simulated_stopunit(const map_location &unit_location, bool remove_movement, bool remove_attacks)
bool simulated_move(int side, const map_location &from, const map_location &to, int steps, map_location &unit_location)
bool simulated_recruit(int side, const unit_type *u, const map_location &recruit_location)