mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 02:02:36 +00:00
added a few comments
This commit is contained in:
parent
d40a1f336f
commit
2dfef114f4
@ -158,6 +158,7 @@ class unit
|
||||
bool has_moved() const;
|
||||
bool has_goto() const;
|
||||
int emits_zoc() const;
|
||||
/* cfg: standard unit filter */
|
||||
bool matches_filter(const config& cfg,const gamemap::location& loc,bool use_flat_tod=false) const;
|
||||
void add_overlay(const std::string& overlay);
|
||||
void remove_overlay(const std::string& overlay);
|
||||
@ -274,10 +275,12 @@ class unit
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* cfg: an ability WML structure
|
||||
*/
|
||||
bool ability_active(const std::string& ability,const config& cfg,const gamemap::location& loc) const;
|
||||
bool ability_affects_adjacent(const std::string& ability,const config& cfg,int dir,const gamemap::location& loc) const;
|
||||
bool ability_affects_self(const std::string& ability,const config& cfg,const gamemap::location& loc) const;
|
||||
|
||||
bool resistance_filter_matches(const config& cfg,const gamemap::location& loc,bool attacker,const attack_type& damage_type) const;
|
||||
|
||||
config cfg_;
|
||||
|
@ -263,6 +263,11 @@ std::vector<std::string> unit::ability_tooltips(const gamemap::location& loc) co
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* cfg: an ability WML structure
|
||||
*
|
||||
*/
|
||||
|
||||
bool unit::ability_active(const std::string& ability,const config& cfg,const gamemap::location& loc) const
|
||||
{
|
||||
@ -342,6 +347,11 @@ bool unit::ability_active(const std::string& ability,const config& cfg,const gam
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* cfg: an ability WML structure
|
||||
*
|
||||
*/
|
||||
bool unit::ability_affects_adjacent(const std::string& ability,const config& cfg,int dir,const gamemap::location& loc) const
|
||||
{
|
||||
// wassert("not done" == "done");
|
||||
@ -365,6 +375,11 @@ bool unit::ability_affects_adjacent(const std::string& ability,const config& cfg
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* cfg: an ability WML structure
|
||||
*
|
||||
*/
|
||||
bool unit::ability_affects_self(const std::string& ability,const config& cfg,const gamemap::location& loc) const
|
||||
{
|
||||
if(cfg.child("filter")==NULL) {
|
||||
@ -597,6 +612,11 @@ std::string attack_type::weapon_specials(bool force) const
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* cfg: a weapon special WML structure
|
||||
*
|
||||
*/
|
||||
bool attack_type::special_active(const config& cfg,bool self) const
|
||||
{
|
||||
log_scope("special_active");
|
||||
@ -774,6 +794,11 @@ bool attack_type::special_active(const config& cfg,bool self) const
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* cfg: a weapon special WML structure
|
||||
*
|
||||
*/
|
||||
bool attack_type::special_affects_opponent(const config& cfg) const
|
||||
{
|
||||
log_scope("special_affects_opponent");
|
||||
@ -790,6 +815,11 @@ bool attack_type::special_affects_opponent(const config& cfg) const
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* cfg: a weapon special WML structure
|
||||
*
|
||||
*/
|
||||
bool attack_type::special_affects_self(const config& cfg) const
|
||||
{
|
||||
log_scope("special_affects_self");
|
||||
|
@ -90,6 +90,9 @@ private:
|
||||
const gamestatus* game_status_;
|
||||
const std::vector<team>* teams_;
|
||||
mutable attack_type* other_attack_;
|
||||
/*
|
||||
* cfg: a weapon special WML structure
|
||||
*/
|
||||
bool special_active(const config& cfg,bool self) const;
|
||||
bool special_affects_opponent(const config& cfg) const;
|
||||
bool special_affects_self(const config& cfg) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user