55 const struct player *charge_owner = NULL;
56 struct unit_ai *charge_data = NULL;
65 }
else if (charge_city) {
69 if (charge_unit && charge_data->
bodyguard != guard->
id) {
71 }
else if (!charge_unit && !charge_city && 0 < guard_data->
charge) {
77 }
else if (charge_owner && charge_owner != guard_owner) {
96 struct unit_ai *guard_data = NULL;
103 || (guard_data && BODYGUARD_WANTED <= guard_data->
bodyguard));
107 "inconsistent guard references");
108 }
else if (guard &&
unit_owner(guard) != charge_owner) {
130 }
else if (charge_city) {
208 if (0 < guard_data->
charge
306 const struct player *charge_owner = NULL;
314 }
else if (charge_city) {
318 if (!charge_unit && !charge_city && 0 < guard_data->
charge) {
322 if (charge_owner && charge_owner != guard_owner) {
struct city * aiguard_charge_city(struct ai_type *ait, struct unit *guard)
void aiguard_clear_charge(struct ai_type *ait, struct unit *guard)
void aiguard_request_guard(struct ai_type *ait, struct unit *punit)
bool aiguard_has_guard(struct ai_type *ait, struct unit *charge)
void aiguard_assign_guard_unit(struct ai_type *ait, struct unit *charge, struct unit *guard)
bool aiguard_wanted(struct ai_type *ait, struct unit *charge)
void aiguard_assign_guard_city(struct ai_type *ait, struct city *charge, struct unit *guard)
struct unit * aiguard_charge_unit(struct ai_type *ait, struct unit *guard)
void aiguard_clear_guard(struct ai_type *ait, struct unit *charge)
struct unit * aiguard_guard_of(struct ai_type *ait, struct unit *charge)
bool aiguard_has_charge(struct ai_type *ait, struct unit *guard)
void aiguard_update_charge(struct ai_type *ait, struct unit *guard)
void aiguard_check_charge_unit(struct ai_type *ait, const struct unit *charge)
void aiguard_check_guard(struct ai_type *ait, const struct unit *guard)
#define CHECK_CHARGE_UNIT(ait, charge)
#define CHECK_GUARD(ait, guard)
#define BODYGUARD_LOG(ait, loglevel, punit, msg,...)
static struct unit_ai * def_ai_unit_data(const struct unit *punit, struct ai_type *deftype)
#define city_owner(_pcity_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
#define fc_assert_ret(condition)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
#define UNIT_LOG(loglevel, punit, msg,...)
#define LOGLEVEL_BODYGUARD