Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
unittype.h File Reference
#include "bitvector.h"
#include "shared.h"
#include "fc_types.h"
#include "name_translation.h"
#include "requirements.h"
#include "specenum_gen.h"
#include "speclist.h"

Go to the source code of this file.

Data Structures

struct  unit_class
 
struct  combat_bonus
 
struct  veteran_level
 
struct  veteran_system
 
struct  unit_type
 

Macros

#define U_LAST   MAX_NUM_UNITS
 
#define UNIT_MAX_PARADROP_RANGE   (65535 - 1)
 
#define SPECENUM_NAME   unit_class_flag_id
 
#define SPECENUM_VALUE0   UCF_TERRAIN_SPEED
 
#define SPECENUM_VALUE0NAME   N_("?uclassflag:TerrainSpeed")
 
#define SPECENUM_VALUE1   UCF_TERRAIN_DEFENSE
 
#define SPECENUM_VALUE1NAME   N_("?uclassflag:TerrainDefense")
 
#define SPECENUM_VALUE2   UCF_DAMAGE_SLOWS
 
#define SPECENUM_VALUE2NAME   N_("?uclassflag:DamageSlows")
 
#define SPECENUM_VALUE3   UCF_CAN_OCCUPY_CITY
 
#define SPECENUM_VALUE3NAME   N_("?uclassflag:CanOccupyCity")
 
#define SPECENUM_VALUE4   UCF_BUILD_ANYWHERE
 
#define SPECENUM_VALUE4NAME   N_("?uclassflag:BuildAnywhere")
 
#define SPECENUM_VALUE5   UCF_UNREACHABLE
 
#define SPECENUM_VALUE5NAME   N_("?uclassflag:Unreachable")
 
#define SPECENUM_VALUE6   UCF_COLLECT_RANSOM
 
#define SPECENUM_VALUE6NAME   N_("?uclassflag:CollectRansom")
 
#define SPECENUM_VALUE7   UCF_ZOC
 
#define SPECENUM_VALUE7NAME   N_("?uclassflag:ZOC")
 
#define SPECENUM_VALUE8   UCF_DOESNT_OCCUPY_TILE
 
#define SPECENUM_VALUE8NAME   N_("?uclassflag:DoesntOccupyTile")
 
#define SPECENUM_VALUE9   UCF_ATTACK_NON_NATIVE
 
#define SPECENUM_VALUE9NAME   N_("?uclassflag:AttackNonNative")
 
#define SPECENUM_VALUE10   UCF_KILLCITIZEN
 
#define SPECENUM_VALUE10NAME   N_("?uclassflag:KillCitizen")
 
#define SPECENUM_VALUE11   UCF_HUT_FRIGHTEN
 
#define SPECENUM_VALUE11NAME   N_("?uclassflag:HutFrighten")
 
#define SPECENUM_VALUE12   UCF_NONNAT_BOMBARD_TGT
 
#define SPECENUM_VALUE12NAME   N_("?uclassflag:NonNatBombardTgt")
 
#define SPECENUM_VALUE13   UCF_USER_FLAG_1
 
#define SPECENUM_VALUE14   UCF_USER_FLAG_2
 
#define SPECENUM_VALUE15   UCF_USER_FLAG_3
 
#define SPECENUM_VALUE16   UCF_USER_FLAG_4
 
#define SPECENUM_VALUE17   UCF_USER_FLAG_5
 
#define SPECENUM_VALUE18   UCF_USER_FLAG_6
 
#define SPECENUM_VALUE19   UCF_USER_FLAG_7
 
#define SPECENUM_VALUE20   UCF_USER_FLAG_8
 
#define SPECENUM_VALUE21   UCF_USER_FLAG_9
 
#define SPECENUM_VALUE22   UCF_USER_FLAG_10
 
#define SPECENUM_VALUE23   UCF_USER_FLAG_11
 
#define SPECENUM_VALUE24   UCF_USER_FLAG_12
 
#define SPECENUM_VALUE25   UCF_USER_FLAG_13
 
#define SPECENUM_VALUE26   UCF_USER_FLAG_14
 
#define SPECENUM_VALUE27   UCF_USER_FLAG_15
 
#define SPECENUM_VALUE28   UCF_USER_FLAG_16
 
#define SPECENUM_VALUE29   UCF_USER_FLAG_17
 
#define SPECENUM_VALUE30   UCF_USER_FLAG_18
 
#define SPECENUM_VALUE31   UCF_USER_FLAG_19
 
#define SPECENUM_VALUE32   UCF_USER_FLAG_20
 
#define SPECENUM_VALUE33   UCF_USER_FLAG_21
 
#define SPECENUM_VALUE34   UCF_USER_FLAG_22
 
#define SPECENUM_VALUE35   UCF_USER_FLAG_23
 
#define SPECENUM_VALUE36   UCF_USER_FLAG_24
 
#define SPECENUM_VALUE37   UCF_USER_FLAG_25
 
#define SPECENUM_COUNT   UCF_COUNT
 
#define SPECENUM_NAMEOVERRIDE
 
#define SPECENUM_BITVECTOR   bv_unit_class_flags
 
#define UCF_LAST_USER_FLAG   UCF_USER_FLAG_25
 
#define MAX_NUM_USER_UCLASS_FLAGS
 
#define SPECENUM_NAME   unit_move_type
 
#define SPECENUM_VALUE0   UMT_LAND
 
#define SPECENUM_VALUE0NAME   "Land"
 
#define SPECENUM_VALUE1   UMT_SEA
 
#define SPECENUM_VALUE1NAME   "Sea"
 
#define SPECENUM_VALUE2   UMT_BOTH
 
#define SPECENUM_VALUE2NAME   "Both"
 
#define SPECENUM_NAME   unit_type_flag_id
 
#define SPECENUM_VALUE0   UTYF_NOZOC
 
#define SPECENUM_VALUE0NAME   N_("?unitflag:HasNoZOC")
 
#define SPECENUM_VALUE1   UTYF_IGZOC
 
#define SPECENUM_VALUE1NAME   N_("?unitflag:IgZOC")
 
#define SPECENUM_VALUE2   UTYF_CIVILIAN
 
#define SPECENUM_VALUE2NAME   N_("?unitflag:NonMil")
 
#define SPECENUM_VALUE3   UTYF_IGTER
 
#define SPECENUM_VALUE3NAME   N_("?unitflag:IgTer")
 
#define SPECENUM_VALUE4   UTYF_FIELDUNIT
 
#define SPECENUM_VALUE4NAME   N_("?unitflag:FieldUnit")
 
#define SPECENUM_VALUE5   UTYF_PROVOKING
 
#define SPECENUM_VALUE5NAME   N_("?unitflag:Provoking")
 
#define SPECENUM_VALUE6   UTYF_NEVER_PROTECTS
 
#define SPECENUM_VALUE6NAME   N_("?unitflag:NeverProtects")
 
#define SPECENUM_VALUE7   UTYF_SETTLERS
 
#define SPECENUM_VALUE7NAME   N_("?unitflag:Settlers")
 
#define SPECENUM_VALUE8   UTYF_DIPLOMAT
 
#define SPECENUM_VALUE8NAME   N_("?unitflag:Diplomat")
 
#define SPECENUM_VALUE9   UTYF_COAST_STRICT
 
#define SPECENUM_VALUE9NAME   N_("?unitflag:CoastStrict")
 
#define SPECENUM_VALUE10   UTYF_COAST
 
#define SPECENUM_VALUE10NAME   N_("?unitflag:Coast")
 
#define SPECENUM_VALUE11   UTYF_SHIELD2GOLD
 
#define SPECENUM_VALUE11NAME   N_("?unitflag:Shield2Gold")
 
#define SPECENUM_VALUE12   UTYF_SPY
 
#define SPECENUM_VALUE12NAME   N_("?unitflag:Spy")
 
#define SPECENUM_VALUE13   UTYF_ONLY_NATIVE_ATTACK
 
#define SPECENUM_VALUE13NAME   N_("?unitflag:Only_Native_Attack")
 
#define SPECENUM_VALUE14   UTYF_FANATIC
 
#define SPECENUM_VALUE14NAME   N_("?unitflag:Fanatic")
 
#define SPECENUM_VALUE15   UTYF_GAMELOSS
 
#define SPECENUM_VALUE15NAME   N_("?unitflag:GameLoss")
 
#define SPECENUM_VALUE16   UTYF_UNIQUE
 
#define SPECENUM_VALUE16NAME   N_("?unitflag:Unique")
 
#define SPECENUM_VALUE17   UTYF_EVAC_FIRST
 
#define SPECENUM_VALUE17NAME   N_("?unitflag:EvacuateFirst")
 
#define SPECENUM_VALUE18   UTYF_SUPERSPY
 
#define SPECENUM_VALUE18NAME   N_("?unitflag:SuperSpy")
 
#define SPECENUM_VALUE19   UTYF_NOHOME
 
#define SPECENUM_VALUE19NAME   N_("?unitflag:NoHome")
 
#define SPECENUM_VALUE20   UTYF_NO_VETERAN
 
#define SPECENUM_VALUE20NAME   N_("?unitflag:NoVeteran")
 
#define SPECENUM_VALUE21   UTYF_CITYBUSTER
 
#define SPECENUM_VALUE21NAME   N_("?unitflag:CityBuster")
 
#define SPECENUM_VALUE22   UTYF_NOBUILD
 
#define SPECENUM_VALUE22NAME   N_("?unitflag:NoBuild")
 
#define SPECENUM_VALUE23   UTYF_BADWALLATTACKER
 
#define SPECENUM_VALUE23NAME   N_("?unitflag:BadWallAttacker")
 
#define SPECENUM_VALUE24   UTYF_BADCITYDEFENDER
 
#define SPECENUM_VALUE24NAME   N_("?unitflag:BadCityDefender")
 
#define SPECENUM_VALUE25   UTYF_BARBARIAN_ONLY
 
#define SPECENUM_VALUE25NAME   N_("?unitflag:BarbarianOnly")
 
#define SPECENUM_VALUE26   UTYF_NEWCITY_GAMES_ONLY
 
#define SPECENUM_VALUE26NAME   N_("?unitflag:NewCityGamesOnly")
 
#define SPECENUM_VALUE27   UTYF_CANESCAPE
 
#define SPECENUM_VALUE27NAME   N_("?unitflag:CanEscape")
 
#define SPECENUM_VALUE28   UTYF_CANKILLESCAPING
 
#define SPECENUM_VALUE28NAME   N_("?unitflag:CanKillEscaping")
 
#define SPECENUM_VALUE29   UTYF_RANDOM_MOVEMENT
 
#define SPECENUM_VALUE29NAME   N_("?unitflag:RandomMovement")
 
#define SPECENUM_VALUE30   UTYF_USER_FLAG_1
 
#define SPECENUM_VALUE31   UTYF_USER_FLAG_2
 
#define SPECENUM_VALUE32   UTYF_USER_FLAG_3
 
#define SPECENUM_VALUE33   UTYF_USER_FLAG_4
 
#define SPECENUM_VALUE34   UTYF_USER_FLAG_5
 
#define SPECENUM_VALUE35   UTYF_USER_FLAG_6
 
#define SPECENUM_VALUE36   UTYF_USER_FLAG_7
 
#define SPECENUM_VALUE37   UTYF_USER_FLAG_8
 
#define SPECENUM_VALUE38   UTYF_USER_FLAG_9
 
#define SPECENUM_VALUE39   UTYF_USER_FLAG_10
 
#define SPECENUM_VALUE40   UTYF_USER_FLAG_11
 
#define SPECENUM_VALUE41   UTYF_USER_FLAG_12
 
#define SPECENUM_VALUE42   UTYF_USER_FLAG_13
 
#define SPECENUM_VALUE43   UTYF_USER_FLAG_14
 
#define SPECENUM_VALUE44   UTYF_USER_FLAG_15
 
#define SPECENUM_VALUE45   UTYF_USER_FLAG_16
 
#define SPECENUM_VALUE46   UTYF_USER_FLAG_17
 
#define SPECENUM_VALUE47   UTYF_USER_FLAG_18
 
#define SPECENUM_VALUE48   UTYF_USER_FLAG_19
 
#define SPECENUM_VALUE49   UTYF_USER_FLAG_20
 
#define SPECENUM_VALUE50   UTYF_USER_FLAG_21
 
#define SPECENUM_VALUE51   UTYF_USER_FLAG_22
 
#define SPECENUM_VALUE52   UTYF_USER_FLAG_23
 
#define SPECENUM_VALUE53   UTYF_USER_FLAG_24
 
#define SPECENUM_VALUE54   UTYF_USER_FLAG_25
 
#define SPECENUM_VALUE55   UTYF_USER_FLAG_26
 
#define SPECENUM_VALUE56   UTYF_USER_FLAG_27
 
#define SPECENUM_VALUE57   UTYF_USER_FLAG_28
 
#define SPECENUM_VALUE58   UTYF_USER_FLAG_29
 
#define SPECENUM_VALUE59   UTYF_USER_FLAG_30
 
#define SPECENUM_VALUE60   UTYF_USER_FLAG_31
 
#define SPECENUM_VALUE61   UTYF_USER_FLAG_32
 
#define SPECENUM_VALUE62   UTYF_USER_FLAG_33
 
#define SPECENUM_VALUE63   UTYF_USER_FLAG_34
 
#define SPECENUM_VALUE64   UTYF_USER_FLAG_35
 
#define SPECENUM_VALUE65   UTYF_USER_FLAG_36
 
#define SPECENUM_VALUE66   UTYF_USER_FLAG_37
 
#define SPECENUM_VALUE67   UTYF_USER_FLAG_38
 
#define SPECENUM_VALUE68   UTYF_USER_FLAG_39
 
#define SPECENUM_VALUE69   UTYF_USER_FLAG_40
 
#define SPECENUM_VALUE70   UTYF_USER_FLAG_41
 
#define SPECENUM_VALUE71   UTYF_USER_FLAG_42
 
#define SPECENUM_VALUE72   UTYF_USER_FLAG_43
 
#define SPECENUM_VALUE73   UTYF_USER_FLAG_44
 
#define SPECENUM_VALUE74   UTYF_USER_FLAG_45
 
#define SPECENUM_VALUE75   UTYF_USER_FLAG_46
 
#define SPECENUM_VALUE76   UTYF_USER_FLAG_47
 
#define SPECENUM_VALUE77   UTYF_USER_FLAG_48
 
#define SPECENUM_VALUE78   UTYF_USER_FLAG_49
 
#define SPECENUM_VALUE79   UTYF_USER_FLAG_50
 
#define UTYF_LAST_USER_FLAG   UTYF_USER_FLAG_50
 
#define MAX_NUM_USER_UNIT_FLAGS   (UTYF_LAST_USER_FLAG - UTYF_USER_FLAG_1 + 1)
 
#define SPECENUM_NAMEOVERRIDE
 
#define SPECENUM_BITVECTOR   bv_unit_type_flags
 
#define L_FIRST   (UTYF_LAST_USER_FLAG + 1)
 
#define SPECENUM_NAME   unit_role_id
 
#define SPECENUM_VALUE80   L_FIRSTBUILD
 
#define SPECENUM_VALUE80NAME   N_("?unitflag:FirstBuild")
 
#define SPECENUM_VALUE81   L_EXPLORER
 
#define SPECENUM_VALUE81NAME   N_("?unitflag:Explorer")
 
#define SPECENUM_VALUE82   L_HUT
 
#define SPECENUM_VALUE82NAME   N_("?unitflag:Hut")
 
#define SPECENUM_VALUE83   L_HUT_TECH
 
#define SPECENUM_VALUE83NAME   N_("?unitflag:HutTech")
 
#define SPECENUM_VALUE84   L_PARTISAN
 
#define SPECENUM_VALUE84NAME   N_("?unitflag:Partisan")
 
#define SPECENUM_VALUE85   L_DEFEND_OK
 
#define SPECENUM_VALUE85NAME   N_("?unitflag:DefendOk")
 
#define SPECENUM_VALUE86   L_DEFEND_GOOD
 
#define SPECENUM_VALUE86NAME   N_("?unitflag:DefendGood")
 
#define SPECENUM_VALUE87   L_FERRYBOAT
 
#define SPECENUM_VALUE87NAME   N_("?unitflag:FerryBoat")
 
