From c51610524a84fb0f80887b71bc6d1cbb39cd29d4 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 19 Jul 2023 12:35:29 +0300 Subject: [PATCH 19/19] 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/advisors/advbuilding.h b/server/advisors/advbuilding.h index 1f1315f54f..68065db45c 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. + 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 INFRA_WEIGHTING (TRADE_WEIGHTING * 0.75) #define WARMING_FACTOR 50 #define COOLING_FACTOR WARMING_FACTOR @@ -37,4 +37,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