The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
ai::readonly_context_proxy Class Reference

#include <contexts.hpp>

Inheritance diagram for ai::readonly_context_proxy:
Inheritance graph

Public Member Functions

 readonly_context_proxy ()
 
virtual ~readonly_context_proxy ()
 
void init_readonly_context_proxy (readonly_context &target)
 
virtual readonly_contextget_readonly_context ()
 
virtual void on_readonly_context_create ()
 
virtual const teamcurrent_team () const
 
virtual void diagnostic (const std::string &msg)
 
virtual void log_message (const std::string &msg)
 
virtual attack_result_ptr check_attack_action (const map_location &attacker_loc, const map_location &defender_loc, int attacker_weapon)
 
virtual move_result_ptr check_move_action (const map_location &from, const map_location &to, bool remove_movement=true, bool unreach_is_ok=false)
 
virtual recall_result_ptr check_recall_action (const std::string &id, const map_location &where=map_location::null_location(), const map_location &from=map_location::null_location())
 
virtual recruit_result_ptr check_recruit_action (const std::string &unit_name, const map_location &where=map_location::null_location(), const map_location &from=map_location::null_location())
 
virtual stopunit_result_ptr check_stopunit_action (const map_location &unit_location, bool remove_movement=true, bool remove_attacks=false)
 
virtual synced_command_result_ptr check_synced_command_action (const std::string &lua_code, const map_location &location=map_location::null_location())
 
virtual void calculate_possible_moves (std::map< map_location, pathfind::paths > &possible_moves, move_map &srcdst, move_map &dstsrc, bool enemy, bool assume_full_movement=false, const terrain_filter *remove_destinations=nullptr) const
 
virtual void calculate_moves (const unit_map &units, std::map< map_location, pathfind::paths > &possible_moves, move_map &srcdst, move_map &dstsrc, bool enemy, bool assume_full_movement=false, const terrain_filter *remove_destinations=nullptr, bool see_all=false) const
 
virtual const game_infoget_info () const
 
virtual void raise_user_interact () const
 
virtual int get_recursion_count () const
 Get the value of the recursion counter. More...
 
defensive_position const & best_defensive_position (const map_location &unit, const move_map &dstsrc, const move_map &srcdst, const move_map &enemy_dstsrc) const
 
virtual std::map< map_location,
defensive_position > & 
defensive_position_cache () const
 
virtual const
unit_advancements_aspect
get_advancements () const
 
virtual double get_aggression () const
 
virtual int get_attack_depth () const
 
virtual const aspect_mapget_aspects () const
 
virtual aspect_mapget_aspects ()
 
virtual void add_aspects (std::vector< aspect_ptr > &aspects)
 
virtual void add_facet (const std::string &id, const config &cfg) const
 
virtual const attacks_vectorget_attacks () const
 
virtual const variantget_attacks_as_variant () const
 
virtual const terrain_filterget_avoid () const
 
virtual double get_caution () const
 
virtual const move_mapget_dstsrc () const
 
virtual const move_mapget_enemy_dstsrc () const
 
virtual const moves_mapget_enemy_possible_moves () const
 
virtual const move_mapget_enemy_srcdst () const
 
virtual engine_ptr get_engine_by_cfg (const config &cfg)
 get engine by cfg, creating it if it is not created yet but known More...
 
virtual const std::vector
< engine_ptr > & 
get_engines () const
 
virtual std::vector< engine_ptr > & get_engines ()
 
virtual std::string get_grouping () const
 
virtual const std::vector
< goal_ptr > & 
get_goals () const
 
virtual std::vector< goal_ptr > & get_goals ()
 
virtual double get_leader_aggression () const
 
virtual config get_leader_goal () const
 
virtual bool get_leader_ignores_keep () const
 
virtual double get_leader_value () const
 
virtual bool get_passive_leader () const
 
virtual bool get_passive_leader_shares_keep () const
 
virtual const moves_mapget_possible_moves () const
 
virtual double power_projection (const map_location &loc, const move_map &dstsrc) const
 Function which finds how much 'power' a side can attack a certain location with. More...
 
virtual const std::vector
< unit_ptr > & 
get_recall_list () const
 
virtual double get_recruitment_diversity () const
 
virtual const config get_recruitment_instructions () const
 
virtual const std::vector
< std::string
get_recruitment_more () const
 
