26 val[
"type"] = type_id;
29 from.
write(leader_position);
38 val[
"value"] = unit_id;
41 from.
write(leader_position);
50 val[
"value"] = unit_id;
63 assert(!steps.empty());
69 move[
"skip_sighted"] =
"all";
71 else if(skip_ally_sighted && !skip_sighted)
73 move[
"skip_sighted"] =
"only_ally";
87 int att_weapon,
int def_weapon,
const std::string& attacker_type_id,
88 const std::string& defender_type_id,
int attacker_lvl,
89 int defender_lvl,
const size_t turn,
const time_of_day &
t)
100 move[
"weapon"] = att_weapon;
101 move[
"defender_weapon"] = def_weapon;
102 move[
"attacker_type"] = attacker_type_id;
103 move[
"defender_type"] = defender_type_id;
104 move[
"attacker_lvl"] = attacker_lvl;
105 move[
"defender_lvl"] = defender_lvl;
106 move[
"turn"] =
int(turn);
121 child[
"active"] = turned_on;
149 if(last_select_loc !=
nullptr && last_select_loc->
valid())
152 last_select_loc->
write(source);
160 child[
"code"] = lua_code;
static config get_lua_ai(const std::string &lua_code)
play_controller * controller
static config get_recall(const std::string &unit_id, const map_location &loc, const map_location &from)
GLuint const GLfloat * val
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.
GLdouble GLdouble GLdouble b
Object which defines a time of day with associated bonuses, image, sounds etc.
int current_side() const
Returns the number of the side whose turn it is.
GLboolean GLboolean GLboolean GLboolean a
config & add_child(const std::string &key)
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
void write(config &cfg) const
Encapsulates the map of the game.
static config get_disband(const std::string &unit_id)
GLuint const GLchar * name
static config get_recruit(const std::string &type_id, const map_location &loc, const map_location &from)
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 size_t turn, const time_of_day &t)
A config object defines a single node in a WML file, with access to child nodes.
static config get_event(const std::string &name, const map_location &loc, const map_location *last_select_loc)
GLsizei const GLcharARB ** string
GLsizei GLsizei GLchar * source
static config get_init_side()
void write_locations(const std::vector< map_location > &locs, config &cfg)
Write a vector of locations into a config adding keys x=x1,x2,..,xn and y=y1,y2,..,yn.