28 std::vector<variant> vars;
37 }
else if(key ==
"has_moves") {
53 if(mv_callable ==
nullptr) {
60 if (
int cmp = src_.do_compare(other_src)) {
70 if(mv_callable ==
nullptr) {
77 if (
int cmp = src_.do_compare(other_src)) {
97 if(key ==
"hitpoints_left") {
98 return variant(
new std::vector<variant>(hitLeft_));
99 }
else if(key ==
"probability") {
100 return variant(
new std::vector<variant>(prob_));
101 }
else if(key ==
"possible_status") {
102 return variant(
new std::vector<variant>(status_));
117 : move_from_(move_from), src_(src), dst_(dst),
126 if(key ==
"attack_from") {
128 }
else if(key ==
"defender") {
130 }
else if(key ==
"move_from") {
146 if(a_callable ==
nullptr) {
163 const int other_weapon = a_callable->
weapon();
164 if (
int cmp = (this->
weapon() - other_weapon)) {
173 if(key ==
"attacks") {
174 std::vector<variant> vars;
202 for(
int n = 0;
n != 6; ++
n) {
212 unit->incapacitated() ||
213 unit->invisible(unit->get_location()))
238 if( key ==
"unit_type")
240 if( key ==
"recruit_loc")
307 if(key ==
"object") {
virtual side_number get_side() const
Get the side number.
variant get_value(const std::string &key) const
const formula_callable * failed_callable_
variant get_value(const std::string &key) const
variant get_value(const std::string &key) const
variant get_value(const std::string &key) const
int do_compare(const formula_callable *callable) const
size_t count(const map_location &loc) const
variant get_value(const std::string &key) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
void get_adjacent_tiles(const map_location &a, map_location *res)
Function which, given a location, will place all adjacent locations in res.
variant get_value(const std::string &key) const
bool is_enemy(int n) const
variant get_value(const std::string &key) const
attack_callable(const map_location &move_from, const map_location &src, const map_location &dst, int weapon)
const map_location & dst() const
const ai::formula_ai & ai_
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
virtual const move_map & get_srcdst() const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
const map_location & move_from() const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
Encapsulates the map of the game.
const map_location current_unit_location_
void collect_possible_attacks(std::vector< variant > &vars, map_location attacker_location, map_location attack_position) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
variant get_value(const std::string &key) const
variant get_value(const std::string &key) const
int defender_weapon() const
const map_location & src() const
int do_compare(const formula_callable *callable) const
virtual const team & current_team() const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
bool find(E event, F functor)
Tests whether an event handler is available.
variant get_value(const std::string &key) const
int do_compare(const map_location &a) const
three-way comparator
variant get_value(const std::string &key) const
int do_compare(const game_logic::formula_callable *callable) const
Compare two attacks in deterministic way or compare pointers (nondeterministic in consequent game run...
unit_iterator find(size_t id)
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
void get_inputs(std::vector< game_logic::formula_input > *inputs) const
GLsizei const GLcharARB ** string