#define SPECENUM_VALUE88   L_BARBARIAN
 
#define SPECENUM_VALUE88NAME   N_("?unitflag:Barbarian")
 
#define SPECENUM_VALUE89   L_BARBARIAN_TECH
 
#define SPECENUM_VALUE89NAME   N_("?unitflag:BarbarianTech")
 
#define SPECENUM_VALUE90   L_BARBARIAN_BOAT
 
#define SPECENUM_VALUE90NAME   N_("?unitflag:BarbarianBoat")
 
#define SPECENUM_VALUE91   L_BARBARIAN_BOAT_TECH
 
#define SPECENUM_VALUE91NAME   N_("?unitflag:BarbarianBoatTech")
 
#define SPECENUM_VALUE92   L_BARBARIAN_BUILD
 
#define SPECENUM_VALUE92NAME   N_("?unitflag:BarbarianBuild")
 
#define SPECENUM_VALUE93   L_BARBARIAN_BUILD_TECH
 
#define SPECENUM_VALUE93NAME   N_("?unitflag:BarbarianBuildTech")
 
#define SPECENUM_VALUE94   L_BARBARIAN_LEADER
 
#define SPECENUM_VALUE94NAME   N_("?unitflag:BarbarianLeader")
 
#define SPECENUM_VALUE95   L_BARBARIAN_SEA
 
#define SPECENUM_VALUE95NAME   N_("?unitflag:BarbarianSea")
 
#define SPECENUM_VALUE96   L_BARBARIAN_SEA_TECH
 
#define SPECENUM_VALUE96NAME   N_("?unitflag:BarbarianSeaTech")
 
#define SPECENUM_VALUE97   L_START_CITIES
 
#define SPECENUM_VALUE97NAME   N_("?unitflag:CitiesStartUnit")
 
#define SPECENUM_VALUE98   L_START_WORKER
 
#define SPECENUM_VALUE98NAME   N_("?unitflag:WorkerStartUnit")
 
#define SPECENUM_VALUE99   L_START_EXPLORER
 
#define SPECENUM_VALUE99NAME   N_("?unitflag:ExplorerStartUnit")
 
#define SPECENUM_VALUE100   L_START_KING
 
#define SPECENUM_VALUE100NAME   N_("?unitflag:KingStartUnit")
 
#define SPECENUM_VALUE101   L_START_DIPLOMAT
 
#define SPECENUM_VALUE101NAME   N_("?unitflag:DiplomatStartUnit")
 
#define SPECENUM_VALUE102   L_START_FERRY
 
#define SPECENUM_VALUE102NAME   N_("?unitflag:FerryStartUnit")
 
#define SPECENUM_VALUE103   L_START_DEFEND_OK
 
#define SPECENUM_VALUE103NAME   N_("?unitflag:DefendOkStartUnit")
 
#define SPECENUM_VALUE104   L_START_DEFEND_GOOD
 
#define SPECENUM_VALUE104NAME   N_("?unitflag:DefendGoodStartUnit")
 
#define SPECENUM_VALUE105   L_START_ATTACK_FAST
 
#define SPECENUM_VALUE105NAME   N_("?unitflag:AttackFastStartUnit")
 
#define SPECENUM_VALUE106   L_START_ATTACK_STRONG
 
#define SPECENUM_VALUE106NAME   N_("?unitflag:AttackStrongStartUnit")
 
#define SPECENUM_VALUE107   L_HUNTER
 
#define SPECENUM_VALUE107NAME   N_("?unitflag:Hunter")
 
#define SPECENUM_VALUE108   L_SETTLERS
 
#define SPECENUM_VALUE108NAME   N_("?unitflag:Settlers")
 
#define L_LAST   (L_SETTLERS + 1)
 
#define L_MAX   64 /* Used in the network protocol. */
 
#define SPECENUM_NAME   combat_bonus_type
 
#define SPECENUM_VALUE0   CBONUS_DEFENSE_MULTIPLIER
 
#define SPECENUM_VALUE0NAME   "DefenseMultiplier"
 
#define SPECENUM_VALUE1   CBONUS_DEFENSE_DIVIDER
 
#define SPECENUM_VALUE1NAME   "DefenseDivider"
 
#define SPECENUM_VALUE2   CBONUS_LOW_FIREPOWER
 
#define SPECENUM_VALUE2NAME   "LowFirepower"
 
#define SPECENUM_VALUE3   CBONUS_DEFENSE_MULTIPLIER_PCT
 
#define SPECENUM_VALUE3NAME   "DefenseMultiplierPct"
 
#define SPECENUM_VALUE4   CBONUS_DEFENSE_DIVIDER_PCT
 
#define SPECENUM_VALUE4NAME   "DefenseDividerPct"
 
#define SPECENUM_VALUE5   CBONUS_SCRAMBLES_PCT
 
#define SPECENUM_VALUE5NAME   "CityDefensePct"
 
#define SPECLIST_TAG   combat_bonus
 
#define SPECLIST_TYPE   struct combat_bonus
 
#define combat_bonus_list_iterate(bonuslist, pbonus)    TYPED_LIST_ITERATE(struct combat_bonus, bonuslist, pbonus)
 
#define combat_bonus_list_iterate_end   LIST_ITERATE_END
 
#define U_NOT_OBSOLETED   (NULL)
 
#define uclass_index(_c_)   (_c_)->item_number
 
#define utype_class(_t_)   (_t_)->uclass
 
#define utype_fuel(ptype)   (ptype)->fuel
 
#define unit_type_iterate(_p)
 
#define unit_type_iterate_end
 
#define unit_type_re_active_iterate(_p)
 
#define unit_type_re_active_iterate_end
 
#define unit_tech_reqs_iterate(_utype_, _p)
 
#define unit_tech_reqs_iterate_end
 
#define unit_class_iterate(_p)
 
#define unit_class_iterate_end
 
#define unit_class_re_active_iterate(_p)
 
#define unit_class_re_active_iterate_end
 
#define SPECLIST_TAG   unit_class
 
#define SPECLIST_TYPE   struct unit_class
 
#define unit_class_list_iterate(uclass_list, pclass)    TYPED_LIST_ITERATE(struct unit_class, uclass_list, pclass)
 
#define unit_class_list_iterate_end   LIST_ITERATE_END
 
#define SPECLIST_TAG   unit_type
 
#define SPECLIST_TYPE   struct unit_type
 
#define unit_type_list_iterate(utype_list, ptype)    TYPED_LIST_ITERATE(struct unit_type, utype_list, ptype)
 
#define unit_type_list_iterate_end   LIST_ITERATE_END
 

Typedefs

typedef bool(* role_unit_callback) (struct unit_type *ptype, void *data)
 

Enumerations

enum  move_level { MOVE_NONE , MOVE_PARTIAL , MOVE_FULL }
 

Functions

 BV_DEFINE (bv_utypes, U_LAST)
 
 BV_DEFINE (bv_unit_classes, UCL_LAST)
 
 FC_STATIC_ASSERT (L_LAST - L_FIRST<=L_MAX, too_many_unit_roles)
 
 BV_DEFINE (bv_unit_type_roles, L_MAX)
 
 BV_DEFINE (bv_unit_types, U_LAST)
 
Unit_type_id utype_count (void)
 
Unit_type_id utype_index (const struct unit_type *punittype)
 
Unit_type_id utype_number (const struct unit_type *punittype)
 
const struct unit_typeunit_type_get (const struct unit *punit)
 
struct unit_typeutype_by_number (const Unit_type_id id)
 
struct unit_typeunit_type_by_rule_name (const char *name)
 
struct unit_typeunit_type_by_translated_name (const char *name)
 
const charunit_rule_name (const struct unit *punit)
 
const charutype_rule_name (const struct unit_type *punittype)
 
const charunit_name_translation (const struct unit *punit)
 
const charutype_name_translation (const struct unit_type *punittype)
 
const charutype_values_string (const struct unit_type *punittype)
 
const charutype_values_translation (const struct unit_type *punittype)
 
bool unit_has_type_flag (const struct unit *punit, enum unit_type_flag_id flag)
 
static bool utype_has_flag (const struct unit_type *punittype, int flag)
 
bool unit_has_type_role (const struct unit *punit, enum unit_role_id role)
 
bool utype_has_role (const struct unit_type *punittype, int role)
 
void user_unit_type_flags_init (void)
 
void set_user_unit_type_flag_name (enum unit_type_flag_id id, const char *name, const char *helptxt)
 
const charunit_type_flag_helptxt (enum unit_type_flag_id id)
 
bool utype_can_create_extra (const struct unit_type *putype, const struct extra_type *pextra)
 
bool utype_can_remove_extra (const struct unit_type *putype, const struct extra_type *pextra)
 
bool unit_can_take_over (const struct unit *punit)
 
bool utype_can_take_over (const struct unit_type *punittype)
 
bool utype_can_freely_load (const struct unit_type *pcargotype, const struct unit_type *ptranstype)
 
bool utype_can_freely_unload (const struct unit_type *pcargotype, const struct unit_type *ptranstype)
 
bool utype_may_act_at_all (const struct unit_type *putype)
 
bool utype_can_do_action (const struct unit_type *putype, const action_id act_id)
 
bool utype_can_do_action_result (const struct unit_type *putype, enum action_result result)
 
bool utype_can_do_action_sub_result (const struct unit_type *putype, enum action_sub_result sub_result)
 
bool utype_acts_hostile (const struct unit_type *putype)
 
bool can_unit_act_when_ustate_is (const struct unit_type *punit_type, const enum ustate_prop prop, const bool is_there)
 
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)
 
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)
 
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)
 
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_act_if_tgt_diplrel_tile_other (const struct unit_type *punit_type, const action_id act_id, const int prop, const bool is_there)
 
bool utype_may_act_move_frags (const struct unit_type *punit_type, const action_id act_id, const int move_fragments)
 
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)
 
bool utype_action_takes_all_mp (const struct unit_type *putype, struct action *paction)
 
bool utype_action_takes_all_mp_if_ustate_is (const struct unit_type *putype, struct action *paction, const enum ustate_prop prop)
 
bool utype_is_consumed_by_action (const struct action *paction, const struct unit_type *utype)
 
bool utype_is_consumed_by_action_result (enum action_result result, const struct unit_type *utype)
 
bool utype_is_moved_to_tgt_by_action (const struct action *paction, const struct unit_type *utype)
 
bool utype_is_unmoved_by_action (const struct action *paction, const struct unit_type *utype)
 
bool utype_pays_for_regular_move_to_tgt (const struct action *paction, const struct unit_type *utype)
 
int utype_pays_mp_for_action_base (const struct action *paction, const struct unit_type *putype)
 
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)
 
void role_unit_precalcs (void)
 
void role_unit_precalcs_free (void)
 
int num_role_units (int role)
 
struct unit_typerole_units_iterate (int role, role_unit_callback cb, void *data)
 
struct unit_typerole_units_iterate_backwards (int role, role_unit_callback cb, void *data)
 
struct unit_typeget_role_unit (int role, int role_index)
 
struct unit_typebest_role_unit (const struct city *pcity, int role)
 
struct unit_typebest_role_unit_for_player (const struct player *pplayer, int role)
 
struct unit_typefirst_role_unit_for_player (const struct player *pplayer, int role)
 
bool role_units_translations (struct astring *astr, int flag, bool alts)
 
Unit_Class_id uclass_count (void)
 
Unit_Class_id uclass_number (const struct unit_class *pclass)
 
struct unit_classunit_class_get (const struct unit *punit)
 
struct unit_classuclass_by_number (const Unit_Class_id id)
 
struct unit_classunit_class_by_rule_name (const char *s)
 
const charuclass_rule_name (const struct unit_class *pclass)
 
const charuclass_name_translation (const struct unit_class *pclass)
 
bool unit_has_class_flag (const struct unit *punit, enum unit_class_flag_id flag)
 
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_class_flags_init (void)
 
void set_user_unit_class_flag_name (enum unit_class_flag_id id, const char *name, const char *helptxt)
 
const charunit_class_flag_helptxt (enum unit_class_flag_id id)
 
int unit_build_shield_cost (const struct city *pcity, const struct unit *punit)
 
int utype_build_shield_cost (const struct city *pcity, const struct player *pplayer, const struct unit_type *punittype)
 
int utype_build_shield_cost_base (const struct unit_type *punittype)
 
int unit_build_shield_cost_base (const struct unit *punit)
 
int utype_buy_gold_cost (const struct city *pcity, const struct unit_type *punittype, int shields_in_stock)
 
const struct veteran_systemutype_veteran_system (const struct unit_type *punittype)
 
int utype_veteran_levels (const struct unit_type *punittype)
 
const struct veteran_levelutype_veteran_level (const struct unit_type *punittype, int level)
 
const charutype_veteran_name_translation (const struct unit_type *punittype, int level)
 
bool utype_veteran_has_power_bonus (const struct unit_type *punittype)
 
struct veteran_systemveteran_system_new (int count)
 
void veteran_system_destroy (struct veteran_system *vsystem)
 
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)
 
int unit_pop_value (const struct unit *punit)
 
int utype_pop_value (const struct unit_type *punittype, const struct city *pcity)
 
enum unit_move_type utype_move_type (const struct unit_type *punittype)
 
void set_unit_move_type (struct unit_class *puclass)
 
int utype_upkeep_cost (const struct unit_type *ut, struct player *pplayer, Output_type_id otype)
 
int utype_happy_cost (const struct unit_type *ut, const struct player *pplayer)
 
const struct unit_typecan_upgrade_unittype (const struct player *pplayer, const struct unit_type *punittype)
 
int unit_upgrade_price (const struct player *pplayer, const struct unit_type *from, const struct unit_type *to)
 
bool utype_player_already_has_this (const struct player *pplayer, const struct unit_type *putype)
 
bool utype_player_already_has_this_unique (const struct player *pplayer, const struct unit_type *putype)
 
bool can_player_build_unit_direct (const struct player *p, const struct unit_type *punittype, bool consider_reg_impr_req)
 
bool can_player_build_unit_later (const struct player *p, const struct unit_type *punittype)
 
bool can_player_build_unit_now (const struct player *p, const struct unit_type *punittype)
 
bool utype_is_cityfounder (const struct unit_type *utype)
 
bool uclass_flag_is_in_use (enum unit_class_flag_id ucflag)
 
bool utype_flag_is_in_use (enum unit_type_flag_id uflag)
 
void unit_types_init (void)
 
void unit_types_free (void)
 
void unit_type_flags_free (void)
 
void unit_class_flags_free (void)
 
struct unit_typeunit_type_array_first (void)
 
const struct unit_typeunit_type_array_last (void)
 
struct advanceutype_primary_tech_req (const struct unit_type *ptype)
 
bool is_tech_req_for_utype (const struct unit_type *ptype, struct advance *padv)
 
voidutype_ai_data (const struct unit_type *ptype, const struct ai_type *ai)
 
void utype_set_ai_data (struct unit_type *ptype, const struct ai_type *ai, void *data)
 
void unit_type_action_cache_set (struct unit_type *ptype)
 
void unit_type_action_cache_init (void)
 
void unit_classes_init (void)
 
void unit_classes_free (void)
 
void set_unit_class_caches (struct unit_class *pclass)
 
void set_unit_type_caches (struct unit_type *ptype)
 
struct unit_classunit_class_array_first (void)
 
const struct unit_classunit_class_array_last (void)
 

Macro Definition Documentation

◆ combat_bonus_list_iterate

#define combat_bonus_list_iterate (   bonuslist,
  pbonus 
)     TYPED_LIST_ITERATE(struct combat_bonus, bonuslist, pbonus)

Definition at line 480 of file unittype.h.

◆ combat_bonus_list_iterate_end

#define combat_bonus_list_iterate_end   LIST_ITERATE_END

Definition at line 482 of file unittype.h.

◆ L_FIRST

#define L_FIRST   (UTYF_LAST_USER_FLAG + 1)

Definition at line 349 of file unittype.h.

◆ L_LAST

#define L_LAST   (L_SETTLERS + 1)

Definition at line 439 of file unittype.h.

◆ L_MAX

#define L_MAX   64 /* Used in the network protocol. */

Definition at line 443 of file unittype.h.

◆ MAX_NUM_USER_UCLASS_FLAGS

