From 21ff1395579e93dc31f912dc9bf723ed5e939b61 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 19 Jul 2023 12:41:43 +0300 Subject: [PATCH 21/21] AI: Make _WEIGHTING values adv_want To make sure calculations made with them have necessary accuracy. See osdn #47736 Signed-off-by: Marko Lindqvist --- server/advisors/advbuilding.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/advisors/advbuilding.h b/server/advisors/advbuilding.h index e5908f2f2a..5ddefde0ef 100644 --- a/server/advisors/advbuilding.h +++ b/server/advisors/advbuilding.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,16 +16,16 @@ /* server/advisors */ #include "advchoice.h" -#define FOOD_WEIGHTING 30 -#define SHIELD_WEIGHTING 17 -#define TRADE_WEIGHTING 18 +#define FOOD_WEIGHTING (adv_want)30 +#define SHIELD_WEIGHTING (adv_want)17 +#define TRADE_WEIGHTING (adv_want)18 /* The Trade Weighting has to about as large as the Shield Weighting, - otherwise the AI will build Barracks to create veterans in cities - with only 1 shields production. + otherwise the AI will build Barracks to create veterans in cities + with only 1 shield production. 8 is too low 18 is too high */ -#define POLLUTION_WEIGHTING 20 /* tentative */ +#define POLLUTION_WEIGHTING (adv_want)20 /* Tentative */ #define WARMING_FACTOR 50 #define COOLING_FACTOR WARMING_FACTOR @@ -36,4 +36,4 @@ void building_advisor(struct player *pplayer); void advisor_choose_build(struct player *pplayer, struct city *pcity); void building_advisor_choose(struct city *pcity, struct adv_choice *choice); -#endif /* FC__BUILDINGADV_H */ +#endif /* FC__BUILDINGADV_H */ -- 2.40.1