#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 () override |
virtual void | on_readonly_context_create () override |
virtual const team & | current_team () const override |
virtual void | diagnostic (const std::string &msg) override |
virtual void | log_message (const std::string &msg) override |
virtual attack_result_ptr | check_attack_action (const map_location &attacker_loc, const map_location &defender_loc, int attacker_weapon) override |
virtual move_result_ptr | check_move_action (const map_location &from, const map_location &to, bool remove_movement=true, bool unreach_is_ok=false) override |
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()) override |
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()) override |
virtual stopunit_result_ptr | check_stopunit_action (const map_location &unit_location, bool remove_movement=true, bool remove_attacks=false) override |
virtual synced_command_result_ptr | check_synced_command_action (const std::string &lua_code, const map_location &location=map_location::null_location()) override |
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 override |
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 override |
virtual const game_info & | get_info () const override |
virtual void | raise_user_interact () const override |
virtual int | get_recursion_count () const override |
Get the value of the recursion counter. More... | |
const defensive_position & | best_defensive_position (const map_location &unit, const move_map &dstsrc, const move_map &srcdst, const move_map &enemy_dstsrc) const override |
virtual std::map< map_location, defensive_position > & | defensive_position_cache () const override |
virtual const unit_advancements_aspect & | get_advancements () const override |
virtual double | get_aggression () const override |
virtual bool | get_allow_ally_villages () const override |
virtual const aspect_map & | get_aspects () const override |
virtual aspect_map & | get_aspects () override |
virtual void | add_aspects (std::vector< aspect_ptr > &aspects) override |
virtual void | add_facet (const std::string &id, const config &cfg) const override |
virtual const attacks_vector & | get_attacks () const override |
virtual const wfl::variant & | get_attacks_as_variant () const override |
virtual const terrain_filter & | get_avoid () const override |
virtual double | get_caution () const override |
virtual const move_map & | get_dstsrc () const override |
virtual const move_map & | get_enemy_dstsrc () const override |
virtual const moves_map & | get_enemy_possible_moves () const override |
virtual const move_map & | get_enemy_srcdst () const override |
virtual engine_ptr | get_engine_by_cfg (const config &cfg) override |
get engine by cfg, creating it if it is not created yet but known More... | |
virtual const std::vector< engine_ptr > & | get_engines () const override |
virtual std::vector< engine_ptr > & | get_engines () override |
virtual std::string | get_grouping () const override |
virtual const std::vector< goal_ptr > & | get_goals () const override |
virtual std::vector< goal_ptr > & | get_goals () override |
virtual double | get_leader_aggression () const override |
virtual config | get_leader_goal () const override |
virtual utils::variant< bool, std::vector< std::string > > | get_leader_ignores_keep () const override |
virtual double | get_leader_value () const override |
virtual utils::variant< bool, std::vector< std::string > > | get_passive_leader () const override |
virtual utils::variant< bool, std::vector< std::string > > | get_passive_leader_shares_keep () const override |
virtual const moves_map & | get_possible_moves () const override |
virtual double | power_projection (const map_location &loc, const move_map &dstsrc) const override |
Function which finds how much 'power' a side can attack a certain location with. More... | |
virtual double | get_recruitment_diversity () const override |
virtual const config | get_recruitment_instructions () const override |
virtual const std::vector< std::string > | get_recruitment_more () const override |
virtual const std::vector< std::string > | get_recruitment_pattern () const override |
virtual int | get_recruitment_randomness () const override |
virtual const config | get_recruitment_save_gold () const override |
virtual const move_map & | get_srcdst () const override |
virtual double | get_retreat_enemy_weight () const override |
virtual double | get_retreat_factor () const override |
virtual double | get_scout_village_targeting () const override |
virtual bool | get_simple_targeting () const override |
virtual bool | get_support_villages () const override |
virtual double | get_village_value () const override |
virtual int | get_villages_per_scout () const override |
virtual bool | is_active (const std::string &time_of_day, const std::string &turns) const override |
virtual bool | is_keep_ignoring_leader (const std::string &id) const override |
virtual bool | is_passive_leader (const std::string &id) const override |
virtual bool | is_passive_keep_sharing_leader (const std::string &id) const override |
virtual bool | is_dst_src_valid_lua () const override |
virtual bool | is_dst_src_enemy_valid_lua () const override |
virtual bool | is_src_dst_valid_lua () const override |
virtual bool | is_src_dst_enemy_valid_lua () const override |
virtual void | invalidate_defensive_position_cache () const override |
virtual void | invalidate_move_maps () const override |
virtual void | invalidate_keeps_cache () const override |
virtual const std::set< map_location > & | keeps () const override |
virtual bool | leader_can_reach_keep () const override |
virtual const map_location & | nearest_keep (const map_location &loc) const override |
virtual void | recalculate_move_maps () const override |
virtual void | recalculate_move_maps_enemy () const override |
virtual void | set_dst_src_valid_lua () override |
virtual void | set_dst_src_enemy_valid_lua () override |
virtual void | set_src_dst_valid_lua () override |
virtual void | set_src_dst_enemy_valid_lua () override |
virtual const map_location & | suitable_keep (const map_location &leader_location, const pathfind::paths &leader_paths) const override |
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 override |
serialize to config More... | |
virtual unit_stats_cache_t & | unit_stats_cache () const override |
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 override |
Get the side number. More... | |
virtual void | set_side (side_number side) override |
Set the side number. More... | |
virtual side_context & | get_side_context () override |
unwrap More... | |
virtual config | to_side_context_config () const override |
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 425 of file contexts.hpp.
|
inline |
Definition at line 427 of file contexts.hpp.
|
inlinevirtual |
Definition at line 432 of file contexts.hpp.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 566 of file contexts.hpp.
References ai::readonly_context::add_aspects(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 571 of file contexts.hpp.
References ai::readonly_context::add_facet(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 530 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 505 of file contexts.hpp.
References ai::readonly_context::calculate_moves(), enemy, and target_.
Referenced by ai::ai_default_rca::leader_shares_keep_phase::execute().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 497 of file contexts.hpp.
References ai::readonly_context::calculate_possible_moves(), enemy, 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 465 of file contexts.hpp.
References ai::readonly_context::check_attack_action(), and target_.
Referenced by ai::ai_default_rca::combat_phase::execute().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 470 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 475 of file contexts.hpp.
References ai::readonly_context::check_recall_action(), and target_.
Referenced by ai::default_recruitment::recruitment::execute_recall().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 481 of file contexts.hpp.
References ai::readonly_context::check_recruit_action(), target_, and unit_name().
Referenced by ai::default_recruitment::recruitment::execute_recruit().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 487 of file contexts.hpp.
References ai::readonly_context::check_stopunit_action(), and target_.
Referenced by ai::ai_default_rca::goto_phase::execute().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 492 of file contexts.hpp.
References ai::readonly_context::check_synced_command_action(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 450 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(), wfl::attack_map_callable::collect_possible_attacks(), ai::default_ai_context_impl::count_free_hexes_in_castle(), ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(), ai::default_recruitment::recruitment::do_combat_analysis(), 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::leader_shares_keep_phase::evaluate(), ai::default_recruitment::recruitment::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::default_recruitment::recruitment::recall_unit_value(), ai::formula_ai::shortest_path_calculator(), ai::default_recruitment::recruitment::update_important_hexes(), and ai::default_recruitment::recruitment::update_state().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 536 of file contexts.hpp.
References ai::readonly_context::defensive_position_cache(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 455 of file contexts.hpp.
References ai::readonly_context::diagnostic(), wfl::msg(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 541 of file contexts.hpp.
References ai::readonly_context::get_advancements(), and target_.
Referenced by ai::manager::get_advancement_aspect_for_side().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 546 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 551 of file contexts.hpp.
References ai::readonly_context::get_allow_ally_villages(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 556 of file contexts.hpp.
References ai::readonly_context::get_aspects(), and target_.
Referenced by ai::ai_composite::on_create().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 561 of file contexts.hpp.
References ai::readonly_context::get_aspects(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 576 of file contexts.hpp.
References ai::readonly_context::get_attacks(), and target_.
Referenced by ai::ai_default_rca::combat_phase::evaluate().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 581 of file contexts.hpp.
References ai::readonly_context::get_attacks_as_variant(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 586 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 591 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 596 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::move_to_targets_phase::choose_move(), ai::ai_default_rca::goto_phase::evaluate(), ai::ai_default_rca::get_villages_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), and ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 601 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_to_targets_phase::choose_move(), 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::get_villages_phase::execute(), ai::ai_default_rca::move_to_targets_phase::execute(), ai::default_recruitment::recruitment::execute(), ai::formula_ai::get_value(), and ai::ai_default_rca::retreat_phase::should_retreat().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 606 of file contexts.hpp.
References ai::readonly_context::get_enemy_possible_moves(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 611 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().
|
inlineoverridevirtual |
get engine by cfg, creating it if it is not created yet but known
Implements ai::readonly_context.
Definition at line 616 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 621 of file contexts.hpp.
References ai::readonly_context::get_engines(), and target_.
Referenced by ai::ai_composite::on_create().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 626 of file contexts.hpp.
References ai::readonly_context::get_engines(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 636 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 641 of file contexts.hpp.
References ai::readonly_context::get_goals(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 631 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 514 of file contexts.hpp.
References ai::readonly_context::get_info(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 646 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 651 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 656 of file contexts.hpp.
References ai::readonly_context::get_leader_ignores_keep(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 661 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 666 of file contexts.hpp.
References ai::readonly_context::get_passive_leader(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 671 of file contexts.hpp.
References ai::readonly_context::get_passive_leader_shares_keep(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 676 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 440 of file contexts.hpp.
References ai::readonly_context::get_readonly_context(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 686 of file contexts.hpp.
References ai::readonly_context::get_recruitment_diversity(), and target_.
Referenced by ai::default_recruitment::recruitment::do_combat_analysis().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 691 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 696 of file contexts.hpp.
References ai::readonly_context::get_recruitment_more(), and target_.
Referenced by ai::default_recruitment::recruitment::handle_recruitment_more().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 701 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 706 of file contexts.hpp.
References ai::readonly_context::get_recruitment_randomness(), and target_.
Referenced by ai::default_recruitment::recruitment::do_randomness().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 711 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().
|
inlineoverridevirtual |
Get the value of the recursion counter.
Reimplemented from ai::side_context_proxy.
Reimplemented in ai::formula_ai, ai::readwrite_context_impl, ai::readwrite_context_proxy, ai::default_ai_context_impl, ai::stage, ai::candidate_action, and ai::ai_composite.
Definition at line 524 of file contexts.hpp.
References ai::side_context::get_recursion_count(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 721 of file contexts.hpp.
References ai::readonly_context::get_retreat_enemy_weight(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 726 of file contexts.hpp.
References ai::readonly_context::get_retreat_factor(), and target_.
Referenced by ai::formula_ai::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 731 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 736 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 716 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::move_to_targets_phase::choose_move(), ai::ai_default_rca::get_healing_phase::evaluate(), ai::ai_default_rca::retreat_phase::evaluate(), ai::formula_ai::get_value(), and wfl::attack_map_callable::get_value().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 741 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 746 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 751 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 434 of file contexts.hpp.
References 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 796 of file contexts.hpp.
References ai::readonly_context::invalidate_defensive_position_cache(), and target_.
Referenced by ai::ai_composite::new_turn().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 806 of file contexts.hpp.
References ai::readonly_context::invalidate_keeps_cache(), and target_.
Referenced by ai::ai_composite::new_turn().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 801 of file contexts.hpp.
References ai::readonly_context::invalidate_move_maps(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 756 of file contexts.hpp.
References ai::readonly_context::is_active(), and target_.
Referenced by ai::aspect::active(), and ai::goal::active().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 781 of file contexts.hpp.
References ai::readonly_context::is_dst_src_enemy_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 776 of file contexts.hpp.
References ai::readonly_context::is_dst_src_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 761 of file contexts.hpp.
References ai::readonly_context::is_keep_ignoring_leader(), and target_.
Referenced by ai::ai_default_rca::move_to_targets_phase::choose_move(), ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), and ai::ai_default_rca::move_to_targets_phase::form_group().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 771 of file contexts.hpp.
References ai::readonly_context::is_passive_keep_sharing_leader(), and target_.
Referenced by ai::ai_default_rca::move_leader_to_keep_phase::evaluate(), ai::ai_default_rca::leader_shares_keep_phase::evaluate(), and ai::ai_default_rca::leader_shares_keep_phase::execute().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 766 of file contexts.hpp.
References ai::readonly_context::is_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::leader_shares_keep_phase::execute(), ai::ai_default_rca::get_villages_phase::find_villages(), and ai::ai_default_rca::get_villages_phase::get_villages().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 791 of file contexts.hpp.
References ai::readonly_context::is_src_dst_enemy_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 786 of file contexts.hpp.
References ai::readonly_context::is_src_dst_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 811 of file contexts.hpp.
References ai::readonly_context::keeps(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 816 of file contexts.hpp.
References ai::readonly_context::leader_can_reach_keep(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 460 of file contexts.hpp.
References ai::readonly_context::log_message(), wfl::msg(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 821 of file contexts.hpp.
References loc, ai::readonly_context::nearest_keep(), and target_.
Referenced by ai::ai_default_rca::get_villages_phase::get_villages().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 445 of file contexts.hpp.
References ai::readonly_context::on_readonly_context_create(), and target_.
|
inlineoverridevirtual |
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 681 of file contexts.hpp.
References loc, 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 519 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().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 826 of file contexts.hpp.
References ai::readonly_context::recalculate_move_maps(), and target_.
Referenced by ai::ai_composite::new_turn().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 831 of file contexts.hpp.
References ai::readonly_context::recalculate_move_maps_enemy(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 841 of file contexts.hpp.
References ai::readonly_context::set_dst_src_enemy_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 836 of file contexts.hpp.
References ai::readonly_context::set_dst_src_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 851 of file contexts.hpp.
References ai::readonly_context::set_src_dst_enemy_valid_lua(), and target_.
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 846 of file contexts.hpp.
References ai::readonly_context::set_src_dst_valid_lua(), and target_.
|
inlineoverridevirtual |
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 856 of file contexts.hpp.
References ai::readonly_context::suitable_keep(), and target_.
Referenced by ai::ai_default_rca::move_leader_to_keep_phase::evaluate().
|
inlineoverridevirtual |
serialize to config
Implements ai::readonly_context.
Definition at line 861 of file contexts.hpp.
References target_, and ai::readonly_context::to_readonly_context_config().
|
inlineoverridevirtual |
Implements ai::readonly_context.
Definition at line 866 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 872 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_allow_ally_villages(), get_aspects(), 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_recruitment_diversity(), get_recruitment_instructions(), get_recruitment_more(), get_recruitment_pattern(), get_recruitment_randomness(), get_recruitment_save_gold(), get_recursion_count(), get_retreat_enemy_weight(), get_retreat_factor(), 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_keep_ignoring_leader(), is_passive_keep_sharing_leader(), is_passive_leader(), 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().