#include <goal.hpp>


Public Member Functions | |
| protect_goal (readonly_context &context, const config &cfg, bool protect_only_own_unit, bool protect_unit) | |
| virtual void | add_targets (std::back_insert_iterator< std::vector< target > > target_list) |
| virtual void | on_create () |
Private Member Functions | |
| double | value () |
Private Attributes | |
| boost::shared_ptr< terrain_filter > | filter_ptr_ |
| bool | protect_only_own_unit_ |
| bool | protect_unit_ |
| int | radius_ |
| double | value_ |
Definition at line 118 of file goal.hpp.
| ai::protect_goal::protect_goal | ( | readonly_context & | context, | |
| const config & | cfg, | |||
| bool | protect_only_own_unit, | |||
| bool | protect_unit | |||
| ) |
| void ai::protect_goal::add_targets | ( | std::back_insert_iterator< std::vector< target > > | target_list | ) | [virtual] |
Reimplemented from ai::goal.
Definition at line 225 of file goal.cpp.
References ai::goal::active(), ai::goal::cfg_, config::child(), ai::readonly_context_proxy::current_team(), DBG_AI_GOAL, gui2::distance(), distance_between(), filter_ptr_, unit::get_location(), ai::side_context_proxy::get_side(), unit::invisible(), team::is_enemy(), LOG_AI_GOAL, unit::matches_filter(), protect_only_own_unit_, protect_unit_, radius_, unit::side(), resources::units, and value_.

| void ai::protect_goal::on_create | ( | ) | [virtual] |
Reimplemented from ai::goal.
Definition at line 193 of file goal.cpp.
References ai::goal::cfg_, config::child(), ERR_AI_GOAL, filter_ptr_, config::get(), lexical_cast(), radius_, resources::units, and value_.

| double ai::protect_goal::value | ( | ) | [inline, private] |
boost::shared_ptr<terrain_filter> ai::protect_goal::filter_ptr_ [private] |
Definition at line 135 of file goal.hpp.
Referenced by add_targets(), and on_create().
bool ai::protect_goal::protect_only_own_unit_ [private] |
Definition at line 136 of file goal.hpp.
Referenced by add_targets().
bool ai::protect_goal::protect_unit_ [private] |
Definition at line 137 of file goal.hpp.
Referenced by add_targets().
int ai::protect_goal::radius_ [private] |
Definition at line 138 of file goal.hpp.
Referenced by add_targets(), and on_create().
double ai::protect_goal::value_ [private] |
Definition at line 139 of file goal.hpp.
Referenced by add_targets(), on_create(), and value().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:28 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |