|
Classes |
struct | a_ai_op |
struct | a_ai |
struct | a_strategy |
struct | a_theater |
struct | weightelt |
Defines |
#define | side_ai_type(s) ((s)->aitype) |
#define | MAXGOALS 30 |
#define | MAXTHEATERS 98 |
#define | ai(s) ((Strategy *) (s)->ai) |
#define | strength_est(side, side2, u) ((ai(side)->strengths[side2->id])[u]) |
#define | allied_strength_est(side, side2, u) ((ai(side)->alstrengths[side2->id])[u]) |
#define | strength0_est(side, side2, u) ((ai(side)->strengths0[side2->id])[u]) |
#define | allied_strength0_est(side, side2, u) ((ai(side)->alstrengths0[side2->id])[u]) |
#define | for_all_theaters(s, th) for ((th) = ai(s)->theaters; (th) != NULL; (th) = (th)->next) \ |
#define | theater_at(s, x, y) (ai(s)->theaters ? ai(s)->theatertable[((int) ai(s)->areatheaters[(x)+area.width*(y)])] : NULL) |
#define | set_theater_at(s, x, y, th) ((ai(s)->areatheaters[(x)+area.width*(y)]) = (th)->id) |
#define | for_all_cells_in_theater(s, x, y, th) |
#define | unit_theater(unit) ((Theater *) (unit)->aihook) |
#define | set_unit_theater(unit, theater) ((unit)->aihook = (char *) (theater)) |
#define | RS_DEVELOP_NEEDED 4 |
#define | RS_DEVELOP_ASSIGNED 3 |
#define | RS_UPGRADE_NEEDED 1 |
Typedefs |
typedef enum a_game_class | GameClass |
typedef a_ai_op | AI_ops |
typedef a_ai | AI |
typedef a_strategy | Strategy |
typedef a_theater | Theater |
Enumerations |
enum | a_game_class { gc_none,
gc_standard,
gc_time,
gc_advanced
} |
Functions |
void | try_to_draw (Side *side, int flag, char *ainame) |
void | give_up (Side *side, char *ainame) |
int | goal_truth (Side *side, Goal *goal) |
int | accelerable (int u) |
int | accelerator (int u1, int u2) |
GameClass | find_game_class (void) |
void | update_unit_plans (Side *side) |
void | update_unit_plans_randomly (Side *side) |
int | need_this_type_to_collect (Side *side, int u, int m) |
void | assign_to_collection (Side *side, Unit *unit, int m) |
void | assign_to_improve (Side *side, Unit *unit) |
int | assign_to_colonize (Side *side, Unit *unit) |
void | assign_to_defend_unit (Unit *unit, Unit *unit2) |
void | assign_to_exploration (Side *side, Unit *unit) |
void | assign_explorer_to_theater (Side *side, Unit *unit, Theater *theater) |
void | assign_to_explorer_construction (Side *side, Unit *unit) |
void | assign_to_offense (Side *side, Unit *unit) |
void | assign_to_offense_support (Side *side, Unit *unit) |
void | assign_to_colonization_support (Side *side, Unit *unit) |
void | assign_to_defense (Side *side, Unit *unit) |
void | assign_to_defense_support (Side *side, Unit *unit) |
int | preferred_build_type (Side *side, Unit *unit, int plantype) |
int | can_develop_on (int u, int u2) |
int | needs_develop (Side *side, int u) |
int | assign_to_develop_on (Side *side, Unit *unit, int u2) |
int | build_depot_for_self (Unit *unit) |
int | desired_direction_impassable (Unit *unit, int x, int y) |
int | could_be_ferried (Unit *unit, int x, int y) |
int | blocked_by_enemy (Unit *unit, int x, int y, int shortest) |
int | attack_blockage (Side *side, Unit *unit, int x, int y, int shortest) |
int | enemy_close_by (Side *side, Unit *unit, int dist, int *xp, int *yp) |
int | suitable_port (Unit *unit) |
int | need_more_transportation (Side *side) |
int | need_explorers (Side *side) |
void | add_goal (Side *side, Goal *goal) |
Goal * | has_goal (Side *side, GoalType goaltype) |
Goal * | has_unsatisfied_goal (Side *side, GoalType goaltype) |
Variables |
GameClass | game_class |
int | bhw_max |