43 wfl::action_callable(),
66 const move_map& enemy_dstsrc,
double aggression);
75 std::vector<std::pair<map_location,map_location>>
movements;
std::vector< std::pair< map_location, map_location > > movements
void analyze(const gamemap &map, unit_map &units, const readonly_context &ai_obj, const move_map &dstsrc, const move_map &srcdst, const move_map &enemy_dstsrc, double aggression)
bool uses_leader
Is true if this attack sequence makes use of the leader.
wfl::variant get_value(const std::string &key) const override
void get_inputs(wfl::formula_input_vector &inputs) const override
double target_value
The value of the unit being targeted.
double avg_damage_inflicted
The average hitpoints damage inflicted.
double chance_to_kill
Estimated % chance to kill the unit.
bool attack_close(const map_location &loc) const
wfl::variant execute_self(wfl::variant ctxt) override
double terrain_quality
The weighted average of the % chance to hit each attacking unit.
double avg_damage_taken
The average hitpoints damage taken.
double alternative_terrain_quality
The weighted average of the % defense of the best possible terrain that the attacking units could rea...
bool leader_threat
Is true if the unit is a threat to our leader.
double avg_losses
The value on average, of units lost in the combat.
double vulnerability
The vulnerability is the power projection of enemy units onto the hex we're standing on.
double resources_used
The sum of the values of units used in the attack.
double rating(double aggression, const readonly_context &ai_obj) const
int target_starting_damage
bool is_surrounded
Is true if the units involved in this attack sequence are surrounded.
virtual default_ai_context & get_default_ai_context()
virtual void clear_additional_targets() const
recursion_counter recursion_counter_
int get_recursion_count() const
Get the value of the recursion counter.
virtual const std::vector< target > & additional_targets() const
virtual int rate_terrain(const unit &u, const map_location &loc) const
virtual std::vector< target > find_targets(const move_map &enemy_dstsrc)
default_ai_context_impl(readwrite_context &context, const config &)
virtual ~default_ai_context_impl()
virtual config to_default_ai_context_config() const
int count_free_hexes_in_castle(const map_location &loc, std::set< map_location > &checked_hexes)
virtual void add_target(const target &t) const
std::vector< target > additional_targets_
virtual ~default_ai_context_proxy()
virtual int rate_terrain(const unit &u, const map_location &loc) const
virtual void clear_additional_targets() const
int count_free_hexes_in_castle(const map_location &loc, std::set< map_location > &checked_hexes)
virtual std::vector< target > find_targets(const move_map &enemy_dstsrc)
default_ai_context_proxy()
virtual const std::vector< target > & additional_targets() const
default_ai_context * target_
virtual default_ai_context & get_default_ai_context()
virtual config to_default_ai_context_config() const
virtual void add_target(const target &t) const
void init_default_ai_context_proxy(default_ai_context &target)
virtual std::vector< target > find_targets(const move_map &enemy_dstsrc)=0
default_ai_context()
Constructor.
virtual const std::vector< target > & additional_targets() const =0
virtual default_ai_context & get_default_ai_context()=0
virtual int count_free_hexes_in_castle(const map_location &loc, std::set< map_location > &checked_hexes)=0
virtual ~default_ai_context()
Destructor.
virtual void clear_additional_targets() const =0
virtual int rate_terrain(const unit &u, const map_location &loc) const =0
virtual void add_target(const target &t) const =0
virtual config to_default_ai_context_config() const =0
void init_readwrite_context_proxy(readwrite_context &target)
int get_count() const
Get the current value of the recursion counter.
A config object defines a single node in a WML file, with access to child nodes.
Encapsulates the map of the game.
Container associating units to locations.
This class represents a single unit of a specific type.
Helper functions for the object which operates in the context of AI for specific side this is part of...
A small explanation about what's going on here: Each action has access to two game_info objects First...
std::multimap< map_location, map_location > move_map
The standard way in which a map of possible moves is recorded.
std::vector< formula_input > formula_input_vector
target(const map_location &pos, double val, ai_target::type target_type=ai_target::type::village)
Encapsulates the map of the game.