13#ifndef FC__IMPROVEMENT_H
14#define FC__IMPROVEMENT_H
42#define B_LAST MAX_NUM_BUILDINGS
103 const char *helptxt);
111 const struct tile *ptile,
139#define WONDER_DESTROYED (MAX_NUM_PLAYER_SLOTS + 1)
140#define WONDER_NOT_OWNED (MAX_NUM_PLAYER_SLOTS + 2)
141#define WONDER_OWNED(player_id) ((player_id) < MAX_NUM_PLAYER_SLOTS)
144#define WONDER_LOST (-1)
145#define WONDER_NOT_BUILT 0
146#define WONDER_BUILT(city_id) ((city_id) > 0)
159 const struct player *pplayer,
199#define improvement_iterate(_p) \
201 struct impr_type *_p = improvement_array_first(); \
203 for (; _p <= improvement_array_last(); _p++) {
205#define improvement_iterate_end \
210#define improvement_re_active_iterate(_p) \
211 improvement_iterate(_p) { \
212 if (!_p->ruledit_disabled) {
214#define improvement_re_active_iterate_end \
216 } improvement_iterate_end;
218#define genus_iterate(_p) \
220 enum impr_genus_id _p; \
221 for (_p = (enum impr_genus_id)0; _p < IG_COUNT; \
222 _p = (enum impr_genus_id)((int)_p + 1)) {
224#define genus_iterate_end \
#define BV_DEFINE(name, bits)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
const struct impr_type * valid_improvement(const struct impr_type *pimprove)
struct impr_type * improvement_by_number(const Impr_type_id id)
bool can_sell_building(const struct impr_type *pimprove)
int impr_sell_gold(const struct impr_type *pimprove)
void improvements_init(void)
bool is_building_sellable(const struct impr_type *pimprove)
const struct impr_type * improvement_array_last(void)
const struct impr_type * valid_improvement_by_number(const Impr_type_id id)
bool can_city_sell_building(const struct city *pcity, const struct impr_type *pimprove)
bool can_player_build_improvement_direct(const struct player *p, const struct impr_type *pimprove)
bool great_wonder_is_built(const struct impr_type *pimprove)
enum test_result test_player_sell_building_now(struct player *pplayer, struct city *pcity, const struct impr_type *pimprove)
void user_impr_flags_init(void)
bool is_special_improvement(const struct impr_type *pimprove)
bool is_improvement_redundant(const struct city *pcity, const struct impr_type *pimprove)
bool can_player_build_improvement_later(const struct player *p, const struct impr_type *pimprove)
void wonder_built(const struct city *pcity, const struct impr_type *pimprove)
bool great_wonder_is_destroyed(const struct impr_type *pimprove)
bool wonder_is_lost(const struct player *pplayer, const struct impr_type *pimprove)
bool can_player_build_improvement_now(const struct player *p, struct impr_type *pimprove)
bool is_improvement(const struct impr_type *pimprove)
bool wonder_is_built(const struct player *pplayer, const struct impr_type *pimprove)
int impr_base_build_shield_cost(const struct impr_type *pimprove)
Impr_type_id improvement_number(const struct impr_type *pimprove)
bool small_wonder_is_built(const struct player *pplayer, const struct impr_type *pimprove)
bool can_improvement_go_obsolete(const struct impr_type *pimprove)
const char * improvement_rule_name(const struct impr_type *pimprove)
bool is_improvement_visible(const struct impr_type *pimprove)
struct city * city_from_wonder(const struct player *pplayer, const struct impr_type *pimprove)
Impr_type_id improvement_index(const struct impr_type *pimprove)
int impr_buy_gold_cost(const struct city *pcity, const struct impr_type *pimprove, int shields_in_stock)
int impr_build_shield_cost(const struct city *pcity, const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
bool improvement_obsolete(const struct player *pplayer, const struct impr_type *pimprove, const struct city *pcity)
struct impr_type * improvement_by_translated_name(const char *name)
void improvement_feature_cache_init(void)
bool improvement_has_flag(const struct impr_type *pimprove, enum impr_flag_id flag)
struct impr_type * improvement_by_rule_name(const char *name)
struct city * city_from_small_wonder(const struct player *pplayer, const struct impr_type *pimprove)
void wonder_destroyed(const struct city *pcity, const struct impr_type *pimprove)
void set_user_impr_flag_name(enum impr_flag_id id, const char *name, const char *helptxt)
bool is_convert_improvement(const struct impr_type *pimprove)
void impr_flags_free(void)
bool wonder_visible_to_player(const struct impr_type *wonder, const struct player *pplayer, const struct player *owner, enum fc_tristate embassy)
const char * impr_flag_helptxt(enum impr_flag_id id)
const char * improvement_name_translation(const struct impr_type *pimprove)
struct city * city_from_great_wonder(const struct impr_type *pimprove)
Impr_type_id improvement_count(void)
bool is_small_wonder(const struct impr_type *pimprove)
struct impr_type * improvement_array_first(void)
int impr_estimate_build_shield_cost(const struct player *pplayer, const struct tile *ptile, const struct impr_type *pimprove)
const struct impr_type * improvement_replacement(const struct impr_type *pimprove)
struct player * great_wonder_owner(const struct impr_type *pimprove)
bool great_wonder_is_available(const struct impr_type *pimprove)
void improvements_free(void)
bool is_improvement_productive(const struct city *pcity, const struct impr_type *pimprove)
char graphic_str[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector obsolete_by
char soundtag_alt[MAX_LEN_NAME]
char soundtag_alt2[MAX_LEN_NAME]
struct requirement_vector reqs
struct name_translation name
char soundtag[MAX_LEN_NAME]