|
Classes |
struct | OpRole |
| Operational Role. More...
|
struct | AI_Side |
| Per-side master AI structure. More...
|
Enumerations |
enum | OpRole_Type { OR_NONE = 0,
OR_SHUTTLE,
OR_CONSTRUCTOR,
OR_Total
} |
| Types of Operational Roles. More...
|
enum | OpRole_Outcome { ORO_INVALID = 0,
ORO_FAILED,
ORO_OK,
ORO_HANDLED_TACTICAL
} |
| Operational Role Outcomes. More...
|
enum | TacticalConcern { TC_NONE = 0,
TC_DANGER_IMMEDIATE,
TC_Total
} |
| Enumeration of tactical concerns. More...
|
Functions |
void | create_side_ai (Side *side) |
| Create/init master AI structure associated with a side.
|
AI_Side * | get_side_ai (Side *side) |
| Return master AI structure associated with a side.
|
void | allocate_oproles (Side *side, int nodesnum) |
| Allocate a new block of oproles in pool.
|
OpRole * | acquire_oprole (Side *side, int id, OpRole_Type type) |
| Acquire oprole.
|
void | release_oprole (OpRole *oprole) |
| Release oprole.
|
OpRole * | find_oprole (Side *side, int id) |
| Find oprole associated with a particular unit ID.
|
int | choose_utype_to_construct (OpRole *oprole, int *uscore) |
| Choose utype to construct, and optionally return its relative worth.
|
Unit * | choose_unit_to_build_upon (OpRole *oprole, int *uscore) |
Unit * | choose_unit_to_repair (OpRole *oprole, int *uscore) |
Unit * | choose_transport_to_construct_in (int u2, Side *side, UnitView *uvtspt, int upchain) |
| Choose transport to construct given utype in.
|
Task * | generate_construction_task (Unit *unit, int u2) |
| Generate an appropriate construction task given constructor and utype.
|
int | choose_construction_or_repair (OpRole *oprole) |
| Choose a construction task to perform.
|
OpRole_Outcome | handle_constructor_oprole (OpRole *oprole) |
| Handle constructor operational role.
|
void | handle_oprole (OpRole *oprole) |
| Evaluate an operational role.
|
void | handle_oproles (Side *side) |
| Evaluate all operational roles on a side.
|
int | n_plan_to_construct_at (Side *side, int x, int y, short *p_utypes) |
| How many friendly units plan to construct at given location?
|
int | resource_contention_with_any (int u, int x, int y, Side *side) |
| Would any units be in contention with an utype at a given location?
|
int | choose_best_hit_method (int hitmethod, int fhm, int ahm, int dhm, int ftm, int atm, int dtm) |
| Given various combat stats, which hit method is preferred?
|
int | choose_best_hit_method (Unit *unit, UnitView *uview) |
| Which hit method should given unit use to hit given uview?
|
int | guess_best_hit_method_used_by (Unit *unit, UnitView *uview) |
| Which hit method should given uview use to hit given unit?
|
int | choose_best_capture_method (int capmethod, int fcm, int acm, int dccm, int ftm, int atm, int dctm) |
| Given various combat stats, which capture method is preferred?
|
int | choose_best_capture_method (Unit *unit, UnitView *uview) |
| Which capture method should given unit use to capture given uview?
|
int | guess_best_capture_method_used_by (Unit *unit, UnitView *uview) |
| Which capture method should given uview use ti hit given unit?
|
int | turns_to_defeat_best_ratio (Unit *unit, UnitView *uview) |
int | seems_safe_against (Unit *unit, UnitView *uview) |
| Does given unit seem safe from given uview?
|
int | is_frightened_by (Unit *unit, UnitView *uview) |
| Is given unit deathly afraid of given uview?
|
int | is_harassed_by (Unit *unit, UnitView *uview) |
| Is given unit possibly being harassed by given uview?
|
int | choose_flee_direction (Unit *unit, int feardirs[NUMDIRS+1], int hardirs[NUMDIRS+1]) |
| Choose best direction, if any, to flee from fears.
|
TacticalConcern | handle_immediate_danger (Unit *unit) |
| Handle immediate danger to given unit.
|
TacticalConcern | handle_tactical_situation (Unit *unit) |
| Handle tactical situation of given unit.
|