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