virtual const std::vector
< std::string
get_recruitment_pattern () const
 
virtual int get_recruitment_randomness () const
 
virtual const config get_recruitment_save_gold () const
 
virtual const move_mapget_srcdst () const
 
virtual double get_scout_village_targeting () const
 
virtual bool get_simple_targeting () const
 
virtual bool get_support_villages () const
 
virtual double get_village_value () const
 
virtual int get_villages_per_scout () const
 
virtual bool is_active (const std::string &time_of_day, const std::string &turns) const
 
virtual bool is_dst_src_valid_lua () const
 
virtual bool is_dst_src_enemy_valid_lua () const
 
virtual bool is_src_dst_valid_lua () const
 
virtual bool is_src_dst_enemy_valid_lua () const
 
virtual void invalidate_defensive_position_cache () const
 
virtual void invalidate_move_maps () const
 
virtual void invalidate_keeps_cache () const
 
virtual const std::set
< map_location > & 
keeps () const
 
virtual bool leader_can_reach_keep () const
 
virtual const map_locationnearest_keep (const map_location &loc) const
 
virtual void recalculate_move_maps () const
 
virtual void recalculate_move_maps_enemy () const
 
virtual void set_dst_src_valid_lua ()
 
virtual void set_dst_src_enemy_valid_lua ()
 
virtual void set_src_dst_valid_lua ()
 
virtual void set_src_dst_enemy_valid_lua ()
 
virtual const map_locationsuitable_keep (const map_location &leader_location, const pathfind::paths &leader_paths)
 get most suitable keep for leader - nearest free that can be reached in 1 turn, if none - return nearest occupied that can be reached in 1 turn, if none - return nearest keep, if none - return null_location More...
 
virtual config to_readonly_context_config () const
 serialize to config More...
 
virtual unit_stats_cache_tunit_stats_cache () const
 
- Public Member Functions inherited from ai::readonly_context
 readonly_context ()
 
virtual ~readonly_context ()
 
- Public Member Functions inherited from ai::side_context
virtual ~side_context ()
 empty destructor More...
 
 side_context ()
 empty constructor More...
 
- Public Member Functions inherited from ai::side_context_proxy
 side_context_proxy ()
 
virtual ~side_context_proxy ()
 
void init_side_context_proxy (side_context &target)
 
virtual side_number get_side () const
 Get the side number. More...
 
virtual void set_side (side_number side)
 Set the side number. More...
 
virtual side_contextget_side_context ()
 unwrap More...
 
virtual config to_side_context_config () const
 serialize this context to config More...
 

Private Attributes

readonly_contexttarget_
 

Additional Inherited Members

- Public Types inherited from ai::readonly_context
typedef std::map< std::pair
< map_location, const
unit_type * >, std::pair
< battle_context_unit_stats,
battle_context_unit_stats > > 
unit_stats_cache_t
 

Detailed Description

Definition at line 512 of file contexts.hpp.

Constructor & Destructor Documentation

ai::readonly_context_proxy::readonly_context_proxy ( )
inline

Definition at line 514 of file contexts.hpp.

virtual ai::readonly_context_proxy::~readonly_context_proxy ( )
inlinevirtual

Definition at line 519 of file contexts.hpp.

Member Function Documentation

virtual void ai::readonly_context_proxy::add_aspects ( std::vector< aspect_ptr > &  aspects)
inlinevirtual

Implements ai::readonly_context.

Definition at line 665 of file contexts.hpp.

References ai::readonly_context::add_aspects(), and target_.

virtual void ai::readonly_context_proxy::add_facet ( const std::string id,
const config cfg 
) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 671 of file contexts.hpp.

References ai::readonly_context::add_facet(), and target_.