#define MAX_NUM_USER_UCLASS_FLAGS
Value:
char * incite_cost
Definition comments.c:74
#define UCF_LAST_USER_FLAG
Definition unittype.h:127

Definition at line 128 of file unittype.h.

◆ MAX_NUM_USER_UNIT_FLAGS

#define MAX_NUM_USER_UNIT_FLAGS   (UTYF_LAST_USER_FLAG - UTYF_USER_FLAG_1 + 1)

Definition at line 332 of file unittype.h.

◆ SPECENUM_BITVECTOR [1/2]

#define SPECENUM_BITVECTOR   bv_unit_class_flags

Definition at line 124 of file unittype.h.

◆ SPECENUM_BITVECTOR [2/2]

#define SPECENUM_BITVECTOR   bv_unit_type_flags

Definition at line 124 of file unittype.h.

◆ SPECENUM_COUNT

#define SPECENUM_COUNT   UCF_COUNT

Definition at line 122 of file unittype.h.

◆ SPECENUM_NAME [1/5]

Definition at line 59 of file unittype.h.

◆ SPECENUM_NAME [2/5]

Definition at line 59 of file unittype.h.

◆ SPECENUM_NAME [3/5]

Definition at line 59 of file unittype.h.

◆ SPECENUM_NAME [4/5]

Definition at line 59 of file unittype.h.

◆ SPECENUM_NAME [5/5]

Definition at line 59 of file unittype.h.

◆ SPECENUM_NAMEOVERRIDE [1/2]

#define SPECENUM_NAMEOVERRIDE

Definition at line 123 of file unittype.h.

◆ SPECENUM_NAMEOVERRIDE [2/2]

#define SPECENUM_NAMEOVERRIDE

Definition at line 123 of file unittype.h.

◆ SPECENUM_VALUE0 [1/4]

#define SPECENUM_VALUE0   UCF_TERRAIN_SPEED

Definition at line 60 of file unittype.h.

◆ SPECENUM_VALUE0 [2/4]

#define SPECENUM_VALUE0   UMT_LAND

Definition at line 60 of file unittype.h.

◆ SPECENUM_VALUE0 [3/4]

#define SPECENUM_VALUE0   UTYF_NOZOC

Definition at line 60 of file unittype.h.

◆ SPECENUM_VALUE0 [4/4]

#define SPECENUM_VALUE0   CBONUS_DEFENSE_MULTIPLIER

Definition at line 60 of file unittype.h.

◆ SPECENUM_VALUE0NAME [1/4]

#define SPECENUM_VALUE0NAME   N_("?uclassflag:TerrainSpeed")

Definition at line 61 of file unittype.h.

◆ SPECENUM_VALUE0NAME [2/4]

#define SPECENUM_VALUE0NAME   "Land"

Definition at line 61 of file unittype.h.

◆ SPECENUM_VALUE0NAME [3/4]

#define SPECENUM_VALUE0NAME   N_("?unitflag:HasNoZOC")

Definition at line 61 of file unittype.h.

◆ SPECENUM_VALUE0NAME [4/4]

#define SPECENUM_VALUE0NAME   "DefenseMultiplier"

Definition at line 61 of file unittype.h.

◆ SPECENUM_VALUE1 [1/4]

#define SPECENUM_VALUE1   UCF_TERRAIN_DEFENSE

Definition at line 62 of file unittype.h.

◆ SPECENUM_VALUE1 [2/4]

#define SPECENUM_VALUE1   UMT_SEA

Definition at line 62 of file unittype.h.

◆ SPECENUM_VALUE1 [3/4]

#define SPECENUM_VALUE1   UTYF_IGZOC

Definition at line 62 of file unittype.h.

◆ SPECENUM_VALUE1 [4/4]

#define SPECENUM_VALUE1   CBONUS_DEFENSE_DIVIDER

Definition at line 62 of file unittype.h.

◆ SPECENUM_VALUE10 [1/2]

#define SPECENUM_VALUE10   UCF_KILLCITIZEN

Definition at line 86 of file unittype.h.

◆ SPECENUM_VALUE10 [2/2]

#define SPECENUM_VALUE10   UTYF_COAST

Definition at line 86 of file unittype.h.

◆ SPECENUM_VALUE100

#define SPECENUM_VALUE100   L_START_KING

Definition at line 413 of file unittype.h.

◆ SPECENUM_VALUE100NAME

#define SPECENUM_VALUE100NAME   N_("?unitflag:KingStartUnit")

Definition at line 414 of file unittype.h.

◆ SPECENUM_VALUE101

#define SPECENUM_VALUE101   L_START_DIPLOMAT

Definition at line 416 of file unittype.h.

◆ SPECENUM_VALUE101NAME

#define SPECENUM_VALUE101NAME   N_("?unitflag:DiplomatStartUnit")

Definition at line 417 of file unittype.h.

◆ SPECENUM_VALUE102

#define SPECENUM_VALUE102   L_START_FERRY

Definition at line 419 of file unittype.h.

◆ SPECENUM_VALUE102NAME

#define SPECENUM_VALUE102NAME   N_("?unitflag:FerryStartUnit")

Definition at line 420 of file unittype.h.

◆ SPECENUM_VALUE103

#define SPECENUM_VALUE103   L_START_DEFEND_OK

Definition at line 422 of file unittype.h.

◆ SPECENUM_VALUE103NAME

#define SPECENUM_VALUE103NAME   N_("?unitflag:DefendOkStartUnit")

Definition at line 423 of file unittype.h.

◆ SPECENUM_VALUE104

#define SPECENUM_VALUE104   L_START_DEFEND_GOOD

Definition at line 425 of file unittype.h.

◆ SPECENUM_VALUE104NAME

#define SPECENUM_VALUE104NAME   N_("?unitflag:DefendGoodStartUnit")

Definition at line 426 of file unittype.h.

◆ SPECENUM_VALUE105

#define SPECENUM_VALUE105   L_START_ATTACK_FAST

Definition at line 428 of file unittype.h.

◆ SPECENUM_VALUE105NAME

#define SPECENUM_VALUE105NAME   N_("?unitflag:AttackFastStartUnit")

Definition at line 429 of file unittype.h.

◆ SPECENUM_VALUE106

#define SPECENUM_VALUE106   L_START_ATTACK_STRONG

Definition at line 431 of file unittype.h.

◆ SPECENUM_VALUE106NAME

#define SPECENUM_VALUE106NAME   N_("?unitflag:AttackStrongStartUnit")

Definition at line 432 of file unittype.h.

◆ SPECENUM_VALUE107

#define SPECENUM_VALUE107   L_HUNTER

Definition at line 434 of file unittype.h.

◆ SPECENUM_VALUE107NAME

#define SPECENUM_VALUE107NAME   N_("?unitflag:Hunter")

Definition at line 435 of file unittype.h.

◆ SPECENUM_VALUE108

#define SPECENUM_VALUE108   L_SETTLERS

Definition at line 437 of file unittype.h.

◆ SPECENUM_VALUE108NAME

#define SPECENUM_VALUE108NAME   N_("?unitflag:Settlers")

Definition at line 438 of file unittype.h.

◆ SPECENUM_VALUE10NAME [1/2]

#define SPECENUM_VALUE10NAME   N_("?uclassflag:KillCitizen")

Definition at line 87 of file unittype.h.

◆ SPECENUM_VALUE10NAME [2/2]

#define SPECENUM_VALUE10NAME   N_("?unitflag:Coast")

Definition at line 87 of file unittype.h.

◆ SPECENUM_VALUE11 [1/2]

#define SPECENUM_VALUE11   UCF_HUT_FRIGHTEN

Definition at line 89 of file unittype.h.

◆ SPECENUM_VALUE11 [2/2]

#define SPECENUM_VALUE11   UTYF_SHIELD2GOLD

Definition at line 89 of file unittype.h.

◆ SPECENUM_VALUE11NAME [1/2]

#define SPECENUM_VALUE11NAME   N_("?uclassflag:HutFrighten")

Definition at line 90 of file unittype.h.

◆ SPECENUM_VALUE11NAME [2/2]

#define SPECENUM_VALUE11NAME   N_("?unitflag:Shield2Gold")

Definition at line 90 of file unittype.h.

◆ SPECENUM_VALUE12 [1/2]

#define SPECENUM_VALUE12   UCF_NONNAT_BOMBARD_TGT

Definition at line 92 of file unittype.h.

◆ SPECENUM_VALUE12 [2/2]

#define SPECENUM_VALUE12   UTYF_SPY

Definition at line 92 of file unittype.h.

◆ SPECENUM_VALUE12NAME [1/2]

#define SPECENUM_VALUE12NAME   N_("?uclassflag:NonNatBombardTgt")

Definition at line 93 of file unittype.h.

◆ SPECENUM_VALUE12NAME [2/2]

#define SPECENUM_VALUE12NAME   N_("?unitflag:Spy")

Definition at line 93 of file unittype.h.

◆ SPECENUM_VALUE13 [1/2]

#define SPECENUM_VALUE13   UCF_USER_FLAG_1

Definition at line 95 of file unittype.h.

◆ SPECENUM_VALUE13 [2/2]

#define SPECENUM_VALUE13   UTYF_ONLY_NATIVE_ATTACK

Definition at line 95 of file unittype.h.

◆ SPECENUM_VALUE13NAME

#define SPECENUM_VALUE13NAME   N_("?unitflag:Only_Native_Attack")

Definition at line 226 of file unittype.h.

◆ SPECENUM_VALUE14 [1/2]

#define SPECENUM_VALUE14   UCF_USER_FLAG_2

Definition at line 96 of file unittype.h.

◆ SPECENUM_VALUE14 [2/2]

#define SPECENUM_VALUE14   UTYF_FANATIC

Definition at line 96 of file unittype.h.

◆ SPECENUM_VALUE14NAME

#define SPECENUM_VALUE14NAME   N_("?unitflag:Fanatic")

Definition at line 229 of file unittype.h.

◆ SPECENUM_VALUE15 [1/2]

#define SPECENUM_VALUE15   UCF_USER_FLAG_3

Definition at line 97 of file unittype.h.

◆ SPECENUM_VALUE15 [2/2]

#define SPECENUM_VALUE15   UTYF_GAMELOSS

Definition at line 97 of file unittype.h.

◆ SPECENUM_VALUE15NAME

#define SPECENUM_VALUE15NAME   N_("?unitflag:GameLoss")

Definition at line 232 of file unittype.h.

◆ SPECENUM_VALUE16 [1/2]

#define SPECENUM_VALUE16   UCF_USER_FLAG_4

Definition at line 98 of file unittype.h.

◆ SPECENUM_VALUE16 [2/2]

#define SPECENUM_VALUE16   UTYF_UNIQUE

Definition at line 98 of file unittype.h.

◆ SPECENUM_VALUE16NAME

#define SPECENUM_VALUE16NAME   N_("?unitflag:Unique")

Definition at line 235 of file unittype.h.

◆ SPECENUM_VALUE17 [1/2]

#define SPECENUM_VALUE17   UCF_USER_FLAG_5

Definition at line 99 of file unittype.h.

◆ SPECENUM_VALUE17 [2/2]

#define SPECENUM_VALUE17   UTYF_EVAC_FIRST

Definition at line 99 of file unittype.h.

◆ SPECENUM_VALUE17NAME

#define SPECENUM_VALUE17NAME   N_("?unitflag:EvacuateFirst")

Definition at line 240 of file unittype.h.

◆ SPECENUM_VALUE18 [1/2]

#define SPECENUM_VALUE18   UCF_USER_FLAG_6

Definition at line 100 of file unittype.h.

◆ SPECENUM_VALUE18 [2/2]

#define SPECENUM_VALUE18   UTYF_SUPERSPY

Definition at line 100 of file unittype.h.

◆ SPECENUM_VALUE18NAME

#define SPECENUM_VALUE18NAME   N_("?unitflag:SuperSpy")

Definition at line 243 of file unittype.h.

◆ SPECENUM_VALUE19 [1/2]

#define SPECENUM_VALUE19   UCF_USER_FLAG_7

Definition at line 101 of file unittype.h.

◆ SPECENUM_VALUE19 [2/2]

#define SPECENUM_VALUE19   UTYF_NOHOME

Definition at line 101 of file unittype.h.

◆ SPECENUM_VALUE19NAME

#define SPECENUM_VALUE19NAME   N_("?unitflag:NoHome")

Definition at line 246 of file unittype.h.

◆ SPECENUM_VALUE1NAME [1/4]

#define SPECENUM_VALUE1NAME   N_("?uclassflag:TerrainDefense")

Definition at line 63 of file unittype.h.

◆ SPECENUM_VALUE1NAME [2/4]

#define SPECENUM_VALUE1NAME   "Sea"

Definition at line 63 of file unittype.h.

◆ SPECENUM_VALUE1NAME [3/4]

#define SPECENUM_VALUE1NAME   N_("?unitflag:IgZOC")

Definition at line 63 of file unittype.h.

◆ SPECENUM_VALUE1NAME [4/4]

#define SPECENUM_VALUE1NAME   "DefenseDivider"

Definition at line 63 of file unittype.h.

◆ SPECENUM_VALUE2 [1/4]

#define SPECENUM_VALUE2   UCF_DAMAGE_SLOWS

Definition at line 64 of file unittype.h.

◆ SPECENUM_VALUE2 [2/4]

#define SPECENUM_VALUE2   UMT_BOTH

Definition at line 64 of file unittype.h.

◆ SPECENUM_VALUE2 [3/4]

#define SPECENUM_VALUE2   UTYF_CIVILIAN

Definition at line 64 of file unittype.h.

◆ SPECENUM_VALUE2 [4/4]

#define SPECENUM_VALUE2   CBONUS_LOW_FIREPOWER

Definition at line 64 of file unittype.h.

◆ SPECENUM_VALUE20 [1/2]

#define SPECENUM_VALUE20   UCF_USER_FLAG_8

Definition at line 102 of file unittype.h.

◆ SPECENUM_VALUE20 [2/2]

#define SPECENUM_VALUE20   UTYF_NO_VETERAN

Definition at line 102 of file unittype.h.

◆ SPECENUM_VALUE20NAME

#define SPECENUM_VALUE20NAME   N_("?unitflag:NoVeteran")

Definition at line 249 of file unittype.h.

◆ SPECENUM_VALUE21 [1/2]

#define SPECENUM_VALUE21   UCF_USER_FLAG_9

Definition at line 103 of file unittype.h.

◆ SPECENUM_VALUE21 [2/2]

#define SPECENUM_VALUE21   UTYF_CITYBUSTER

Definition at line 103 of file unittype.h.

◆ SPECENUM_VALUE21NAME

#define SPECENUM_VALUE21NAME   N_("?unitflag:CityBuster")

Definition at line 252 of file unittype.h.

◆ SPECENUM_VALUE22 [1/2]

#define SPECENUM_VALUE22   UCF_USER_FLAG_10

Definition at line 104 of file unittype.h.

◆ SPECENUM_VALUE22 [2/2]

#define SPECENUM_VALUE22   UTYF_NOBUILD

Definition at line 104 of file unittype.h.

◆ SPECENUM_VALUE22NAME

#define SPECENUM_VALUE22NAME   N_("?unitflag:NoBuild")

Definition at line 255 of file unittype.h.

◆ SPECENUM_VALUE23 [1/2]

#define SPECENUM_VALUE23   UCF_USER_FLAG_11

Definition at line 105 of file unittype.h.

◆ SPECENUM_VALUE23 [2/2]

#define SPECENUM_VALUE23   UTYF_BADWALLATTACKER

Definition at line 105 of file unittype.h.

◆ SPECENUM_VALUE23NAME

#define SPECENUM_VALUE23NAME   N_("?unitflag:BadWallAttacker")

Definition at line 259 of file unittype.h.

◆ SPECENUM_VALUE24 [1/2]

#define SPECENUM_VALUE24   UCF_USER_FLAG_12

Definition at line 106 of file unittype.h.

◆ SPECENUM_VALUE24 [2/2]

#define SPECENUM_VALUE24   UTYF_BADCITYDEFENDER

Definition at line 106 of file unittype.h.

◆ SPECENUM_VALUE24NAME

#define SPECENUM_VALUE24NAME   N_("?unitflag:BadCityDefender")

Definition at line 262 of file unittype.h.

