update: Fix income and level use after revolt or revert to deity
prepare_sects() caches the sector owner's getnatp() across guerrilla(), do_plague() and populace(). This is wrong, because the owner may change. The mistake can be traced back all the way back to BSD Empire 1.1. If the sector revolts or reverts to deity, the ex-owner still receives taxes and bank interest. The update test demonstrates this bug. If the sector revolts, we use the ex-owner's instead of the owner's tech and research for plague, and we use the ex-owners happiness and required happiness instead of the owner's for loyalty update and civil unrest. Change do_plague() and populace() to call getnatp() themselves. Call it in prepare_sects() only after we're done messing with the sector owner. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
1e8d290e57
commit
fdde783278
7 changed files with 22 additions and 22 deletions
|
@ -152,7 +152,6 @@ land 0:31,0:15
|
|||
| starvation 0:15,0
|
||||
| #30 lost 12% to lack of maintenance
|
||||
| #31 lost 1%
|
||||
| BUG: income from sectors lost to che not lost
|
||||
| BUG: no sector maintenance
|
||||
| sector building
|
||||
| -16:-12,0 no money
|
||||
|
@ -209,7 +208,6 @@ plane -32:-1,-16:-1
|
|||
land -32:-1,-16:-1
|
||||
|| country#5
|
||||
| che retake -16:-14,-8
|
||||
| BUG: no income from liberated sectors
|
||||
read 5
|
||||
nation 5
|
||||
|| country#6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue