91 enum base_flag_id flag,
102 const struct tile *ptile)
121 struct extra_type_list *
bases;
125 if (
bases ==
nullptr || id < 0 || id >= extra_type_list_size(
bases)) {
164 pbase->self = pextra;
176 const struct unit *punit,
177 const struct tile *ptile)
bool base_flag_is_retired(enum base_flag_id flag)
Returns TRUE iff the given flag is retired.
Base_type_id base_number(const struct base_type *pbase)
Return the base index.
void base_type_init(struct extra_type *pextra, int idx)
Initialize base_type structures.
bool base_has_flag(const struct base_type *pbase, enum base_flag_id flag)
Check if base provides effect.
bool is_base_flag_card_near(const struct tile *ptile, enum base_flag_id flag)
Returns TRUE iff any cardinally adjacent tile contains a base with the given flag (does not check pti...
void base_types_free()
Free the memory associated with base types.
struct extra_type * base_extra_get(const struct base_type *pbase)
Return extra that base is.
bool base_has_flag_for_utype(const struct base_type *pbase, enum base_flag_id flag, const struct unit_type *punittype)
Base provides base flag for unit? Checks if base provides flag and if base is native to unit.
struct base_type * base_by_number(const Base_type_id id)
Returns base_type entry for an ID value.
bool can_build_base(const struct unit *punit, const struct base_type *pbase, const struct tile *ptile)
Can unit build base to given tile?
Base_type_id base_count()
Return the number of base_types.
struct base_type * get_base_by_gui_type(enum base_gui_type type, const struct unit *punit, const struct tile *ptile)
Get best gui_type base for given parameters.
bool is_base_flag_near_tile(const struct tile *ptile, enum base_flag_id flag)
Returns TRUE iff any adjacent tile contains a base with the given flag (does not check ptile itself)
bool territory_claiming_base(const struct base_type *pbase)
Does this base type claim territory?
bool BV_ISSET(const BV &bv, int bit)
#define fc_assert_ret_val(condition, val)
#define cardinal_adjc_iterate_end
#define adjc_iterate(nmap, center_tile, itr_tile)
#define cardinal_adjc_iterate(nmap, center_tile, itr_tile)
bool are_reqs_active(const struct player *target_player, const struct player *other_player, const struct city *target_city, const struct impr_type *target_building, const struct tile *target_tile, const struct unit *target_unit, const struct unit_type *target_unittype, const struct output_type *target_output, const struct specialist *target_specialist, const struct action *target_action, const struct requirement_vector *reqs, const enum req_problem_type prob_type, const enum vision_layer vision_layer, const enum national_intelligence nintel)
Checks the requirement(s) to see if they are active on the given target.
enum base_gui_type gui_type
struct packet_ruleset_control control
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
const struct unit_type * unit_type_get(const struct unit *punit)
Return the unit type for this unit.