The Battle for Wesnoth  1.15.1+dev
replay_helper.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2018 by David White <dave@whitevine.net>
3  Part of the Battle for Wesnoth Project https://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 #pragma once
16 
17 #include <vector>
18 #include <string>
19 class config;
20 struct map_location;
21 struct time_of_day;
22 
24 {
25 public:
26  static config get_recruit(const std::string& type_id, const map_location& loc, const map_location& from);
27 
28  static config get_recall(const std::string& unit_id, const map_location& loc, const map_location& from);
29 
30  static config get_disband(const std::string& unit_id);
31  //TODO: add some additional checkup (unit checksum) here.
32  static config get_movement(const std::vector<map_location>& steps, bool skip_sighted, bool skip_ally_sighted);
33 
34  static config get_attack(const map_location& a, const map_location& b,
35  int att_weapon, int def_weapon, const std::string& attacker_type_id,
36  const std::string& defender_type_id, int attacker_lvl,
37  int defender_lvl, const std::size_t turn, const time_of_day &t);
38 
39  static config get_auto_shroud(bool turned_on);
40 
41  static config get_update_shroud();
42 
43  static config get_init_side();
44  /*
45 
46  */
47  static config get_event(const std::string& name, const map_location& loc, const map_location* last_select_loc);
48 
49  static config get_lua_ai(const std::string& lua_code);
50 
51 };
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:57
static const char * name(const std::vector< SDL_Joystick *> &joysticks, const std::size_t index)
Definition: joystick.cpp:48
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:42
static config get_disband(const std::string &unit_id)
double t
Definition: astarsearch.cpp:64
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:92
static config get_event(const std::string &name, const map_location &loc, const map_location *last_select_loc)
static config get_init_side()