defensive_position const& ai::readonly_context_proxy::best_defensive_position ( const map_location unit,
const move_map dstsrc,
const move_map srcdst,
const move_map enemy_dstsrc 
) const
inlinevirtual
virtual void ai::readonly_context_proxy::calculate_moves ( const unit_map units,
std::map< map_location, pathfind::paths > &  possible_moves,
move_map srcdst,
move_map dstsrc,
bool  enemy,
bool  assume_full_movement = false,
const terrain_filter remove_destinations = nullptr,
bool  see_all = false 
) const
inlinevirtual
virtual void ai::readonly_context_proxy::calculate_possible_moves ( std::map< map_location, pathfind::paths > &  possible_moves,
move_map srcdst,
move_map dstsrc,
bool  enemy,
bool  assume_full_movement = false,
const terrain_filter remove_destinations = nullptr 
) const
inlinevirtual
virtual attack_result_ptr ai::readonly_context_proxy::check_attack_action ( const map_location attacker_loc,
const map_location defender_loc,
int  attacker_weapon 
)
inlinevirtual
virtual move_result_ptr ai::readonly_context_proxy::check_move_action ( const map_location from,
const map_location to,
bool  remove_movement = true,
bool  unreach_is_ok = false 
)
inlinevirtual
virtual recall_result_ptr ai::readonly_context_proxy::check_recall_action ( const std::string id,
const map_location where = map_location::null_location(),
const map_location from = map_location::null_location() 
)
inlinevirtual
virtual recruit_result_ptr ai::readonly_context_proxy::check_recruit_action ( const std::string unit_name,
const map_location where = map_location::null_location(),
const map_location from = map_location::null_location() 
)
inlinevirtual
virtual stopunit_result_ptr ai::readonly_context_proxy::check_stopunit_action ( const map_location unit_location,
bool  remove_movement = true,
bool  remove_attacks = false 
)
inlinevirtual
virtual synced_command_result_ptr ai::readonly_context_proxy::check_synced_command_action ( const std::string lua_code,
const map_location location = map_location::null_location() 
)
inlinevirtual

Implements ai::readonly_context.

Definition at line 583 of file contexts.hpp.

References ai::readonly_context::check_synced_command_action(), and target_.

virtual const team& ai::readonly_context_proxy::current_team ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 539 of file contexts.hpp.

References ai::readonly_context::current_team(), and target_.

Referenced by ai::ai_default_rca::move_to_targets_phase::access_points(), ai::protect_goal::add_targets(), ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::ai_default_rca::move_to_targets_phase::choose_move(), game_logic::attack_map_callable::collect_possible_attacks(), ai::default_ai_context_impl::count_free_hexes_in_castle(), ai::default_recruitment::recruitment::do_combat_analysis(), ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), game_logic::attack_candidate_action::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::default_recruitment::recruitment::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::evaluate(), ai::ai_default_rca::get_villages_phase::execute(), ai::default_recruitment::recruitment::execute(), ai::default_ai_context_impl::find_targets(), ai::ai_default_rca::get_villages_phase::find_villages(), ai::formula_ai::get_allowed_teleports(), ai::default_recruitment::recruitment::get_appropriate_recall(), ai::default_recruitment::recruitment::get_cheapest_unit_cost_for_leader(), ai::default_recruitment::recruitment::get_unit_ratio(), ai::formula_ai::get_value(), ai::default_recruitment::recruitment::is_enemy_in_radius(), ai::formula_ai::shortest_path_calculator(), ai::default_recruitment::recruitment::update_important_hexes(), and ai::default_recruitment::recruitment::update_state().

virtual std::map<map_location,defensive_position>& ai::readonly_context_proxy::defensive_position_cache ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 629 of file contexts.hpp.

References ai::readonly_context::defensive_position_cache(), and target_.

virtual void ai::readonly_context_proxy::diagnostic ( const std::string msg)
inlinevirtual

Implements ai::readonly_context.

Definition at line 544 of file contexts.hpp.

References ai::readonly_context::diagnostic(), and target_.

virtual const unit_advancements_aspect& ai::readonly_context_proxy::get_advancements ( ) const
inlinevirtual
virtual double ai::readonly_context_proxy::get_aggression ( ) const
inlinevirtual
virtual const aspect_map& ai::readonly_context_proxy::get_aspects ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 653 of file contexts.hpp.

References ai::readonly_context::get_aspects(), and target_.

Referenced by ai::ai_composite::on_create().

virtual aspect_map& ai::readonly_context_proxy::get_aspects ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 659 of file contexts.hpp.

References ai::readonly_context::get_aspects(), and target_.

virtual int ai::readonly_context_proxy::get_attack_depth ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 647 of file contexts.hpp.

References ai::readonly_context::get_attack_depth(), and target_.

Referenced by ai::formula_ai::get_value().

virtual const attacks_vector& ai::readonly_context_proxy::get_attacks ( ) const
inlinevirtual
virtual const variant& ai::readonly_context_proxy::get_attacks_as_variant ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 685 of file contexts.hpp.

