Skip to content

Commit 5fe838f

Browse files
committed
Remove the bought shields penalty after conquest
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.
1 parent 3cb758c commit 5fe838f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/cityturn.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3254,6 +3254,7 @@ static void nullify_caravan_and_disband_plus(struct city *pcity)
32543254
void nullify_prechange_production(struct city *pcity)
32553255
{
32563256
nullify_caravan_and_disband_plus(pcity);
3257+
pcity->bought_shields = 0;
32573258
pcity->before_change_shields = 0;
32583259
}
32593260

0 commit comments

Comments
 (0)