Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

aiunit2.h

Go to the documentation of this file.
00001 /* Unit and Unit Type Analysis and Status Functions for AIs
00002    Copyright (C) 2005 Eric A. McDonald.
00003 
00004 Xconq is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation; either version 2, or (at your option)
00007 any later version.  See the file COPYING.  */
00008 
00025 /* Vision and Detection Worths */
00026 
00028 extern int seer_worth(int u);
00030 extern void set_seer_worth(int u, int n);
00032 extern void maybe_set_seer_worths(void);
00033 
00034 /* Size Estimates */
00035 
00037 
00038 extern int could_meet_size_goal(int u, int x, int y);
00039 
00040 /* ACP Estimates */
00041 
00042 namespace Xconq {
00044     extern int *cv__acp_max_wo_effects;
00046     extern int *cv__acp_per_turn_max_wo_effects;
00047 }
00049 extern int acp_max_wo_effects(int u);
00051 extern int acp_per_turn_max_wo_effects(int u);
00052 
00053 /* Speed Estimates */
00054 
00055 namespace Xconq {
00057     extern int *cv__speed_max_wo_effects;
00058 }
00060 extern int speed_max_wo_effects(int u);
00061 
00062 /* MP Estimates */
00063 
00064 namespace Xconq {
00066     extern int *cv__mp_per_turn_max;
00067 }
00069 extern int mp_per_turn_max(int u);
00070 
00071 /* Number of Moves Estimates */
00072 
00073 namespace Xconq {
00075     extern int **cv__moves_per_turn_max_on_t;
00076 }
00078 extern int moves_per_turn_max(int u, int t);
00079 
00080 /* Movement Range Estimates */
00081 
00082 namespace Xconq {
00084     extern int ***cv__move_range_max_on_t_with_m;
00086     extern int **cv__move_range_max_on_t;
00087 }
00089 extern int move_range_max_on(int u, int t, int m, int amt);
00091 extern int move_range_max(int u, int t, int *amt);
00093 extern int move_range_best(int u, int *amt);
00095 extern int move_range_worst(int u, int *amt);
00096 
00097 /* Movement Worths */
00098 
00100 extern int mover_worth(int u);
00102 extern void set_mover_worth(int u, int n);
00104 extern void maybe_set_mover_worths(void);
00105 
00107 extern int depot_worth(int u);
00109 extern void set_depot_worth(int u, int n);
00111 extern void maybe_set_depot_worths(void);
00112 
00114 extern int distributor_worth(int u);
00116 extern void set_distributor_worth(int u, int n);
00118 extern void maybe_set_distributor_worths(void);
00119 
00121 extern int producer_worth(int u);
00123 extern void set_producer_worth(int u, int n);
00125 extern void maybe_set_producer_worths(void);
00127 extern int producer_worth_on_known(Unit *producer, int x, int y);
00128 
00130 extern int prod_enhancer_worth(int u);
00132 extern void set_prod_enhancer_worth(int u, int n);
00134 extern void maybe_set_prod_enhancer_worths(void);
00135 
00136 /* Worths as a base. */
00137 /* A base is considered to be a depot inclusive-or producer that has 
00138     stored materials in common with another unit that can occupy it. */
00139 
00141 extern int base_worth_for(int u, int u2);
00143 extern void set_base_worth_for(int u, int n);
00145 extern void maybe_set_base_worths_for(void);
00146 
00148 extern int base_worth(int u);
00150 extern void set_base_worth(int u, int n);
00152 extern void maybe_set_base_worths(void);
00153 
00154 /* Construction Questions */
00155 
00157 extern int can_create_in(
00158     Unit *actor, Unit *creator, int u3, Unit *transport);
00160 extern int can_create_at(Unit *actor, Unit *creator, int u3, int x, int y);
00161 
00162 /* Tooling Point Estimates */
00163 
00165 extern int tp_per_turn_est(Unit *unit, int u2);
00166 
00167 /* Construction Point Estimates */
00168 
00170 extern int cp_per_turn_est(Unit *unit, int u2);
00172 extern int cp_gained_per_turn_est(Unit *unit, Side *side);
00173 
00174 /* Hitpoint Estimates */
00175 
00177 extern int hp_per_turn_est(Unit *unit, int u2);
00179 extern int hp_gained_per_turn_est(Unit *unit, Side *side);
00180 
00181 /* Combat Rate Estimates */
00182 
00184 extern int firings_per_turn_est(int u, int u2);
00186 extern int attacks_per_turn_est(int u, int u2);
00188 extern int detonations_per_turn_est(int u, int u2);
00190 extern int capture_attempts_per_turn_est(int u, int u2, Side *side2);
00191 
00192 /* Hit Estimates */
00193 
00195 extern int firings_mean_to_destroy(
00196     int u, int u2, int hp2, int dm = 100, int hcm = 100);
00198 extern int firings_mean_to_destroy(int u, UnitView *uview);
00200 extern int firings_mean_to_destroy(int u2, Unit *unit);
00202 extern int fire_turns_mean_to_destroy(int u, UnitView *uview);
00204 extern int fire_turns_mean_to_destroy(int u2, Unit *unit);
00205 
00207 extern int attacks_mean_to_destroy(
00208     int u, int u2, int hp2, int dm = 100, int hcm = 100);
00210 extern int attacks_mean_to_destroy(int u, UnitView *uview);
00212 extern int attacks_mean_to_destroy(int u2, Unit *unit);
00214 extern int attack_turns_mean_to_destroy(int u, UnitView *uview);
00216 extern int attack_turns_mean_to_destroy(int u2, Unit *unit);
00217 
00219 extern int detonations_mean_to_destroy(
00220     int u, int u2, int hp2, int dm = 100);
00222 extern int detonations_mean_to_destroy(int u, UnitView *uview);
00224 extern int detonations_mean_to_destroy(int u2, Unit *unit);
00226 extern int detonate_turns_mean_to_destroy(int u, UnitView *uview);
00228 extern int detonate_turns_mean_to_destroy(int u2, Unit *unit);
00229 
00230 /* Capture Estimates */
00231 
00233 extern int firings_mean_to_capture(int u, int u2, Side *side2, int ccm = 100);
00235 extern int firings_mean_to_capture(int u, UnitView *uview);
00237 extern int firings_mean_to_capture(int u2, Unit *unit);
00239 extern int fire_turns_mean_to_capture(int u, UnitView *uview);
00241 extern int fire_turns_mean_to_capture(int u2, Unit *unit);
00242 
00244 extern int attacks_mean_to_capture(int u, int u2, Side *side2, int ccm = 100);
00246 extern int attacks_mean_to_capture(int u, UnitView *uview);
00248 extern int attacks_mean_to_capture(int u2, Unit *unit);
00250 extern int attack_turns_mean_to_capture(int u, UnitView *uview);
00252 extern int attack_turns_mean_to_capture(int u2, Unit *unit);
00253 
00255 extern int attempts_mean_to_capture(int u, int u2, Side *side2, int ccm = 100);
00257 extern int attempts_mean_to_capture(int u, UnitView *uview);
00259 extern int attempts_mean_to_capture(int u2, Unit *unit);
00261 extern int capture_turns_mean_to_capture(int u, UnitView *uview);
00263 extern int capture_turns_mean_to_capture(int u2, Unit *unit);
00264 
00265 /* Worths as an explorer. */
00266 /* An explorer is considered to be a mobile unit which can see. */
00267 
00269 
00276 extern int explorer_worth(int u);
00278 extern void set_explorer_worth(int u, int n);
00280 extern void maybe_set_explorer_worths(void);
00281 
00282 /* Total Worths */
00283 
00285 extern int total_worth(int u);

Generated on Sat Sep 17 10:28:52 2005 for XconqKernel by doxygen 1.3.6