References ai::readonly_context::get_attacks_as_variant(), and target_.

Referenced by ai::formula_ai::get_value().

virtual const terrain_filter& ai::readonly_context_proxy::get_avoid ( ) const
inlinevirtual
virtual double ai::readonly_context_proxy::get_caution ( ) const
inlinevirtual
virtual const move_map& ai::readonly_context_proxy::get_dstsrc ( ) const
inlinevirtual
virtual const move_map& ai::readonly_context_proxy::get_enemy_dstsrc ( ) const
inlinevirtual
virtual const moves_map& ai::readonly_context_proxy::get_enemy_possible_moves ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 715 of file contexts.hpp.

References ai::readonly_context::get_enemy_possible_moves(), and target_.

virtual const move_map& ai::readonly_context_proxy::get_enemy_srcdst ( ) const
inlinevirtual
virtual engine_ptr ai::readonly_context_proxy::get_engine_by_cfg ( const config cfg)
inlinevirtual

get engine by cfg, creating it if it is not created yet but known

Implements ai::readonly_context.

Definition at line 727 of file contexts.hpp.

References ai::readonly_context::get_engine_by_cfg(), and target_.

Referenced by ai::ai_composite::evaluate(), and ai::ai_composite::on_create().

virtual const std::vector<engine_ptr>& ai::readonly_context_proxy::get_engines ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 733 of file contexts.hpp.

References ai::readonly_context::get_engines(), and target_.

Referenced by ai::ai_composite::on_create().

virtual std::vector<engine_ptr>& ai::readonly_context_proxy::get_engines ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 739 of file contexts.hpp.

References ai::readonly_context::get_engines(), and target_.

virtual const std::vector<goal_ptr>& ai::readonly_context_proxy::get_goals ( ) const
inlinevirtual
virtual std::vector<goal_ptr>& ai::readonly_context_proxy::get_goals ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 757 of file contexts.hpp.

References ai::readonly_context::get_goals(), and target_.

virtual std::string ai::readonly_context_proxy::get_grouping ( ) const
inlinevirtual
virtual const game_info& ai::readonly_context_proxy::get_info ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 605 of file contexts.hpp.

References ai::readonly_context::get_info(), and target_.

virtual double ai::readonly_context_proxy::get_leader_aggression ( ) const
inlinevirtual
virtual config ai::readonly_context_proxy::get_leader_goal ( ) const
inlinevirtual
virtual bool ai::readonly_context_proxy::get_leader_ignores_keep ( ) const
inlinevirtual
virtual double ai::readonly_context_proxy::get_leader_value ( ) const
inlinevirtual
virtual bool ai::readonly_context_proxy::get_passive_leader ( ) const
inlinevirtual
virtual bool ai::readonly_context_proxy::get_passive_leader_shares_keep ( ) const
inlinevirtual
virtual const moves_map& ai::readonly_context_proxy::get_possible_moves ( ) const
inlinevirtual
virtual readonly_context& ai::readonly_context_proxy::get_readonly_context ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 527 of file contexts.hpp.

References ai::readonly_context::get_readonly_context(), and target_.

virtual const std::vector<unit_ptr>& ai::readonly_context_proxy::get_recall_list ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 812 of file contexts.hpp.

References ai::readonly_context::get_recall_list(), and target_.

virtual double ai::readonly_context_proxy::get_recruitment_diversity ( ) const
inlinevirtual
virtual const config ai::readonly_context_proxy::get_recruitment_instructions ( ) const
inlinevirtual
virtual const std::vector<std::string> ai::readonly_context_proxy::get_recruitment_more ( ) const
inlinevirtual
virtual const std::vector<std::string> ai::readonly_context_proxy::get_recruitment_pattern ( ) const
inlinevirtual
virtual int ai::readonly_context_proxy::get_recruitment_randomness ( ) const
inlinevirtual
virtual const config ai::readonly_context_proxy::get_recruitment_save_gold ( ) const
inlinevirtual
virtual int ai::readonly_context_proxy::get_recursion_count ( ) const
inlinevirtual
virtual double ai::readonly_context_proxy::get_scout_village_targeting ( ) const
inlinevirtual
virtual bool ai::readonly_context_proxy::get_simple_targeting ( ) const
inlinevirtual
virtual const move_map& ai::readonly_context_proxy::get_srcdst ( ) const
inlinevirtual
virtual bool ai::readonly_context_proxy::get_support_villages ( ) const
inlinevirtual
virtual double ai::readonly_context_proxy::get_village_value ( ) const
inlinevirtual
virtual int ai::readonly_context_proxy::get_villages_per_scout ( ) const
inlinevirtual
void ai::readonly_context_proxy::init_readonly_context_proxy ( readonly_context target)
inline
virtual void ai::readonly_context_proxy::invalidate_defensive_position_cache ( ) const
inlinevirtual
virtual void ai::readonly_context_proxy::invalidate_keeps_cache ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 928 of file contexts.hpp.

