The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | List of all members
unit_ability Struct Reference

Data typedef for unit_ability_list. More...

#include <unit.hpp>

Public Member Functions

 unit_ability (const config *ability_cfg, map_location student_loc, map_location teacher_loc)
 

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...
 
const configability_cfg
 The contents of the ability tag, never nullptr. More...
 

Detailed Description

Data typedef for unit_ability_list.

Definition at line 37 of file unit.hpp.

Constructor & Destructor Documentation

◆ unit_ability()

unit_ability::unit_ability ( const config ability_cfg,
map_location  student_loc,
map_location  teacher_loc 
)
inline

Definition at line 39 of file unit.hpp.

Member Data Documentation

◆ ability_cfg

const config* unit_ability::ability_cfg

The contents of the ability tag, never nullptr.

Definition at line 59 of file unit.hpp.

Referenced by battle_context_unit_stats::battle_context_unit_stats(), attack_type::get_specials_and_abilities(), and attack_type::overwrite_special_overwriter().

◆ student_loc

map_location unit_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 unit_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 52 of file unit.hpp.

◆ teacher_loc

map_location unit_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 57 of file unit.hpp.


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