From 82105e5e525e93bc02848e4aa3980daa3c40d790 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 9 Jan 2024 04:13:18 +0200 Subject: [PATCH 02/41] AI: Increase space want when already running for spacerace This does not increase want to start spacerace, but makes it less half-hearted attempt when already running. See osdn #42259 Signed-off-by: Marko Lindqvist --- ai/default/daieffects.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ai/default/daieffects.c b/ai/default/daieffects.c index 4c8a11c380..cc245daf0c 100644 --- a/ai/default/daieffects.c +++ b/ai/default/daieffects.c @@ -420,15 +420,24 @@ adv_want dai_effect_value(struct player *pplayer, && (adv->dipl.spacerace_leader || adv->dipl.production_leader == pplayer || adv->dipl.tech_leader == pplayer)) { + int space_want; + if (pcity->id == adv->wonder_city) { /* adjust_improvement_wants_by_effects() lowers want for any non-wonder * target on wonder city. We want space part want reduced even more than * regular buildings, as buildings are at least helping the specific city * when finished. */ - v += 80; + space_want = 80; } else { - v += 140; + space_want = 140; + } + + if (pplayer->spaceship.state == SSHIP_STARTED) { + /* We are already running. Let's not make it a half-hearted attempt. */ + space_want *= 3; } + + v += space_want; } break; case EFT_SPY_RESISTANT: -- 2.43.0