Freeciv-3.2
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);
39 const struct civ_map *nmap,
40 struct player *pplayer,
41 struct city *pcity,
43void dai_assess_danger_player(struct ai_type *ait,
44 const struct civ_map *nmap, struct player *pplayer);
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, const struct civ_map *nmap,
50 struct player *pplayer,
51 struct city *pcity, unsigned int danger,
52 struct adv_choice *choice, adv_want extra_want);
53
54#endif /* FC__DAIMILITARY_H */
char * incite_cost
Definition comments.c:75
struct unit_type * dai_choose_defender_versus(struct city *pcity, struct unit *attacker)
Definition daimilitary.c:91
int assess_defense(struct ai_type *ait, struct city *pcity)
struct adv_choice * military_advisor_choose_build(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct city *pcity, player_unit_list_getter ul_cb)
struct unit_list *() player_unit_list_getter(struct player *pplayer)
Definition daimilitary.h:34
bool dai_process_defender_want(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer, struct city *pcity, unsigned int danger, struct adv_choice *choice, adv_want extra_want)
int assess_defense_quadratic(struct ai_type *ait, struct city *pcity)
void dai_assess_danger_player(struct ai_type *ait, const struct civ_map *nmap, struct player *pplayer)
int assess_defense_unit(struct ai_type *ait, struct city *pcity, struct unit *punit, bool igwall)
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
float adv_want
Definition fc_types.h:1354
Definition ai.h:50
Definition city.h:320
Definition unit.h:138