Freeciv-3.4
|
Go to the source code of this file.
Macros | |
#define | CHECK_GUARD(ait, guard) aiguard_check_guard(ait, guard) |
#define | CHECK_CHARGE_UNIT(ait, charge) aiguard_check_charge_unit(ait, charge) |
#define CHECK_CHARGE_UNIT | ( | ait, | |
charge | |||
) | aiguard_check_charge_unit(ait, charge) |
Definition at line 22 of file daiguard.h.
#define CHECK_GUARD | ( | ait, | |
guard | |||
) | aiguard_check_guard(ait, guard) |
Definition at line 21 of file daiguard.h.
Assign a guard to a city.
Definition at line 196 of file daiguard.c.
Referenced by dai_military_findjob(), and dai_unit_new_task().
Assign a bodyguard to a unit.
Assumes that a unit can have at most one guard.
Definition at line 173 of file daiguard.c.
Referenced by dai_military_findjob().
Which city (if any) has a guard been assigned to? Returns NULL if the unit is not a guard for a city.
Definition at line 289 of file daiguard.c.
Referenced by dai_military_bodyguard(), dai_military_defend(), and dai_military_findjob().
Which unit (if any) has a guard been assigned to? Returns NULL if the unit is not the guard for a unit.
Definition at line 279 of file daiguard.c.
Referenced by dai_military_bodyguard(), dai_military_findjob(), and dai_unit_bodyguard_move().
Do sanity checks on a charge, reporting error messages to the log if necessary.
Inconsistent references do not always indicate an error, because units can change owners (for example, because of civil war) outside the control of the AI code.
Definition at line 90 of file daiguard.c.
Do sanity checks on a guard, reporting error messages to the log if necessary.
Inconsistent references do not always indicate an error, because units can change owners (for example, because of civil war) outside the control of the AI code.
Definition at line 48 of file daiguard.c.
Remove the assignment of a charge to a guard.
Assumes that a unit can have at most one guard.
Definition at line 117 of file daiguard.c.
Referenced by aiguard_assign_guard_city(), aiguard_assign_guard_unit(), aiguard_update_charge(), dai_military_defend(), dai_unit_close(), and dai_unit_new_task().
Remove assignment of bodyguard for a unit.
Assumes that a unit can have at most one guard.
There is no analogous function for cities, because cities can have many guards: instead use aiguard_clear_charge for each city guard.
Definition at line 146 of file daiguard.c.
Referenced by aiguard_assign_guard_unit(), aiguard_request_guard(), dai_gothere_bodyguard(), and dai_unit_close().
Which unit, if any, is the body guard of a unit? Returns NULL if the unit has not been assigned a guard.
Definition at line 269 of file daiguard.c.
Referenced by dai_gothere_bodyguard(), dai_manage_unit(), dai_unit_attack(), dai_unit_move(), and dai_unit_new_task().
Has a charge unit been assigned to a guard?
Definition at line 250 of file daiguard.c.
Referenced by dai_military_findjob().
Has a guard been assigned to a charge?
Definition at line 259 of file daiguard.c.
Referenced by dai_manage_unit(), and dai_military_findjob().
Request a (new) bodyguard for the unit.
Definition at line 227 of file daiguard.c.
Referenced by dai_gothere_bodyguard(), dai_manage_diplomat(), and dai_manage_unit().
Check whether the assignment of a guard is still sane, and fix and problems. It was once sane, but might have been destroyed or become an enemy since.
Definition at line 299 of file daiguard.c.
Referenced by dai_military_findjob().
Has a unit requested a guard and not (yet) been provided with one?
Definition at line 241 of file daiguard.c.
Referenced by dai_military_findjob(), and look_for_charge().