#include <callable_objects.hpp>
Public Types | |
typedef std::multimap < map_location, map_location > | move_map |
Public Member Functions | |
attack_map_callable (const ai::formula_ai &ai, const unit_map &units) | |
Public Member Functions inherited from game_logic::formula_callable | |
formula_callable (bool has_self=true) | |
variant | query_value (const std::string &key) const |
void | mutate_value (const std::string &key, const variant &value) |
std::vector< formula_input > | inputs () const |
bool | equals (const formula_callable *other) const |
bool | less (const formula_callable *other) const |
void | serialize (std::string &str) const |
bool | has_key (const std::string &key) const |
Public Member Functions inherited from reference_counted_object | |
reference_counted_object () | |
reference_counted_object (const reference_counted_object &) | |
reference_counted_object & | operator= (const reference_counted_object &) |
virtual | ~reference_counted_object () |
void | add_ref () const |
void | dec_ref () const |
int | refcount () const |
Private Member Functions | |
variant | get_value (const std::string &key) const |
void | get_inputs (std::vector< game_logic::formula_input > *inputs) const |
void | collect_possible_attacks (std::vector< variant > &vars, map_location attacker_location, map_location attack_position) const |
Private Attributes | |
const unit_map & | units_ |
const ai::formula_ai & | ai_ |
Additional Inherited Members | |
Protected Types inherited from game_logic::formula_callable | |
enum | TYPE { FORMULA_C, TERRAIN_C, LOCATION_C, UNIT_TYPE_C, UNIT_C, ATTACK_TYPE_C, MOVE_PARTIAL_C, MOVE_C, ATTACK_C, MOVE_MAP_C } |
Protected Member Functions inherited from game_logic::formula_callable | |
virtual | ~formula_callable () |
virtual void | set_value (const std::string &key, const variant &value) |
virtual int | do_compare (const formula_callable *callable) const |
virtual void | serialize_to_string (std::string &) const |
Protected Member Functions inherited from reference_counted_object | |
void | turn_reference_counting_off () const |
Protected Attributes inherited from game_logic::formula_callable | |
TYPE | type_ |
Definition at line 30 of file callable_objects.hpp.
typedef std::multimap<map_location, map_location> game_logic::attack_map_callable::move_map |
Definition at line 32 of file callable_objects.hpp.
|
inline |
Definition at line 33 of file callable_objects.hpp.
|
private |
Definition at line 198 of file callable_objects.cpp.
References ai_, ai::readonly_context_proxy::current_team(), unit_map::end(), unit_map::find(), resources::gameboard, get_adjacent_tiles(), team::is_enemy(), and units_.
Referenced by get_value().
|
privatevirtual |
Reimplemented from game_logic::formula_callable.
Definition at line 193 of file callable_objects.cpp.
References game_logic::FORMULA_READ_ONLY.
|
privatevirtual |
Implements game_logic::formula_callable.
Definition at line 172 of file callable_objects.cpp.
References ai_, collect_possible_attacks(), unit_map::count(), unit_map::end(), ai::side_context_proxy::get_side(), ai::readonly_context_proxy::get_srcdst(), i, resources::units, and units_.
|
private |
Definition at line 38 of file callable_objects.hpp.
Referenced by collect_possible_attacks(), and get_value().
|
private |
Definition at line 37 of file callable_objects.hpp.
Referenced by collect_possible_attacks(), and get_value().