Skip to content

Commit

Permalink
Remove the bought shields penalty after conquest
Browse files Browse the repository at this point in the history
Conquest removes all shields from the city production. This means the
penalty on bought shields is no longer needed.

Not resetting to zero resulted in negative shields with the following
sequence of events:
1. Player A buys something
2. Player B conquers the city (the shield stock becomes 0)
3. Player B changes production
4. The bought shields penalty is deduced from the shield stock

This is needed in a few more cases such as sabotage. Implement the
change in nullify_prechange_production that is already used when
changing production.

Noticed by TriClad in Sim06.
  • Loading branch information
lmoureaux authored and jwrober committed Feb 3, 2025
1 parent 3cb758c commit d275a88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/cityturn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3254,6 +3254,7 @@ static void nullify_caravan_and_disband_plus(struct city *pcity)
void nullify_prechange_production(struct city *pcity)
{
nullify_caravan_and_disband_plus(pcity);
pcity->bought_shields = 0;
pcity->before_change_shields = 0;
}

Expand Down

0 comments on commit d275a88

Please sign in to comment.