Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

ai::testing_ai_default::aspect_attacks Class Reference

#include <aspect_attacks.hpp>

Inheritance diagram for ai::testing_ai_default::aspect_attacks:
Inheritance graph
[legend]
Collaboration diagram for ai::testing_ai_default::aspect_attacks:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 aspect_attacks (readonly_context &context, const config &cfg, const std::string &id)
virtual ~aspect_attacks ()
virtual void recalculate () const
virtual config to_config () const

Protected Member Functions

boost::shared_ptr< attacks_vectoranalyze_targets () const
void do_attack_analysis (const map_location &loc, const move_map &srcdst, const move_map &dstsrc, const move_map &fullmove_srcdst, const move_map &fullmove_dstsrc, const move_map &enemy_srcdst, const move_map &enemy_dstsrc, const map_location *tiles, bool *used_locations, std::vector< map_location > &units, std::vector< attack_analysis > &result, attack_analysis &cur_analysis, const team &current_team) const

Static Protected Member Functions

static int rate_terrain (const unit &u, const map_location &loc)

Protected Attributes

config filter_own_
config filter_enemy_

Detailed Description

Definition at line 38 of file aspect_attacks.hpp.


Constructor & Destructor Documentation

ai::testing_ai_default::aspect_attacks::aspect_attacks ( readonly_context context,
const config cfg,
const std::string &  id 
)

Definition at line 43 of file aspect_attacks.cpp.

References config::child(), filter_enemy_, and filter_own_.

Here is the call graph for this function:

ai::testing_ai_default::aspect_attacks::~aspect_attacks (  )  [virtual]

Definition at line 56 of file aspect_attacks.cpp.


Member Function Documentation

boost::shared_ptr< attacks_vector > ai::testing_ai_default::aspect_attacks::analyze_targets (  )  const [protected]
void ai::testing_ai_default::aspect_attacks::do_attack_analysis ( const map_location loc,
const move_map srcdst,
const move_map dstsrc,
const move_map fullmove_srcdst,
const move_map fullmove_dstsrc,
const move_map enemy_srcdst,
const move_map enemy_dstsrc,
const map_location tiles,
bool *  used_locations,
std::vector< map_location > &  units,
std::vector< attack_analysis > &  result,
attack_analysis cur_analysis,
const team current_team 
) const [protected]
int ai::testing_ai_default::aspect_attacks::rate_terrain ( const unit u,
const map_location loc 
) [static, protected]

Definition at line 361 of file aspect_attacks.cpp.

References unit::defense_modifier(), resources::game_map, unit::get_ability_bool(), gamemap::get_terrain(), gamemap::gives_healing(), gamemap::is_village(), map_, unit::side(), resources::teams, gui2::terrain, and village_owner().

Referenced by do_attack_analysis().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::testing_ai_default::aspect_attacks::recalculate (  )  const [virtual]

Implements ai::typesafe_aspect< attacks_vector >.

Definition at line 60 of file aspect_attacks.cpp.

References analyze_targets(), ai::aspect::valid_, and ai::typesafe_aspect< attacks_vector >::value_.

Here is the call graph for this function:

config ai::testing_ai_default::aspect_attacks::to_config (  )  const [virtual]

Reimplemented from ai::aspect.

Definition at line 393 of file aspect_attacks.cpp.

References config::add_child(), config::empty(), filter_enemy_, and filter_own_.

Here is the call graph for this function:


Member Data Documentation

Definition at line 66 of file aspect_attacks.hpp.

Referenced by analyze_targets(), aspect_attacks(), and to_config().

Definition at line 65 of file aspect_attacks.hpp.

Referenced by analyze_targets(), aspect_attacks(), and to_config().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:05 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs