281 .value.building = impr
567 }
else if (
peffect->value < 0) {
654 if (
peffect->type == effect_type) {
700 .value = {.building = pimprove}
719 .building = pimprove,
747 enum effect_type effect_type)
790 const struct player *other_player,
791 enum effect_type effect_type,
825 enum effect_type effect_type)
884 enum effect_type effect_type)
913 const struct tile *ptile,
915 enum effect_type effect_type)
937 const struct tile *ptile,
939 enum effect_type effect_type)
959 enum effect_type effect_type)
982 enum effect_type effect_type)
1006 enum effect_type effect_type)
1017 .building = building,
1032 const struct tile *ptile,
1035 enum effect_type effect_type)
1045 if (ptile !=
nullptr) {
1092 enum effect_type
etype)
1129 const struct player *pplayer,
1130 enum effect_type effect_type)
1154 enum effect_type effect_type)
1181 enum effect_type effect_type,
1204 enum effect_type effect_type,
1209 .value = {.building = pimprove}};
1222 .building = pimprove,
1226 bool present =
TRUE;
1229 if (
peffect->type != effect_type) {
1235 &&
preq->source.value.building == pimprove) {
1236 present =
preq->present;
1285 if (!
preq->present) {
1288 if (
buf[0] !=
'\0') {
#define city_tile(_pcity_)
#define city_owner(_pcity_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
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
void effect_remove(struct effect *peffect)
void recv_ruleset_effect(const struct packet_ruleset_effect *packet)
struct effect_list * effects[EFT_COUNT]
struct effect_list * govs[G_LAST]
struct effect_list * tracker
struct user_effect ueffects[EFT_USER_EFFECT_LAST+1 - EFT_USER_EFFECT_1]
bool effect_universals_value_never_below(enum effect_type type, struct universal *unis, size_t n_unis, int min_value)
int get_tile_output_bonus(const struct city *pcity, const struct tile *ptile, const struct output_type *poutput, enum effect_type effect_type)
int get_player_output_bonus(const struct player *pplayer, const struct output_type *poutput, enum effect_type effect_type)
int get_city_specialist_output_bonus(const struct city *pcity, const struct specialist *pspecialist, const struct output_type *poutput, enum effect_type effect_type)
bool is_building_replaced(const struct city *pcity, const struct impr_type *pimprove, const enum req_problem_type prob_type)
int get_player_bonus_effects(struct effect_list *plist, const struct player *pplayer, enum effect_type effect_type)
bool iterate_effect_cache(iec_cb cb, void *data)
int get_city_bonus(const struct city *pcity, enum effect_type effect_type)
int get_current_construction_bonus(const struct city *pcity, enum effect_type effect_type, const enum req_problem_type prob_type)
int get_city_bonus_effects(struct effect_list *plist, const struct city *pcity, const struct output_type *poutput, enum effect_type effect_type)
int get_unit_vs_tile_bonus(const struct tile *ptile, const struct unit *punit, enum effect_type etype)
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
int get_city_output_bonus(const struct city *pcity, const struct output_type *poutput, 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)
void send_ruleset_cache(struct conn_list *dest)
void get_effect_req_text(const struct effect *peffect, char *buf, size_t buf_len)
struct effect_list * buildings[B_LAST]
void ruleset_cache_free(void)
struct effect * effect_new(enum effect_type type, int value, struct multiplier *pmul)
static struct @22 ruleset_cache
int get_building_bonus(const struct city *pcity, const struct impr_type *building, enum effect_type effect_type)
int effect_value_from_universals(enum effect_type type, struct universal *unis, size_t n_unis)
int get_city_tile_output_bonus(const struct city *pcity, const struct tile *ptile, const struct output_type *poutput, enum effect_type effect_type)
void user_effect_ai_valued_set(enum effect_type tgt, enum effect_type valued_as)
int get_target_bonus_effects(struct effect_list *plist, const struct req_context *context, const struct req_context *other_context, enum effect_type effect_type)
struct effect * effect_copy(struct effect *old, enum effect_type override_type)
int effect_cumulative_max(enum effect_type type, struct universal *unis, size_t n_unis)
void effect_free(struct effect *peffect)
void ruleset_cache_init(void)
struct effect_list * advances[A_LAST]
int get_world_bonus(enum effect_type effect_type)
int effect_cumulative_min(enum effect_type type, struct universal *for_uni)
struct effect_list * get_effects(enum effect_type effect_type)
struct effect_list * get_req_source_effects(const struct universal *psource)
enum effect_type user_effect_ai_valued_as(enum effect_type real)
static bool is_effect_prevented(const struct req_context *context, const struct req_context *other_context, const struct effect *peffect, const enum req_problem_type prob_type)
bool building_has_effect(const struct impr_type *pimprove, enum effect_type effect_type)
double get_effect_expected_value(const struct req_context *context, const struct player *other_player, enum effect_type effect_type, eft_value_filter_cb weighter, void *data, int n_data)
void effect_req_append(struct effect *peffect, struct requirement req)
int get_tile_bonus(const struct tile *ptile, enum effect_type effect_type)
int get_unittype_bonus(const struct player *pplayer, const struct tile *ptile, const struct unit_type *punittype, const struct action *paction, enum effect_type effect_type)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
void get_effect_list_req_text(const struct effect_list *plist, struct astring *astr)
bool is_user_effect(enum effect_type eff)
int effect_value_will_make_positive(enum effect_type type)
#define effect_list_iterate_end
#define USER_EFFECT_NUMBER(eff)
double(* eft_value_filter_cb)(const struct effect *eft, const struct req_context *context, const struct player *other_player, void *data, int n_data)
bool(* iec_cb)(struct effect *, void *data)
#define EFT_USER_EFFECT_LAST
#define effect_list_iterate(effect_list, peffect)
static bool is_server(void)
Government_type_id government_count(void)
static GtkWidget * source
struct impr_type * improvement_by_number(const Impr_type_id id)
Impr_type_id improvement_number(const struct impr_type *pimprove)
bool improvement_has_flag(const struct impr_type *pimprove, enum impr_flag_id flag)
Impr_type_id improvement_count(void)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
const char * multiplier_name_translation(const struct multiplier *pmul)
Multiplier_type_id multiplier_number(const struct multiplier *pmul)
struct multiplier * multiplier_by_number(Multiplier_type_id id)
void lsend_packet_ruleset_effect(struct conn_list *dest, const struct packet_ruleset_effect *packet)
int player_multiplier_effect_value(const struct player *pplayer, const struct multiplier *pmul)
const struct req_context * req_context_empty(void)
void universal_extraction(const struct universal *source, int *kind, int *value)
bool universal_fulfills_requirements(bool check_necessary, const struct requirement_vector *reqs, const struct universal *source)
bool is_req_active(const struct req_context *context, const struct req_context *other_context, const struct requirement *req, const enum req_problem_type prob_type)
bool are_reqs_active(const struct req_context *context, const struct req_context *other_context, const struct requirement_vector *reqs, const enum req_problem_type prob_type)
enum req_item_found universal_fulfills_requirement(const struct requirement *preq, const struct universal *source)
bool universals_say_everything(struct requirement_vector *reqs, struct universal *unis, size_t n_unis)
const char * universal_name_translation(const struct universal *psource, char *buf, size_t bufsz)
bool universals_mean_unfulfilled(struct requirement_vector *reqs, struct universal *unis, size_t n_unis)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
void strvec_destroy(struct strvec *psv)
void strvec_append(struct strvec *psv, const char *string)
struct strvec * strvec_new(void)
const char * strvec_to_and_list(const struct strvec *psv, struct astring *astr)
struct requirement_vector reqs
Multiplier_type_id multiplier
enum effect_type effect_type
const struct player * player
enum effect_type ai_value_as
size_t fc_strlcat(char *dest, const char *src, size_t n)
static Tech_type_id advance_count(void)
struct city * tile_city(const struct tile *ptile)
#define tile_owner(_tile)
enum impr_flag_id impr_flag
const struct unit_type * unit_type_get(const struct unit *punit)