◆ SPECENUM_VALUE25 [1/2]

#define SPECENUM_VALUE25   UCF_USER_FLAG_13

Definition at line 107 of file unittype.h.

◆ SPECENUM_VALUE25 [2/2]

#define SPECENUM_VALUE25   UTYF_BARBARIAN_ONLY

Definition at line 107 of file unittype.h.

◆ SPECENUM_VALUE25NAME

#define SPECENUM_VALUE25NAME   N_("?unitflag:BarbarianOnly")

Definition at line 265 of file unittype.h.

◆ SPECENUM_VALUE26 [1/2]

#define SPECENUM_VALUE26   UCF_USER_FLAG_14

Definition at line 108 of file unittype.h.

◆ SPECENUM_VALUE26 [2/2]

#define SPECENUM_VALUE26   UTYF_NEWCITY_GAMES_ONLY

Definition at line 108 of file unittype.h.

◆ SPECENUM_VALUE26NAME

#define SPECENUM_VALUE26NAME   N_("?unitflag:NewCityGamesOnly")

Definition at line 268 of file unittype.h.

◆ SPECENUM_VALUE27 [1/2]

#define SPECENUM_VALUE27   UCF_USER_FLAG_15

Definition at line 109 of file unittype.h.

◆ SPECENUM_VALUE27 [2/2]

#define SPECENUM_VALUE27   UTYF_CANESCAPE

Definition at line 109 of file unittype.h.

◆ SPECENUM_VALUE27NAME

#define SPECENUM_VALUE27NAME   N_("?unitflag:CanEscape")

Definition at line 271 of file unittype.h.

◆ SPECENUM_VALUE28 [1/2]

#define SPECENUM_VALUE28   UCF_USER_FLAG_16

Definition at line 110 of file unittype.h.

◆ SPECENUM_VALUE28 [2/2]

#define SPECENUM_VALUE28   UTYF_CANKILLESCAPING

Definition at line 110 of file unittype.h.

◆ SPECENUM_VALUE28NAME

#define SPECENUM_VALUE28NAME   N_("?unitflag:CanKillEscaping")

Definition at line 274 of file unittype.h.

◆ SPECENUM_VALUE29 [1/2]

#define SPECENUM_VALUE29   UCF_USER_FLAG_17

Definition at line 111 of file unittype.h.

◆ SPECENUM_VALUE29 [2/2]

#define SPECENUM_VALUE29   UTYF_RANDOM_MOVEMENT

Definition at line 111 of file unittype.h.

◆ SPECENUM_VALUE29NAME

#define SPECENUM_VALUE29NAME   N_("?unitflag:RandomMovement")

Definition at line 277 of file unittype.h.

◆ SPECENUM_VALUE2NAME [1/4]

#define SPECENUM_VALUE2NAME   N_("?uclassflag:DamageSlows")

Definition at line 65 of file unittype.h.

◆ SPECENUM_VALUE2NAME [2/4]

#define SPECENUM_VALUE2NAME   "Both"

Definition at line 65 of file unittype.h.

◆ SPECENUM_VALUE2NAME [3/4]

#define SPECENUM_VALUE2NAME   N_("?unitflag:NonMil")

Definition at line 65 of file unittype.h.

◆ SPECENUM_VALUE2NAME [4/4]

#define SPECENUM_VALUE2NAME   "LowFirepower"

Definition at line 65 of file unittype.h.

◆ SPECENUM_VALUE3 [1/3]

#define SPECENUM_VALUE3   UCF_CAN_OCCUPY_CITY

Definition at line 67 of file unittype.h.

◆ SPECENUM_VALUE3 [2/3]

#define SPECENUM_VALUE3   UTYF_IGTER

Definition at line 67 of file unittype.h.

◆ SPECENUM_VALUE3 [3/3]

#define SPECENUM_VALUE3   CBONUS_DEFENSE_MULTIPLIER_PCT

Definition at line 67 of file unittype.h.

◆ SPECENUM_VALUE30 [1/2]

#define SPECENUM_VALUE30   UCF_USER_FLAG_18

Definition at line 112 of file unittype.h.

◆ SPECENUM_VALUE30 [2/2]

#define SPECENUM_VALUE30   UTYF_USER_FLAG_1

Definition at line 112 of file unittype.h.

◆ SPECENUM_VALUE31 [1/2]

#define SPECENUM_VALUE31   UCF_USER_FLAG_19

Definition at line 113 of file unittype.h.

◆ SPECENUM_VALUE31 [2/2]

#define SPECENUM_VALUE31   UTYF_USER_FLAG_2

Definition at line 113 of file unittype.h.

◆ SPECENUM_VALUE32 [1/2]

#define SPECENUM_VALUE32   UCF_USER_FLAG_20

Definition at line 114 of file unittype.h.

◆ SPECENUM_VALUE32 [2/2]

#define SPECENUM_VALUE32   UTYF_USER_FLAG_3

Definition at line 114 of file unittype.h.

◆ SPECENUM_VALUE33 [1/2]

#define SPECENUM_VALUE33   UCF_USER_FLAG_21

Definition at line 115 of file unittype.h.

◆ SPECENUM_VALUE33 [2/2]

#define SPECENUM_VALUE33   UTYF_USER_FLAG_4

Definition at line 115 of file unittype.h.

◆ SPECENUM_VALUE34 [1/2]

#define SPECENUM_VALUE34   UCF_USER_FLAG_22

Definition at line 116 of file unittype.h.

◆ SPECENUM_VALUE34 [2/2]

#define SPECENUM_VALUE34   UTYF_USER_FLAG_5

Definition at line 116 of file unittype.h.

◆ SPECENUM_VALUE35 [1/2]

#define SPECENUM_VALUE35   UCF_USER_FLAG_23

Definition at line 117 of file unittype.h.

◆ SPECENUM_VALUE35 [2/2]

#define SPECENUM_VALUE35   UTYF_USER_FLAG_6

Definition at line 117 of file unittype.h.

◆ SPECENUM_VALUE36 [1/2]

#define SPECENUM_VALUE36   UCF_USER_FLAG_24

Definition at line 118 of file unittype.h.

◆ SPECENUM_VALUE36 [2/2]

#define SPECENUM_VALUE36   UTYF_USER_FLAG_7

Definition at line 118 of file unittype.h.

◆ SPECENUM_VALUE37 [1/2]

#define SPECENUM_VALUE37   UCF_USER_FLAG_25

Definition at line 119 of file unittype.h.

◆ SPECENUM_VALUE37 [2/2]

#define SPECENUM_VALUE37   UTYF_USER_FLAG_8

Definition at line 119 of file unittype.h.

◆ SPECENUM_VALUE38

#define SPECENUM_VALUE38   UTYF_USER_FLAG_9

Definition at line 287 of file unittype.h.

◆ SPECENUM_VALUE39

#define SPECENUM_VALUE39   UTYF_USER_FLAG_10

Definition at line 288 of file unittype.h.

◆ SPECENUM_VALUE3NAME [1/3]

#define SPECENUM_VALUE3NAME   N_("?uclassflag:CanOccupyCity")

Definition at line 68 of file unittype.h.

◆ SPECENUM_VALUE3NAME [2/3]

#define SPECENUM_VALUE3NAME   N_("?unitflag:IgTer")

Definition at line 68 of file unittype.h.

◆ SPECENUM_VALUE3NAME [3/3]

#define SPECENUM_VALUE3NAME   "DefenseMultiplierPct"

Definition at line 68 of file unittype.h.

◆ SPECENUM_VALUE4 [1/3]

#define SPECENUM_VALUE4   UCF_BUILD_ANYWHERE

Definition at line 69 of file unittype.h.

◆ SPECENUM_VALUE4 [2/3]

#define SPECENUM_VALUE4   UTYF_FIELDUNIT

Definition at line 69 of file unittype.h.

◆ SPECENUM_VALUE4 [3/3]

#define SPECENUM_VALUE4   CBONUS_DEFENSE_DIVIDER_PCT

Definition at line 69 of file unittype.h.

◆ SPECENUM_VALUE40

#define SPECENUM_VALUE40   UTYF_USER_FLAG_11

Definition at line 289 of file unittype.h.

◆ SPECENUM_VALUE41

#define SPECENUM_VALUE41   UTYF_USER_FLAG_12

Definition at line 290 of file unittype.h.

◆ SPECENUM_VALUE42

#define SPECENUM_VALUE42   UTYF_USER_FLAG_13

Definition at line 291 of file unittype.h.

◆ SPECENUM_VALUE43

#define SPECENUM_VALUE43   UTYF_USER_FLAG_14

Definition at line 292 of file unittype.h.

◆ SPECENUM_VALUE44

#define SPECENUM_VALUE44   UTYF_USER_FLAG_15

Definition at line 293 of file unittype.h.

◆ SPECENUM_VALUE45

#define SPECENUM_VALUE45   UTYF_USER_FLAG_16

Definition at line 294 of file unittype.h.

◆ SPECENUM_VALUE46

#define SPECENUM_VALUE46   UTYF_USER_FLAG_17

Definition at line 295 of file unittype.h.

◆ SPECENUM_VALUE47

#define SPECENUM_VALUE47   UTYF_USER_FLAG_18

Definition at line 296 of file unittype.h.

◆ SPECENUM_VALUE48

#define SPECENUM_VALUE48   UTYF_USER_FLAG_19

Definition at line 297 of file unittype.h.

◆ SPECENUM_VALUE49

#define SPECENUM_VALUE49   UTYF_USER_FLAG_20

Definition at line 298 of file unittype.h.

◆ SPECENUM_VALUE4NAME [1/3]

#define SPECENUM_VALUE4NAME   N_("?uclassflag:BuildAnywhere")

Definition at line 70 of file unittype.h.

◆ SPECENUM_VALUE4NAME [2/3]

#define SPECENUM_VALUE4NAME   N_("?unitflag:FieldUnit")

Definition at line 70 of file unittype.h.

◆ SPECENUM_VALUE4NAME [3/3]

#define SPECENUM_VALUE4NAME   "DefenseDividerPct"

Definition at line 70 of file unittype.h.

◆ SPECENUM_VALUE5 [1/3]

#define SPECENUM_VALUE5   UCF_UNREACHABLE

Definition at line 71 of file unittype.h.

◆ SPECENUM_VALUE5 [2/3]

#define SPECENUM_VALUE5   UTYF_PROVOKING

Definition at line 71 of file unittype.h.

◆ SPECENUM_VALUE5 [3/3]

#define SPECENUM_VALUE5   CBONUS_SCRAMBLES_PCT

Definition at line 71 of file unittype.h.

◆ SPECENUM_VALUE50

#define SPECENUM_VALUE50   UTYF_USER_FLAG_21

Definition at line 299 of file unittype.h.

◆ SPECENUM_VALUE51

#define SPECENUM_VALUE51   UTYF_USER_FLAG_22

Definition at line 300 of file unittype.h.

◆ SPECENUM_VALUE52

#define SPECENUM_VALUE52   UTYF_USER_FLAG_23

Definition at line 301 of file unittype.h.

◆ SPECENUM_VALUE53

#define SPECENUM_VALUE53   UTYF_USER_FLAG_24

Definition at line 302 of file unittype.h.

◆ SPECENUM_VALUE54

#define SPECENUM_VALUE54   UTYF_USER_FLAG_25

Definition at line 303 of file unittype.h.

◆ SPECENUM_VALUE55

#define SPECENUM_VALUE55   UTYF_USER_FLAG_26

Definition at line 304 of file unittype.h.

◆ SPECENUM_VALUE56

#define SPECENUM_VALUE56   UTYF_USER_FLAG_27

Definition at line 305 of file unittype.h.

◆ SPECENUM_VALUE57

#define SPECENUM_VALUE57   UTYF_USER_FLAG_28

Definition at line 306 of file unittype.h.

◆ SPECENUM_VALUE58

#define SPECENUM_VALUE58   UTYF_USER_FLAG_29

Definition at line 307 of file unittype.h.

◆ SPECENUM_VALUE59

#define SPECENUM_VALUE59   UTYF_USER_FLAG_30

Definition at line 308 of file unittype.h.

◆ SPECENUM_VALUE5NAME [1/3]

#define SPECENUM_VALUE5NAME   N_("?uclassflag:Unreachable")

Definition at line 72 of file unittype.h.

◆ SPECENUM_VALUE5NAME [2/3]

#define SPECENUM_VALUE5NAME   N_("?unitflag:Provoking")

Definition at line 72 of file unittype.h.

◆ SPECENUM_VALUE5NAME [3/3]

#define SPECENUM_VALUE5NAME   "CityDefensePct"

Definition at line 72 of file unittype.h.

◆ SPECENUM_VALUE6 [1/2]

#define SPECENUM_VALUE6   UCF_COLLECT_RANSOM

Definition at line 74 of file unittype.h.

◆ SPECENUM_VALUE6 [2/2]

#define SPECENUM_VALUE6   UTYF_NEVER_PROTECTS

Definition at line 74 of file unittype.h.

◆ SPECENUM_VALUE60

#define SPECENUM_VALUE60   UTYF_USER_FLAG_31

Definition at line 309 of file unittype.h.

◆ SPECENUM_VALUE61

#define SPECENUM_VALUE61   UTYF_USER_FLAG_32

Definition at line 310 of file unittype.h.

◆ SPECENUM_VALUE62

#define SPECENUM_VALUE62   UTYF_USER_FLAG_33

Definition at line 311 of file unittype.h.

◆ SPECENUM_VALUE63

#define SPECENUM_VALUE63   UTYF_USER_FLAG_34

Definition at line 312 of file unittype.h.

◆ SPECENUM_VALUE64

#define SPECENUM_VALUE64   UTYF_USER_FLAG_35

Definition at line 313 of file unittype.h.

◆ SPECENUM_VALUE65

#define SPECENUM_VALUE65   UTYF_USER_FLAG_36

Definition at line 314 of file unittype.h.

◆ SPECENUM_VALUE66

#define SPECENUM_VALUE66   UTYF_USER_FLAG_37

Definition at line 315 of file unittype.h.

◆ SPECENUM_VALUE67

#define SPECENUM_VALUE67   UTYF_USER_FLAG_38

Definition at line 316 of file unittype.h.

◆ SPECENUM_VALUE68

#define SPECENUM_VALUE68   UTYF_USER_FLAG_39

Definition at line 317 of file unittype.h.

◆ SPECENUM_VALUE69

#define SPECENUM_VALUE69   UTYF_USER_FLAG_40

Definition at line 318 of file unittype.h.

◆ SPECENUM_VALUE6NAME [1/2]

#define SPECENUM_VALUE6NAME   N_("?uclassflag:CollectRansom")

Definition at line 75 of file unittype.h.

◆ SPECENUM_VALUE6NAME [2/2]

#define SPECENUM_VALUE6NAME   N_("?unitflag:NeverProtects")

Definition at line 75 of file unittype.h.

◆ SPECENUM_VALUE7 [1/2]

#define SPECENUM_VALUE7   UCF_ZOC

Definition at line 77 of file unittype.h.

◆ SPECENUM_VALUE7 [2/2]

#define SPECENUM_VALUE7   UTYF_SETTLERS

Definition at line 77 of file unittype.h.

◆ SPECENUM_VALUE70

#define SPECENUM_VALUE70   UTYF_USER_FLAG_41

Definition at line 319 of file unittype.h.

◆ SPECENUM_VALUE71

#define SPECENUM_VALUE71   UTYF_USER_FLAG_42

Definition at line 320 of file unittype.h.

◆ SPECENUM_VALUE72

#define SPECENUM_VALUE72   UTYF_USER_FLAG_43

Definition at line 321 of file unittype.h.

◆ SPECENUM_VALUE73

#define SPECENUM_VALUE73   UTYF_USER_FLAG_44

Definition at line 322 of file unittype.h.

◆ SPECENUM_VALUE74

#define SPECENUM_VALUE74   UTYF_USER_FLAG_45

Definition at line 323 of file unittype.h.

◆ SPECENUM_VALUE75

#define SPECENUM_VALUE75   UTYF_USER_FLAG_46

Definition at line 324 of file unittype.h.

◆ SPECENUM_VALUE76

#define SPECENUM_VALUE76   UTYF_USER_FLAG_47

Definition at line 325 of file unittype.h.

