Project

General

Profile

Feature #1121 ยป 0080-Make-Shield2Gold_Factor-to-take-unit-type-granularit.patch

Marko Lindqvist, 11/15/2024 10:09 PM

View differences:

common/unittype.c
FIXME: Should the ai know about this? */
if (utype_has_flag(ut, UTYF_SHIELD2GOLD)
&& (otype == O_GOLD || otype == O_SHIELD)) {
gold_upkeep_factor = get_player_bonus(pplayer, EFT_SHIELD2GOLD_FACTOR);
gold_upkeep_factor = get_target_bonus_effects(NULL,
&(const struct req_context) {
.player = pplayer,
.unittype = ut
},
NULL, EFT_SHIELD2GOLD_FACTOR);
if (gold_upkeep_factor > 0) {
switch (otype) {
case O_GOLD:
doc/README.effects
Shield2Gold_Factor
Factor in percent for the conversion of unit shield upkeep to gold upkeep.
A value of 200 would transfer 1 shield upkeep to 2 gold upkeep. The range
of this effect must be player or world. Note that only units with the
"Shield2Gold" flag will be affected by this.
A value of 200 would transfer 1 shield upkeep to 2 gold upkeep.
This works on unit type granularity, properties of individual units
do not count. Note that only units with the "Shield2Gold" flag will
be affected by this.
Shrink_Food
Food left after cities shrink is amount percent of the capacity of
    (1-1/1)