The Battle for Wesnoth  1.19.17+dev
Public Member Functions | Public Attributes | Private Attributes | List of all members
active_ability Struct Reference

Data typedef for active_ability_list. More...

#include <unit.hpp>

Public Member Functions

 active_ability (const ability_ptr &p_ability, map_location student_loc, map_location teacher_loc)
 
const configability_cfg () const
 
const unit_ability_tability () const
 

Public Attributes

map_location student_loc
 Used by the formula in the ability. More...
 
map_location teacher_loc
 The location of the teacher, that is the unit who owns the ability tags (different from student because of [affect_adjacent]) More...
 

Private Attributes

const_ability_ptr p_ability_
 The contents of the ability tag, never nullptr. More...
 

Detailed Description

Data typedef for active_ability_list.

Definition at line 36 of file unit.hpp.

Constructor & Destructor Documentation

◆ active_ability()

active_ability::active_ability ( const ability_ptr p_ability,
map_location  student_loc,
map_location  teacher_loc 
)
inline

Definition at line 38 of file unit.hpp.

Member Function Documentation

◆ ability()

const unit_ability_t& active_ability::ability ( ) const
inline

Definition at line 59 of file unit.hpp.

References p_ability_.

Referenced by attack_type::get_specials_and_abilities().

◆ ability_cfg()

const config& active_ability::ability_cfg ( ) const
inline

Member Data Documentation

◆ p_ability_

const_ability_ptr active_ability::p_ability_
private

The contents of the ability tag, never nullptr.

Definition at line 62 of file unit.hpp.

Referenced by ability(), and ability_cfg().

◆ student_loc

map_location active_ability::student_loc

Used by the formula in the ability.

The REAL location of the student (not the 'we are assuming the student is at this position' location) once active_ability_list can contain abilities from different 'students', as it contains abilities from a unit aswell from its opponents (abilities with apply_to= opponent)

Definition at line 51 of file unit.hpp.

◆ teacher_loc

map_location active_ability::teacher_loc

The location of the teacher, that is the unit who owns the ability tags (different from student because of [affect_adjacent])

Definition at line 56 of file unit.hpp.


The documentation for this struct was generated from the following file: