Feature #1350 » 0024-Rename-Shield2Gold_Factor-as-Shield2Gold_Pct.patch
| ai/default/daieffects.c | ||
|---|---|---|
|
/* This has no effect for AI */
|
||
|
case EFT_VISIBLE_WALLS:
|
||
|
case EFT_CITY_IMAGE:
|
||
|
case EFT_SHIELD2GOLD_FACTOR:
|
||
|
case EFT_SHIELD2GOLD_PCT:
|
||
|
break;
|
||
|
case EFT_PERFORMANCE:
|
||
|
case EFT_NATION_PERFORMANCE:
|
||
| common/unittype.c | ||
|---|---|---|
|
}
|
||
|
/* Switch shield upkeep to gold upkeep if
|
||
|
- the effect 'EFT_SHIELD2GOLD_FACTOR' is non-zero (it gives the
|
||
|
- the effect 'EFT_SHIELD2GOLD_PCT is non-zero (it gives the
|
||
|
conversion factor in percent) and
|
||
|
FIXME: Should the ai know about this? */
|
||
|
if (otype == O_GOLD || otype == O_SHIELD) {
|
||
| ... | ... | |
|
.player = pplayer,
|
||
|
.unittype = ut
|
||
|
},
|
||
|
NULL, EFT_SHIELD2GOLD_FACTOR);
|
||
|
NULL, EFT_SHIELD2GOLD_PCT);
|
||
|
if (gold_upkeep_factor > 0) {
|
||
|
switch (otype) {
|
||
| data/goldkeep/effects.ruleset | ||
|---|---|---|
|
value = 1585
|
||
|
[effect_upkeep_shield2gold]
|
||
|
type = "Shield2Gold_Factor"
|
||
|
type = "Shield2Gold_Pct"
|
||
|
value = 100
|
||
|
reqs =
|
||
|
{ "type", "name", "range"
|
||
| doc/README.effects | ||
|---|---|---|
|
will tolerate city disorder before government falls. If value is
|
||
|
zero, government never falls.
|
||
|
Shield2Gold_Factor
|
||
|
Shield2Gold_Pct
|
||
|
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.
|
||
|
This works on unit type granularity, properties of individual units
|
||
| gen_headers/enums/effects_enums.def | ||
|---|---|---|
|
VISIBLE_WALLS "Visible_Walls"
|
||
|
TECH_COST_FACTOR "Tech_Cost_Factor"
|
||
|
/* [x%] gold upkeep instead of [1] shield upkeep for units */
|
||
|
SHIELD2GOLD_FACTOR "Shield2Gold_Factor"
|
||
|
SHIELD2GOLD_PCT "Shield2Gold_Pct"
|
||
|
TILE_WORKABLE "Tile_Workable"
|
||
|
/* The index for the city image of the given city style. */
|
||
|
CITY_IMAGE "City_Image"
|
||
| server/ruleset/rscompat.c | ||
|---|---|---|
|
struct rscompat_info *info = (struct rscompat_info *)data;
|
||
|
if (info->version < RSFORMAT_3_3) {
|
||
|
if (peffect->type == EFT_SHIELD2GOLD_FACTOR) {
|
||
|
if (peffect->type == EFT_SHIELD2GOLD_PCT) {
|
||
|
requirement_vector_append(&(peffect->reqs),
|
||
|
req_from_str("UnitTypeFlag", "Local",
|
||
|
FALSE, FALSE, FALSE,
|
||
| ... | ... | |
|
{
|
||
|
if (!fc_strcasecmp("Martial_Law_Each", old_name)) {
|
||
|
return "Martial_Law_By_Unit";
|
||
|
} else if (!fc_strcasecmp("Shield2Gold_Factor", old_name)) {
|
||
|
return "Shield2Gold_Pct";
|
||
|
}
|
||
|
return old_name;
|
||
- « Previous
- 1
- 2
- Next »