95 pimprove->allows_units =
FALSE;
98 pimprove->allows_units =
TRUE;
103 pimprove->allows_extras =
FALSE;
106 pimprove->allows_extras =
TRUE;
111 pimprove->prevents_disaster =
FALSE;
114 pimprove->prevents_disaster =
TRUE;
119 pimprove->protects_vs_actions =
FALSE;
122 &act->target_reqs)) {
123 pimprove->protects_vs_actions =
TRUE;
128 pimprove->allows_actions =
FALSE;
131 pimprove->allows_actions =
TRUE;
213 if (
NULL == pimprove) {
274 const struct tile *ptile,
282 .building = pimprove,
413 const struct city *pcity)
419 .building = pimprove,
600 .value = { .building = pimprove } };
905 city_id = pplayer->
wonders[idx];
920 log_error(
"Player %s (nb %d) has outdated wonder info for "
921 "%s (nb %d), it points to city nb %d.",
926 log_error(
"Player %s (nb %d) has outdated wonder info for "
927 "%s (nb %d), the city %s (nb %d) doesn't have this wonder.",
949 const struct player *pplayer,
953 if (pplayer ==
owner) {
1032 log_error(
"Game has outdated wonder info for %s (nb %d), "
1033 "the player %s (nb %d) doesn't have this wonder.",
1073 return (
NULL != pplayer
1085 if (
NULL == pplayer) {
1129 if (pcity->
owner != pplayer) {
1138 if (pimprove !=
NULL
1154 return pobs->source.value.building;
1189 const char *helptxt)
1209 if (helptxt && helptxt[0] !=
'\0') {
bool is_action_possible_on_city(action_id act_id, const struct player *actor_player, const struct city *target_city)
#define action_enablers_iterate_end
#define enabler_get_action_id(_enabler_)
#define action_id_get_actor_kind(act_id)
#define action_enablers_iterate(_enabler_)
#define BV_ISSET(bv, bit)
bool city_has_building(const struct city *pcity, const struct impr_type *pimprove)
const char * city_name_get(const struct city *pcity)
int city_map_radius_sq_get(const struct city *pcity)
bool can_city_build_unit_now(const struct civ_map *nmap, const struct city *pcity, const struct unit_type *punittype)
#define city_tile(_pcity_)
#define city_owner(_pcity_)
#define city_tile_iterate(_nmap, _radius_sq, _city_tile, _tile)
#define city_tile_iterate_end
static void base(QVariant data1, QVariant data2)
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 cost
bool can_disaster_happen(const struct disaster_type *pdis, const struct city *pcity)
#define disaster_type_iterate(_p)
#define disaster_type_iterate_end
bool is_building_replaced(const struct city *pcity, const struct impr_type *pimprove, const enum req_problem_type prob_type)
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct player *other_player, enum effect_type effect_type)
int get_potential_improvement_bonus(const struct impr_type *pimprove, const struct city *pcity, enum effect_type effect_type, const enum req_problem_type prob_type, bool consider_multipliers)
int get_building_bonus(const struct city *pcity, const struct impr_type *building, enum effect_type effect_type)
struct effect_list * get_req_source_effects(const struct universal *psource)
bool building_has_effect(const struct impr_type *pimprove, enum effect_type effect_type)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
static bool is_server(void)
#define MAX_NUM_USER_BUILDING_FLAGS
#define IF_LAST_USER_FLAG
void user_flag_init(struct user_flag *flag)
void user_flag_free(struct user_flag *flag)
static GtkWidget * source
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)
static bool improvement_has_side_effects(const struct city *pcity, 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)
static bool impr_prevents_disaster(const struct city *pcity, 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)
static bool improvement_has_effects(const struct city *pcity, 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)
static bool impr_provides_buildable_extras(const struct city *pcity, 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 * impr_flag_id_name_cb(enum impr_flag_id flag)
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)
static void improvement_free(struct impr_type *p)
bool is_wonder(const struct impr_type *pimprove)
static bool impr_protects_vs_actions(const struct city *pcity, 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)
static bool impr_allows_actions(const struct city *pcity, const struct impr_type *pimprove)
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)
static struct impr_type improvement_types[B_LAST]
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)
static bool impr_provides_buildable_units(const struct city *pcity, const struct impr_type *pimprove)
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)
static struct user_flag user_impr_flags[MAX_NUM_USER_BUILDING_FLAGS]
#define WONDER_BUILT(city_id)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define WONDER_OWNED(player_id)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * name_translation_get(const struct name_translation *ptrans)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
bool team_has_embassy(const struct team *pteam, const struct player *tgt_player)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
bool is_req_active(const struct req_context *context, const struct player *other_player, const struct requirement *req, const enum req_problem_type prob_type)
enum req_unchanging_status is_req_preventing(const struct req_context *context, const struct player *other_player, const struct requirement *req, enum req_problem_type prob_type)
#define requirement_fulfilled_by_improvement(_imp_, _rqs_)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
#define requirement_needs_improvement(_imp_, _rqs_)
#define NUM_SS_COMPONENTS
#define NUM_SS_STRUCTURALS
void strvec_destroy(struct strvec *psv)
struct packet_ruleset_control control
struct packet_game_info info
struct requirement_vector obsolete_by
struct requirement_vector reqs
struct name_translation name
int great_wonder_owners[B_LAST]
enum wonder_visib_type small_wonder_visibility
enum spaceship_state state
struct player_spaceship spaceship
const struct player * player
int fc_strcasecmp(const char *str0, const char *str1)
bool utype_player_already_has_this(const struct player *pplayer, const struct unit_type *putype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
#define unit_type_iterate(_p)
#define unit_type_iterate_end
bool victory_enabled(enum victory_condition_type victory)