The Battle for Wesnoth  1.17.0-dev
replay_helper.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2021
3  by David White <dave@whitevine.net>
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 #pragma once
17 
18 #include <vector>
19 #include <string>
20 class config;
21 struct map_location;
22 struct time_of_day;
23 
25 {
26 public:
27  static config get_recruit(const std::string& type_id, const map_location& loc, const map_location& from);
28 
29  static config get_recall(const std::string& unit_id, const map_location& loc, const map_location& from);
30 
31  static config get_disband(const std::string& unit_id);
32  //TODO: add some additional checkup (unit checksum) here.
33  static config get_movement(const std::vector<map_location>& steps, bool skip_sighted, bool skip_ally_sighted);
34 
35  static config get_attack(const map_location& a, const map_location& b,
36  int att_weapon, int def_weapon, const std::string& attacker_type_id,
37  const std::string& defender_type_id, int attacker_lvl,
38  int defender_lvl, const std::size_t turn, const time_of_day &t);
39 
40  static config get_auto_shroud(bool turned_on);
41 
42  static config get_update_shroud();
43 
44  static config get_init_side();
45  /*
46 
47  */
48  static config get_event(const std::string& name, const map_location& loc, const map_location* last_select_loc);
49 
50  static config get_lua_ai(const std::string& lua_code);
51 
52 };
static config get_lua_ai(const std::string &lua_code)
static config get_recall(const std::string &unit_id, const map_location &loc, const map_location &from)
#define a
static config get_auto_shroud(bool turned_on)
Records that the player has toggled automatic shroud updates.
static config get_movement(const std::vector< map_location > &steps, bool skip_sighted, bool skip_ally_sighted)
Records a move that follows the provided steps.
static config get_update_shroud()
Records that the player has manually updated fog/shroud.
#define b
Object which defines a time of day with associated bonuses, image, sounds etc.
Definition: time_of_day.hpp:56
static config get_attack(const map_location &a, const map_location &b, int att_weapon, int def_weapon, const std::string &attacker_type_id, const std::string &defender_type_id, int attacker_lvl, int defender_lvl, const std::size_t turn, const time_of_day &t)
Encapsulates the map of the game.
Definition: location.hpp:38
static config get_disband(const std::string &unit_id)
double t
Definition: astarsearch.cpp:65
static config get_recruit(const std::string &type_id, const map_location &loc, const map_location &from)
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:60
static config get_event(const std::string &name, const map_location &loc, const map_location *last_select_loc)
static config get_init_side()