#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 |
| std::size_t | size () |
| 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 105 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 117 of file unit.hpp.
References begin(), cfgs_, and end().
Referenced by attack_type::get_weapon_ability().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 100 of file unit.hpp.
References cfgs_.
Referenced by unit::get_abilities(), attack_type::get_specials(), and unit_type::resistance_against().
|
inline |
Definition at line 89 of file unit.hpp.
References cfgs_.
Referenced by battle_context_unit_stats::battle_context_unit_stats(), attack_type::damage_types(), unit::defense_modifier(), attack_type::effective_damage_type(), 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(), attack_type::overwrite_special_overwriter(), unit_type::resistance_against(), and unit::resistance_value().
|
inline |
|
inline |
|
inline |
Definition at line 90 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 744 of file abilities.cpp.
References wfl::variant::as_int(), wfl::formula::evaluate(), loc, and p.
|
inline |
Definition at line 67 of file unit.hpp.
References get_extremum().
Referenced by tod_manager::get_illuminated_time_of_day(), attack_type::modified_attacks(), and unit_type::resistance_against().
|
inline |
Definition at line 102 of file unit.hpp.
References loc_.
Referenced by unit_abilities::effect::effect().
|
inline |
Definition at line 71 of file unit.hpp.
References get_extremum().
Referenced by tod_manager::get_illuminated_time_of_day().
|
inline |
Definition at line 94 of file unit.hpp.
References cfgs_.
Referenced by attack_type::overwrite_special_overwriter().
|
private |
|
private |