The Battle for Wesnoth  1.15.6+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 (differnt from student because of [afect_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 52 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 54 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 70 of file unit.hpp.

Referenced by battle_context_unit_stats::battle_context_unit_stats().

◆ 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 assiming 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 65 of file unit.hpp.

Referenced by attack_type::add_formula_context().

◆ teacher_loc

map_location unit_ability::teacher_loc

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

Definition at line 68 of file unit.hpp.

Referenced by attack_type::add_formula_context().


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