Project

General

Profile

Bug #184 » 0023-Make-output-effects-to-respect-output_granularity.patch

S3_1 - Marko Lindqvist, 01/18/2024 08:28 PM

View differences:

common/city.c
int penalty_limit = get_tile_output_bonus(pcity, ptile, output,
EFT_OUTPUT_PENALTY_TILE);
if (is_celebrating) {
if (prod >= game.info.granularity) {
prod += get_tile_output_bonus(pcity, ptile, output,
EFT_OUTPUT_INC_TILE_CELEBRATE);
penalty_limit = 0; /* no penalty if celebrating */
EFT_OUTPUT_INC_TILE);
if (is_celebrating) {
prod += get_tile_output_bonus(pcity, ptile, output,
EFT_OUTPUT_INC_TILE_CELEBRATE);
}
}
prod += get_tile_output_bonus(pcity, ptile, output,
EFT_OUTPUT_INC_TILE);
prod += (prod
* get_tile_output_bonus(pcity, ptile, output,
EFT_OUTPUT_PER_TILE))
/ 100;
if (!is_celebrating && penalty_limit > 0 && prod > penalty_limit) {
prod--;
if (prod <= game.info.granularity) {
prod = 0;
} else {
prod -= game.info.granularity;
}
}
}
doc/README.effects
Add amount to each worked tile.
Output_Inc_Tile
Add amount to each worked tile that already has at least 1 output.
Add amount to each worked tile that already has at least
output_granularity (from game.ruleset) output.
Output_Per_Tile
Increase tile output by amount percent.
......
to world size. The amount of this extra waste is (distance * amount / 100 / max_distance)
Output_Penalty_Tile
When a tile yields more output than amount, it gets a penalty of -1,
unless the city working it is celebrating.
When a tile yields more output than amount, it gets a penalty of
-1 x output_granularity (from game.ruleset), unless the city working
it is celebrating.
Output_Inc_Tile_Celebrate
Tiles get amount extra output when city working them is celebrating.
Like Output_Inc_Tile, but only applies if city is also celebrating.
Upgrade_Price_Pct
Increases unit upgrade cost by amount percent. This effect works at
(2-2/2)