Freeciv-3.3
|
#include "bitvector.h"
#include "log.h"
#include "city.h"
#include "combat.h"
#include "game.h"
#include "map.h"
#include "movement.h"
#include "nation.h"
#include "player.h"
#include "unit.h"
#include "unitlist.h"
#include "pf_tools.h"
#include "srv_log.h"
#include "unithand.h"
#include "unittools.h"
#include "advdata.h"
#include "advgoto.h"
#include "handicaps.h"
#include "daiplayer.h"
#include "daitools.h"
#include "daiunit.h"
#include "daihunter.h"
Go to the source code of this file.
void dai_hunter_choice | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
struct city * | pcity, | ||
struct adv_choice * | choice, | ||
bool | allow_gold_upkeep | ||
) |
Check if we want to build a hunter.
Definition at line 251 of file daihunter.c.
Referenced by military_advisor_choose_build().
We don't need a hunter in this city if we already have one. Return existing hunter if any.
Definition at line 60 of file daihunter.c.
Referenced by dai_hunter_choice().
|
static |
Guess best hunter unit type.
Definition at line 80 of file daihunter.c.
Referenced by dai_hunter_choice().
|
static |
Calculate desire to crush this target.
Definition at line 398 of file daihunter.c.
Referenced by dai_hunter_manage().
Manage a (possibly virtual) hunter. Return the want for building a hunter like this. If we return 0, then we have nothing to do with the hunter. If we return -1, then we succeeded, and can try again. If we return > 0 then we are hunting but ran out of moves (this is also used for construction want).
We try to keep track of our original target, but also opportunistically snatch up closer targets if they are better.
We set punit->server.ai->target to target's id.
Definition at line 435 of file daihunter.c.
Referenced by dai_manage_military(), and eval_hunter_want().
|
static |
Check if we want to build a missile for our hunter.
Definition at line 145 of file daihunter.c.
Referenced by dai_hunter_choice().
Does this unit qualify as a hunter?
Definition at line 287 of file daihunter.c.
Referenced by dai_hunter_find(), dai_hunter_missile_want(), and dai_manage_military().
|
static |
Try to shoot our target with a missile. Also shoot down anything that might attempt to intercept us. We assign missiles to a hunter in dai_unit_new_task().
Definition at line 303 of file daihunter.c.
Referenced by dai_hunter_manage().
|
static |
Support function for ai_hunter_choice()
Definition at line 226 of file daihunter.c.
Referenced by dai_hunter_choice().