#include <attack_type.hpp>
Private Member Functions | |
| specials_context_t (const specials_context_t &)=delete | |
Private Attributes | |
| std::shared_ptr< const attack_type > | parent |
| bool | was_moved = false |
Friends | |
| class | attack_type |
already added | |
| specials_context_t (const attack_type &weapon, bool attacking) | |
| Initialize weapon specials context for listing. More... | |
| specials_context_t (const attack_type &weapon, const unit_type &self_type, const map_location &loc, bool attacking=true) | |
| Initialize weapon specials context for a unit type. More... | |
| specials_context_t (const attack_type &weapon, const_attack_ptr other_weapon, unit_const_ptr self, unit_const_ptr other, const map_location &self_loc, const map_location &other_loc, bool attacking) | |
| Initialize weapon specials context for a single unit. More... | |
| specials_context_t (const attack_type &weapon, unit_const_ptr self, const map_location &loc, bool attacking) | |
| Initialize weapon specials context for a pair of units. More... | |
| ~specials_context_t () | |
| specials_context_t (specials_context_t &&) | |
Definition at line 417 of file attack_type.hpp.
|
explicitprivate |
Initialize weapon specials context for listing.
Definition at line 1206 of file abilities.cpp.
References attack_type::is_attacker_, and attack_type::is_for_listing_.
|
private |
Initialize weapon specials context for a unit type.
Sets the context under which specials will be checked for being active.
This version is appropriate for theoretical units of a particular type.
| [in] | weapon | The weapon being considered. |
| [in] | self_type | A reference to the type of the unit with this weapon. |
| [in] | loc | The location of the unit with this weapon. |
| [in] | attacking | Whether or not the unit with this weapon is the attacker. |
Definition at line 1194 of file abilities.cpp.
References attack_type::is_attacker_, attack_type::is_for_listing_, loc, map_location::null_location(), attack_type::other_, attack_type::other_attack_, attack_type::other_loc_, attack_type::self_, and attack_type::self_loc_.
|
private |
Initialize weapon specials context for a single unit.
Sets the context under which specials will be checked for being active.
This version is appropriate if both units in a combat are known.
| [in] | weapon | The weapon being considered. |
| [in] | self | A reference to the unit with this weapon. |
| [in] | other | A reference to the other unit in the combat. |
| [in] | unit_loc | The location of the unit with this weapon. |
| [in] | other_loc | The location of the other unit in the combat. |
| [in] | attacking | Whether or not the unit with this weapon is the attacker. |
| [in] | other_attack | The attack used by the other unit. |
Definition at line 1147 of file abilities.cpp.
References attack_type::is_attacker_, attack_type::is_for_listing_, attack_type::other_, attack_type::other_attack_, attack_type::other_loc_, attack_type::self_, and attack_type::self_loc_.
|
private |
Initialize weapon specials context for a pair of units.
Sets the context under which specials will be checked for being active.
This version is appropriate if there is no specific combat being considered.
| [in] | weapon | The weapon being considered. |
| [in] | self | A reference to the unit with this weapon. |
| [in] | loc | The location of the unit with this weapon. |
| [in] | attacking | Whether or not the unit with this weapon is the attacker. |
Definition at line 1174 of file abilities.cpp.
References attack_type::is_attacker_, attack_type::is_for_listing_, loc, map_location::null_location(), attack_type::other_, attack_type::other_attack_, attack_type::other_loc_, attack_type::self_, and attack_type::self_loc_.
|
privatedelete |
| attack_type::specials_context_t::~specials_context_t | ( | ) |
Definition at line 1213 of file abilities.cpp.
References map_location::null_location().
| attack_type::specials_context_t::specials_context_t | ( | attack_type::specials_context_t && | other | ) |
Definition at line 1225 of file abilities.cpp.
|
friend |
Definition at line 419 of file attack_type.hpp.
|
private |
Definition at line 418 of file attack_type.hpp.
|
private |
Definition at line 432 of file attack_type.hpp.