Classes | |
struct | individual_effect |
class | effect |
Enumerations | |
enum | value_modifier { NOT_USED , SET , ADD , MUL , DIV } |
enum | EFFECTS { EFFECT_DEFAULT =1 , EFFECT_CUMULABLE =2 , EFFECT_WITHOUT_CLAMP_MIN_MAX =3 } |
Functions | |
bool | filter_base_matches (const config &cfg, int def) |
std::string | substitute_variables (const std::string &str, const std::string &tag_name, const config &ability_or_special) |
Substitute gettext variables in name and description of abilities and specials. More... | |
Enumerator | |
---|---|
EFFECT_DEFAULT | |
EFFECT_CUMULABLE | |
EFFECT_WITHOUT_CLAMP_MIN_MAX |
Definition at line 28 of file abilities.hpp.
Enumerator | |
---|---|
NOT_USED | |
SET | |
ADD | |
MUL | |
DIV |
Definition at line 26 of file abilities.hpp.
bool unit_abilities::filter_base_matches | ( | const config & | cfg, |
int | def | ||
) |
Definition at line 2394 of file abilities.cpp.
References config_attribute_value::empty(), config::optional_child(), and config_attribute_value::to_int().
Referenced by unit_abilities::effect::effect(), unit_type::resistance_filter_matches(), and unit::resistance_filter_matches().
std::string unit_abilities::substitute_variables | ( | const std::string & | str, |
const std::string & | tag_name, | ||
const config & | ability_or_special | ||
) |
Substitute gettext variables in name and description of abilities and specials.
str | The string in which the substitution is to be done |
tag_name | Tag name of the special (plague, leadership, chance_to_hit etc.) |
ability_or_special | The config for the special (for example, contents inside [plague][/plague] etc.) |
str
with all gettext variables substitutes with corresponding special properties Definition at line 2415 of file abilities.cpp.
References utils::interpolate_variables_into_string(), attack_type::type(), unit_type_data::types(), and unit_types.
Referenced by unit_type::build_help_index(), attack_type::special_tooltips(), and attack_type::weapon_specials().