◆ SPECENUM_VALUE77

#define SPECENUM_VALUE77   UTYF_USER_FLAG_48

Definition at line 326 of file unittype.h.

◆ SPECENUM_VALUE78

#define SPECENUM_VALUE78   UTYF_USER_FLAG_49

Definition at line 327 of file unittype.h.

◆ SPECENUM_VALUE79

#define SPECENUM_VALUE79   UTYF_USER_FLAG_50

Definition at line 328 of file unittype.h.

◆ SPECENUM_VALUE7NAME [1/2]

#define SPECENUM_VALUE7NAME   N_("?uclassflag:ZOC")

Definition at line 78 of file unittype.h.

◆ SPECENUM_VALUE7NAME [2/2]

#define SPECENUM_VALUE7NAME   N_("?unitflag:Settlers")

Definition at line 78 of file unittype.h.

◆ SPECENUM_VALUE8 [1/2]

#define SPECENUM_VALUE8   UCF_DOESNT_OCCUPY_TILE

Definition at line 80 of file unittype.h.

◆ SPECENUM_VALUE8 [2/2]

#define SPECENUM_VALUE8   UTYF_DIPLOMAT

Definition at line 80 of file unittype.h.

◆ SPECENUM_VALUE80

#define SPECENUM_VALUE80   L_FIRSTBUILD

Definition at line 353 of file unittype.h.

◆ SPECENUM_VALUE80NAME

#define SPECENUM_VALUE80NAME   N_("?unitflag:FirstBuild")

Definition at line 354 of file unittype.h.

◆ SPECENUM_VALUE81

#define SPECENUM_VALUE81   L_EXPLORER

Definition at line 356 of file unittype.h.

◆ SPECENUM_VALUE81NAME

#define SPECENUM_VALUE81NAME   N_("?unitflag:Explorer")

Definition at line 357 of file unittype.h.

◆ SPECENUM_VALUE82

#define SPECENUM_VALUE82   L_HUT

Definition at line 359 of file unittype.h.

◆ SPECENUM_VALUE82NAME

#define SPECENUM_VALUE82NAME   N_("?unitflag:Hut")

Definition at line 360 of file unittype.h.

◆ SPECENUM_VALUE83

#define SPECENUM_VALUE83   L_HUT_TECH

Definition at line 362 of file unittype.h.

◆ SPECENUM_VALUE83NAME

#define SPECENUM_VALUE83NAME   N_("?unitflag:HutTech")

Definition at line 363 of file unittype.h.

◆ SPECENUM_VALUE84

#define SPECENUM_VALUE84   L_PARTISAN

Definition at line 365 of file unittype.h.

◆ SPECENUM_VALUE84NAME

#define SPECENUM_VALUE84NAME   N_("?unitflag:Partisan")

Definition at line 366 of file unittype.h.

◆ SPECENUM_VALUE85

#define SPECENUM_VALUE85   L_DEFEND_OK

Definition at line 368 of file unittype.h.

◆ SPECENUM_VALUE85NAME

#define SPECENUM_VALUE85NAME   N_("?unitflag:DefendOk")

Definition at line 369 of file unittype.h.

◆ SPECENUM_VALUE86

#define SPECENUM_VALUE86   L_DEFEND_GOOD

Definition at line 371 of file unittype.h.

◆ SPECENUM_VALUE86NAME

#define SPECENUM_VALUE86NAME   N_("?unitflag:DefendGood")

Definition at line 372 of file unittype.h.

◆ SPECENUM_VALUE87

#define SPECENUM_VALUE87   L_FERRYBOAT

Definition at line 374 of file unittype.h.

◆ SPECENUM_VALUE87NAME

#define SPECENUM_VALUE87NAME   N_("?unitflag:FerryBoat")

Definition at line 375 of file unittype.h.

◆ SPECENUM_VALUE88

#define SPECENUM_VALUE88   L_BARBARIAN

Definition at line 377 of file unittype.h.

◆ SPECENUM_VALUE88NAME

#define SPECENUM_VALUE88NAME   N_("?unitflag:Barbarian")

Definition at line 378 of file unittype.h.

◆ SPECENUM_VALUE89

#define SPECENUM_VALUE89   L_BARBARIAN_TECH

Definition at line 380 of file unittype.h.

◆ SPECENUM_VALUE89NAME

#define SPECENUM_VALUE89NAME   N_("?unitflag:BarbarianTech")

Definition at line 381 of file unittype.h.

◆ SPECENUM_VALUE8NAME [1/2]

#define SPECENUM_VALUE8NAME   N_("?uclassflag:DoesntOccupyTile")

Definition at line 81 of file unittype.h.

◆ SPECENUM_VALUE8NAME [2/2]

#define SPECENUM_VALUE8NAME   N_("?unitflag:Diplomat")

Definition at line 81 of file unittype.h.

◆ SPECENUM_VALUE9 [1/2]

#define SPECENUM_VALUE9   UCF_ATTACK_NON_NATIVE

Definition at line 83 of file unittype.h.

◆ SPECENUM_VALUE9 [2/2]

#define SPECENUM_VALUE9   UTYF_COAST_STRICT

Definition at line 83 of file unittype.h.

◆ SPECENUM_VALUE90

#define SPECENUM_VALUE90   L_BARBARIAN_BOAT

Definition at line 383 of file unittype.h.

◆ SPECENUM_VALUE90NAME

#define SPECENUM_VALUE90NAME   N_("?unitflag:BarbarianBoat")

Definition at line 384 of file unittype.h.

◆ SPECENUM_VALUE91

#define SPECENUM_VALUE91   L_BARBARIAN_BOAT_TECH

Definition at line 386 of file unittype.h.

◆ SPECENUM_VALUE91NAME

#define SPECENUM_VALUE91NAME   N_("?unitflag:BarbarianBoatTech")

Definition at line 387 of file unittype.h.

◆ SPECENUM_VALUE92

#define SPECENUM_VALUE92   L_BARBARIAN_BUILD

Definition at line 389 of file unittype.h.

◆ SPECENUM_VALUE92NAME

#define SPECENUM_VALUE92NAME   N_("?unitflag:BarbarianBuild")

Definition at line 390 of file unittype.h.

◆ SPECENUM_VALUE93

#define SPECENUM_VALUE93   L_BARBARIAN_BUILD_TECH

Definition at line 392 of file unittype.h.

◆ SPECENUM_VALUE93NAME

#define SPECENUM_VALUE93NAME   N_("?unitflag:BarbarianBuildTech")

Definition at line 393 of file unittype.h.

◆ SPECENUM_VALUE94

#define SPECENUM_VALUE94   L_BARBARIAN_LEADER

Definition at line 395 of file unittype.h.

◆ SPECENUM_VALUE94NAME

#define SPECENUM_VALUE94NAME   N_("?unitflag:BarbarianLeader")

Definition at line 396 of file unittype.h.

◆ SPECENUM_VALUE95

#define SPECENUM_VALUE95   L_BARBARIAN_SEA

Definition at line 398 of file unittype.h.

◆ SPECENUM_VALUE95NAME

#define SPECENUM_VALUE95NAME   N_("?unitflag:BarbarianSea")

Definition at line 399 of file unittype.h.

◆ SPECENUM_VALUE96

#define SPECENUM_VALUE96   L_BARBARIAN_SEA_TECH

Definition at line 401 of file unittype.h.

◆ SPECENUM_VALUE96NAME

#define SPECENUM_VALUE96NAME   N_("?unitflag:BarbarianSeaTech")

Definition at line 402 of file unittype.h.

◆ SPECENUM_VALUE97

#define SPECENUM_VALUE97   L_START_CITIES

Definition at line 404 of file unittype.h.

◆ SPECENUM_VALUE97NAME

#define SPECENUM_VALUE97NAME   N_("?unitflag:CitiesStartUnit")

Definition at line 405 of file unittype.h.

◆ SPECENUM_VALUE98

#define SPECENUM_VALUE98   L_START_WORKER

Definition at line 407 of file unittype.h.

◆ SPECENUM_VALUE98NAME

#define SPECENUM_VALUE98NAME   N_("?unitflag:WorkerStartUnit")

Definition at line 408 of file unittype.h.

◆ SPECENUM_VALUE99

#define SPECENUM_VALUE99   L_START_EXPLORER

Definition at line 410 of file unittype.h.

◆ SPECENUM_VALUE99NAME

#define SPECENUM_VALUE99NAME   N_("?unitflag:ExplorerStartUnit")

Definition at line 411 of file unittype.h.

◆ SPECENUM_VALUE9NAME [1/2]

#define SPECENUM_VALUE9NAME   N_("?uclassflag:AttackNonNative")

Definition at line 84 of file unittype.h.

◆ SPECENUM_VALUE9NAME [2/2]

#define SPECENUM_VALUE9NAME   N_("?unitflag:CoastStrict")

Definition at line 84 of file unittype.h.

◆ SPECLIST_TAG [1/3]

#define SPECLIST_TAG   combat_bonus

Definition at line 476 of file unittype.h.

◆ SPECLIST_TAG [2/3]

#define SPECLIST_TAG   unit_class

Definition at line 476 of file unittype.h.

◆ SPECLIST_TAG [3/3]

#define SPECLIST_TAG   unit_type

Definition at line 476 of file unittype.h.

◆ SPECLIST_TYPE [1/3]

#define SPECLIST_TYPE   struct combat_bonus

Definition at line 477 of file unittype.h.

◆ SPECLIST_TYPE [2/3]

#define SPECLIST_TYPE   struct unit_class

Definition at line 477 of file unittype.h.

◆ SPECLIST_TYPE [3/3]

#define SPECLIST_TYPE   struct unit_type

Definition at line 477 of file unittype.h.

◆ U_LAST

#define U_LAST   MAX_NUM_UNITS

Definition at line 40 of file unittype.h.

◆ U_NOT_OBSOLETED

#define U_NOT_OBSOLETED   (NULL)

Definition at line 528 of file unittype.h.

◆ UCF_LAST_USER_FLAG

#define UCF_LAST_USER_FLAG   UCF_USER_FLAG_25

Definition at line 127 of file unittype.h.

◆ uclass_index

#define uclass_index (   _c_)    (_c_)->item_number

Definition at line 742 of file unittype.h.

◆ unit_class_iterate

#define unit_class_iterate (   _p)
Value:
{ \
if (NULL != _p) { \
for (; _p <= _end_##_p; _p++) {
const struct unit_class * unit_class_array_last(void)
Definition unittype.c:2434
struct unit_class * unit_class_array_first(void)
Definition unittype.c:2423

Definition at line 905 of file unittype.h.

◆ unit_class_iterate_end

#define unit_class_iterate_end
Value:
} \
} \
}

Definition at line 912 of file unittype.h.

◆ unit_class_list_iterate

#define unit_class_list_iterate (   uclass_list,
  pclass 
)     TYPED_LIST_ITERATE(struct unit_class, uclass_list, pclass)

Definition at line 929 of file unittype.h.

◆ unit_class_list_iterate_end

#define unit_class_list_iterate_end   LIST_ITERATE_END

Definition at line 931 of file unittype.h.

◆ unit_class_re_active_iterate

#define unit_class_re_active_iterate (   _p)
Value:
if (!_p->ruledit_disabled) {
#define unit_class_iterate(_p)
Definition unittype.h:905

Definition at line 917 of file unittype.h.

◆ unit_class_re_active_iterate_end

#define unit_class_re_active_iterate_end
Value:
} \
#define unit_class_iterate_end
Definition unittype.h:912

Definition at line 921 of file unittype.h.

◆ UNIT_MAX_PARADROP_RANGE

#define UNIT_MAX_PARADROP_RANGE   (65535 - 1)

Definition at line 56 of file unittype.h.

◆ unit_tech_reqs_iterate

#define unit_tech_reqs_iterate (   _utype_,
  _p 
)
Value:
do { \
if (preq_##_p->source.kind == VUT_ADVANCE) { \
struct advance *_p = preq_##_p->source.value.advance;

Definition at line 872 of file unittype.h.

◆ unit_tech_reqs_iterate_end

#define unit_tech_reqs_iterate_end
Value:
} \
} while (FALSE);
#define requirement_vector_iterate_end
#define FALSE
Definition support.h:47

Definition at line 878 of file unittype.h.

◆ unit_type_iterate

#define unit_type_iterate (   _p)
Value:
{ \
if (NULL != _p) { \
const struct unit_type *_end_##_p = unit_type_array_last(); \
for (; _p <= _end_##_p; _p++) {
struct unit_type * unit_type_array_first(void)
Definition unittype.c:58
const struct unit_type * unit_type_array_last(void)
Definition unittype.c:69

Definition at line 852 of file unittype.h.

◆ unit_type_iterate_end

#define unit_type_iterate_end
Value:
} \
} \
}

Definition at line 859 of file unittype.h.

◆ unit_type_list_iterate

#define unit_type_list_iterate (   utype_list,
  ptype 
)     TYPED_LIST_ITERATE(struct unit_type, utype_list, ptype)

Definition at line 937 of file unittype.h.

◆ unit_type_list_iterate_end

#define unit_type_list_iterate_end   LIST_ITERATE_END

Definition at line 939 of file unittype.h.

◆ unit_type_re_active_iterate

#define unit_type_re_active_iterate (   _p)
Value:
if (!_p->ruledit_disabled) {
#define unit_type_iterate(_p)
Definition unittype.h:852

Definition at line 864 of file unittype.h.

◆ unit_type_re_active_iterate_end

#define unit_type_re_active_iterate_end
Value:
} \
#define unit_type_iterate_end
Definition unittype.h:859

Definition at line 868 of file unittype.h.

◆ UTYF_LAST_USER_FLAG

#define UTYF_LAST_USER_FLAG   UTYF_USER_FLAG_50

Definition at line 331 of file unittype.h.

◆ utype_class

#define utype_class (   _t_)    (_t_)->uclass

Definition at line 749 of file unittype.h.

◆ utype_fuel

#define utype_fuel (   ptype)    (ptype)->fuel

Definition at line 836 of file unittype.h.

Typedef Documentation

◆ role_unit_callback

typedef bool(* role_unit_callback) (struct unit_type *ptype, void *data)

Definition at line 722 of file unittype.h.

Enumeration Type Documentation

◆ move_level

Enumerator
MOVE_NONE 
MOVE_PARTIAL 
MOVE_FULL 

Definition at line 144 of file unittype.h.

Function Documentation

◆ best_role_unit()

struct unit_type * best_role_unit ( const struct city pcity,
int  role 
)

Return "best" unit this city can build, with given role/flag. Returns NULL if none match. "Best" means highest unit type id.

Definition at line 2271 of file unittype.c.

Referenced by city_choose_build_default(), contemplate_new_city(), dai_choose_diplomat_defensive(), dai_choose_diplomat_offensive(), dai_choose_help_wonder(), dai_choose_trade_route(), dai_city_choose_build(), dai_effect_value(), and domestic_advisor_choose_build().

◆ best_role_unit_for_player()

struct unit_type * best_role_unit_for_player ( const struct player pplayer,
int  role 
)

Return "best" unit the player can build, with given role/flag. Returns NULL if none match. "Best" means highest unit type id.

TODO: Cache the result per player?

Definition at line 2297 of file unittype.c.

Referenced by api_find_role_unit_type(), calculate_city_clusters(), city_gold_worth(), dai_wonder_city_distance(), find_best_city_placement(), and find_something_to_kill().

◆ BV_DEFINE() [1/4]

BV_DEFINE ( bv_unit_classes  ,
UCL_LAST   
)

◆ BV_DEFINE() [2/4]

BV_DEFINE ( bv_unit_type_roles  ,
L_MAX   
)

◆ BV_DEFINE() [3/4]

BV_DEFINE ( bv_unit_types  ,
U_LAST   
)

◆ BV_DEFINE() [4/4]

BV_DEFINE ( bv_utypes  ,
U_LAST   
)

◆ can_player_build_unit_direct()

bool can_player_build_unit_direct ( const struct player p,
const struct unit_type punittype,
bool  consider_reg_impr_req 
)

Whether player can build given unit somewhere, ignoring whether unit is obsolete and assuming the player has a coastal city.

consider_reg_impr_req affects only regular buildings that player may have in a city despite being unable to build it any more. E.g. Great Wonder built by someone else make it obvious that this player cannot build the unit, even if consider_reg_impr_req is FALSE.

