Freeciv-3.3: /fast/freeciv/nightly/main/ai/default/daimilitary.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
daimilitary.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__DAIMILITARY_H
14#define FC__DAIMILITARY_H
15
16/* common */
17#include "fc_types.h"
18#include "unittype.h"
19
20/* server/advisors */
21#include "advchoice.h"
22
23struct civ_map;
24
25#ifdef FREECIV_WEB
26#define ASSESS_DANGER_MAX_DISTANCE 40
27#define AI_HANDICAP_DISTANCE_LIMIT 6 /* TODO: 20 for non-web */
28#endif /* FREECIV_WEB */
29
30/* When an enemy has this or lower number of cities left, try harder
31 to finish them off. */
32#define FINISH_HIM_CITY_COUNT 5
33
34typedef struct unit_list *(player_unit_list_getter)(struct player *pplayer);
35
36struct unit_type *dai_choose_defender_versus(struct city *pcity,
37 struct unit *attacker);
38struct adv_choice *military_advisor_choose_build(struct ai_type *ait,
39 struct player *pplayer,
40 struct city *pcity,
41 const struct civ_map *mamap,
42 player_unit_list_getter ul_cb);
43void dai_assess_danger_player(struct ai_type *ait, struct player *pplayer,
44 const struct civ_map *dmap);
45int assess_defense_quadratic(struct ai_type *ait, struct city *pcity);
46int assess_defense_unit(struct ai_type *ait, struct city *pcity,
47 struct unit *punit, bool igwall);
48int assess_defense(struct ai_type *ait, struct city *pcity);
49bool dai_process_defender_want(struct ai_type *ait, struct player *pplayer,
50 struct city *pcity, unsigned int danger,
51 struct adv_choice *choice, adv_want extra_want);
52
53#endif /* FC__DAIMILITARY_H */
advchoice.h
incite_cost
char * incite_cost
Definition comments.c:74
dai_assess_danger_player
void dai_assess_danger_player(struct ai_type *ait, struct player *pplayer, const struct civ_map *dmap)
Definition daimilitary.c:630
dai_choose_defender_versus
struct unit_type * dai_choose_defender_versus(struct city *pcity, struct unit *attacker)
Definition daimilitary.c:89
assess_defense
int assess_defense(struct ai_type *ait, struct city *pcity)
Definition daimilitary.c:341
player_unit_list_getter
struct unit_list *() player_unit_list_getter(struct player *pplayer)
Definition daimilitary.h:34
assess_defense_quadratic
int assess_defense_quadratic(struct ai_type *ait, struct city *pcity)
Definition daimilitary.c:277
dai_process_defender_want
bool dai_process_defender_want(struct ai_type *ait, struct player *pplayer, struct city *pcity, unsigned int danger, struct adv_choice *choice, adv_want extra_want)
Definition daimilitary.c:1051
assess_defense_unit
int assess_defense_unit(struct ai_type *ait, struct city *pcity, struct unit *punit, bool igwall)
Definition daimilitary.c:311
military_advisor_choose_build
struct adv_choice * military_advisor_choose_build(struct ai_type *ait, struct player *pplayer, struct city *pcity, const struct civ_map *mamap, player_unit_list_getter ul_cb)
Definition daimilitary.c:1770
punit
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
fc_types.h
adv_want
float adv_want
Definition fc_types.h:1335
adv_choice
Definition advchoice.h:45
ai_type
Definition ai.h:50
city
Definition city.h:320
civ_map
Definition map_types.h:71
player
Definition player.h:249
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
unittype.h