From 79b5ca6e728b283e6e761d1ef5ab23d2605675fd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 7 May 2021 16:37:41 +0300 Subject: [PATCH 53/53] AI: Consider immediately spent gold as part of income in dai_calc_data() See osdn #42193 Signed-off-by: Marko Lindqvist --- ai/default/aihand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai/default/aihand.c b/ai/default/aihand.c index 38563e7182..37406686f2 100644 --- a/ai/default/aihand.c +++ b/ai/default/aihand.c @@ -139,7 +139,8 @@ void dai_calc_data(const struct player *pplayer, int *trade, int *expenses, } if (NULL != income) { - *income += pcity->surplus[O_GOLD]; + /* Also the immediately used gold is part of income, not only surplus */ + *income += pcity->usage[O_GOLD] + pcity->surplus[O_GOLD]; } } city_list_iterate_end; -- 2.30.2