Feature #2005 ยป 0044-Turn-Tech_Cost_Factor-effect-to-a-percentage-effect-.patch
| ai/default/daieffects.c | ||
|---|---|---|
|
/* Assume that this multiplies accumulation of 5 history points / turn */
|
||
|
v += amount * 5 * 5 / 100;
|
||
|
break;
|
||
|
case EFT_TECH_COST_FACTOR:
|
||
|
v -= amount * 50;
|
||
|
case EFT_TECH_COST_PCT:
|
||
|
v -= amount / 2;
|
||
|
break;
|
||
|
case EFT_TECH_LEAKAGE:
|
||
|
{
|
||
| common/research.c | ||
|---|---|---|
|
research_players_iterate(presearch, pplayer) {
|
||
|
members++;
|
||
|
total_cost += (base_cost
|
||
|
* get_player_bonus(pplayer, EFT_TECH_COST_FACTOR));
|
||
|
* get_player_bonus(pplayer, EFT_TECH_COST_PCT) / 100);
|
||
|
if (!leakage && get_player_bonus(pplayer, EFT_TECH_LEAKAGE)) {
|
||
|
leakage = TRUE;
|
||
|
}
|
||
| ... | ... | |
|
total_research_factor = 0.0;
|
||
|
members = 0;
|
||
|
research_players_iterate(presearch, contributor) {
|
||
|
total_research_factor += (get_player_bonus(contributor, EFT_TECH_COST_FACTOR)
|
||
|
total_research_factor += (get_player_bonus(contributor, EFT_TECH_COST_PCT) / 100.0
|
||
|
+ (is_ai(contributor)
|
||
|
? contributor->ai_common.science_cost / 100.0
|
||
|
: 1));
|
||
| data/alien/effects.ruleset | ||
|---|---|---|
|
value = 1
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/civ1/effects.ruleset | ||
|---|---|---|
|
}
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_cost_double]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
reqs =
|
||
|
{ "type", "name", "range"
|
||
|
"MinYear", "1", "World"
|
||
| data/civ2/effects.ruleset | ||
|---|---|---|
|
}
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_cost_double]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
reqs =
|
||
|
{ "type", "name", "range"
|
||
|
"MinYear", "1", "World"
|
||
| data/civ2civ3/effects.ruleset | ||
|---|---|---|
|
value = 3
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 3
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 300
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/classic/effects.ruleset | ||
|---|---|---|
|
}
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/goldkeep/effects.ruleset | ||
|---|---|---|
|
}
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/granularity/effects.ruleset | ||
|---|---|---|
|
value = 50
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/multiplayer/effects.ruleset | ||
|---|---|---|
|
}
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/sandbox/effects.ruleset | ||
|---|---|---|
|
value = 3
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 3
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 300
|
||
|
[effect_tech_leakage]
|
||
|
type = "Tech_Leakage"
|
||
| data/stub/effects.ruleset | ||
|---|---|---|
|
value = 1
|
||
|
[effect_tech_cost_base]
|
||
|
type = "Tech_Cost_Factor"
|
||
|
value = 1
|
||
|
type = "Tech_Cost_Pct"
|
||
|
value = 100
|
||
|
; Cities can always work tiles
|
||
|
[effect_tile_workable]
|
||
| doc/README.effects | ||
|---|---|---|
|
to world size. This is a percentage calculated from what otherwise would
|
||
|
be the surplus. Percentage is (distance * amount / 100 / max_distance)
|
||
|
Tech_Cost_Factor
|
||
|
Factor for research costs.
|
||
|
Tech_Cost_Pct
|
||
|
Percentage factor for research costs.
|
||
|
Tech_Leakage
|
||
|
If value is positive, tech leakage towards the player is enabled.
|
||
| gen_headers/enums/effects_enums.def | ||
|---|---|---|
|
UPGRADE_PRICE_PCT "Upgrade_Price_Pct"
|
||
|
/* City should use walls gfx */
|
||
|
VISIBLE_WALLS "Visible_Walls"
|
||
|
TECH_COST_FACTOR "Tech_Cost_Factor"
|
||
|
TECH_COST_PCT "Tech_Cost_Pct"
|
||
|
/* [x%] gold upkeep instead of [1] shield upkeep for units */
|
||
|
SHIELD2GOLD_PCT "Shield2Gold_Pct"
|
||
|
TILE_WORKABLE "Tile_Workable"
|
||
| server/ruleset/rscompat.c | ||
|---|---|---|
|
"HasHomeCity"));
|
||
|
}
|
||
|
}
|
||
|
} else if (peffect->type == EFT_TECH_COST_PCT) {
|
||
|
/* From old Tech_Cost_Factor to new Tech_Cost_Pct */
|
||
|
peffect->value *= 100;
|
||
|
}
|
||
|
}
|
||
| ... | ... | |
|
if (!fc_strcasecmp("Upkeep_Factor", old_name)) {
|
||
|
return "Upkeep_Pct";
|
||
|
}
|
||
|
if (!fc_strcasecmp("Tech_Cost_Factor", old_name)) {
|
||
|
return "Tech_Cost_Pct";
|
||
|
}
|
||
|
return old_name;
|
||
|
}
|
||
| server/ruleset/rssanity.c | ||
|---|---|---|
|
EFT_CITY_VISION_RADIUS_SQ,
|
||
|
EFT_MAX_RATES,
|
||
|
EFT_UPKEEP_PCT,
|
||
|
EFT_TECH_COST_FACTOR,
|
||
|
EFT_TECH_COST_PCT,
|
||
|
EFT_COUNT
|
||
|
};
|
||