References ai::readonly_context::invalidate_keeps_cache(), and target_.

Referenced by ai::ai_composite::new_turn().

virtual void ai::readonly_context_proxy::invalidate_move_maps ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 922 of file contexts.hpp.

References ai::readonly_context::invalidate_move_maps(), and target_.

virtual bool ai::readonly_context_proxy::is_active ( const std::string time_of_day,
const std::string turns 
) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 891 of file contexts.hpp.

References ai::readonly_context::is_active(), and target_.

Referenced by ai::goal::active(), and ai::aspect::active().

virtual bool ai::readonly_context_proxy::is_dst_src_enemy_valid_lua ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 901 of file contexts.hpp.

References ai::readonly_context::is_dst_src_enemy_valid_lua(), and target_.

virtual bool ai::readonly_context_proxy::is_dst_src_valid_lua ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 896 of file contexts.hpp.

References ai::readonly_context::is_dst_src_valid_lua(), and target_.

virtual bool ai::readonly_context_proxy::is_src_dst_enemy_valid_lua ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 911 of file contexts.hpp.

References ai::readonly_context::is_src_dst_enemy_valid_lua(), and target_.

virtual bool ai::readonly_context_proxy::is_src_dst_valid_lua ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 906 of file contexts.hpp.

References ai::readonly_context::is_src_dst_valid_lua(), and target_.

virtual const std::set<map_location>& ai::readonly_context_proxy::keeps ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 934 of file contexts.hpp.

References ai::readonly_context::keeps(), and target_.

virtual bool ai::readonly_context_proxy::leader_can_reach_keep ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 940 of file contexts.hpp.

References ai::readonly_context::leader_can_reach_keep(), and target_.

virtual void ai::readonly_context_proxy::log_message ( const std::string msg)
inlinevirtual

Implements ai::readonly_context.

Definition at line 549 of file contexts.hpp.

References ai::readonly_context::log_message(), and target_.

virtual const map_location& ai::readonly_context_proxy::nearest_keep ( const map_location loc) const
inlinevirtual
virtual void ai::readonly_context_proxy::on_readonly_context_create ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 533 of file contexts.hpp.

References ai::readonly_context::on_readonly_context_create(), and target_.

virtual double ai::readonly_context_proxy::power_projection ( const map_location loc,
const move_map dstsrc 
) const
inlinevirtual

Function which finds how much 'power' a side can attack a certain location with.

This is basically the maximum hp of damage that can be inflicted upon a unit on loc by full-health units, multiplied by the defense these units will have. (if 'use_terrain' is false, then it will be multiplied by 0.5)

Example: 'loc' can be reached by two units, one of whom has a 10-3 attack and has 48/48 hp, and can defend at 40% on the adjacent grassland. The other has a 8-2 attack, and has 30/40 hp, and can defend at 60% on the adjacent mountain. The rating will be 10*3*1.0*0.4 + 8*2*0.75*0.6 = 19.2

Implements ai::readonly_context.

Definition at line 806 of file contexts.hpp.

References ai::readonly_context::power_projection(), and target_.

Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move(), ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::ai_default_rca::get_villages_phase::execute(), ai::default_recruitment::recruitment::execute(), ai::default_ai_context_impl::find_targets(), ai::ai_default_rca::get_villages_phase::find_villages(), ai::ai_default_rca::move_to_targets_phase::should_retreat(), and ai::ai_default_rca::retreat_phase::should_retreat().

virtual void ai::readonly_context_proxy::raise_user_interact ( ) const
inlinevirtual
virtual void ai::readonly_context_proxy::recalculate_move_maps ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 952 of file contexts.hpp.

