#include <unit.hpp>
Public Types | |
typedef std::vector< unit_ability >::iterator | iterator |
typedef std::vector< unit_ability >::const_iterator | const_iterator |
Public Member Functions | |
unit_ability_list (const map_location &loc=map_location()) | |
std::pair< int, map_location > | highest (const std::string &key, int def=0) const |
std::pair< int, map_location > | lowest (const std::string &key, int def=0) const |
template<typename TComp > | |
std::pair< int, map_location > | get_extremum (const std::string &key, int def, const TComp &comp) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
bool | empty () const |
unit_ability & | front () |
const unit_ability & | front () const |
unit_ability & | back () |
const unit_ability & | back () const |
iterator | erase (const iterator &erase_it) |
iterator | erase (const iterator &first, const iterator &last) |
template<typename... T> | |
void | emplace_back (T &&... args) |
const map_location & | loc () const |
void | append (const unit_ability_list &other) |
Appends the abilities from other to this, ignores other.loc() More... | |
template<typename Predicate > | |
void | append_if (const unit_ability_list &other, const Predicate &predicate) |
Appends any abilities from other for which the given condition returns true to this, ignores other.loc(). More... | |
Private Attributes | |
std::vector< unit_ability > | cfgs_ |
map_location | loc_ |
typedef std::vector<unit_ability>::const_iterator unit_ability_list::const_iterator |
typedef std::vector<unit_ability>::iterator unit_ability_list::iterator |
|
inline |
|
inline |
Appends the abilities from other to this, ignores other.loc()
Definition at line 107 of file unit.hpp.
References begin(), cfgs_, and end().
Referenced by attack_type::get_specials_and_abilities(), unit_display::reset_helpers(), and unit_display::unit_attack().
|
inline |
Appends any abilities from other for which the given condition returns true to this, ignores other.loc().
other | where to copy the elements from |
predicate | a single-argument function that takes a reference to an element and returns a bool |
Definition at line 119 of file unit.hpp.
References begin(), cfgs_, and end().
Referenced by attack_type::get_weapon_ability().
|
inline |
|
inline |
|
inline |
Definition at line 86 of file unit.hpp.
References cfgs_.
Referenced by append(), append_if(), and attack_type::overwrite_special_checking().
|
inline |
|
inline |
Definition at line 102 of file unit.hpp.
References cfgs_.
Referenced by unit::get_abilities(), attack_type::get_specials(), and unit_type::resistance_against().
|
inline |
Definition at line 92 of file unit.hpp.
References cfgs_.
Referenced by battle_context_unit_stats::battle_context_unit_stats(), unit::defense_modifier(), unit_filter_impl::unit_filter_compound::fill(), tod_manager::get_illuminated_time_of_day(), attack_type::get_specials_and_abilities(), attack_type::modified_attacks(), attack_type::overwrite_special_checking(), unit_type::resistance_against(), and unit::resistance_against().
|
inline |
Definition at line 88 of file unit.hpp.
References cfgs_.
Referenced by append(), append_if(), and attack_type::overwrite_special_checking().
|
inline |
Definition at line 98 of file unit.hpp.
References cfgs_.
Referenced by attack_type::overwrite_special_checking().
|
inline |
Definition at line 93 of file unit.hpp.
References cfgs_.
Referenced by battle_context_unit_stats::battle_context_unit_stats().
|
inline |
std::pair< int, map_location > unit_ability_list::get_extremum | ( | const std::string & | key, |
int | def, | ||
const TComp & | comp | ||
) | const |
Definition at line 605 of file abilities.cpp.
References cfgs_, wfl::formula::evaluate(), loc(), and p.
|
inline |
Definition at line 70 of file unit.hpp.
References get_extremum().
Referenced by unit_abilities::effect::effect(), tod_manager::get_illuminated_time_of_day(), attack_type::modified_attacks(), unit_type::resistance_against(), and unit::resistance_against().
|
inline |
Definition at line 104 of file unit.hpp.
References loc_.
Referenced by unit_abilities::effect::effect(), and get_extremum().
|
inline |
Definition at line 74 of file unit.hpp.
References get_extremum().
Referenced by unit_abilities::effect::effect(), and tod_manager::get_illuminated_time_of_day().
|
private |
Definition at line 126 of file unit.hpp.
Referenced by append(), append_if(), back(), begin(), emplace_back(), empty(), end(), erase(), front(), and get_extremum().
|
private |