The Battle for Wesnoth  1.15.12+dev
Namespaces | Macros | Functions | Variables
abilities.cpp File Reference

Manage unit-abilities, like heal, cure, and weapon_specials. More...

#include "display.hpp"
#include "display_context.hpp"
#include "font/text_formatting.hpp"
#include "game_board.hpp"
#include "global.hpp"
#include "lexical_cast.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "resources.hpp"
#include "team.hpp"
#include "terrain/filter.hpp"
#include "units/unit.hpp"
#include "units/abilities.hpp"
#include "units/filter.hpp"
#include "units/map.hpp"
#include "filter_context.hpp"
#include "formula/callable_objects.hpp"
#include "formula/formula.hpp"
#include "formula/function_gamestate.hpp"
#include "deprecation.hpp"
#include <boost/dynamic_bitset.hpp>
#include <string_view>
Include dependency graph for abilities.cpp:

Go to the source code of this file.

Namespaces

 unit_abilities
 

Macros

#define ERR_NG   LOG_STREAM(err, log_engine)
 

Functions

template std::pair< int, map_locationunit_ability_list::get_extremum< std::less< int > > (const std::string &key, int def, const std::less< int > &comp) const
 
template std::pair< int, map_locationunit_ability_list::get_extremum< std::greater< int > > (const std::string &key, int def, const std::greater< int > &comp) const
 
static bool overwrite_special_affects (const config &special)
 
static void get_ability_children (std::vector< special_match > &tag_result, std::vector< special_match > &id_result, const config &parent, const std::string &id, bool special_id=true, bool special_tags=true)
 Gets the children of parent (which should be the abilities for an attack_type) and places the ones whose tag or id= matches id into tag_result and id_result. More...
 
bool unit_abilities::filter_base_matches (const config &cfg, int def)
 

Variables

static lg::log_domain log_engine ("engine")
 

Detailed Description

Manage unit-abilities, like heal, cure, and weapon_specials.

Definition in file abilities.cpp.

Macro Definition Documentation

◆ ERR_NG

#define ERR_NG   LOG_STREAM(err, log_engine)

Definition at line 46 of file abilities.cpp.

Referenced by unit_abilities::effect::effect(), and attack_type::modified_attacks().

Function Documentation

◆ get_ability_children()

static void get_ability_children ( std::vector< special_match > &  tag_result,
std::vector< special_match > &  id_result,
const config parent,
const std::string &  id,
bool  special_id = true,
bool  special_tags = true 
)
static

Gets the children of parent (which should be the abilities for an attack_type) and places the ones whose tag or id= matches id into tag_result and id_result.

Parameters
tag_resultreceive the children whose tag matches id
id_resultreceive the children whose id matches id
parentthe tags whose contain children (abilities here)
idtag or id of child tested
special_idif true, children check by id
special_tagsif true, children check by tags

Definition at line 1219 of file abilities.cpp.

Referenced by attack_type::has_weapon_ability().

◆ overwrite_special_affects()

static bool overwrite_special_affects ( const config special)
static

Definition at line 1158 of file abilities.cpp.

Referenced by attack_type::overwrite_special_checking().

◆ unit_ability_list::get_extremum< std::greater< int > >()

template std::pair<int, map_location> unit_ability_list::get_extremum< std::greater< int > > ( const std::string &  key,
int  def,
const std::greater< int > &  comp 
) const

◆ unit_ability_list::get_extremum< std::less< int > >()

template std::pair<int, map_location> unit_ability_list::get_extremum< std::less< int > > ( const std::string &  key,
int  def,
const std::less< int > &  comp 
) const

Variable Documentation

◆ log_engine

lg::log_domain log_engine("engine")
static