40#define U_LAST MAX_NUM_UNITS
54#define UNIT_MAX_PARADROP_RANGE (65535 - 1)
57#define SPECENUM_NAME unit_class_flag_id
58#define SPECENUM_VALUE0 UCF_TERRAIN_SPEED
59#define SPECENUM_VALUE0NAME N_("?uclassflag:TerrainSpeed")
60#define SPECENUM_VALUE1 UCF_TERRAIN_DEFENSE
61#define SPECENUM_VALUE1NAME N_("?uclassflag:TerrainDefense")
62#define SPECENUM_VALUE2 UCF_DAMAGE_SLOWS
63#define SPECENUM_VALUE2NAME N_("?uclassflag:DamageSlows")
65#define SPECENUM_VALUE3 UCF_CAN_OCCUPY_CITY
66#define SPECENUM_VALUE3NAME N_("?uclassflag:CanOccupyCity")
67#define SPECENUM_VALUE4 UCF_BUILD_ANYWHERE
68#define SPECENUM_VALUE4NAME N_("?uclassflag:BuildAnywhere")
69#define SPECENUM_VALUE5 UCF_UNREACHABLE
70#define SPECENUM_VALUE5NAME N_("?uclassflag:Unreachable")
72#define SPECENUM_VALUE6 UCF_COLLECT_RANSOM
73#define SPECENUM_VALUE6NAME N_("?uclassflag:CollectRansom")
75#define SPECENUM_VALUE7 UCF_ZOC
76#define SPECENUM_VALUE7NAME N_("?uclassflag:ZOC")
78#define SPECENUM_VALUE8 UCF_DOESNT_OCCUPY_TILE
79#define SPECENUM_VALUE8NAME N_("?uclassflag:DoesntOccupyTile")
81#define SPECENUM_VALUE9 UCF_ATTACK_NON_NATIVE
82#define SPECENUM_VALUE9NAME N_("?uclassflag:AttackNonNative")
84#define SPECENUM_VALUE10 UCF_KILLCITIZEN
85#define SPECENUM_VALUE10NAME N_("?uclassflag:KillCitizen")
87#define SPECENUM_VALUE11 UCF_HUT_FRIGHTEN
88#define SPECENUM_VALUE11NAME N_("?uclassflag:HutFrighten")
90#define SPECENUM_VALUE12 UCF_NONNAT_BOMBARD_TGT
91#define SPECENUM_VALUE12NAME N_("?uclassflag:NonNatBombardTgt")
93#define SPECENUM_VALUE13 UCF_USER_FLAG_1
94#define SPECENUM_VALUE14 UCF_USER_FLAG_2
95#define SPECENUM_VALUE15 UCF_USER_FLAG_3
96#define SPECENUM_VALUE16 UCF_USER_FLAG_4
97#define SPECENUM_VALUE17 UCF_USER_FLAG_5
98#define SPECENUM_VALUE18 UCF_USER_FLAG_6
99#define SPECENUM_VALUE19 UCF_USER_FLAG_7
100#define SPECENUM_VALUE20 UCF_USER_FLAG_8
101#define SPECENUM_VALUE21 UCF_USER_FLAG_9
102#define SPECENUM_VALUE22 UCF_USER_FLAG_10
103#define SPECENUM_VALUE23 UCF_USER_FLAG_11
104#define SPECENUM_VALUE24 UCF_USER_FLAG_12
107#define SPECENUM_COUNT UCF_COUNT
108#define SPECENUM_NAMEOVERRIDE
109#define SPECENUM_BITVECTOR bv_unit_class_flags
112#define UCF_LAST_USER_FLAG UCF_USER_FLAG_12
113#define MAX_NUM_USER_UCLASS_FLAGS (UCF_LAST_USER_FLAG \
114 - UCF_USER_FLAG_1 + 1)
117#define SPECENUM_NAME unit_move_type
118#define SPECENUM_VALUE0 UMT_LAND
119#define SPECENUM_VALUE0NAME "Land"
120#define SPECENUM_VALUE1 UMT_SEA
121#define SPECENUM_VALUE1NAME "Sea"
122#define SPECENUM_VALUE2 UMT_BOTH
123#define SPECENUM_VALUE2NAME "Both"
133struct extra_type_list;
134struct unit_class_list;
178#define SPECENUM_NAME unit_type_flag_id
180#define SPECENUM_VALUE0 UTYF_NOZOC
181#define SPECENUM_VALUE0NAME N_("?unitflag:HasNoZOC")
182#define SPECENUM_VALUE1 UTYF_IGZOC
184#define SPECENUM_VALUE1NAME N_("?unitflag:IgZOC")
185#define SPECENUM_VALUE2 UTYF_CIVILIAN
186#define SPECENUM_VALUE2NAME N_("?unitflag:NonMil")
187#define SPECENUM_VALUE3 UTYF_IGTER
189#define SPECENUM_VALUE3NAME N_("?unitflag:IgTer")
190#define SPECENUM_VALUE4 UTYF_FIELDUNIT
191#define SPECENUM_VALUE4NAME N_("?unitflag:FieldUnit")
194#define SPECENUM_VALUE5 UTYF_PROVOKING
195#define SPECENUM_VALUE5NAME N_("?unitflag:Provoking")
197#define SPECENUM_VALUE6 UTYF_NEVER_PROTECTS
198#define SPECENUM_VALUE6NAME N_("?unitflag:NeverProtects")
200#define SPECENUM_VALUE7 UTYF_SETTLERS
201#define SPECENUM_VALUE7NAME N_("?unitflag:Settlers")
202#define SPECENUM_VALUE8 UTYF_DIPLOMAT
203#define SPECENUM_VALUE8NAME N_("?unitflag:Diplomat")
205#define SPECENUM_VALUE9 UTYF_COAST_STRICT
206#define SPECENUM_VALUE9NAME N_("?unitflag:CoastStrict")
208#define SPECENUM_VALUE10 UTYF_COAST
209#define SPECENUM_VALUE10NAME N_("?unitflag:Coast")
211#define SPECENUM_VALUE11 UTYF_SHIELD2GOLD
212#define SPECENUM_VALUE11NAME N_("?unitflag:Shield2Gold")
214#define SPECENUM_VALUE12 UTYF_SPY
215#define SPECENUM_VALUE12NAME N_("?unitflag:Spy")
217#define SPECENUM_VALUE13 UTYF_ONLY_NATIVE_ATTACK
218#define SPECENUM_VALUE13NAME N_("?unitflag:Only_Native_Attack")
220#define SPECENUM_VALUE14 UTYF_FANATIC
221#define SPECENUM_VALUE14NAME N_("?unitflag:Fanatic")
223#define SPECENUM_VALUE15 UTYF_GAMELOSS
224#define SPECENUM_VALUE15NAME N_("?unitflag:GameLoss")
226#define SPECENUM_VALUE16 UTYF_UNIQUE
227#define SPECENUM_VALUE16NAME N_("?unitflag:Unique")
231#define SPECENUM_VALUE17 UTYF_EVAC_FIRST
232#define SPECENUM_VALUE17NAME N_("?unitflag:EvacuateFirst")
234#define SPECENUM_VALUE18 UTYF_SUPERSPY
235#define SPECENUM_VALUE18NAME N_("?unitflag:SuperSpy")
237#define SPECENUM_VALUE19 UTYF_NOHOME
238#define SPECENUM_VALUE19NAME N_("?unitflag:NoHome")
240#define SPECENUM_VALUE20 UTYF_NO_VETERAN
241#define SPECENUM_VALUE20NAME N_("?unitflag:NoVeteran")
243#define SPECENUM_VALUE21 UTYF_CITYBUSTER
244#define SPECENUM_VALUE21NAME N_("?unitflag:CityBuster")
246#define SPECENUM_VALUE22 UTYF_NOBUILD
247#define SPECENUM_VALUE22NAME N_("?unitflag:NoBuild")
250#define SPECENUM_VALUE23 UTYF_BADWALLATTACKER
251#define SPECENUM_VALUE23NAME N_("?unitflag:BadWallAttacker")
253#define SPECENUM_VALUE24 UTYF_BADCITYDEFENDER
254#define SPECENUM_VALUE24NAME N_("?unitflag:BadCityDefender")
256#define SPECENUM_VALUE25 UTYF_BARBARIAN_ONLY
257#define SPECENUM_VALUE25NAME N_("?unitflag:BarbarianOnly")
259#define SPECENUM_VALUE26 UTYF_NEWCITY_GAMES_ONLY
260#define SPECENUM_VALUE26NAME N_("?unitflag:NewCityGamesOnly")
262#define SPECENUM_VALUE27 UTYF_CANESCAPE
263#define SPECENUM_VALUE27NAME N_("?unitflag:CanEscape")
265#define SPECENUM_VALUE28 UTYF_CANKILLESCAPING
266#define SPECENUM_VALUE28NAME N_("?unitflag:CanKillEscaping")
268#define SPECENUM_VALUE29 UTYF_USER_FLAG_1
269#define SPECENUM_VALUE30 UTYF_USER_FLAG_2
270#define SPECENUM_VALUE31 UTYF_USER_FLAG_3
271#define SPECENUM_VALUE32 UTYF_USER_FLAG_4
272#define SPECENUM_VALUE33 UTYF_USER_FLAG_5
273#define SPECENUM_VALUE34 UTYF_USER_FLAG_6
274#define SPECENUM_VALUE35 UTYF_USER_FLAG_7
275#define SPECENUM_VALUE36 UTYF_USER_FLAG_8
276#define SPECENUM_VALUE37 UTYF_USER_FLAG_9
277#define SPECENUM_VALUE38 UTYF_USER_FLAG_10
278#define SPECENUM_VALUE39 UTYF_USER_FLAG_11
279#define SPECENUM_VALUE40 UTYF_USER_FLAG_12
280#define SPECENUM_VALUE41 UTYF_USER_FLAG_13
281#define SPECENUM_VALUE42 UTYF_USER_FLAG_14
282#define SPECENUM_VALUE43 UTYF_USER_FLAG_15
283#define SPECENUM_VALUE44 UTYF_USER_FLAG_16
284#define SPECENUM_VALUE45 UTYF_USER_FLAG_17
285#define SPECENUM_VALUE46 UTYF_USER_FLAG_18
286#define SPECENUM_VALUE47 UTYF_USER_FLAG_19
287#define SPECENUM_VALUE48 UTYF_USER_FLAG_20
288#define SPECENUM_VALUE49 UTYF_USER_FLAG_21
289#define SPECENUM_VALUE50 UTYF_USER_FLAG_22
290#define SPECENUM_VALUE51 UTYF_USER_FLAG_23
291#define SPECENUM_VALUE52 UTYF_USER_FLAG_24
292#define SPECENUM_VALUE53 UTYF_USER_FLAG_25
293#define SPECENUM_VALUE54 UTYF_USER_FLAG_26
294#define SPECENUM_VALUE55 UTYF_USER_FLAG_27
295#define SPECENUM_VALUE56 UTYF_USER_FLAG_28
296#define SPECENUM_VALUE57 UTYF_USER_FLAG_29
297#define SPECENUM_VALUE58 UTYF_USER_FLAG_30
298#define SPECENUM_VALUE59 UTYF_USER_FLAG_31
299#define SPECENUM_VALUE60 UTYF_USER_FLAG_32
300#define SPECENUM_VALUE61 UTYF_USER_FLAG_33
301#define SPECENUM_VALUE62 UTYF_USER_FLAG_34
302#define SPECENUM_VALUE63 UTYF_USER_FLAG_35
303#define SPECENUM_VALUE64 UTYF_USER_FLAG_36
304#define SPECENUM_VALUE65 UTYF_USER_FLAG_37
305#define SPECENUM_VALUE66 UTYF_USER_FLAG_38
306#define SPECENUM_VALUE67 UTYF_USER_FLAG_39
307#define SPECENUM_VALUE68 UTYF_USER_FLAG_40
308#define SPECENUM_VALUE69 UTYF_USER_FLAG_41
309#define SPECENUM_VALUE70 UTYF_USER_FLAG_42
310#define SPECENUM_VALUE71 UTYF_USER_FLAG_43
311#define SPECENUM_VALUE72 UTYF_USER_FLAG_44
312#define SPECENUM_VALUE73 UTYF_USER_FLAG_45
315#define UTYF_LAST_USER_FLAG UTYF_USER_FLAG_45
316#define MAX_NUM_USER_UNIT_FLAGS (UTYF_LAST_USER_FLAG - UTYF_USER_FLAG_1 + 1)
317#define SPECENUM_NAMEOVERRIDE
318#define SPECENUM_BITVECTOR bv_unit_type_flags
333#define L_FIRST (UTYF_LAST_USER_FLAG + 1)
335#define SPECENUM_NAME unit_role_id
337#define SPECENUM_VALUE74 L_FIRSTBUILD
338#define SPECENUM_VALUE74NAME N_("?unitflag:FirstBuild")
340#define SPECENUM_VALUE75 L_EXPLORER
341#define SPECENUM_VALUE75NAME N_("?unitflag:Explorer")
343#define SPECENUM_VALUE76 L_HUT
344#define SPECENUM_VALUE76NAME N_("?unitflag:Hut")
346#define SPECENUM_VALUE77 L_HUT_TECH
347#define SPECENUM_VALUE77NAME N_("?unitflag:HutTech")
349#define SPECENUM_VALUE78 L_PARTISAN
350#define SPECENUM_VALUE78NAME N_("?unitflag:Partisan")
352#define SPECENUM_VALUE79 L_DEFEND_OK
353#define SPECENUM_VALUE79NAME N_("?unitflag:DefendOk")
355#define SPECENUM_VALUE80 L_DEFEND_GOOD
356#define SPECENUM_VALUE80NAME N_("?unitflag:DefendGood")
358#define SPECENUM_VALUE81 L_FERRYBOAT
359#define SPECENUM_VALUE81NAME N_("?unitflag:FerryBoat")
361#define SPECENUM_VALUE82 L_BARBARIAN
362#define SPECENUM_VALUE82NAME N_("?unitflag:Barbarian")
364#define SPECENUM_VALUE83 L_BARBARIAN_TECH
365#define SPECENUM_VALUE83NAME N_("?unitflag:BarbarianTech")
367#define SPECENUM_VALUE84 L_BARBARIAN_BOAT
368#define SPECENUM_VALUE84NAME N_("?unitflag:BarbarianBoat")
370#define SPECENUM_VALUE85 L_BARBARIAN_BUILD
371#define SPECENUM_VALUE85NAME N_("?unitflag:BarbarianBuild")
373#define SPECENUM_VALUE86 L_BARBARIAN_BUILD_TECH
374#define SPECENUM_VALUE86NAME N_("?unitflag:BarbarianBuildTech")
376#define SPECENUM_VALUE87 L_BARBARIAN_LEADER
377#define SPECENUM_VALUE87NAME N_("?unitflag:BarbarianLeader")
379#define SPECENUM_VALUE88 L_BARBARIAN_SEA
380#define SPECENUM_VALUE88NAME N_("?unitflag:BarbarianSea")
382#define SPECENUM_VALUE89 L_BARBARIAN_SEA_TECH
383#define SPECENUM_VALUE89NAME N_("?unitflag:BarbarianSeaTech")
385#define SPECENUM_VALUE90 L_START_CITIES
386#define SPECENUM_VALUE90NAME N_("?unitflag:CitiesStartUnit")
388#define SPECENUM_VALUE91 L_START_WORKER
389#define SPECENUM_VALUE91NAME N_("?unitflag:WorkerStartUnit")
391#define SPECENUM_VALUE92 L_START_EXPLORER
392#define SPECENUM_VALUE92NAME N_("?unitflag:ExplorerStartUnit")
394#define SPECENUM_VALUE93 L_START_KING
395#define SPECENUM_VALUE93NAME N_("?unitflag:KingStartUnit")
397#define SPECENUM_VALUE94 L_START_DIPLOMAT
398#define SPECENUM_VALUE94NAME N_("?unitflag:DiplomatStartUnit")
400#define SPECENUM_VALUE95 L_START_FERRY
401#define SPECENUM_VALUE95NAME N_("?unitflag:FerryStartUnit")
403#define SPECENUM_VALUE96 L_START_DEFEND_OK
404#define SPECENUM_VALUE96NAME N_("?unitflag:DefendOkStartUnit")
406#define SPECENUM_VALUE97 L_START_DEFEND_GOOD
407#define SPECENUM_VALUE97NAME N_("?unitflag:DefendGoodStartUnit")
409#define SPECENUM_VALUE98 L_START_ATTACK_FAST
410#define SPECENUM_VALUE98NAME N_("?unitflag:AttackFastStartUnit")
412#define SPECENUM_VALUE99 L_START_ATTACK_STRONG
413#define SPECENUM_VALUE99NAME N_("?unitflag:AttackStrongStartUnit")
415#define SPECENUM_VALUE100 L_HUNTER
416#define SPECENUM_VALUE100NAME N_("?unitflag:Hunter")
418#define SPECENUM_VALUE101 L_SETTLERS
419#define SPECENUM_VALUE101NAME N_("?unitflag:Settlers")
420#define L_LAST (L_SETTLERS + 1)
432#define SPECENUM_NAME combat_bonus_type
433#define SPECENUM_VALUE0 CBONUS_DEFENSE_MULTIPLIER
434#define SPECENUM_VALUE0NAME "DefenseMultiplier"
435#define SPECENUM_VALUE1 CBONUS_DEFENSE_DIVIDER
436#define SPECENUM_VALUE1NAME "DefenseDivider"
437#define SPECENUM_VALUE2 CBONUS_LOW_FIREPOWER
438#define SPECENUM_VALUE2NAME "LowFirepower"
439#define SPECENUM_VALUE3 CBONUS_DEFENSE_MULTIPLIER_PCT
440#define SPECENUM_VALUE3NAME "DefenseMultiplierPct"
441#define SPECENUM_VALUE4 CBONUS_DEFENSE_DIVIDER_PCT
442#define SPECENUM_VALUE4NAME "DefenseDividerPct"
443#define SPECENUM_VALUE5 CBONUS_SCRAMBLES_PCT
444#define SPECENUM_VALUE5NAME "CityDefensePct"
457#define SPECLIST_TAG combat_bonus
458#define SPECLIST_TYPE struct combat_bonus
461#define combat_bonus_list_iterate(bonuslist, pbonus) \
462 TYPED_LIST_ITERATE(struct combat_bonus, bonuslist, pbonus)
463#define combat_bonus_list_iterate_end LIST_ITERATE_END
509#define U_NOT_OBSOLETED (NULL)
575 void *
ais[FREECIV_AI_MOD_LAST];
614 const char *helptxt);
634 enum action_result result);
636 enum action_sub_result sub_result);
640 const enum ustate_prop prop,
641 const bool is_there);
644 const enum ustate_prop prop,
645 const bool is_there);
647 enum action_result result,
648 const enum ustate_prop prop,
649 const bool is_there);
653 const enum citytile_type prop,
654 const bool is_there);
659 const bool is_there);
665 const bool is_there);
669 const int move_fragments);
673 const enum citytile_type prop,
674 const bool is_there);
681 const enum ustate_prop prop);
702 const struct action *paction,
704 const struct player *act_player,
705 const struct tile *act_tile,
706 const struct tile *tgt_tile);
729#define uclass_index(_c_) (_c_)->item_number
736#define utype_class(_t_) (_t_)->uclass
748 enum unit_class_flag_id flag);
754 enum unit_class_flag_id flag)
762 const char *helptxt);
768 const struct player *pplayer,
775 int shields_in_stock);
789 const char *vlist_name,
int vlist_power,
790 int vlist_move,
int vlist_raise,
822#define utype_fuel(ptype) (ptype)->fuel
838#define unit_type_iterate(_p) \
840 struct unit_type *_p = unit_type_array_first(); \
842 const struct unit_type *_end_##_p = unit_type_array_last(); \
843 for (; _p <= _end_##_p; _p++) {
845#define unit_type_iterate_end \
850#define unit_type_re_active_iterate(_p) \
851 unit_type_iterate(_p) { \
852 if (!_p->ruledit_disabled) {
854#define unit_type_re_active_iterate_end \
856 } unit_type_iterate_end;
876#define unit_class_iterate(_p) \
878 struct unit_class *_p = unit_class_array_first(); \
880 const struct unit_class *_end_##_p = unit_class_array_last(); \
881 for (; _p <= _end_##_p; _p++) {
883#define unit_class_iterate_end \
888#define unit_class_re_active_iterate(_p) \
889 unit_class_iterate(_p) { \
890 if (!_p->ruledit_disabled) {
892#define unit_class_re_active_iterate_end \
894 } unit_class_iterate_end;
896#define SPECLIST_TAG unit_class
897#define SPECLIST_TYPE struct unit_class
900#define unit_class_list_iterate(uclass_list, pclass) \
901 TYPED_LIST_ITERATE(struct unit_class, uclass_list, pclass)
902#define unit_class_list_iterate_end LIST_ITERATE_END
904#define SPECLIST_TAG unit_type
905#define SPECLIST_TYPE struct unit_type
908#define unit_type_list_iterate(utype_list, ptype) \
909 TYPED_LIST_ITERATE(struct unit_type, utype_list, ptype)
910#define unit_type_list_iterate_end LIST_ITERATE_END
#define BV_DEFINE(name, bits)
#define BV_ISSET(bv, bit)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
enum output_type_id Output_type_id
#define FC_STATIC_ASSERT(cond, tag)
struct setting_list * level[OLEVELS_NUM]
enum unit_type_flag_id flag
enum combat_bonus_type type
Unit_Class_id item_number
enum unit_move_type move_type
struct unit_class_list * subset_movers
struct unit_class::@85 cache
struct extra_type_list * refuel_extras
struct extra_type_list * native_tile_extras
enum hut_behavior hut_behavior
struct extra_type_list * native_bases
struct extra_type_list * bonus_roads
struct unit_class::@86 rscompat_cache_from_3_0
struct name_translation name
bv_unit_class_flags flags
struct extra_type_list * hiding_extras
enum move_level land_move
struct unit_class::@84 adv
int max_defense_mp_bonus_pct
struct unit_type::@87 adv
struct unit_class * uclass
struct unit_type::@89 rscompat_cache
void * ais[FREECIV_AI_MOD_LAST]
struct requirement_vector build_reqs
char graphic_alt[MAX_LEN_NAME]
char sound_move_alt[MAX_LEN_NAME]
struct veteran_system * veteran
const struct unit_type * obsoleted_by
struct advance * require_advance
char graphic_str[MAX_LEN_NAME]
int scramble_coeff[U_LAST]
char sound_move[MAX_LEN_NAME]
struct unit_type::@88 cache
char sound_fight_alt[MAX_LEN_NAME]
struct name_translation name
enum transp_def_type tp_defense
bv_unit_classes disembarks
const struct unit_type * converted_to
char sound_fight[MAX_LEN_NAME]
int defense_mp_bonuses_pct[U_LAST]
struct combat_bonus_list * bonuses
struct name_translation name
struct veteran_level * definitions
bool utype_may_act_tgt_city_tile(const struct unit_type *punit_type, const action_id act_id, const enum citytile_type prop, const bool is_there)
int utype_buy_gold_cost(const struct city *pcity, const struct unit_type *punittype, int shields_in_stock)
void unit_types_init(void)
bool can_unit_act_when_ustate_is(const struct unit_type *punit_type, const enum ustate_prop prop, const bool is_there)
const char * uclass_name_translation(const struct unit_class *pclass)
void set_unit_class_caches(struct unit_class *pclass)
struct unit_type * best_role_unit(const struct city *pcity, int role)
struct unit_type * role_units_iterate(int role, role_unit_callback cb, void *data)
bool utype_action_takes_all_mp(const struct unit_type *putype, struct action *paction)
const char * utype_veteran_name_translation(const struct unit_type *punittype, int level)
const struct unit_type * unit_type_get(const struct unit *punit)
bool utype_has_class_flag(const struct unit_type *ptype, enum unit_class_flag_id flag)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
void user_unit_type_flags_init(void)
int utype_pays_mp_for_action_base(const struct action *paction, const struct unit_type *putype)
bool utype_player_already_has_this(const struct player *pplayer, const struct unit_type *putype)
bool utype_can_freely_unload(const struct unit_type *pcargotype, const struct unit_type *ptranstype)
const char * unit_class_flag_helptxt(enum unit_class_flag_id id)
bool utype_pays_for_regular_move_to_tgt(const struct action *paction, const struct unit_type *utype)
struct unit_type * role_units_iterate_backwards(int role, role_unit_callback cb, void *data)
bool utype_can_remove_extra(const struct unit_type *putype, const struct extra_type *pextra)
int unit_build_shield_cost(const struct city *pcity, const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
bool unit_has_class_flag(const struct unit *punit, enum unit_class_flag_id flag)
bool utype_is_moved_to_tgt_by_action(const struct action *paction, const struct unit_type *utype)
int utype_upkeep_cost(const struct unit_type *ut, struct player *pplayer, Output_type_id otype)
enum unit_move_type utype_move_type(const struct unit_type *punittype)
struct unit_type * first_role_unit_for_player(const struct player *pplayer, int role)
Unit_Class_id uclass_count(void)
bool utype_is_cityfounder(const struct unit_type *utype)
const struct unit_class * unit_class_array_last(void)
struct unit_type * unit_type_by_rule_name(const char *name)
struct unit_type * get_role_unit(int role, int role_index)
struct unit_type * unit_type_array_first(void)
void unit_class_flags_free(void)
bool uclass_flag_is_in_use(enum unit_class_flag_id ucflag)
const char * unit_rule_name(const struct unit *punit)
bool utype_has_role(const struct unit_type *punittype, int role)
void set_unit_move_type(struct unit_class *puclass)
void unit_type_action_cache_init(void)
int utype_build_shield_cost_base(const struct unit_type *punittype)
void set_unit_type_caches(struct unit_type *ptype)
bool utype_may_act_move_frags(const struct unit_type *punit_type, const action_id act_id, const int move_fragments)
const struct veteran_system * utype_veteran_system(const struct unit_type *punittype)
bool utype_is_consumed_by_action_result(enum action_result result, const struct unit_type *utype)
int num_role_units(int role)
bool utype_player_already_has_this_unique(const struct player *pplayer, const struct unit_type *putype)
static bool utype_has_flag(const struct unit_type *punittype, int flag)
void unit_types_free(void)
bool utype_may_act_at_all(const struct unit_type *putype)
int unit_build_shield_cost_base(const struct unit *punit)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
struct unit_type * best_role_unit_for_player(const struct player *pplayer, int role)
void role_unit_precalcs(void)
struct unit_class * uclass_by_number(const Unit_Class_id id)
bool utype_can_create_extra(const struct unit_type *putype, const struct extra_type *pextra)
bool utype_can_freely_load(const struct unit_type *pcargotype, const struct unit_type *ptranstype)
void veteran_system_definition(struct veteran_system *vsystem, int level, const char *vlist_name, int vlist_power, int vlist_move, int vlist_raise, int vlist_wraise)
Unit_type_id utype_count(void)
bool(* role_unit_callback)(struct unit_type *ptype, void *data)
bool can_player_build_unit_direct(const struct player *p, const struct unit_type *punittype)
int utype_veteran_levels(const struct unit_type *punittype)
int utype_pays_mp_for_action_estimate(const struct civ_map *nmap, const struct action *paction, const struct unit_type *putype, const struct player *act_player, const struct tile *act_tile, const struct tile *tgt_tile)
bool utype_can_do_act_when_ustate(const struct unit_type *punit_type, const action_id act_id, const enum ustate_prop prop, const bool is_there)
void veteran_system_destroy(struct veteran_system *vsystem)
const char * utype_rule_name(const struct unit_type *punittype)
struct unit_class * unit_class_get(const struct unit *punit)
bool utype_can_do_action_result_when_ustate(const struct unit_type *putype, enum action_result result, const enum ustate_prop prop, const bool is_there)
struct unit_type * utype_by_number(const Unit_type_id id)
bool utype_can_do_action_result(const struct unit_type *putype, enum action_result result)
bool unit_has_type_role(const struct unit *punit, enum unit_role_id role)
bool utype_action_takes_all_mp_if_ustate_is(const struct unit_type *putype, struct action *paction, const enum ustate_prop prop)
const struct veteran_level * utype_veteran_level(const struct unit_type *punittype, int level)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
bool unit_can_take_over(const struct unit *punit)
void unit_classes_free(void)
void unit_type_action_cache_set(struct unit_type *ptype)
const char * uclass_rule_name(const struct unit_class *pclass)
bool utype_is_consumed_by_action(const struct action *paction, const struct unit_type *utype)
void unit_type_flags_free(void)
Unit_type_id utype_number(const struct unit_type *punittype)
bool utype_veteran_has_power_bonus(const struct unit_type *punittype)
void user_unit_class_flags_init(void)
bool utype_can_act_if_tgt_diplrel_tile_other(const struct unit_type *punit_type, const action_id act_id, const int prop, const bool is_there)
struct unit_class * unit_class_by_rule_name(const char *s)
struct unit_type * unit_type_by_translated_name(const char *name)
const char * unit_type_flag_helptxt(enum unit_type_flag_id id)
const char * utype_values_string(const struct unit_type *punittype)
#define uclass_index(_c_)
void * utype_ai_data(const struct unit_type *ptype, const struct ai_type *ai)
struct unit_class * unit_class_array_first(void)
Unit_type_id utype_index(const struct unit_type *punittype)
void unit_classes_init(void)
bool utype_flag_is_in_use(enum unit_type_flag_id uflag)
int utype_pop_value(const struct unit_type *punittype, const struct city *pcity)
bool utype_can_take_over(const struct unit_type *punittype)
void utype_set_ai_data(struct unit_type *ptype, const struct ai_type *ai, void *data)
void set_user_unit_class_flag_name(enum unit_class_flag_id id, const char *name, const char *helptxt)
bool can_player_build_unit_later(const struct player *p, const struct unit_type *punittype)
int utype_build_shield_cost(const struct city *pcity, const struct player *pplayer, const struct unit_type *punittype)
int unit_pop_value(const struct unit *punit)
void role_unit_precalcs_free(void)
struct veteran_system * veteran_system_new(int count)
Unit_Class_id uclass_number(const struct unit_class *pclass)
bool can_player_build_unit_now(const struct player *p, const struct unit_type *punittype)
bool utype_can_do_action_sub_result(const struct unit_type *putype, enum action_sub_result sub_result)
bool utype_is_unmoved_by_action(const struct action *paction, const struct unit_type *utype)
bool utype_acts_hostile(const struct unit_type *putype)
bool utype_can_do_act_if_tgt_citytile(const struct unit_type *punit_type, const action_id act_id, const enum citytile_type prop, const bool is_there)
const char * utype_name_translation(const struct unit_type *punittype)
bool can_utype_do_act_if_tgt_diplrel(const struct unit_type *punit_type, const action_id act_id, const int prop, const bool is_there)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
void set_user_unit_type_flag_name(enum unit_type_flag_id id, const char *name, const char *helptxt)
int utype_happy_cost(const struct unit_type *ut, const struct player *pplayer)
bool role_units_translations(struct astring *astr, int flag, bool alts)
const char * utype_values_translation(const struct unit_type *punittype)
const struct unit_type * unit_type_array_last(void)
int unit_upgrade_price(const struct player *pplayer, const struct unit_type *from, const struct unit_type *to)