Definition at line 1968 of file unittype.c.

Referenced by adv_data_phase_init(), api_methods_player_can_build_unit_direct(), can_city_build_unit_direct(), can_city_build_unit_now(), can_player_build_unit_later(), can_player_build_unit_now(), can_upgrade_unittype(), clipboard_copy_production(), and find_a_unit_type().

◆ can_player_build_unit_later()

bool can_player_build_unit_later ( const struct player p,
const struct unit_type punittype 
)

Whether player can eventually build given unit somewhere – ie, returns TRUE if unit is available with current tech OR will be available with future tech. Returns FALSE if unit is obsolete.

Definition at line 2099 of file unittype.c.

Referenced by can_city_build_unit_later(), collect_eventually_buildable_targets(), and popup_worklist_editor().

◆ can_player_build_unit_now()

bool can_player_build_unit_now ( const struct player p,
const struct unit_type punittype 
)

Whether player can build given unit somewhere; returns FALSE if unit is obsolete.

Definition at line 2078 of file unittype.c.

Referenced by best_role_unit_for_player(), collect_buildable_targets(), collect_eventually_buildable_targets(), first_role_unit_for_player(), popup_worklist_editor(), and mr_menu::update_airlift_menu().

◆ can_unit_act_when_ustate_is()

bool can_unit_act_when_ustate_is ( const struct unit_type punit_type,
const enum ustate_prop  prop,
const bool  is_there 
)

Return TRUE iff there exists an (action enabler controlled) action that a unit of the type punit_type can perform while its unit state property prop has the value is_there.

Definition at line 943 of file unittype.c.

Referenced by pf_action_possible().

◆ can_upgrade_unittype()

const struct unit_type * can_upgrade_unittype ( const struct player pplayer,
const struct unit_type punittype 
)

◆ can_utype_do_act_if_tgt_diplrel()

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 
)

Return TRUE iff the given (action enabler controlled) action can be performed by a unit of the given type while the given property of its owner's diplomatic relationship to the target's owner has the given value.

Note: since this only supports the local range no information for other ranges are stored in dipl_rel_action_cache.

Definition at line 1017 of file unittype.c.

Referenced by city_can_be_built_here(), expl_act_not_enabl(), helptext_unit(), need_war_player_hlp(), and send_goto_route().

◆ FC_STATIC_ASSERT()

FC_STATIC_ASSERT ( L_LAST - L_FIRST<=  L_MAX,
too_many_unit_roles   
)

◆ first_role_unit_for_player()

struct unit_type * first_role_unit_for_player ( const struct player pplayer,
int  role 
)

Return first unit the player can build, with given role/flag. Returns NULL if none match. Used eg when placing starting units.

Definition at line 2322 of file unittype.c.

Referenced by building_advisor(), and crole_to_unit_type().

◆ get_role_unit()

struct unit_type * get_role_unit ( int  role,
int  role_index 
)

◆ is_tech_req_for_utype()

bool is_tech_req_for_utype ( const struct unit_type ptype,
struct advance padv 
)

◆ num_role_units()

int num_role_units ( int  role)

◆ role_unit_precalcs()

void role_unit_precalcs ( void  )

Initialize; it is safe to call this multiple times (e.g., if units have changed due to rulesets in client).

Definition at line 2175 of file unittype.c.

Referenced by load_rulesetdir(), and set_client_state().

◆ role_unit_precalcs_free()

void role_unit_precalcs_free ( void  )

Free memory allocated by role_unit_precalcs().

Definition at line 2160 of file unittype.c.

Referenced by game_ruleset_free(), and role_unit_precalcs().

◆ role_units_iterate()

struct unit_type * role_units_iterate ( int  role,
role_unit_callback  cb,
void data 
)

Iterate over all the role units and feed them to callback. Once callback returns TRUE, no further units are feeded to it and we return the unit that caused callback to return TRUE

Definition at line 2217 of file unittype.c.

◆ role_units_iterate_backwards()

struct unit_type * role_units_iterate_backwards ( int  role,
role_unit_callback  cb,
void data 
)

Iterate over all the role units and feed them to callback, starting from the last one. Once callback returns TRUE, no further units are feeded to it and we return the unit that caused callback to return TRUE

Definition at line 2236 of file unittype.c.

Referenced by dai_role_utype_for_terrain_class().

◆ role_units_translations()

bool role_units_translations ( struct astring astr,
int  flag,
bool  alts 
)

Return a string with all the names of units with this flag. If "alts" is set, separate with "or", otherwise "and". Return FALSE if no unit with this flag exists.

Definition at line 1668 of file unittype.c.

Referenced by illegal_action_msg(), req_text_insert(), and request_unit_goto().

◆ set_unit_class_caches()

void set_unit_class_caches ( struct unit_class pclass)

Set caches for unit class.

Definition at line 2742 of file unittype.c.

Referenced by handle_rulesets_ready(), and load_rulesetdir().

◆ set_unit_move_type()

void set_unit_move_type ( struct unit_class puclass)

Set move_type for unit class.

Definition at line 2910 of file unittype.c.

Referenced by handle_rulesets_ready().

◆ set_unit_type_caches()

void set_unit_type_caches ( struct unit_type ptype)

Set caches for unit types.

Definition at line 2801 of file unittype.c.

Referenced by handle_rulesets_ready(), and load_rulesetdir().

◆ set_user_unit_class_flag_name()

void set_user_unit_class_flag_name ( enum unit_class_flag_id  id,
const char name,
const char helptxt 
)

Sets user defined name for unit class flag.

Definition at line 1812 of file unittype.c.

Referenced by handle_ruleset_unit_class_flag(), and load_unit_names().

◆ set_user_unit_type_flag_name()

void set_user_unit_type_flag_name ( enum unit_type_flag_id  id,
const char name,
const char helptxt 
)

Sets user defined name for unit flag.

Definition at line 1876 of file unittype.c.

Referenced by handle_ruleset_unit_flag(), and load_unit_names().

◆ uclass_by_number()

struct unit_class * uclass_by_number ( const Unit_Class_id  id)

◆ uclass_count()

Unit_Class_id uclass_count ( void  )

Return the unit_class count.

Definition at line 2445 of file unittype.c.

Referenced by helptext_extra(), helptext_terrain(), helptext_unit(), and req_text_insert().

◆ uclass_flag_is_in_use()

bool uclass_flag_is_in_use ( enum unit_class_flag_id  ucflag)

Returns TRUE iff the specified unit class flag is in use by any unit class.

Parameters
ucflagthe unit class flag to check if is in use.
Returns
TRUE if the unit class flag is used in the current ruleset.

Definition at line 2967 of file unittype.c.

Referenced by universal_never_there().

◆ uclass_has_flag()

static bool uclass_has_flag ( const struct unit_class punitclass,
enum unit_class_flag_id  flag 
)
inlinestatic

◆ uclass_name_translation()

const char * uclass_name_translation ( const struct unit_class pclass)

Return the (translated) name of the unit class. You don't have to free the return pointer.

Definition at line 1632 of file unittype.c.

Referenced by can_unit_move_to_tile_with_notify(), helptext_extra(), helptext_government(), helptext_terrain(), helptext_unit(), req_text_insert(), and universal_name_translation().

◆ uclass_number()

Unit_Class_id uclass_number ( const struct unit_class pclass)

Return the unit_class index.

Definition at line 2467 of file unittype.c.

Referenced by pf_pos_hash_val(), send_ruleset_unit_classes(), send_ruleset_units(), and universal_number().

◆ uclass_rule_name()

const char * uclass_rule_name ( const struct unit_class pclass)

Return the (untranslated) rule name of the unit class. You don't have to free the return pointer.

Definition at line 1641 of file unittype.c.

Referenced by edit_extra::edit_extra(), edit_terrain::edit_terrain(), load_ruleset_units(), sanity_check_ruleset_data(), save_terrain_ruleset(), save_uclass_vec(), save_units_ruleset(), unit_class_by_rule_name(), universal_kind_values(), and universal_rule_name().

◆ unit_build_shield_cost()

int unit_build_shield_cost ( const struct city pcity,
const struct unit punit 
)

Returns the number of shields it takes to build this unit.

Definition at line 1476 of file unittype.c.

Referenced by city_gold_worth(), city_incite_cost(), and get_discounted_reward().

◆ unit_build_shield_cost_base()

int unit_build_shield_cost_base ( const struct unit punit)

◆ unit_can_take_over()

bool unit_can_take_over ( const struct unit punit)

◆ unit_class_array_first()

struct unit_class * unit_class_array_first ( void  )

Return the first item of unit_classes.

Definition at line 2423 of file unittype.c.

◆ unit_class_array_last()

const struct unit_class * unit_class_array_last ( void  )

Return the last item of unit_classes.

Definition at line 2434 of file unittype.c.

◆ unit_class_by_rule_name()

struct unit_class * unit_class_by_rule_name ( const char s)

Returns the unit class that has the given (untranslated) rule name. Returns NULL if none match.

Definition at line 1784 of file unittype.c.

Referenced by load_ruleset_terrain(), load_ruleset_units(), and universal_value_from_str().

◆ unit_class_flag_helptxt()

const char * unit_class_flag_helptxt ( enum unit_class_flag_id  id)

Return the (untranslated) help text of the user unit class flag.

Definition at line 1854 of file unittype.c.

Referenced by helptext_unit(), save_units_ruleset(), and send_ruleset_unit_classes().

◆ unit_class_flags_free()

void unit_class_flags_free ( void  )

Frees the memory associated with all unit class flags

Definition at line 2411 of file unittype.c.

Referenced by game_ruleset_free().

◆ unit_class_get()

struct unit_class * unit_class_get ( const struct unit punit)

◆ unit_classes_free()

void unit_classes_free ( void  )

Free resources allocated for unit classes.

Definition at line 2528 of file unittype.c.

Referenced by game_ruleset_free().

◆ unit_classes_init()

void unit_classes_init ( void  )

Initialize unit_class structures.

Definition at line 2506 of file unittype.c.

Referenced by game_ruleset_init().

◆ unit_has_class_flag()

bool unit_has_class_flag ( const struct unit punit,
enum unit_class_flag_id  flag 
)

Return whether the unit has the class flag.

Definition at line 1649 of file unittype.c.

◆ unit_has_type_flag()

bool unit_has_type_flag ( const struct unit punit,
enum unit_type_flag_id  flag 
)

◆ unit_has_type_role()

bool unit_has_type_role ( const struct unit punit,
enum unit_role_id  role 
)

Return whether the unit has the given role.

Definition at line 208 of file unittype.c.

Referenced by actres_possible(), dai_fill_unit_param(), dai_hunter_qualify(), dai_manage_barbarian_leader(), dai_manage_unit(), dai_spend_gold(), and dai_unit_make_homecity().

◆ unit_name_translation()

const char * unit_name_translation ( const struct unit punit)

◆ unit_pop_value()

int unit_pop_value ( const struct unit punit)

How much population this unit contains. This can be different from what it originally cost, i.e., from what utype_pop_cost() for the unit type returns.

Definition at line 1543 of file unittype.c.

Referenced by actres_possible(), city_add_unit(), city_desirability(), and expl_act_not_enabl().

◆ unit_rule_name()

const char * unit_rule_name ( const struct unit punit)

◆ unit_type_action_cache_init()

void unit_type_action_cache_init ( void  )

Cache what unit types may be allowed do what actions, both at all and when certain properties are true.

Definition at line 931 of file unittype.c.

Referenced by load_rulesetdir().

◆ unit_type_action_cache_set()

void unit_type_action_cache_set ( struct unit_type ptype)

Cache if any action may be possible for a unit of the type putype given the property tested for. Since a it could be ignored both present and !present must be checked.

Definition at line 915 of file unittype.c.

Referenced by handle_rulesets_ready(), and unit_type_action_cache_init().

◆ unit_type_array_first()

struct unit_type * unit_type_array_first ( void  )

Return the first item of unit_types.

Definition at line 58 of file unittype.c.

Referenced by api_edit_create_unit_full().

◆ unit_type_array_last()

const struct unit_type * unit_type_array_last ( void  )

Return the last item of unit_types.

Definition at line 69 of file unittype.c.

Referenced by api_edit_create_unit_full().

◆ unit_type_by_rule_name()

struct unit_type * unit_type_by_rule_name ( const char name)

Returns the unit type that has the given (untranslated) rule name. Returns NULL if none match.

Definition at line 1767 of file unittype.c.

Referenced by api_find_unit_type_by_name(), tab_unit::initialize_new_utype(), lookup_unit_list(), lookup_unit_type(), tab_unit::select_unit(), sg_load_player_units(), sg_load_player_units(), and universal_value_from_str().

◆ unit_type_by_translated_name()

struct unit_type * unit_type_by_translated_name ( const char name)

Returns the unit type that has the given (translated) name. Returns NULL if none match.

Definition at line 1752 of file unittype.c.

Referenced by help_update_unit_type(), help_dialog::make_tree(), and help_widget::set_topic_unit().

◆ unit_type_flag_helptxt()

const char * unit_type_flag_helptxt ( enum unit_type_flag_id  id)

Return the (untranslated) helptxt of the user unit flag.

Definition at line 1917 of file unittype.c.

Referenced by helptext_unit(), save_units_ruleset(), and send_ruleset_units().

◆ unit_type_flags_free()

void unit_type_flags_free ( void  )

Frees the memory associated with all unit type flags

Definition at line 2399 of file unittype.c.

Referenced by game_ruleset_free().

◆ unit_type_get()

const struct unit_type * unit_type_get ( const struct unit punit)

Return the unit type for this unit.

Definition at line 123 of file unittype.c.

