14 #ifndef UNIT_ATTACK_TYPE_H_INCLUDED
15 #define UNIT_ATTACK_TYPE_H_INCLUDED
71 std::vector<std::pair<t_string, t_string> >
special_tooltips(std::vector<bool> *active_list=
nullptr)
const;
74 bool attacking,
const attack_type *other_attack)
const;
80 unsigned & max_attacks)
const;
102 bool include_backstab=
true)
const;
const t_string & name() const
bool apply_modification(const config &cfg)
Modifies *this using the specifications in cfg, but only if *this matches cfg viewed as a filter...
bool matches_filter(const config &filter) const
Returns whether or not *this matches the given filter.
void set_specials_context(const map_location &unit_loc, const map_location &other_loc, bool attacking, const attack_type *other_attack) const
Sets the context under which specials will be checked for being active.
attack_type(const config &cfg)
double attack_weight() const
int modified_damage(bool is_backstab) const
Returns the damage per attack of this weapon, considering specials.
int movement_used() const
void set_specials_context_for_listing() const
void set_num_attacks(int value)
std::string weapon_specials(bool only_active=false, bool is_backstab=false) const
Returns a comma-separated string of active names for the specials of *this.
const std::string & icon() const
Definitions for the interface to Wesnoth Markup Language (WML).
bool get_special_bool(const std::string &special, bool simple_check=false) const
Returns whether or not *this has a special with a tag or id equal to special.
void set_name(const t_string &value)
void write(config &cfg) const
GLsizei const GLfloat * value
const config specials() const
Templates and utility-routines for strings and numbers.
const std::string & id() const
const std::string & type() const
void set_defense_weight(double value)
void set_specials(config value)
bool special_active(const config &special, AFFECTS whom, bool include_backstab=true) const
Returns whether or not the given special is active for the specified unit, based on the current conte...
Encapsulates the map of the game.
void set_damage(int value)
const std::string & range() const
void modified_attacks(bool is_backstab, unsigned &min_attacks, unsigned &max_attacks) const
Calculates the number of attacks this weapon has, considering specials.
~attack_type()
Default implementation, but defined out-of-line for efficiency reasons.
unit_ability_list get_specials(const std::string &special) const
Returns the currently active specials as an ability list, given the current context (see set_specials...
std::string accuracy_parry_description() const
bool describe_modification(const config &cfg, std::string *description)
Trimmed down version of apply_modification(), with no modifications actually made.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
void set_range(const std::string &value)
void set_parry(int value)
void set_icon(const std::string &value)
double defense_weight() const
void set_movement_used(int value)
A config object defines a single node in a WML file, with access to child nodes.
const attack_type * other_attack_
void set_accuracy(int value)
GLsizei const GLcharARB ** string
void set_attack_weight(double value)
std::vector< std::pair< t_string, t_string > > special_tooltips(std::vector< bool > *active_list=nullptr) const
Returns a vector of names and descriptions for the specials of *this.
void set_type(const std::string &value)