#include <contexts.hpp>
Public Member Functions | |
readonly_context_proxy () | |
virtual | ~readonly_context_proxy () |
void | init_readonly_context_proxy (readonly_context &target) |
virtual readonly_context & | get_readonly_context () |
virtual void | on_readonly_context_create () |
virtual const team & | current_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_info & | get_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_map & | get_aspects () const |
virtual aspect_map & | get_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_vector & | get_attacks () const |
virtual const variant & | get_attacks_as_variant () const |
virtual const terrain_filter & | get_avoid () const |
virtual double | get_caution () const |
virtual const move_map & | get_dstsrc () const |
virtual const move_map & | get_enemy_dstsrc () const |
virtual const moves_map & | get_enemy_possible_moves () const |
virtual const move_map & | get_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_map & | get_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_map & | get_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_location & | nearest_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_location & | suitable_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_t & | unit_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_context & | get_side_context () |
unwrap More... | |
virtual config | to_side_context_config () const |
serialize this context to config More... | |
Private Attributes | |
readonly_context * | target_ |
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 |
Definition at line 512 of file contexts.hpp.
|
inline |
Definition at line 514 of file contexts.hpp.
|
inlinevirtual |
Definition at line 519 of file contexts.hpp.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 665 of file contexts.hpp.
References ai::readonly_context::add_aspects(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 671 of file contexts.hpp.
References ai::readonly_context::add_facet(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 622 of file contexts.hpp.
References ai::readonly_context::best_defensive_position(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::should_retreat(), and ai::ai_default_rca::retreat_phase::should_retreat().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 596 of file contexts.hpp.
References ai::readonly_context::calculate_moves(), and target_.
Referenced by ai::ai_default_rca::leader_shares_keep_phase::execute().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 588 of file contexts.hpp.
References ai::readonly_context::calculate_possible_moves(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::ai_default_rca::move_to_targets_phase::choose_move(), ai::ai_default_rca::retreat_phase::evaluate(), ai::default_ai_context_impl::find_targets(), and ai::ai_default_rca::move_to_targets_phase::move_group().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 554 of file contexts.hpp.
References ai::readonly_context::check_attack_action(), and target_.
Referenced by ai::ai_default_rca::combat_phase::execute().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 559 of file contexts.hpp.
References ai::readonly_context::check_move_action(), and target_.
Referenced by ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::execute(), and ai::ai_default_rca::get_villages_phase::find_villages().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 565 of file contexts.hpp.
References ai::readonly_context::check_recall_action(), and target_.
Referenced by ai::default_recruitment::recruitment::execute_recall().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 572 of file contexts.hpp.
References ai::readonly_context::check_recruit_action(), and target_.
Referenced by ai::default_recruitment::recruitment::execute_recruit().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 578 of file contexts.hpp.
References ai::readonly_context::check_stopunit_action(), and target_.
Referenced by ai::ai_default_rca::goto_phase::execute().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 583 of file contexts.hpp.
References ai::readonly_context::check_synced_command_action(), and target_.
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 629 of file contexts.hpp.
References ai::readonly_context::defensive_position_cache(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 544 of file contexts.hpp.
References ai::readonly_context::diagnostic(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 635 of file contexts.hpp.
References ai::readonly_context::get_advancements(), and target_.
Referenced by ai::readwrite_context_impl::execute_attack_action().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 641 of file contexts.hpp.
References ai::readonly_context::get_aggression(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(), ai::ai_default_rca::combat_phase::evaluate(), ai::readwrite_context_impl::execute_attack_action(), and ai::formula_ai::get_value().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 659 of file contexts.hpp.
References ai::readonly_context::get_aspects(), and target_.
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 678 of file contexts.hpp.
References ai::readonly_context::get_attacks(), and target_.
Referenced by ai::ai_default_rca::combat_phase::evaluate().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 691 of file contexts.hpp.
References ai::readonly_context::get_avoid(), and target_.
Referenced by ai::ai_default_rca::retreat_phase::evaluate(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 697 of file contexts.hpp.
References ai::readonly_context::get_caution(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 703 of file contexts.hpp.
References ai::readonly_context::get_dstsrc(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::get_villages_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::ai_default_rca::move_to_targets_phase::execute(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 709 of file contexts.hpp.
References ai::readonly_context::get_enemy_dstsrc(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::ai_default_rca::move_leader_to_goals_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::get_villages_phase::evaluate(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::ai_default_rca::move_to_targets_phase::execute(), ai::ai_default_rca::get_villages_phase::execute(), ai::default_recruitment::recruitment::execute(), ai::formula_ai::get_value(), and ai::ai_default_rca::retreat_phase::should_retreat().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 715 of file contexts.hpp.
References ai::readonly_context::get_enemy_possible_moves(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 721 of file contexts.hpp.
References ai::readonly_context::get_enemy_srcdst(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), and ai::formula_ai::get_value().
|
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().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 739 of file contexts.hpp.
References ai::readonly_context::get_engines(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 751 of file contexts.hpp.
References ai::readonly_context::get_goals(), and target_.
Referenced by ai::ai_composite::add_goal(), ai::default_ai_context_impl::find_targets(), and ai::ai_composite::on_create().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 757 of file contexts.hpp.
References ai::readonly_context::get_goals(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 745 of file contexts.hpp.
References ai::readonly_context::get_grouping(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 605 of file contexts.hpp.
References ai::readonly_context::get_info(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 763 of file contexts.hpp.
References ai::readonly_context::get_leader_aggression(), and target_.
Referenced by ai::ai_default_rca::combat_phase::evaluate(), ai::readwrite_context_impl::execute_attack_action(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 770 of file contexts.hpp.
References ai::readonly_context::get_leader_goal(), and target_.
Referenced by ai::ai_default_rca::move_leader_to_goals_phase::evaluate().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 776 of file contexts.hpp.
References ai::readonly_context::get_leader_ignores_keep(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::move_to_targets_phase::form_group(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 782 of file contexts.hpp.
References ai::readonly_context::get_leader_value(), and target_.
Referenced by ai::default_ai_context_impl::find_targets(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 788 of file contexts.hpp.
References ai::readonly_context::get_passive_leader(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::evaluate(), ai::ai_default_rca::get_villages_phase::find_villages(), ai::formula_ai::get_value(), and ai::ai_default_rca::get_villages_phase::get_villages().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 794 of file contexts.hpp.
References ai::readonly_context::get_passive_leader_shares_keep(), and target_.
Referenced by ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::evaluate(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 800 of file contexts.hpp.
References ai::readonly_context::get_possible_moves(), and target_.
Referenced by ai::ai_default_rca::move_leader_to_keep_phase::evaluate().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 527 of file contexts.hpp.
References ai::readonly_context::get_readonly_context(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 812 of file contexts.hpp.
References ai::readonly_context::get_recall_list(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 818 of file contexts.hpp.
References ai::readonly_context::get_recruitment_diversity(), and target_.
Referenced by ai::default_recruitment::recruitment::do_combat_analysis().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 824 of file contexts.hpp.
References ai::readonly_context::get_recruitment_instructions(), and target_.
Referenced by ai::default_recruitment::recruitment::evaluate(), and ai::default_recruitment::recruitment::limit_ok().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 830 of file contexts.hpp.
References ai::readonly_context::get_recruitment_more(), and target_.
Referenced by ai::default_recruitment::recruitment::handle_recruitment_more().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 836 of file contexts.hpp.
References ai::readonly_context::get_recruitment_pattern(), and target_.
Referenced by ai::ai_default_rca::combat_phase::evaluate(), ai::formula_ai::get_value(), and ai::default_recruitment::recruitment::integrate_recruitment_pattern_in_recruitment_instructions().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 842 of file contexts.hpp.
References ai::readonly_context::get_recruitment_randomness(), and target_.
Referenced by ai::default_recruitment::recruitment::do_randomness().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 848 of file contexts.hpp.
References ai::readonly_context::get_recruitment_save_gold(), and target_.
Referenced by ai::default_recruitment::recruitment::execute(), and ai::default_recruitment::recruitment::update_state().
|
inlinevirtual |
Get the value of the recursion counter.
Reimplemented from ai::side_context_proxy.
Reimplemented in ai::readwrite_context_impl, ai::readwrite_context_proxy, ai::default_ai_context_impl, ai::formula_ai, ai::candidate_action, ai::ai_composite, and ai::stage.
Definition at line 616 of file contexts.hpp.
References ai::side_context::get_recursion_count(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 860 of file contexts.hpp.
References ai::readonly_context::get_scout_village_targeting(), and target_.
Referenced by ai::formula_ai::get_value(), and ai::ai_default_rca::move_to_targets_phase::rate_target().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 866 of file contexts.hpp.
References ai::readonly_context::get_simple_targeting(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 854 of file contexts.hpp.
References ai::readonly_context::get_srcdst(), and target_.
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), ai::formula_ai::can_reach_unit(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::ai_default_rca::move_to_targets_phase::execute(), game_logic::attack_map_callable::get_value(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 872 of file contexts.hpp.
References ai::readonly_context::get_support_villages(), and target_.
Referenced by ai::default_ai_context_impl::find_targets(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 878 of file contexts.hpp.
References ai::readonly_context::get_village_value(), and target_.
Referenced by ai::default_ai_context_impl::find_targets(), and ai::formula_ai::get_value().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 884 of file contexts.hpp.
References ai::readonly_context::get_villages_per_scout(), and target_.
Referenced by ai::formula_ai::get_value(), and ai::default_recruitment::recruitment::update_scouts_wanted().
|
inline |
Definition at line 521 of file contexts.hpp.
References ai::readonly_context::get_readonly_context(), ai::side_context_proxy::init_side_context_proxy(), and target_.
Referenced by ai::aspect::aspect(), ai::formula_ai::formula_ai(), ai::goal::goal(), ai::readwrite_context_proxy::init_readwrite_context_proxy(), and ai::readwrite_context_impl::readwrite_context_impl().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 916 of file contexts.hpp.
References ai::readonly_context::invalidate_defensive_position_cache(), and target_.
Referenced by ai::ai_composite::new_turn().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 922 of file contexts.hpp.
References ai::readonly_context::invalidate_move_maps(), and target_.
|
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().
|
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_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 896 of file contexts.hpp.
References ai::readonly_context::is_dst_src_valid_lua(), and target_.
|
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_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 906 of file contexts.hpp.
References ai::readonly_context::is_src_dst_valid_lua(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 934 of file contexts.hpp.
References ai::readonly_context::keeps(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 940 of file contexts.hpp.
References ai::readonly_context::leader_can_reach_keep(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 549 of file contexts.hpp.
References ai::readonly_context::log_message(), and target_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 946 of file contexts.hpp.
References ai::readonly_context::nearest_keep(), and target_.
Referenced by ai::ai_default_rca::get_villages_phase::get_villages().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 533 of file contexts.hpp.
References ai::readonly_context::on_readonly_context_create(), and target_.
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 610 of file contexts.hpp.
References ai::readonly_context::raise_user_interact(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 958 of file contexts.hpp.
References ai::readonly_context::recalculate_move_maps_enemy(), and target_.
|
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_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 963 of file contexts.hpp.
References ai::readonly_context::set_dst_src_valid_lua(), and target_.
|
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_.
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 973 of file contexts.hpp.
References ai::readonly_context::set_src_dst_valid_lua(), and target_.
|
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().
|
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().
|
inlinevirtual |
Implements ai::readonly_context.
Definition at line 995 of file contexts.hpp.
References target_, and ai::readonly_context::unit_stats_cache().
Referenced by ai::ai_default_rca::aspect_attacks_base::analyze_targets(), and ai::ai_composite::new_turn().
|
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().