elthran / UndyingKingdoms

UndyingKingdoms
0 stars 1 forks source link

County should start to lose happiness when you can't afford to pay all your expenses #314

Open klondikemarlen opened 5 years ago

klondikemarlen commented 5 years ago

Currently there are no ill effect to having negative income.

elthran commented 5 years ago

I would like it to do this because it's better. For every 25 gold that you can't pay at the end of a turn you should get -1 happiness. So -10 gold == -1 happiness -30 gold == -2 happiness

It should be fairly simple to code. The happiness_change() function would just need to check expected revenue and current gold levels and apply the happiness factor. It would just need to make sure that this runs before the actual changing of the gold. (eg. You get -50 gold per turn and have 70 gold currently. The expected happiness change on the economy page shows 0 since you can afford to pay your troops. It then does the gold change of -50 and then goes to apply the happiness change, the happiness function would now see that you owe 50 but only have 20, and dings you one happiness. This is not what we want)