The Battle for Wesnoth  1.19.18+dev
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
unit_abilities::effect Class Reference

#include <abilities.hpp>

Public Types

typedef std::vector< individual_effect >::const_iterator iterator
 
typedef std::vector< individual_effect >::const_iterator const_iterator
 

Public Member Functions

 effect (const active_ability_list &list, int def, const const_attack_ptr &attacker=const_attack_ptr(), EFFECTS wham=EFFECT_DEFAULT)
 
int get_composite_value () const
 
double get_composite_double_value () const
 
const_iterator begin () const
 
const_iterator end () const
 

Private Member Functions

void effect_impl (const active_ability_list &list, int def, const const_attack_ptr &att, EFFECTS wham)
 Part of the constructor, calculates for a group of abilities with equal priority. More...
 

Private Attributes

std::vector< individual_effecteffect_list_
 
int composite_value_
 
double composite_double_value_
 

Detailed Description

Definition at line 351 of file abilities.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 357 of file abilities.hpp.

◆ iterator

Definition at line 356 of file abilities.hpp.

Constructor & Destructor Documentation

◆ effect()

unit_abilities::effect::effect ( const active_ability_list list,
int  def,
const const_attack_ptr attacker = const_attack_ptr(),
EFFECTS  wham = EFFECT_DEFAULT 
)

Definition at line 2027 of file abilities.cpp.

References composite_value_, effect_impl(), i, and active_ability_list::loc().

Member Function Documentation

◆ begin()

const_iterator unit_abilities::effect::begin ( ) const
inline

Definition at line 363 of file abilities.hpp.

References effect_list_.

Referenced by gui2::dialogs::attack_predictions::set_data().

◆ effect_impl()

void unit_abilities::effect::effect_impl ( const active_ability_list list,
int  def,
const const_attack_ptr att,
EFFECTS  wham 
)
private

◆ end()

const_iterator unit_abilities::effect::end ( ) const
inline

Definition at line 365 of file abilities.hpp.

References effect_list_.

Referenced by gui2::dialogs::attack_predictions::set_data().

◆ get_composite_double_value()

double unit_abilities::effect::get_composite_double_value ( ) const
inline

Definition at line 361 of file abilities.hpp.

References composite_double_value_.

Referenced by attack_type::modified_damage().

◆ get_composite_value()

int unit_abilities::effect::get_composite_value ( ) const
inline

Member Data Documentation

◆ composite_double_value_

double unit_abilities::effect::composite_double_value_
private

Definition at line 372 of file abilities.hpp.

Referenced by effect_impl(), and get_composite_double_value().

◆ composite_value_

int unit_abilities::effect::composite_value_
private

Definition at line 371 of file abilities.hpp.

Referenced by effect(), effect_impl(), and get_composite_value().

◆ effect_list_

std::vector<individual_effect> unit_abilities::effect::effect_list_
private

Definition at line 370 of file abilities.hpp.

Referenced by begin(), effect_impl(), and end().


The documentation for this class was generated from the following files: