Freeciv-3.3
|
#include "log.h"
#include "game.h"
#include "unit.h"
#include "srv_log.h"
#include "dailog.h"
#include "daiplayer.h"
#include "daiunit.h"
#include "aiguard.h"
Go to the source code of this file.
Enumerations | |
enum | bodyguard_enum { BODYGUARD_WANTED = -1 , BODYGUARD_NONE } |
Assign a guard to a city.
Definition at line 196 of file aiguard.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 aiguard.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 aiguard.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 aiguard.c.
Referenced by dai_military_bodyguard(), dai_military_findjob(), and dai_unit_bodyguard_move().
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 aiguard.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 aiguard.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 aiguard.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 aiguard.c.
Referenced by dai_military_findjob().
Has a guard been assigned to a charge?
Definition at line 259 of file aiguard.c.
Referenced by dai_manage_unit(), and dai_military_findjob().
Request a (new) bodyguard for the unit.
Definition at line 227 of file aiguard.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 aiguard.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 aiguard.c.
Referenced by dai_military_findjob(), and look_for_charge().