Freeciv-3.2: /fast/freeciv/nightly/S3_2/ai/handicaps.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
handicaps.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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__HANDICAPS_H
14#define FC__HANDICAPS_H
15
16/* See handicap_desc() for what these do. */
17 enum handicap_type {
18 H_DIPLOMAT = 0,
19 H_AWAY,
20 H_LIMITEDHUTS,
21 H_DEFENSIVE,
22 H_EXPERIMENTAL,
23 H_RATES,
24 H_TARGETS,
25 H_HUTS,
26 H_FOG,
27 H_NOPLANES,
28 H_MAP,
29 H_DIPLOMACY,
30 H_REVOLUTION,
31 H_EXPANSION,
32 H_DANGER,
33 H_CEASEFIRE,
34 H_NOBRIBE_WF,
35 H_PRODCHGPEN,
36 H_ASSESS_DANGER_LIMITED,
37 H_LAST
38};
39
40 BV_DEFINE(bv_handicap, H_LAST);
41
42void handicaps_init(struct player *pplayer);
43void handicaps_close(struct player *pplayer);
44
45void handicaps_set(struct player *pplayer, bv_handicap handicaps);
46bool has_handicap(const struct player *pplayer, enum handicap_type htype);
47
48const char *handicap_desc(enum handicap_type htype, bool *inverted);
49
50#endif /* FC__HANDICAPS_H */
BV_DEFINE
#define BV_DEFINE(name, bits)
Definition bitvector.h:132
incite_cost
char * incite_cost
Definition comments.c:74
has_handicap
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
Definition handicaps.c:66
handicap_type
handicap_type
Definition handicaps.h:17
H_LAST
@ H_LAST
Definition handicaps.h:37
H_MAP
@ H_MAP
Definition handicaps.h:28
H_REVOLUTION
@ H_REVOLUTION
Definition handicaps.h:30
H_DIPLOMACY
@ H_DIPLOMACY
Definition handicaps.h:29
H_DIPLOMAT
@ H_DIPLOMAT
Definition handicaps.h:18
H_TARGETS
@ H_TARGETS
Definition handicaps.h:24
H_LIMITEDHUTS
@ H_LIMITEDHUTS
Definition handicaps.h:20
H_RATES
@ H_RATES
Definition handicaps.h:23
H_AWAY
@ H_AWAY
Definition handicaps.h:19
H_HUTS
@ H_HUTS
Definition handicaps.h:25
H_EXPERIMENTAL
@ H_EXPERIMENTAL
Definition handicaps.h:22
H_DEFENSIVE
@ H_DEFENSIVE
Definition handicaps.h:21
H_DANGER
@ H_DANGER
Definition handicaps.h:32
H_NOBRIBE_WF
@ H_NOBRIBE_WF
Definition handicaps.h:34
H_NOPLANES
@ H_NOPLANES
Definition handicaps.h:27
H_FOG
@ H_FOG
Definition handicaps.h:26
H_PRODCHGPEN
@ H_PRODCHGPEN
Definition handicaps.h:35
H_EXPANSION
@ H_EXPANSION
Definition handicaps.h:31
H_CEASEFIRE
@ H_CEASEFIRE
Definition handicaps.h:33
H_ASSESS_DANGER_LIMITED
@ H_ASSESS_DANGER_LIMITED
Definition handicaps.h:36
handicaps_init
void handicaps_init(struct player *pplayer)
Definition handicaps.c:29
handicaps_close
void handicaps_close(struct player *pplayer)
Definition handicaps.c:42
handicap_desc
const char * handicap_desc(enum handicap_type htype, bool *inverted)
Definition handicaps.c:80
handicaps_set
void handicaps_set(struct player *pplayer, bv_handicap handicaps)
Definition handicaps.c:55
player
Definition player.h:247