Freeciv-3.3: /fast/freeciv/nightly/main/server/advisors/advgoto.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
advgoto.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__ADVGOTO_H
14#define FC__ADVGOTO_H
15
16/* common/aicore */
17#include "path_finding.h"
18
19/*
20 * WAGs: how hard to avoid tall stacks of units.
21 * Pass as fearfulness values to adv_avoid_risks.
22 */
23#define NORMAL_STACKING_FEARFULNESS ((double)PF_TURN_FACTOR / 36.0)
24
25 struct adv_risk_cost
26{
27 double base_value;
28 double fearfulness;
29 double enemy_zoc_cost;
30};
31
32bool adv_follow_path(struct unit *punit, struct pf_path *path,
33 struct tile *ptile);
34
35bool adv_unit_execute_path(struct unit *punit, struct pf_path *path);
36
37int adv_could_unit_move_to_tile(struct unit *punit, struct tile *dst_tile);
38
39bool adv_danger_at(struct unit *punit, struct tile *ptile);
40
41void adv_avoid_risks(struct pf_parameter *parameter,
42 struct adv_risk_cost *risk_cost,
43 struct unit *punit,
44 const double fearfulness);
45
46int adv_unittype_att_rating(const struct unit_type *punittype, int veteran,
47 int moves_left, int hp);
48int adv_unit_att_rating(const struct unit *punit);
49int adv_unit_def_rating_basic(const struct unit *punit);
50int adv_unit_def_rating_basic_squared(const struct unit *punit);
51
52#endif /* FC__ADVGOTO_H */
adv_follow_path
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
Definition advgoto.c:47
adv_unit_def_rating_basic_squared
int adv_unit_def_rating_basic_squared(const struct unit *punit)
Definition advgoto.c:415
adv_unit_def_rating_basic
int adv_unit_def_rating_basic(const struct unit *punit)
Definition advgoto.c:406
adv_danger_at
bool adv_danger_at(struct unit *punit, struct tile *ptile)
Definition advgoto.c:425
adv_unittype_att_rating
int adv_unittype_att_rating(const struct unit_type *punittype, int veteran, int moves_left, int hp)
Definition advgoto.c:385
adv_unit_att_rating
int adv_unit_att_rating(const struct unit *punit)
Definition advgoto.c:396
adv_could_unit_move_to_tile
int adv_could_unit_move_to_tile(struct unit *punit, struct tile *dst_tile)
Definition advgoto.c:359
adv_avoid_risks
void adv_avoid_risks(struct pf_parameter *parameter, struct adv_risk_cost *risk_cost, struct unit *punit, const double fearfulness)
Definition advgoto.c:595
adv_unit_execute_path
bool adv_unit_execute_path(struct unit *punit, struct pf_path *path)
Definition advgoto.c:86
incite_cost
char * incite_cost
Definition comments.c:74
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
path_finding.h
adv_risk_cost
Definition advgoto.h:26
adv_risk_cost::enemy_zoc_cost
double enemy_zoc_cost
Definition advgoto.h:29
adv_risk_cost::base_value
double base_value
Definition advgoto.h:27
adv_risk_cost::fearfulness
double fearfulness
Definition advgoto.h:28
pf_parameter
Definition path_finding.h:357
pf_path
Definition path_finding.h:344
tile
Definition tile.h:50
unit_type
Definition unittype.h:507
unit
Definition unit.h:140