22 #define SPECENUM_NAME effect_type
23 #define SPECENUM_VALUE0 EFT_TECH_PARASITE
24 #define SPECENUM_VALUE0NAME "Tech_Parasite"
25 #define SPECENUM_VALUE1 EFT_AIRLIFT
26 #define SPECENUM_VALUE1NAME "Airlift"
27 #define SPECENUM_VALUE2 EFT_ANY_GOVERNMENT
28 #define SPECENUM_VALUE2NAME "Any_Government"
29 #define SPECENUM_VALUE3 EFT_CAPITAL_CITY
30 #define SPECENUM_VALUE3NAME "Capital_City"
31 #define SPECENUM_VALUE4 EFT_ENABLE_NUKE
32 #define SPECENUM_VALUE4NAME "Enable_Nuke"
33 #define SPECENUM_VALUE5 EFT_ENABLE_SPACE
34 #define SPECENUM_VALUE5NAME "Enable_Space"
35 #define SPECENUM_VALUE6 EFT_SPECIALIST_OUTPUT
36 #define SPECENUM_VALUE6NAME "Specialist_Output"
37 #define SPECENUM_VALUE7 EFT_OUTPUT_BONUS
38 #define SPECENUM_VALUE7NAME "Output_Bonus"
39 #define SPECENUM_VALUE8 EFT_OUTPUT_BONUS_2
40 #define SPECENUM_VALUE8NAME "Output_Bonus_2"
42 #define SPECENUM_VALUE9 EFT_OUTPUT_ADD_TILE
43 #define SPECENUM_VALUE9NAME "Output_Add_Tile"
45 #define SPECENUM_VALUE10 EFT_OUTPUT_INC_TILE
46 #define SPECENUM_VALUE10NAME "Output_Inc_Tile"
48 #define SPECENUM_VALUE11 EFT_OUTPUT_PER_TILE
49 #define SPECENUM_VALUE11NAME "Output_Per_Tile"
50 #define SPECENUM_VALUE12 EFT_OUTPUT_WASTE_PCT
51 #define SPECENUM_VALUE12NAME "Output_Waste_Pct"
52 #define SPECENUM_VALUE13 EFT_FORCE_CONTENT
53 #define SPECENUM_VALUE13NAME "Force_Content"
55 #define SPECENUM_VALUE14 EFT_GIVE_IMM_TECH
56 #define SPECENUM_VALUE14NAME "Give_Imm_Tech"
57 #define SPECENUM_VALUE15 EFT_GROWTH_FOOD
58 #define SPECENUM_VALUE15NAME "Growth_Food"
60 #define SPECENUM_VALUE16 EFT_HEALTH_PCT
61 #define SPECENUM_VALUE16NAME "Health_Pct"
62 #define SPECENUM_VALUE17 EFT_HAVE_EMBASSIES
63 #define SPECENUM_VALUE17NAME "Have_Embassies"
64 #define SPECENUM_VALUE18 EFT_MAKE_CONTENT
65 #define SPECENUM_VALUE18NAME "Make_Content"
66 #define SPECENUM_VALUE19 EFT_MAKE_CONTENT_MIL
67 #define SPECENUM_VALUE19NAME "Make_Content_Mil"
68 #define SPECENUM_VALUE20 EFT_MAKE_CONTENT_MIL_PER
69 #define SPECENUM_VALUE20NAME "Make_Content_Mil_Per"
71 #define SPECENUM_VALUE21 EFT_MAKE_HAPPY
72 #define SPECENUM_VALUE21NAME "Make_Happy"
73 #define SPECENUM_VALUE22 EFT_NO_ANARCHY
74 #define SPECENUM_VALUE22NAME "No_Anarchy"
75 #define SPECENUM_VALUE23 EFT_NUKE_PROOF
76 #define SPECENUM_VALUE23NAME "Nuke_Proof"
80 #define SPECENUM_VALUE24 EFT_POLLU_POP_PCT
81 #define SPECENUM_VALUE24NAME "Pollu_Pop_Pct"
82 #define SPECENUM_VALUE25 EFT_POLLU_POP_PCT_2
83 #define SPECENUM_VALUE25NAME "Pollu_Pop_Pct_2"
85 #define SPECENUM_VALUE26 EFT_POLLU_PROD_PCT
86 #define SPECENUM_VALUE26NAME "Pollu_Prod_Pct"
88 #define SPECENUM_VALUE27 EFT_REVEAL_CITIES
89 #define SPECENUM_VALUE27NAME "Reveal_Cities"
90 #define SPECENUM_VALUE28 EFT_REVEAL_MAP
91 #define SPECENUM_VALUE28NAME "Reveal_Map"
93 #define SPECENUM_VALUE29 EFT_INCITE_COST_PCT
94 #define SPECENUM_VALUE29NAME "Incite_Cost_Pct"
95 #define SPECENUM_VALUE30 EFT_SIZE_ADJ
96 #define SPECENUM_VALUE30NAME "Size_Adj"
97 #define SPECENUM_VALUE31 EFT_SIZE_UNLIMIT
98 #define SPECENUM_VALUE31NAME "Size_Unlimit"
99 #define SPECENUM_VALUE32 EFT_SS_STRUCTURAL
100 #define SPECENUM_VALUE32NAME "SS_Structural"
101 #define SPECENUM_VALUE33 EFT_SS_COMPONENT
102 #define SPECENUM_VALUE33NAME "SS_Component"
103 #define SPECENUM_VALUE34 EFT_SS_MODULE
104 #define SPECENUM_VALUE34NAME "SS_Module"
105 #define SPECENUM_VALUE35 EFT_SPY_RESISTANT
106 #define SPECENUM_VALUE35NAME "Spy_Resistant"
107 #define SPECENUM_VALUE36 EFT_MOVE_BONUS
108 #define SPECENUM_VALUE36NAME "Move_Bonus"
109 #define SPECENUM_VALUE37 EFT_UNIT_NO_LOSE_POP
110 #define SPECENUM_VALUE37NAME "Unit_No_Lose_Pop"
111 #define SPECENUM_VALUE38 EFT_UNIT_RECOVER
112 #define SPECENUM_VALUE38NAME "Unit_Recover"
113 #define SPECENUM_VALUE39 EFT_UPGRADE_UNIT
114 #define SPECENUM_VALUE39NAME "Upgrade_Unit"
115 #define SPECENUM_VALUE40 EFT_UPKEEP_FREE
116 #define SPECENUM_VALUE40NAME "Upkeep_Free"
117 #define SPECENUM_VALUE41 EFT_TECH_UPKEEP_FREE
118 #define SPECENUM_VALUE41NAME "Tech_Upkeep_Free"
119 #define SPECENUM_VALUE42 EFT_NO_UNHAPPY
120 #define SPECENUM_VALUE42NAME "No_Unhappy"
121 #define SPECENUM_VALUE43 EFT_VETERAN_BUILD
122 #define SPECENUM_VALUE43NAME "Veteran_Build"
123 #define SPECENUM_VALUE44 EFT_VETERAN_COMBAT
124 #define SPECENUM_VALUE44NAME "Veteran_Combat"
125 #define SPECENUM_VALUE45 EFT_HP_REGEN
126 #define SPECENUM_VALUE45NAME "HP_Regen"
127 #define SPECENUM_VALUE46 EFT_CITY_VISION_RADIUS_SQ
128 #define SPECENUM_VALUE46NAME "City_Vision_Radius_Sq"
129 #define SPECENUM_VALUE47 EFT_UNIT_VISION_RADIUS_SQ
130 #define SPECENUM_VALUE47NAME "Unit_Vision_Radius_Sq"
132 #define SPECENUM_VALUE48 EFT_DEFEND_BONUS
133 #define SPECENUM_VALUE48NAME "Defend_Bonus"
134 #define SPECENUM_VALUE49 EFT_TRADEROUTE_PCT
135 #define SPECENUM_VALUE49NAME "Traderoute_Pct"
136 #define SPECENUM_VALUE50 EFT_GAIN_AI_LOVE
137 #define SPECENUM_VALUE50NAME "Gain_AI_Love"
138 #define SPECENUM_VALUE51 EFT_TURN_YEARS
139 #define SPECENUM_VALUE51NAME "Turn_Years"
140 #define SPECENUM_VALUE52 EFT_SLOW_DOWN_TIMELINE
141 #define SPECENUM_VALUE52NAME "Slow_Down_Timeline"
142 #define SPECENUM_VALUE53 EFT_CIVIL_WAR_CHANCE
143 #define SPECENUM_VALUE53NAME "Civil_War_Chance"
145 #define SPECENUM_VALUE54 EFT_MIGRATION_PCT
146 #define SPECENUM_VALUE54NAME "Migration_Pct"
148 #define SPECENUM_VALUE55 EFT_EMPIRE_SIZE_BASE
149 #define SPECENUM_VALUE55NAME "Empire_Size_Base"
151 #define SPECENUM_VALUE56 EFT_EMPIRE_SIZE_STEP
152 #define SPECENUM_VALUE56NAME "Empire_Size_Step"
153 #define SPECENUM_VALUE57 EFT_MAX_RATES
154 #define SPECENUM_VALUE57NAME "Max_Rates"
155 #define SPECENUM_VALUE58 EFT_MARTIAL_LAW_EACH
156 #define SPECENUM_VALUE58NAME "Martial_Law_Each"
157 #define SPECENUM_VALUE59 EFT_MARTIAL_LAW_MAX
158 #define SPECENUM_VALUE59NAME "Martial_Law_Max"
159 #define SPECENUM_VALUE60 EFT_RAPTURE_GROW
160 #define SPECENUM_VALUE60NAME "Rapture_Grow"
161 #define SPECENUM_VALUE61 EFT_REVOLUTION_UNHAPPINESS
162 #define SPECENUM_VALUE61NAME "Revolution_Unhappiness"
163 #define SPECENUM_VALUE62 EFT_HAS_SENATE
164 #define SPECENUM_VALUE62NAME "Has_Senate"
165 #define SPECENUM_VALUE63 EFT_INSPIRE_PARTISANS
166 #define SPECENUM_VALUE63NAME "Inspire_Partisans"
167 #define SPECENUM_VALUE64 EFT_HAPPINESS_TO_GOLD
168 #define SPECENUM_VALUE64NAME "Happiness_To_Gold"
170 #define SPECENUM_VALUE65 EFT_FANATICS
171 #define SPECENUM_VALUE65NAME "Fanatics"
172 #define SPECENUM_VALUE66 EFT_NO_DIPLOMACY
173 #define SPECENUM_VALUE66NAME "No_Diplomacy"
174 #define SPECENUM_VALUE67 EFT_TRADE_REVENUE_BONUS
175 #define SPECENUM_VALUE67NAME "Trade_Revenue_Bonus"
177 #define SPECENUM_VALUE68 EFT_UNHAPPY_FACTOR
178 #define SPECENUM_VALUE68NAME "Unhappy_Factor"
180 #define SPECENUM_VALUE69 EFT_UPKEEP_FACTOR
181 #define SPECENUM_VALUE69NAME "Upkeep_Factor"
183 #define SPECENUM_VALUE70 EFT_UNIT_UPKEEP_FREE_PER_CITY
184 #define SPECENUM_VALUE70NAME "Unit_Upkeep_Free_Per_City"
185 #define SPECENUM_VALUE71 EFT_OUTPUT_WASTE
186 #define SPECENUM_VALUE71NAME "Output_Waste"
187 #define SPECENUM_VALUE72 EFT_OUTPUT_WASTE_BY_DISTANCE
188 #define SPECENUM_VALUE72NAME "Output_Waste_By_Distance"
190 #define SPECENUM_VALUE73 EFT_OUTPUT_PENALTY_TILE
191 #define SPECENUM_VALUE73NAME "Output_Penalty_Tile"
192 #define SPECENUM_VALUE74 EFT_OUTPUT_INC_TILE_CELEBRATE
193 #define SPECENUM_VALUE74NAME "Output_Inc_Tile_Celebrate"
195 #define SPECENUM_VALUE75 EFT_CITY_UNHAPPY_SIZE
196 #define SPECENUM_VALUE75NAME "City_Unhappy_Size"
198 #define SPECENUM_VALUE76 EFT_CITY_RADIUS_SQ
199 #define SPECENUM_VALUE76NAME "City_Radius_Sq"
201 #define SPECENUM_VALUE77 EFT_CITY_BUILD_SLOTS
202 #define SPECENUM_VALUE77NAME "City_Build_Slots"
203 #define SPECENUM_VALUE78 EFT_UPGRADE_PRICE_PCT
204 #define SPECENUM_VALUE78NAME "Upgrade_Price_Pct"
206 #define SPECENUM_VALUE79 EFT_VISIBLE_WALLS
207 #define SPECENUM_VALUE79NAME "Visible_Walls"
208 #define SPECENUM_VALUE80 EFT_TECH_COST_FACTOR
209 #define SPECENUM_VALUE80NAME "Tech_Cost_Factor"
211 #define SPECENUM_VALUE81 EFT_SHIELD2GOLD_FACTOR
212 #define SPECENUM_VALUE81NAME "Shield2Gold_Factor"
213 #define SPECENUM_VALUE82 EFT_TILE_WORKABLE
214 #define SPECENUM_VALUE82NAME "Tile_Workable"
216 #define SPECENUM_VALUE83 EFT_CITY_IMAGE
217 #define SPECENUM_VALUE83NAME "City_Image"
218 #define SPECENUM_VALUE84 EFT_IMPR_BUILD_COST_PCT
219 #define SPECENUM_VALUE84NAME "Building_Build_Cost_Pct"
220 #define SPECENUM_VALUE85 EFT_MAX_TRADE_ROUTES
221 #define SPECENUM_VALUE85NAME "Max_Trade_Routes"
222 #define SPECENUM_VALUE86 EFT_GOV_CENTER
223 #define SPECENUM_VALUE86NAME "Gov_Center"
224 #define SPECENUM_VALUE87 EFT_COMBAT_ROUNDS
225 #define SPECENUM_VALUE87NAME "Combat_Rounds"
226 #define SPECENUM_VALUE88 EFT_IMPR_BUY_COST_PCT
227 #define SPECENUM_VALUE88NAME "Building_Buy_Cost_Pct"
228 #define SPECENUM_VALUE89 EFT_UNIT_BUILD_COST_PCT
229 #define SPECENUM_VALUE89NAME "Unit_Build_Cost_Pct"
230 #define SPECENUM_VALUE90 EFT_UNIT_BUY_COST_PCT
231 #define SPECENUM_VALUE90NAME "Unit_Buy_Cost_Pct"
232 #define SPECENUM_VALUE91 EFT_NOT_TECH_SOURCE
233 #define SPECENUM_VALUE91NAME "Not_Tech_Source"
234 #define SPECENUM_VALUE92 EFT_ENEMY_CITIZEN_UNHAPPY_PCT
235 #define SPECENUM_VALUE92NAME "Enemy_Citizen_Unhappy_Pct"
236 #define SPECENUM_VALUE93 EFT_IRRIGATION_PCT
237 #define SPECENUM_VALUE93NAME "Irrigation_Pct"
238 #define SPECENUM_VALUE94 EFT_MINING_PCT
239 #define SPECENUM_VALUE94NAME "Mining_Pct"
240 #define SPECENUM_VALUE95 EFT_OUTPUT_TILE_PUNISH_PCT
241 #define SPECENUM_VALUE95NAME "Output_Tile_Punish_Pct"
242 #define SPECENUM_VALUE96 EFT_UNIT_BRIBE_COST_PCT
243 #define SPECENUM_VALUE96NAME "Unit_Bribe_Cost_Pct"
244 #define SPECENUM_VALUE97 EFT_VICTORY
245 #define SPECENUM_VALUE97NAME "Victory"
246 #define SPECENUM_VALUE98 EFT_PERFORMANCE
247 #define SPECENUM_VALUE98NAME "Performance"
248 #define SPECENUM_VALUE99 EFT_HISTORY
249 #define SPECENUM_VALUE99NAME "History"
250 #define SPECENUM_VALUE100 EFT_NATION_PERFORMANCE
251 #define SPECENUM_VALUE100NAME "National_Performance"
252 #define SPECENUM_VALUE101 EFT_NATION_HISTORY
253 #define SPECENUM_VALUE101NAME "National_History"
254 #define SPECENUM_VALUE102 EFT_TURN_FRAGMENTS
255 #define SPECENUM_VALUE102NAME "Turn_Fragments"
256 #define SPECENUM_VALUE103 EFT_MAX_STOLEN_GOLD_PM
257 #define SPECENUM_VALUE103NAME "Max_Stolen_Gold_Pm"
258 #define SPECENUM_VALUE104 EFT_THIEFS_SHARE_PM
259 #define SPECENUM_VALUE104NAME "Thiefs_Share_Pm"
260 #define SPECENUM_VALUE105 EFT_RETIRE_PCT
261 #define SPECENUM_VALUE105NAME "Retire_Pct"
262 #define SPECENUM_VALUE106 EFT_ILLEGAL_ACTION_MOVE_COST
263 #define SPECENUM_VALUE106NAME "Illegal_Action_Move_Cost"
264 #define SPECENUM_VALUE107 EFT_HAVE_CONTACTS
265 #define SPECENUM_VALUE107NAME "Have_Contacts"
266 #define SPECENUM_VALUE108 EFT_CASUS_BELLI_CAUGHT
267 #define SPECENUM_VALUE108NAME "Casus_Belli_Caught"
268 #define SPECENUM_VALUE109 EFT_CASUS_BELLI_SUCCESS
269 #define SPECENUM_VALUE109NAME "Casus_Belli_Success"
270 #define SPECENUM_VALUE110 EFT_ACTION_ODDS_PCT
271 #define SPECENUM_VALUE110NAME "Action_Odds_Pct"
272 #define SPECENUM_VALUE111 EFT_BORDER_VISION
273 #define SPECENUM_VALUE111NAME "Border_Vision"
274 #define SPECENUM_VALUE112 EFT_STEALINGS_IGNORE
275 #define SPECENUM_VALUE112NAME "Stealings_Ignore"
276 #define SPECENUM_VALUE113 EFT_OUTPUT_WASTE_BY_REL_DISTANCE
277 #define SPECENUM_VALUE113NAME "Output_Waste_By_Rel_Distance"
278 #define SPECENUM_VALUE114 EFT_SABOTEUR_RESISTANT
279 #define SPECENUM_VALUE114NAME "Building_Saboteur_Resistant"
280 #define SPECENUM_VALUE115 EFT_UNIT_SLOTS
281 #define SPECENUM_VALUE115NAME "Unit_Slots"
282 #define SPECENUM_VALUE116 EFT_ATTACK_BONUS
283 #define SPECENUM_VALUE116NAME "Attack_Bonus"
284 #define SPECENUM_VALUE117 EFT_CONQUEST_TECH_PCT
285 #define SPECENUM_VALUE117NAME "Conquest_Tech_Pct"
286 #define SPECENUM_VALUE118 EFT_ACTION_SUCCESS_MOVE_COST
287 #define SPECENUM_VALUE118NAME "Action_Success_Actor_Move_Cost"
288 #define SPECENUM_VALUE119 EFT_ACTION_SUCCESS_TARGET_MOVE_COST
289 #define SPECENUM_VALUE119NAME "Action_Success_Target_Move_Cost"
290 #define SPECENUM_VALUE120 EFT_INFRA_POINTS
291 #define SPECENUM_VALUE120NAME "Infra_Points"
292 #define SPECENUM_VALUE121 EFT_FORTIFY_DEFENSE_BONUS
293 #define SPECENUM_VALUE121NAME "Fortify_Defense_Bonus"
294 #define SPECENUM_VALUE122 EFT_MAPS_STOLEN_PCT
295 #define SPECENUM_VALUE122NAME "Maps_Stolen_Pct"
296 #define SPECENUM_VALUE123 EFT_UNIT_SHIELD_VALUE_PCT
297 #define SPECENUM_VALUE123NAME "Unit_Shield_Value_Pct"
298 #define SPECENUM_VALUE124 EFT_CASUS_BELLI_COMPLETE
299 #define SPECENUM_VALUE124NAME "Casus_Belli_Complete"
300 #define SPECENUM_VALUE125 EFT_ILLEGAL_ACTION_HP_COST
301 #define SPECENUM_VALUE125NAME "Illegal_Action_HP_Cost"
302 #define SPECENUM_VALUE128 EFT_NUKE_IMPROVEMENT_PCT
303 #define SPECENUM_VALUE128NAME "Nuke_Improvement_Pct"
304 #define SPECENUM_VALUE129 EFT_HP_REGEN_MIN
305 #define SPECENUM_VALUE129NAME "HP_Regen_Min"
306 #define SPECENUM_VALUE130 EFT_BOMBARD_LIMIT_PCT
307 #define SPECENUM_VALUE130NAME "Bombard_Limit_Pct"
308 #define SPECENUM_VALUE131 EFT_TRADE_REVENUE_EXPONENT
309 #define SPECENUM_VALUE131NAME "Trade_Revenue_Exponent"
310 #define SPECENUM_VALUE132 EFT_WONDER_VISIBLE
311 #define SPECENUM_VALUE132NAME "Wonder_Visible"
312 #define SPECENUM_VALUE133 EFT_NATION_INTELLIGENCE
313 #define SPECENUM_VALUE133NAME "Nation_Intelligence"
314 #define SPECENUM_VALUE134 EFT_NUKE_INFRASTRUCTURE_PCT
315 #define SPECENUM_VALUE134NAME "Nuke_Infrastructure_Pct"
316 #define SPECENUM_VALUE135 EFT_GROWTH_SURPLUS_PCT
317 #define SPECENUM_VALUE135NAME "Growth_Surplus_Pct"
318 #define SPECENUM_VALUE136 EFT_POLLU_TRADE_PCT
319 #define SPECENUM_VALUE136NAME "Pollu_Trade_Pct"
321 #define SPECENUM_COUNT EFT_COUNT
322 #include "specenum_gen.h"
328 enum effect_type
type;
340 struct requirement_vector
reqs;
344 #define SPECLIST_TAG effect
345 #define SPECLIST_TYPE struct effect
347 #define effect_list_iterate(effect_list, peffect) \
348 TYPED_LIST_ITERATE(struct effect, effect_list, peffect)
349 #define effect_list_iterate_end LIST_ITERATE_END
361 struct packet_ruleset_effect;
382 enum vision_layer vlayer = V_COUNT);
386 enum effect_type effect_type);
388 const struct tile *ptile,
390 enum effect_type effect_type);
393 enum effect_type effect_type);
396 enum effect_type effect_type);
398 const struct player *pother,
399 enum national_intelligence nintel,
400 enum effect_type effect_type);
403 enum effect_type effect_type);
406 enum effect_type effect_type);
408 const struct tile *ptile,
410 enum effect_type effect_type,
411 enum vision_layer vision_layer = V_COUNT);
418 const struct player *pplayer,
419 enum effect_type effect_type);
421 const struct city *pcity,
423 enum effect_type effect_type);
426 struct effect_list *plist,
const struct player *target_player,
427 const struct player *other_player,
const struct city *target_city,
428 const struct impr_type *target_building,
const struct tile *target_tile,
429 const struct unit *target_unit,
const struct unit_type *target_unittype,
432 const struct action *target_action,
enum effect_type effect_type,
433 enum vision_layer vision_layer = V_COUNT,
434 enum national_intelligence nintel = NI_COUNT);
437 enum effect_type effect_type);
439 enum effect_type effect_type,
442 const struct city *pcity,
443 enum effect_type effect_type,
447 struct effect_list *
get_effects(
enum effect_type effect_type);
void recv_ruleset_effect(const struct packet_ruleset_effect *packet)
Receives a new effect.
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)
Returns the effect bonus the improvement would or does provide if present.
int get_unittype_bonus(const struct player *pplayer, const struct tile *ptile, const struct unit_type *punittype, enum effect_type effect_type, enum vision_layer vision_layer=V_COUNT)
int get_tile_output_bonus(const struct city *pcity, const struct tile *ptile, const struct output_type *poutput, enum effect_type effect_type)
Returns the effect bonus at a tile for given output type (or nullptr for output-type-independent bonu...
int get_player_output_bonus(const struct player *pplayer, const struct output_type *poutput, enum effect_type effect_type)
Returns the player effect bonus of an output.
int get_city_specialist_output_bonus(const struct city *pcity, const struct specialist *pspecialist, const struct output_type *poutput, enum effect_type effect_type)
Returns the effect bonus of a specialist in a city.
bool is_building_replaced(const struct city *pcity, const struct impr_type *pimprove, const enum req_problem_type prob_type)
Returns TRUE if a building is replaced.
int get_player_bonus_effects(struct effect_list *plist, const struct player *pplayer, enum effect_type effect_type)
Returns the effect sources of this type currently active at the player.
int get_player_intel_bonus(const struct player *pplayer, const struct player *pother, enum national_intelligence nintel, enum effect_type effect_type)
Gets the player effect bonus of a national intelligence.
bool iterate_effect_cache(iec_cb cb, void *data)
Iterate through all the effects in cache, and call callback for each.
int get_current_construction_bonus(const struct city *pcity, enum effect_type effect_type, const enum req_problem_type prob_type)
Returns the effect bonus the currently-in-construction-item will provide.
int get_city_bonus_effects(struct effect_list *plist, const struct city *pcity, const struct output_type *poutput, enum effect_type effect_type)
Returns the effect sources of this type currently active at the city.
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
Returns the effect bonus at a unit.
void ruleset_cache_init()
Initialize the ruleset cache.
int get_city_output_bonus(const struct city *pcity, const struct output_type *poutput, enum effect_type effect_type)
Returns the player effect bonus of an output.
void ruleset_cache_free()
Free the ruleset cache.
QString effect_type_unit_text(effect_type type, int value)
Returns a string describing an effect value as interpreted in the context of an effect_type,...
void send_ruleset_cache(struct conn_list *dest)
Send the ruleset cache data over the network.
void get_effect_req_text(const struct effect *peffect, char *buf, size_t buf_len)
Make user-friendly text for the source.
struct effect_list * get_req_source_effects(struct universal *psource)
Get a list of effects with this requirement source.
bool(* iec_cb)(struct effect *, void *data)
int get_player_bonus(const struct player *plr, enum effect_type effect_type)
Returns the effect bonus for a player.
int get_city_bonus(const struct city *pcity, enum effect_type effect_type, enum vision_layer vlayer=V_COUNT)
Returns the effect bonus at a city.
const effect_list * get_effects()
Get a list of all effects.
int get_building_bonus(const struct city *pcity, const struct impr_type *building, enum effect_type effect_type)
Returns the effect bonus at a building.
int effect_value_from_universals(enum effect_type type, struct universal *unis, size_t n_unis)
Return the base value of a given effect that can always be expected from just the sources in the list...
int get_city_tile_output_bonus(const struct city *pcity, const struct tile *ptile, const struct output_type *poutput, enum effect_type effect_type)
Returns the effect bonus at a city tile.
struct effect * effect_copy(struct effect *old)
Return new copy of the effect.
int effect_cumulative_max(enum effect_type type, struct universal *for_uni)
Get the maximum effect value in this ruleset for the universal (that is, the sum of all positive effe...
struct effect * effect_new(enum effect_type type, int value, struct multiplier *pmul)
Add effect to ruleset cache.
int get_world_bonus(enum effect_type effect_type)
Returns the effect bonus for the whole world.
int effect_cumulative_min(enum effect_type type, struct universal *for_uni)
Get the minimum effect value in this ruleset for the universal (that is, the sum of all negative effe...
QString get_effect_list_req_text(const struct effect_list *plist)
Make user-friendly text for an effect list.
int get_target_bonus_effects(struct effect_list *plist, 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, enum effect_type effect_type, enum vision_layer vision_layer=V_COUNT, enum national_intelligence nintel=NI_COUNT)
bool building_has_effect(const struct impr_type *pimprove, enum effect_type effect_type)
Returns TRUE if the building has any effect bonuses of the given type.
void effect_req_append(struct effect *peffect, struct requirement req)
Append requirement to effect.
struct multiplier * multiplier
struct requirement_vector reqs