References ai::readonly_context::recalculate_move_maps(), and target_.

Referenced by ai::ai_composite::new_turn().

virtual void ai::readonly_context_proxy::recalculate_move_maps_enemy ( ) const
inlinevirtual

Implements ai::readonly_context.

Definition at line 958 of file contexts.hpp.

References ai::readonly_context::recalculate_move_maps_enemy(), and target_.

virtual void ai::readonly_context_proxy::set_dst_src_enemy_valid_lua ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 968 of file contexts.hpp.

References ai::readonly_context::set_dst_src_enemy_valid_lua(), and target_.

virtual void ai::readonly_context_proxy::set_dst_src_valid_lua ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 963 of file contexts.hpp.

References ai::readonly_context::set_dst_src_valid_lua(), and target_.

virtual void ai::readonly_context_proxy::set_src_dst_enemy_valid_lua ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 978 of file contexts.hpp.

References ai::readonly_context::set_src_dst_enemy_valid_lua(), and target_.

virtual void ai::readonly_context_proxy::set_src_dst_valid_lua ( )
inlinevirtual

Implements ai::readonly_context.

Definition at line 973 of file contexts.hpp.

References ai::readonly_context::set_src_dst_valid_lua(), and target_.

virtual const map_location& ai::readonly_context_proxy::suitable_keep ( const map_location leader_location,
const pathfind::paths leader_paths 
)
inlinevirtual

get most suitable keep for leader - nearest free that can be reached in 1 turn, if none - return nearest occupied that can be reached in 1 turn, if none - return nearest keep, if none - return null_location

Implements ai::readonly_context.

Definition at line 983 of file contexts.hpp.

References ai::readonly_context::suitable_keep(), and target_.

Referenced by ai::ai_default_rca::move_leader_to_keep_phase::evaluate().

virtual config ai::readonly_context_proxy::to_readonly_context_config ( ) const
inlinevirtual

serialize to config

Implements ai::readonly_context.

Definition at line 989 of file contexts.hpp.

References target_, and ai::readonly_context::to_readonly_context_config().

virtual unit_stats_cache_t& ai::readonly_context_proxy::unit_stats_cache ( ) const
inlinevirtual

Member Data Documentation

readonly_context* ai::readonly_context_proxy::target_
private

Definition at line 1002 of file contexts.hpp.

Referenced by add_aspects(), add_facet(), best_defensive_position(), calculate_moves(), calculate_possible_moves(), check_attack_action(), check_move_action(), check_recall_action(), check_recruit_action(), check_stopunit_action(), check_synced_command_action(), current_team(), defensive_position_cache(), diagnostic(), get_advancements(), get_aggression(), get_aspects(), get_attack_depth(), get_attacks(), get_attacks_as_variant(), get_avoid(), get_caution(), get_dstsrc(), get_enemy_dstsrc(), get_enemy_possible_moves(), get_enemy_srcdst(), get_engine_by_cfg(), get_engines(), get_goals(), get_grouping(), get_info(), get_leader_aggression(), get_leader_goal(), get_leader_ignores_keep(), get_leader_value(), get_passive_leader(), get_passive_leader_shares_keep(), get_possible_moves(), get_readonly_context(), get_recall_list(), get_recruitment_diversity(), get_recruitment_instructions(), get_recruitment_more(), get_recruitment_pattern(), get_recruitment_randomness(), get_recruitment_save_gold(), get_recursion_count(), get_scout_village_targeting(), get_simple_targeting(), get_srcdst(), get_support_villages(), get_village_value(), get_villages_per_scout(), init_readonly_context_proxy(), invalidate_defensive_position_cache(), invalidate_keeps_cache(), invalidate_move_maps(), is_active(), is_dst_src_enemy_valid_lua(), is_dst_src_valid_lua(), is_src_dst_enemy_valid_lua(), is_src_dst_valid_lua(), keeps(), leader_can_reach_keep(), log_message(), nearest_keep(), on_readonly_context_create(), power_projection(), raise_user_interact(), recalculate_move_maps(), recalculate_move_maps_enemy(), set_dst_src_enemy_valid_lua(), set_dst_src_valid_lua(), set_src_dst_enemy_valid_lua(), set_src_dst_valid_lua(), suitable_keep(), to_readonly_context_config(), and unit_stats_cache().


The documentation for this class was generated from the following file: