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
26{
27 double base_value;
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
38
39bool adv_danger_at(struct unit *punit, struct tile *ptile);
40
41void adv_avoid_risks(struct pf_parameter *parameter,
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);
51
52#endif /* FC__ADVGOTO_H */
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
Definition advgoto.c:47
int adv_unit_def_rating_basic_squared(const struct unit *punit)
Definition advgoto.c:415
int adv_unit_def_rating_basic(const struct unit *punit)
Definition advgoto.c:406
bool adv_danger_at(struct unit *punit, struct tile *ptile)
Definition advgoto.c:425
int adv_unittype_att_rating(const struct unit_type *punittype, int veteran, int moves_left, int hp)
Definition advgoto.c:385
int adv_unit_att_rating(const struct unit *punit)
Definition advgoto.c:396
int adv_could_unit_move_to_tile(struct unit *punit, struct tile *dst_tile)
Definition advgoto.c:359
void adv_avoid_risks(struct pf_parameter *parameter, struct adv_risk_cost *risk_cost, struct unit *punit, const double fearfulness)
Definition advgoto.c:595
bool adv_unit_execute_path(struct unit *punit, struct pf_path *path)
Definition advgoto.c:86
char * incite_cost
Definition comments.c:76
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
double enemy_zoc_cost
Definition advgoto.h:29
double base_value
Definition advgoto.h:27
double fearfulness
Definition advgoto.h:28
Definition tile.h:50
Definition unit.h:140