Freeciv-3.1: /fast/freeciv/nightly/S3_1/ai/default/aiparatrooper.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions
aiparatrooper.c File Reference
`#include "log.h"`
`#include "city.h"`
`#include "game.h"`
`#include "player.h"`
`#include "research.h"`
`#include "unit.h"`
`#include "unitlist.h"`
`#include "pf_tools.h"`
`#include "citytools.h"`
`#include "maphand.h"`
`#include "srv_log.h"`
`#include "unithand.h"`
`#include "unittools.h"`
`#include "advdata.h"`
`#include "mapgen_utils.h"`
`#include "handicaps.h"`
`#include "aidata.h"`
`#include "ailog.h"`
`#include "aiplayer.h"`
`#include "aiunit.h"`
`#include "aitools.h"`
`#include "daicity.h"`
`#include "aiparatrooper.h"`

Go to the source code of this file.

## Macros

#define | LOGLEVEL_PARATROOPER LOG_DEBUG

## Functions

static struct tile * | find_best_tile_to_paradrop_to (struct ai_type *ait, struct unit *punit)
void | dai_manage_paratrooper (struct ai_type *ait, struct player *pplayer, struct unit *punit)
static int | calculate_want_for_paratrooper (struct unit *punit, struct tile *ptile_city)
void | dai_choose_paratrooper (struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, bool allow_gold_upkeep)

## Macro Definition Documentation

## ◆ LOGLEVEL_PARATROOPER

#define LOGLEVEL_PARATROOPER LOG_DEBUG

Definition at line 59 of file aiparatrooper.c.

## Function Documentation

## ◆ calculate_want_for_paratrooper()

static int calculate_want_for_paratrooper | ( | struct unit * | punit,
|  | struct tile * | ptile_city
| ) |  |

static

Evaluate value of the unit. Idea: one paratrooper can scare/protect all cities in their range

Definition at line 311 of file aiparatrooper.c.

Referenced by dai_choose_paratrooper().

## ◆ dai_choose_paratrooper()

void dai_choose_paratrooper | ( | struct ai_type * | ait,
|  | struct player * | pplayer,
|  | struct city * | pcity,
|  | struct adv_choice * | choice,
|  | bool | allow_gold_upkeep
| ) |  |

Chooses to build a paratroopers if necessary

Definition at line 382 of file aiparatrooper.c.

Referenced by military_advisor_choose_build().

## ◆ dai_manage_paratrooper()

void dai_manage_paratrooper | ( | struct ai_type * | ait,
|  | struct player * | pplayer,
|  | struct unit * | punit
| ) |  |

This function does manage the paratrooper units of the AI.

Definition at line 198 of file aiparatrooper.c.

Referenced by dai_manage_unit().

## ◆ find_best_tile_to_paradrop_to()

static struct tile * find_best_tile_to_paradrop_to | ( | struct ai_type * | ait,
|  | struct unit * | punit
| ) |  |

static

Find best tile the paratrooper should jump to.

Definition at line 64 of file aiparatrooper.c.

Referenced by dai_manage_paratrooper().