Referenced by act_sel_new_extra_tgt_callback(), action_auto_perf_unit_sel(), action_decision_handle(), action_dice_roll_odds(), action_may_happen_unit_on_city(), action_maybe_possible_actor_unit(), action_mp_full_makes_legal(), action_prob_pre_action_dice_roll(), action_prob_self_full(), action_prob_vs_city_full(), action_prob_vs_extras_full(), action_prob_vs_stack_full(), action_prob_vs_tile_full(), action_prob_vs_unit_full(), action_success_actor_consume(), action_success_target_pay_mp(), actres_get_act_time(), actres_possible(), adv_danger_at(), adv_data_phase_init(), adv_unit_att_rating(), adv_unit_def_rating_basic(), adv_unit_execute_path(), adv_unit_move(), ap_dipl_battle_win(), api_edit_create_unit_full(), api_edit_unit_upgrade(), api_effects_unit_bonus(), are_road_reqs_fulfilled(), assess_danger(), assess_danger_unit(), auto_settlers_player(), base_assess_defense_unit(), base_get_defense_power(), base_transporter_for_unit(), build_city_callback(), build_city_callback(), calculate_want_for_paratrooper(), can_be_irrigated(), can_build_base(), can_build_extra(), can_player_see_hypotetic_units_at(), can_player_see_unit_at(), can_remove_extra(), can_unit_do_activity_targeted_at(), can_unit_do_autosettlers(), can_unit_do_connect(), can_unit_exist_at_tile(), can_unit_move_to_tile_with_notify(), can_unit_survive_at_tile(), can_unit_transport(), can_unit_unload(), city_add_unit(), city_build(), city_can_be_built_here(), city_distribute_surplus_shields(), city_gold_worth(), city_unit_present(), city_unit_slots_available(), city_unit_supported(), city_unit_unhappiness(), clipboard_copy_production(), combat_odds_to_astr(), construct_move_data_list(), contemplate_terrain_improvements(), could_unit_load(), count_my_units(), cr_entry_attack(), cr_entry_defense(), create_extra(), units_select::create_pixmap(), create_present_supported_units_widget_list(), create_unit_menu(), dai_action_value_unit_vs_city(), dai_airlift(), dai_choose_defender_versus(), dai_consider_tile_dangerous(), dai_data_phase_begin(), dai_diplomat_bribe_nearby(), dai_evaluate_tile_for_air_attack(), dai_fill_unit_param(), dai_find_strategic_airbase(), dai_gothere_bodyguard(), dai_hunter_juiciness(), dai_hunter_manage(), dai_hunter_missile_want(), dai_hunter_try_launch(), dai_manage_airunit(), dai_manage_diplomat(), dai_manage_hitpoint_recovery(), dai_manage_military(), dai_manage_paratrooper(), dai_manage_unit(), dai_military_attack(), dai_military_findjob(), dai_rampage_want(), dai_set_defenders(), dai_unit_attack(), dai_unit_make_homecity(), dai_unit_move(), dai_unit_new_task(), dai_upgrade_units(), dai_war_desire(), decrease_unit_hp_smooth(), defense_multiplication(), destroy_extra(), diplomat_bribe(), diplomat_embassy(), diplomat_escape_full(), diplomat_get_tech(), diplomat_incite(), diplomat_infiltrate_tile(), diplomat_investigate(), diplomat_sabotage(), diplomat_success_vs_defender(), disband_all_units(), do_attack(), do_capture_units(), do_conquer_extras(), do_expel_unit(), do_heal_unit(), do_move_unit(), do_paradrop(), do_unit_act_sel_vs(), do_unit_conquer_city(), do_unit_establish_trade(), do_unit_strike_city_building(), do_unit_strike_city_production(), do_unit_upgrade(), do_upgrade_effects(), do_wipe_units(), does_nation_block_action(), does_terrain_block_action(), edit_buffer_copy(), editor_grab_tool(), expl_act_not_enabl(), explain_why_no_action_enabled(), explorer_desirable(), fill_grid_sprite_array(), fill_parameter_part(), fill_unit_sprite_array(), find_best_focus_candidate(), find_best_tile_to_paradrop_to(), find_nearest_airbase(), find_nearest_safe_city(), find_nearest_unit(), find_something_to_kill(), get_act_sel_action_custom_text(), get_activity_rate(), get_attack_power(), get_economy_report_units_data(), get_fortified_defense_power(), get_modified_firepower(), get_total_attack_power(), get_total_defense_power(), get_transporter_capacity(), get_unit_bonus(), get_unit_info_label_text2(), get_unit_vs_tile_bonus(), get_units_report_data(), get_units_upgrade_info(), goods_can_be_provided(), goto_fill_parameter_base(), handle_edit_unit(), handle_edit_unit_remove(), handle_unit_action_query(), handle_unit_combat_info(), handle_unit_packet_common(), handle_unit_type_upgrade(), hp_gain_coord(), illegal_action_msg(), illegal_action_pay_price(), immediate_destination(), invasion_funct(), is_action_enabled_unit_on_city_full(), is_action_enabled_unit_on_extras_full(), is_action_enabled_unit_on_self_full(), is_action_enabled_unit_on_stack_full(), is_action_enabled_unit_on_tile_full(), is_action_enabled_unit_on_unit_full(), is_attack_unit(), is_city_surrounded_by_our_spies(), is_hiding_unit(), is_losing_hp(), is_my_turn(), is_possible_base_fuel(), is_refuel_tile(), is_square_threatened(), is_unit_reachable_at(), is_unit_reachable_by_unit(), is_unitstate_req_active(), key_unit_action_select(), kill_something_with(), look_for_charge(), map_move_cost_unit(), maybe_become_veteran_real(), maybe_claim_base(), mr_menu::menus_sensitive(), move_unit_map_canvas(), need_war_player_hlp(), notify_unit_experience(), objbind_get_allowed_value_span(), objbind_get_value_from_object(), package_short_unit(), package_unit(), units_select::paint(), paste_tile(), pf_attack_possible(), pf_get_move_scope(), pf_reverse_map_unit_pos(), pf_transport_check(), pft_fill_unit_attack_param(), pft_fill_unit_default_parameter(), pft_fill_unit_overlap_param(), pft_fill_unit_parameter(), player_restore_units(), popup_advanced_terrain_dialog(), popup_info_text(), present_unit_callback(), quickselect(), real_menus_update(), redraw_unit_info_label(), remove_city(), request_unit_return(), request_unit_select(), resolve_city_emergency(), select_tgt_extra(), select_tgt_unit(), send_goto_route(), sg_load_player_unit(), sg_load_player_unit(), sg_load_player_units(), sg_load_sanitycheck(), sg_load_sanitycheck(), mr_menu::slot_build_city(), spy_attack(), spy_escape(), spy_nuke_city(), spy_poison(), spy_sabotage_unit(), spy_spread_plague(), spy_steal_gold(), spy_steal_popup_shared(), spy_steal_some_maps(), test_unit_can_airlift_to(), texai_tile_worker_task_select(), texai_unit_update(), transfer_unit(), transform_unit(), unit_activity_astr(), unit_activity_targeted_internal(), unit_att_rating_now(), unit_attack_civilian_casualties(), unit_attack_unit_at_tile_result(), unit_being_aggressive(), unit_bombard(), unit_bombard_rate(), unit_bribe_cost(), unit_build_shield_cost(), unit_build_shield_cost_base(), unit_can_convert(), unit_can_defend_here(), unit_can_do_action(), unit_can_do_action_result(), unit_can_do_action_sub_result(), unit_can_est_trade_route_here(), unit_can_help_build_wonder_here(), unit_can_take_over(), unit_change_homecity_handling(), unit_change_owner(), unit_class_get(), unit_conquer_city(), unit_convert(), unit_def_rating(), unit_description(), unit_do_destroy_city(), unit_do_help_build(), unit_do_regular_move(), unit_food_upkeep(), unit_foodbox_cost(), unit_gain_hitpoints(), unit_has_type_flag(), unit_has_type_role(), unit_is_cityfounder(), unit_is_on_layer(), unit_move(), unit_move_consequences(), unit_move_rate(), unit_move_to_tile_test(), unit_name_translation(), unit_nuke(), unit_pays_mp_for_action(), unit_pop_value(), unit_restore_hitpoints(), unit_rule_name(), unit_select_dialog_popup(), unit_shield_value(), unit_teleport_to_tile_test(), unit_transform_result(), unit_transport_check(), unit_upgrade_info(), unit_upgrade_test(), unit_veteran_level_string(), unit_virtual_create(), unit_vision_range_modifiers(), unit_wipe_units_at_tile_result(), units_can_convert(), units_orders_city_dlg_callback(), units_report_update(), hud_units::update_actions(), update_national_activities(), update_unit_activity(), update_unit_upkeep(), units_reports::update_units(), upgrade_unit_order_targets(), usdlg_check_unit_location(), usdlg_data_add_unit(), usdlg_data_new(), usdlg_tab_append_units(), utype_player_already_has_this(), windfall_benefit(), and wipe_unit_full().

◆ unit_types_free()

void unit_types_free ( void  )

Frees the memory associated with all unit types.

Definition at line 2385 of file unittype.c.

Referenced by game_ruleset_free().

◆ unit_types_init()

void unit_types_init ( void  )

Inialize unit-type structures.

Definition at line 2346 of file unittype.c.

Referenced by game_ruleset_init().

◆ unit_upgrade_price()

int unit_upgrade_price ( const struct player pplayer,
const struct unit_type from,
const struct unit_type to 
)

Return the cost (gold) of upgrading a single unit of the specified type to the new type. This price could (but currently does not) depend on other attributes (like nation or government type) of the player the unit belongs to.

Definition at line 1731 of file unittype.c.

Referenced by dai_upgrade_units(), do_unit_upgrade(), expl_act_not_enabl(), get_units_upgrade_info(), handle_unit_action_query(), handle_unit_type_upgrade(), popup_upgrade_unit_callback(), unit_upgrade_info(), unit_upgrade_test(), units_report_command_callback(), and unittype_item::upgrade_units().

◆ user_unit_class_flags_init()

void user_unit_class_flags_init ( void  )

Initialize user unit class flags.

Definition at line 1800 of file unittype.c.

Referenced by game_ruleset_init().

◆ user_unit_type_flags_init()

void user_unit_type_flags_init ( void  )

Initialize user unit type flags.

Definition at line 1864 of file unittype.c.

Referenced by game_ruleset_init().

◆ utype_action_takes_all_mp()

bool utype_action_takes_all_mp ( const struct unit_type putype,
struct action paction 
)

Returns TRUE iff performing the specified action always will consume all remaining MP of an actor unit of the specified type.

Parameters
putypethe unit type performing the action
pactionthe action that is performed
Returns
if all remaining MP is guaranteed to be consumed given the above

Definition at line 1191 of file unittype.c.

Referenced by find_something_to_kill(), helptext_unit(), pf_danger_map_iterate(), pf_fuel_map_attack_is_possible(), pf_fuel_map_iterate(), pf_normal_map_iterate(), and single_invader().

◆ utype_action_takes_all_mp_if_ustate_is()

bool utype_action_takes_all_mp_if_ustate_is ( const struct unit_type putype,
struct action paction,
const enum ustate_prop  prop 
)

Returns TRUE iff performing the specified action always will consume all remaining MP of an actor unit of the specified type when the specified unit state property is true after the action has been performed.

Parameters
putypethe unit type performing the action
pactionthe action that is performed
propthe unit state property
Returns
if all remaining MP is guaranteed to be consumed given the above

Definition at line 1207 of file unittype.c.

Referenced by helptext_unit().

◆ utype_acts_hostile()

bool utype_acts_hostile ( const struct unit_type putype)

Return TRUE iff units of this type can do hostile actions controlled by generalized (ruleset defined) action enablers.

Definition at line 443 of file unittype.c.

Referenced by assess_danger(), dai_hunter_juiciness(), dai_hunter_manage(), find_something_to_kill(), goto_fill_parameter_base(), and is_square_threatened().

◆ utype_ai_data()

void * utype_ai_data ( const struct unit_type ptype,
const struct ai_type ai 
)

Return pointer to ai data of given unit type and ai type.

Definition at line 2725 of file unittype.c.

Referenced by assess_danger(), dai_can_unit_type_follow_unit_type(), dai_hunter_guess_best(), dai_unit_defense_desirability(), dai_units_ruleset_close(), and dai_units_ruleset_init().

◆ utype_build_shield_cost()

int utype_build_shield_cost ( const struct city pcity,
const struct player pplayer,
const struct unit_type punittype 
)

◆ utype_build_shield_cost_base()

int utype_build_shield_cost_base ( const struct unit_type punittype)

◆ utype_buy_gold_cost()

int utype_buy_gold_cost ( const struct city pcity,
const struct unit_type punittype,
int  shields_in_stock 
)

Returns the amount of gold it takes to rush this unit.

Definition at line 1492 of file unittype.c.

Referenced by city_gold_worth(), and city_production_buy_gold_cost().

◆ utype_by_number()

struct unit_type * utype_by_number ( const Unit_type_id  id)

◆ utype_can_act_if_tgt_diplrel_tile_other()

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 
)

Return TRUE iff the given (action enabler controlled) action can be performed by a unit of the given type while the given property of its owner's diplomatic relationship to the target tile's owner has the given value.

Definition at line 1036 of file unittype.c.

Referenced by need_war_player_hlp().

◆ utype_can_create_extra()

bool utype_can_create_extra ( const struct unit_type putype,
const struct extra_type pextra 
)

Return whether the unit can do an action that creates the specified extra kind.

Definition at line 217 of file unittype.c.

Referenced by act_sel_new_extra_tgt_callback().

◆ utype_can_do_act_if_tgt_citytile()

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 
)

Returns TRUE iff the unit type can do the specified (action enabler controlled) action while its target's CityTile property state has the value is_there.

Definition at line 996 of file unittype.c.

Referenced by action_prob_vs_stack_full().

◆ utype_can_do_act_when_ustate()

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 
)

Return TRUE iff the unit type can do the specified (action enabler controlled) action while its unit state property prop has the value is_there.

Definition at line 955 of file unittype.c.

Referenced by can_unit_act_when_ustate_is(), city_can_be_built_here(), expl_act_not_enabl(), explain_why_no_action_enabled(), illegal_action_msg(), unit_attack_unit_at_tile_result(), unit_wipe_units_at_tile_result(), and utype_can_do_action_result_when_ustate().

◆ utype_can_do_action()

bool utype_can_do_action ( const struct unit_type putype,
const action_id  act_id 
)

Return TRUE iff units of the given type can do the specified generalized (ruleset defined) action enabler controlled action.

Note that a specific unit in a specific situation still may be unable to perform the specified action.

Definition at line 371 of file unittype.c.

Referenced by action_decision_handle(), action_may_happen_unit_on_city(), action_maybe_possible_actor_unit(), adv_data_phase_init(), build_city_callback(), build_city_callback(), calculate_city_clusters(), city_can_be_built_here(), count_my_units(), dai_choose_diplomat_offensive(), dai_choose_help_wonder(), dai_choose_paratrooper(), dai_choose_trade_route(), dai_evaluate_tile_for_air_attack(), dai_hunter_missile_want(), dai_hunter_try_launch(), dai_unit_new_task(), dai_units_ruleset_init(), dai_wonder_city_distance(), disband_all_units(), does_nation_block_action(), does_terrain_block_action(), expl_act_not_enabl(), helptext_unit(), impr_allows_actions(), pf_danger_map_iterate(), pf_fuel_map_attack_is_possible(), pf_fuel_map_iterate(), pf_normal_map_iterate(), popup_info_text(), real_menus_update(), send_ruleset_units(), mr_menu::slot_build_city(), unit_attack_unit_at_tile_result(), unit_can_do_action(), unit_can_est_trade_route_here(), unit_can_help_build_wonder_here(), unit_wipe_units_at_tile_result(), units_can_convert(), mr_menu::update_airlift_menu(), update_simple_ai_types(), utype_act_takes_all_mp_cache_set(), utype_act_takes_all_mp_ustate_cache_set(), utype_acts_hostile(), utype_can_create_extra(), utype_can_do_action_result(), utype_can_do_action_role(), utype_can_do_action_sub_result(), utype_can_remove_extra(), utype_is_consumed_by_action_result(), utype_may_act_at_all(), utype_may_do_escape_action(), and utype_unknown_move_cost().

◆ utype_can_do_action_result()

bool utype_can_do_action_result ( const struct unit_type putype,
enum action_result  result 
)

◆ utype_can_do_action_result_when_ustate()

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 
)

Return TRUE iff units of the given type can do any enabler controlled action with the specified action result while its unit state property prop has the value is_there.

Note that a specific unit in a specific situation still may be unable to perform the specified action.

Definition at line 975 of file unittype.c.

Referenced by can_attack_from_non_native().

◆ utype_can_do_action_sub_result()

bool utype_can_do_action_sub_result ( const struct unit_type putype,
enum action_sub_result  sub_result 
)

Return TRUE iff units of the given type can do any enabler controlled action with the specified action sub result.

Note that a specific unit in a specific situation still may be unable to perform the specified action.

Definition at line 408 of file unittype.c.

Referenced by unit_can_do_action_sub_result().

◆ utype_can_freely_load()

bool utype_can_freely_load ( const struct unit_type pcargotype,
const struct unit_type ptranstype 
)

Return TRUE iff the given cargo type has no restrictions on when it can load onto the given transporter. (Does not check that cargo is valid for transport!)

Definition at line 288 of file unittype.c.

Referenced by could_unit_load(), helptext_unit(), is_possible_base_fuel(), and pf_get_move_scope().

◆ utype_can_freely_unload()

bool utype_can_freely_unload ( const struct unit_type pcargotype,
const struct unit_type ptranstype 
)

Return TRUE iff the given cargo type has no restrictions on when it can unload from the given transporter. (Does not check that cargo is valid for transport!)

Definition at line 300 of file unittype.c.

Referenced by amphibious_move_scope(), base_transporter_for_unit(), can_unit_unload(), helptext_unit(), pf_danger_map_iterate(), pf_fuel_map_iterate(), pf_get_move_scope(), and pf_normal_map_new().

◆ utype_can_remove_extra()

bool utype_can_remove_extra ( const struct unit_type putype,
const struct extra_type pextra 
)

Return whether the unit can do an action that removes the specified extra kind.

Definition at line 241 of file unittype.c.

Referenced by act_sel_new_extra_tgt_callback().

◆ utype_can_take_over()

bool utype_can_take_over ( const struct unit_type punittype)

Return whether the unit type can take over enemy cities.

Definition at line 276 of file unittype.c.

Referenced by adv_data_phase_init(), dai_units_ruleset_init(), pf_get_action(), pf_get_move_scope(), process_attacker_want(), and unit_can_take_over().

◆ utype_count()

