Project

General

Profile

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

main, S3_2 - Marko Lindqvist, 01/18/2024 08:27 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
multiplicative with it.
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_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.
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_Per_Tile
Increase tile output by amount percent.
(1-1/2)