32 #include <boost/dynamic_bitset.hpp>
47 void place(
int x,
int y);
48 bool clear(
int x,
int y);
51 bool value(
int x,
int y)
const;
52 bool shared_value(
const std::vector<const shroud_map*>& maps,
int x,
int y)
const;
54 bool copy_from(
const std::vector<const shroud_map*>& maps);
56 std::string
write()
const;
57 void read(
const std::string& shroud_data);
58 void merge(
const std::string& shroud_data);
67 std::vector<std::vector<bool>>
data_;
230 const std::size_t
index = std::size_t(
n-1);
402 const std::vector<const shroud_map*>&
ally_shroud(
const std::vector<team>& teams)
const;
403 const std::vector<const shroud_map*>&
ally_fog(
const std::vector<team>& teams)
const;
A color range definition is made of four reference RGB colors, used for calculating conversions from ...
A config object defines a single node in a WML file, with access to child nodes.
Encapsulates the map of the game.
This class encapsulates the recall list of a team.
bool copy_from(const std::vector< const shroud_map * > &maps)
void read(const std::string &shroud_data)
void set_enabled(bool enabled)
std::vector< std::vector< bool > > data_
bool shared_value(const std::vector< const shroud_map * > &maps, int x, int y) const
void merge(const std::string &shroud_data)
bool value(int x, int y) const
std::string write() const
const std::string & str() const
This class stores all the data for a single 'side' (in game nomenclature).
static std::string get_side_highlight_pango(int side)
void set_action_bonus_count(const int count)
int carryover_gold() const
const std::string & color() const
bool clear_shroud(const map_location &loc)
void have_leader(bool value=true)
static color_t get_minimap_color(int side)
bool no_turn_confirmation() const
void set_carryover_percentage(int value)
void fix_villages(const gamemap &map)
bool is_proxy_human() const
const std::string & side_name() const
recall_list_manager recall_list_
game_events::pump_result_t get_village(const map_location &, const int owner_side, game_data *fire_event)
Acquires a village from owner_side.
void set_countdown_time(const std::chrono::milliseconds &amount) const
void set_flag_icon(const std::string &flag_icon)
void set_scroll_to_leader(bool value)
int support() const
Calculate total support capacity, based on support_per_village.
const std::string & faction() const
int village_support() const
std::vector< const shroud_map * > ally_shroud_
static const color_range get_side_color_range(int side)
void set_objectives_changed(bool c=true) const
void set_shroud(bool shroud)
bool fog_or_shroud() const
void change_proxy(side_proxy_controller::type proxy)
bool auto_shroud_updates() const
void set_local(bool local)
const std::string & current_player() const
void set_recruits(const std::set< std::string > &recruits)
const std::string & team_name() const
bool objectives_changed() const
void set_carryover_gold(int value)
void set_carryover_bonus(double value)
static std::string get_side_color_id_from_config(const config &cfg)
bool is_local_human() const
std::chrono::milliseconds countdown_time_
void merge_shroud_map_data(const std::string &shroud_data)
Merge a WML shroud map with the shroud data of this player.
bool clear_fog(const map_location &loc)
bool is_enemy(int n) const
team_shared_vision::type share_vision() const
void set_auto_shroud_updates(bool value)
int action_bonus_count() const
bool owns_village(const map_location &loc) const
bool calculate_is_enemy(std::size_t index) const
const std::set< map_location > & villages() const
const recall_list_manager & recall_list() const
void set_current_player(const std::string &player)
void change_controller(side_controller::type controller)
bool knows_about_team(std::size_t index) const
const t_string & objectives() const
void change_team(const std::string &name, const t_string &user_name)
static const t_string get_side_color_name_for_UI(unsigned side)
const t_string & faction_name() const
defeat_condition::type defeat_cond() const
void set_objectives(const t_string &new_objectives, bool silently=false)
t_string side_name_tstr() const
bool carryover_add() const
std::string shroud_data() const
void handle_legacy_share_vision(const config &cfg)
int carryover_percentage() const
void write(config &cfg) const
static std::string get_side_color_id(unsigned side)
bool is_network_ai() const
std::vector< const shroud_map * > ally_fog_
void set_persistent(bool value)
void reset_objectives_changed() const
void set_recall_cost(int cost)
void set_side_name(const t_string &new_name)
void set_start_gold(const int amount)
void build(const config &cfg, const gamemap &map, int gold=default_team_gold_)
const std::string & save_id() const
static const int default_team_gold_
void set_carryover_add(bool value)
void calculate_enemies(std::size_t index) const
void add_recruit(const std::string &)
side_controller::type controller() const
int minimum_recruit_price() const
double carryover_bonus() const
void change_controller(const std::string &new_controller)
void add_fog_override(const std::set< map_location > &hexes)
Records hexes that were cleared of fog via WML.
static void clear_caches()
clear the shroud, fog, and enemies cache for all teams
std::shared_ptr< wb::side_actions > get_side_actions() const
get the whiteboard planned actions for this team
bool auto_shroud_updates_
void set_defeat_condition(defeat_condition::type value)
std::set< map_location > fog_clearer_
Stores hexes that have been cleared of fog via WML.
bool is_network_human() const
std::string allied_human_teams() const
bool shrouded(const map_location &loc) const
const config & variables() const
std::set< map_location > villages_
void set_color(const std::string &color)
std::chrono::milliseconds countdown_time() const
const std::string & flag_icon() const
std::string save_id_or_number() const
void spend_gold(const int amount)
const std::vector< const shroud_map * > & ally_fog(const std::vector< team > &teams) const
bool get_scroll_to_leader() const
side_proxy_controller::type proxy_controller() const
static color_t get_side_color(int side)
void set_flag(const std::string &flag)
static const std::set< std::string > attributes
Stores the attributes recognized by [side].
const std::string & flag() const
std::string last_recruit_
recall_list_manager & recall_list()
void set_village_gold(int income)
void set_hidden(bool value)
void set_village_support(int support)
void last_recruit(const std::string &u_type)
void set_defeat_condition_string(const std::string &value)
sets the defeat condition if
const std::string & last_recruit() const
bool get_disallow_observers() const
void set_no_turn_confirmation(bool value)
std::shared_ptr< wb::side_actions > planned_actions_
Whiteboard planned actions for this team.
void set_save_id(const std::string &save_id)
const std::set< std::string > & recruits() const
const t_string & user_team_name() const
void lose_village(const map_location &)
void set_share_vision(const std::string &vision_status)
void set_base_income(int amount)
void set_share_vision(team_shared_vision::type vision_status)
boost::dynamic_bitset enemies_
void remove_fog_override(const std::set< map_location > &hexes)
Removes the record of hexes that were cleared of fog via WML.
bool fogged(const map_location &loc) const
void set_lost(bool value=true)
void place_shroud(const map_location &loc)
void change_controller_by_wml(const std::string &new_controller)
void set_gold(int amount)
bool chose_random() const
void log_recruitable() const
const std::vector< const shroud_map * > & ally_shroud(const std::vector< team > &teams) const
Definitions for the interface to Wesnoth Markup Language (WML).
std::tuple< bool, bool > pump_result_t
bool fire_event(const ui_event event, const std::vector< std::pair< widget *, ui_event >> &event_chain, widget *dispatcher, widget *w, F &&... params)
Helper function for fire_event.
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
The basic class for representing 8-bit RGB or RGBA colour values.
Encapsulates the map of the game.
static constexpr utils::optional< enum_type > get_enum(const std::string_view value)
Converts a string into its enum equivalent.
void read(const config &cfg)
int minimum_recruit_price
std::string countdown_time
void handle_legacy_share_vision(const config &cfg)
std::string current_player
side_proxy_controller::type proxy_controller
void write(config &cfg) const
bool no_turn_confirmation
side_controller::type controller
defeat_condition::type defeat_cond
std::set< std::string > can_recruit
bool objectives_changed
< Team's objectives for the current level.
team_shared_vision::type share_vision
void validate_side(int side)
static map_location::direction n