Unit_type_id utype_count ( void  )

◆ utype_flag_is_in_use()

bool utype_flag_is_in_use ( enum unit_type_flag_id  uflag)

Returns TRUE iff the specified unit type flag is in use by any unit type.

Parameters
uflagthe unit type flag to check if is in use.
Returns
TRUE if the unit type flag is used in the current ruleset.

Definition at line 2986 of file unittype.c.

Referenced by universal_never_there().

◆ utype_happy_cost()

int utype_happy_cost ( const struct unit_type ut,
const struct player pplayer 
)

Return the "happy cost" (the number of citizens who are discontented) for this unit.

Definition at line 181 of file unittype.c.

Referenced by city_unit_unhappiness(), and resolve_city_emergency().

◆ utype_has_class_flag()

bool utype_has_class_flag ( const struct unit_type ptype,
enum unit_class_flag_id  flag 
)

Return whether the unit type has the class flag.

Definition at line 1657 of file unittype.c.

Referenced by get_modified_firepower().

◆ utype_has_flag()

static bool utype_has_flag ( const struct unit_type punittype,
int  flag 
)
inlinestatic

Definition at line 617 of file unittype.h.

Referenced by adjust_ai_unit_choice(), adv_units_ruleset_init(), api_methods_unit_type_has_flag(), can_attack_non_native_hard_reqs(), can_exist_at_tile(), can_player_build_unit_direct(), can_player_build_unit_later(), can_unit_survive_at_tile(), choose_build_target(), city_production_build_units(), combat_bonus_against(), create_unit_full(), dai_hunter_guess_best(), dai_hunter_missile_want(), dai_process_defender_want(), dai_unit_attack_desirability(), dai_unit_defense_desirability(), dai_units_ruleset_init(), do_capture_units(), get_unit_info_label_text2(), handle_edit_unit_create(), helptext_government(), helptext_unit(), is_possible_base_fuel(), is_refuel_tile(), is_unitflag_req_active(), load_ruleset_units(), city_production_delegate::paint(), pf_attack_possible(), pf_danger_node_init(), pf_fuel_node_init(), pf_get_move_scope(), pf_normal_node_init(), pf_pos_hash_cmp(), pf_pos_hash_val(), pft_enable_default_actions(), player_may_explore(), role_unit_precalcs(), sanity_check_ruleset_data(), save_units_ruleset(), sg_load_sanitycheck(), sg_load_sanitycheck(), target_get_section(), tile_move_cost_ptrs(), transfer_unit(), try_summon_barbarians(), unit_has_type_flag(), unit_move_to_tile_test(), unit_teleport_to_tile_test(), unit_type_found(), unit_type_really_ignores_zoc(), unit_virtual_create(), unit_virtual_prepare(), update_simple_ai_types(), utype_flag_is_in_use(), utype_player_already_has_this_unique(), utype_unknown_move_cost(), and utype_upkeep_cost().

◆ utype_has_role()

bool utype_has_role ( const struct unit_type punittype,
int  role 
)

Return whether the given unit type has the role. Roles are like flags but have no meaning except to the AI.

Definition at line 199 of file unittype.c.

Referenced by adv_units_ruleset_init(), api_methods_unit_type_has_role(), can_player_build_unit_direct(), dai_choose_bodyguard(), dai_process_defender_want(), load_ruleset_units(), role_unit_precalcs(), rs_barbarian_units(), save_units_ruleset(), unit_has_type_role(), and unit_role_defender().

◆ utype_index()

Unit_type_id utype_index ( const struct unit_type punittype)

Return the unit type index.

Currently same as utype_number(), paired with utype_count() indicates use as an array index.

Definition at line 91 of file unittype.c.

Referenced by assess_danger(), can_utype_do_act_if_tgt_diplrel(), city_production_build_units(), city_production_caravan_shields_init(), city_production_gets_caravan_shields(), dai_process_defender_want(), dai_wants_defender_against(), defense_multiplication(), do_capture_units(), get_unit_info_label_text2(), get_units_report_data(), get_unittype_sprite(), load_ruleset_units(), load_unit_names(), local_dipl_rel_action_cache_set(), local_dipl_rel_tile_other_tgt_action_cache_set(), package_city(), pf_transport_check(), pft_fill_amphibious_parameter(), pft_fill_unit_default_parameter(), real_activeunits_report_dialog_update(), real_units_report_dialog_update(), tab_unit::refresh(), set_unit_type_caches(), sg_load_sanitycheck(), sg_load_sanitycheck(), texai_city_worker_wants(), texai_tile_worker_task_select(), tgt_citytile_act_cache_set(), tileset_setup_unit_type(), unit_hud_selector::type_filter(), unit_can_act_cache_set(), unit_hud_selector::unit_hud_selector(), unit_state_action_cache_set(), units_report_update(), mr_menu::update_airlift_menu(), units_reports::update_units(), usdlg_data_add_unit(), usdlg_data_new(), usdlg_tab_append_activity(), usdlg_tab_append_units(), usdlg_tab_append_utype(), usdlg_tab_update(), utype_act_takes_all_mp_cache_set(), utype_act_takes_all_mp_ustate_cache_set(), utype_action_takes_all_mp(), utype_action_takes_all_mp_if_ustate_is(), utype_can_act_if_tgt_diplrel_tile_other(), utype_can_do_act_if_tgt_citytile(), utype_can_do_act_when_ustate(), and utype_can_do_action().

◆ utype_is_cityfounder()

bool utype_is_cityfounder ( const struct unit_type utype)

Is cityfounder type

Definition at line 2951 of file unittype.c.

Referenced by dai_spend_gold(), dai_war_desire(), sanity_check_ruleset_data(), and unit_is_cityfounder().

◆ utype_is_consumed_by_action()

bool utype_is_consumed_by_action ( const struct action paction,
const struct unit_type utype 
)

◆ utype_is_consumed_by_action_result()

bool utype_is_consumed_by_action_result ( enum action_result  result,
const struct unit_type utype 
)

Returns TRUE iff performing an action with the specified action result will consume an actor unit of the specified type.

Definition at line 1229 of file unittype.c.

Referenced by dai_choose_paratrooper(), and city_production_delegate::paint().

◆ utype_is_moved_to_tgt_by_action()

bool utype_is_moved_to_tgt_by_action ( const struct action paction,
const struct unit_type utype 
)

Returns TRUE iff successfully performing the specified action always will move the actor unit of the specified type to the target's tile.

Definition at line 1249 of file unittype.c.

Referenced by adv_unit_move(), dai_action_value_unit_vs_city(), dai_unit_move(), illegal_action_pay_price(), unit_order_list_is_sane(), upgrade_unit_order_targets(), utype_pays_for_regular_move_to_tgt(), and utype_pays_mp_for_action_estimate().

◆ utype_is_unmoved_by_action()

bool utype_is_unmoved_by_action ( const struct action paction,
const struct unit_type utype 
)

Returns TRUE iff successfully performing the specified action never will move the actor unit from its current tile.

Definition at line 1288 of file unittype.c.

Referenced by dai_action_value_unit_vs_city(), unit_order_list_is_sane(), and upgrade_unit_order_targets().

◆ utype_may_act_at_all()

bool utype_may_act_at_all ( const struct unit_type putype)

◆ utype_may_act_move_frags()

bool utype_may_act_move_frags ( const struct unit_type punit_type,
const action_id  act_id,
const int  move_fragments 
)

Return TRUE iff the given (action enabler controlled) action may be performed by a unit of the given type that has the given number of move fragments left.

Note: Values aren't cached. If a performance critical user appears it would be a good idea to cache the (merged) ranges of move fragments where a unit of the given type can perform the specified action.

Definition at line 1058 of file unittype.c.

Referenced by action_mp_full_makes_legal(), test_unit_can_airlift_to(), and utype_may_act_move_frags().

◆ utype_may_act_tgt_city_tile()

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 
)

Return TRUE iff the given (action enabler controlled) action may be performed by a unit of the given type if the target tile has the given property.

Note: Values aren't cached. If a performance critical user appears it would be a good idea to cache the result.

Definition at line 1124 of file unittype.c.

Referenced by expl_act_not_enabl(), and utype_may_act_tgt_city_tile().

◆ utype_move_type()

enum unit_move_type utype_move_type ( const struct unit_type punittype)

Return move type of the unit type

Definition at line 1551 of file unittype.c.

Referenced by editor_grab_tool(), quickselect(), and usdlg_check_unit_location().

◆ utype_name_translation()

const char * utype_name_translation ( const struct unit_type punittype)

Return the (translated) name of the unit type. You don't have to free the return pointer.

Definition at line 1560 of file unittype.c.

Referenced by add_global_worklist(), add_target_to_worklist(), api_methods_unit_type_name_translation(), boot_help_texts(), can_unit_move_to_tile_with_notify(), city_build_unit(), city_dialog_update_building(), client_change_all(), create_present_supported_units_widget_list(), create_tech_info(), diplomat_bribe(), disband_all_units(), disband_city(), eco_report::disband_units(), do_capture_units(), do_unit_upgrade(), do_upgrade_effects(), economy_report_command_callback(), economy_report_update(), editbar_reload_tileset(), editor_tool_get_value_name(), explain_why_no_action_enabled(), get_production_name(), get_tooltip_unit(), get_unit_info_label_text2(), handle_edit_unit_create(), handle_edit_unit_remove(), handle_unit_type_upgrade(), help_callback(), help_update_tech(), help_update_unit_type(), helptext_building(), helptext_extra(), helptext_government(), helptext_nation(), helptext_unit(), illegal_action_msg(), insert_allows(), manual_units(), research_diagram::mousePressEvent(), objbind_get_value_from_object(), city_production_delegate::paint(), city_production_model::populate(), popup_advanced_terrain_dialog(), popup_info_text(), popup_unit_info(), popup_upgrade_unit_callback(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_city_report_dialog_update_city(), real_info_city_report_dialog_update(), real_menus_update(), really_handle_city_buy(), redraw_city_dialog(), redraw_unit_info_label(), req_text_insert(), research_tech_lost(), role_units_translations(), select_tgt_extra(), select_tgt_unit(), set_global_worklist(), help_widget::set_topic_tech(), help_widget::set_topic_unit(), sg_load_sanitycheck(), sg_load_sanitycheck(), try_to_save_unit(), unit_convert(), unit_description(), unit_hud_selector::unit_hud_selector(), unit_lost_with_transport(), unit_name_translation(), unit_select_dialog_popup(), unit_type_by_translated_name(), unit_upgrade_info(), units_report_command_callback(), units_report_update(), universal_name_translation(), mr_menu::update_airlift_menu(), eco_report::update_report(), units_reports::update_units(), upgrade_unit_prod(), unittype_item::upgrade_units(), usdlg_tab_append_utype(), utype_values_translation(), wl_help_from_iter(), worklist_change_build_target(), and worklist_item_postpone_req_vec().

◆ utype_number()

Unit_type_id utype_number ( const struct unit_type punittype)

◆ utype_pays_for_regular_move_to_tgt()

bool utype_pays_for_regular_move_to_tgt ( const struct action paction,
const struct unit_type utype 
)

Returns TRUE iff successfully performing the specified action always will cost the actor unit of the specified type the move fragments it would take to perform a regular move to the target's tile. This cost is added to the cost of successfully performing the action.

Definition at line 1330 of file unittype.c.

Referenced by dai_action_value_unit_vs_city(), and utype_pays_mp_for_action_estimate().

◆ utype_pays_mp_for_action_base()

int utype_pays_mp_for_action_base ( const struct action paction,
const struct unit_type putype 
)

Returns the amount of movement points successfully performing the specified action will consume in the actor unit type without taking effects or regular moves into account.

Definition at line 1381 of file unittype.c.

Referenced by unit_pays_mp_for_action(), and utype_pays_mp_for_action_estimate().

◆ utype_pays_mp_for_action_estimate()

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 
)

Returns an estimate of the amount of movement points successfully performing the specified action will consume in the actor unit type.

Definition at line 1393 of file unittype.c.

Referenced by dai_evaluate_tile_for_air_attack().

◆ utype_player_already_has_this()

bool utype_player_already_has_this ( const struct player pplayer,
const struct unit_type putype 
)

Returns TRUE iff the player already has a unit of this type.

Definition at line 1941 of file unittype.c.

Referenced by impr_allows_actions(), and utype_player_already_has_this_unique().

◆ utype_player_already_has_this_unique()

bool utype_player_already_has_this_unique ( const struct player pplayer,
const struct unit_type putype 
)

◆ utype_pop_value()

int utype_pop_value ( const struct unit_type punittype,
const struct city pcity 
)

How much city shrinks when it builds unit of this type.

Definition at line 1528 of file unittype.c.

Referenced by city_build_unit(), city_create_unit(), and city_production_build_units().

◆ utype_primary_tech_req()

struct advance * utype_primary_tech_req ( const struct unit_type ptype)

Return primary tech requirement for the unit type. Avoid using this, and support full list of requirements instead. Returns pointer to A_NONE if there's no requirements for the unit type.

Definition at line 2696 of file unittype.c.

Referenced by get_tooltip_unit(), help_update_unit_type(), popup_unit_info(), help_widget::set_topic_unit(), and spy_steal_popup_shared().

◆ utype_rule_name()

const char * utype_rule_name ( const struct unit_type punittype)

◆ utype_set_ai_data()

void utype_set_ai_data ( struct unit_type ptype,
const struct ai_type ai,
void data 
)

Attach ai data to unit type

Definition at line 2733 of file unittype.c.

Referenced by dai_units_ruleset_close(), and dai_units_ruleset_init().

◆ utype_upkeep_cost()

int utype_upkeep_cost ( const struct unit_type ut,
struct player pplayer,
Output_type_id  otype 
)

◆ utype_values_string()

const char * utype_values_string ( const struct unit_type punittype)

Return string describing unit type values. String is static buffer that gets reused when function is called again.

Definition at line 1596 of file unittype.c.

Referenced by get_city_dialog_production_row(), and utype_values_translation().

◆ utype_values_translation()

const char * utype_values_translation ( const struct unit_type punittype)

Return string with translated unit name and list of its values. String is static buffer that gets reused when function is called again.

Definition at line 1617 of file unittype.c.

Referenced by name_and_sort_items(), and city_dialog::update_improvements().

◆ utype_veteran_has_power_bonus()

bool utype_veteran_has_power_bonus ( const struct unit_type punittype)

Return whether this unit type's veteran system, if any, confers a power factor bonus at any level (it could just add extra moves).

Definition at line 2626 of file unittype.c.

Referenced by helptext_unit().

◆ utype_veteran_level()

const struct veteran_level * utype_veteran_level ( const struct unit_type punittype,
int  level 
)

◆ utype_veteran_levels()

int utype_veteran_levels ( const struct unit_type punittype)

◆ utype_veteran_name_translation()

const char * utype_veteran_name_translation ( const struct unit_type punittype,
int  level 
)

Return translated name of the given veteran level. NULL if this unit type doesn't have different veteran levels.

Definition at line 2598 of file unittype.c.

Referenced by combat_odds_to_astr(), create_present_supported_units_widget_list(), popup_advanced_terrain_dialog(), redraw_unit_info_label(), unit_description(), and unit_select_dialog_popup().

◆ utype_veteran_system()

const struct veteran_system * utype_veteran_system ( const struct unit_type punittype)

Return veteran system used for this unit type.

Definition at line 2567 of file unittype.c.

Referenced by helptext_government(), maybe_become_veteran_real(), notify_unit_experience(), transform_unit(), utype_veteran_level(), and utype_veteran_levels().

◆ veteran_system_definition()

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 
)

Fill veteran level in given veteran system with given information.

Definition at line 2671 of file unittype.c.

Referenced by handle_ruleset_game(), handle_ruleset_unit(), and load_ruleset_veteran().

◆ veteran_system_destroy()

void veteran_system_destroy ( struct veteran_system vsystem)

Free veteran system

Definition at line 2658 of file unittype.c.

Referenced by game_ruleset_free(), and unit_type_free().

◆ veteran_system_new()

struct veteran_system * veteran_system_new ( int  count)

Allocate new veteran system structure with given veteran level count.

Definition at line 2640 of file unittype.c.

Referenced by handle_ruleset_game(), handle_ruleset_unit(), and load_ruleset_veteran().