Freeciv-3.2
Loading...
Searching...
No Matches
aiguard.h
Go to the documentation of this file.
1/**********************************************************************
2 Freeciv - Copyright (C) 2002 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__AIGUARD_H
14#define FC__AIGUARD_H
15
16#include "support.h" /* bool type */
17
18#include "fc_types.h"
19
20#ifndef FREECIV_NDEBUG
21#define CHECK_GUARD(ait, guard) aiguard_check_guard(ait, guard)
22#define CHECK_CHARGE_UNIT(ait, charge) aiguard_check_charge_unit(ait, charge)
23#else /* FREECIV_NDEBUG */
24#define CHECK_GUARD(ait, guard) (void)0
25#define CHECK_CHARGE_UNIT(ait, charge) (void)0
26#endif /* FREECIV_NDEBUG */
27
28void aiguard_check_guard(struct ai_type *ait, const struct unit *guard);
29void aiguard_check_charge_unit(struct ai_type *ait, const struct unit *charge);
30void aiguard_clear_charge(struct ai_type *ait, struct unit *guard);
31void aiguard_clear_guard(struct ai_type *ait, struct unit *charge);
32void aiguard_assign_guard_unit(struct ai_type *ait, struct unit *charge,
33 struct unit *guard);
34void aiguard_assign_guard_city(struct ai_type *ait, struct city *charge,
35 struct unit *guard);
36void aiguard_request_guard(struct ai_type *ait, struct unit *punit);
37bool aiguard_wanted(struct ai_type *ait, struct unit *charge);
38bool aiguard_has_charge(struct ai_type *ait, struct unit *charge);
39bool aiguard_has_guard(struct ai_type *ait, struct unit *charge);
40struct unit *aiguard_guard_of(struct ai_type *ait, struct unit *charge);
41struct unit *aiguard_charge_unit(struct ai_type *ait, struct unit *guard);
42struct city *aiguard_charge_city(struct ai_type *ait, struct unit *guard);
43void aiguard_update_charge(struct ai_type *ait, struct unit *guard);
44
45#endif /* FC__AIGUARD_H */
struct city * aiguard_charge_city(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:289
void aiguard_clear_charge(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:117
void aiguard_request_guard(struct ai_type *ait, struct unit *punit)
Definition aiguard.c:227
bool aiguard_has_guard(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:259
void aiguard_assign_guard_unit(struct ai_type *ait, struct unit *charge, struct unit *guard)
Definition aiguard.c:173
bool aiguard_wanted(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:241
void aiguard_assign_guard_city(struct ai_type *ait, struct city *charge, struct unit *guard)
Definition aiguard.c:196
struct unit * aiguard_charge_unit(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:279
void aiguard_clear_guard(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:146
struct unit * aiguard_guard_of(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:269
bool aiguard_has_charge(struct ai_type *ait, struct unit *charge)
Definition aiguard.c:250
void aiguard_update_charge(struct ai_type *ait, struct unit *guard)
Definition aiguard.c:299
void aiguard_check_charge_unit(struct ai_type *ait, const struct unit *charge)
Definition aiguard.c:90
void aiguard_check_guard(struct ai_type *ait, const struct unit *guard)
Definition aiguard.c:48
char * incite_cost
Definition comments.c:75
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
Definition dialogs_g.h:74
Definition ai.h:50
Definition city.h:320
Definition unit.h:138