From 284f2761088541727133721be9b21241e9cca974 Mon Sep 17 00:00:00 2001 From: Xilmi Date: Sun, 18 Aug 2024 09:47:37 +0200 Subject: [PATCH] Update Nullkiller.cpp Don't trade away gold when the gold-pressure is high. --- AI/Nullkiller/Engine/Nullkiller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AI/Nullkiller/Engine/Nullkiller.cpp b/AI/Nullkiller/Engine/Nullkiller.cpp index 8b3843c90..f9954a6d2 100644 --- a/AI/Nullkiller/Engine/Nullkiller.cpp +++ b/AI/Nullkiller/Engine/Nullkiller.cpp @@ -635,7 +635,7 @@ bool Nullkiller::handleTrading() if (i == 6) { - if (income[i] > 0) + if (income[i] > 0 && !buildAnalyzer->isGoldPressureHigh()) okToSell = true; } else @@ -663,7 +663,7 @@ bool Nullkiller::handleTrading() if (toGive && toGive <= available[mostExpendable]) //don't try to sell 0 resources { cb->trade(m, EMarketMode::RESOURCE_RESOURCE, GameResID(mostExpendable), GameResID(mostWanted), toGive); - logAi->debug("Traded %d of %s for %d of %s at %s", toGive, mostExpendable, toGet, mostWanted, obj->getObjectName()); + logAi->info("Traded %d of %s for %d of %s at %s", toGive, mostExpendable, toGet, mostWanted, obj->getObjectName()); haveTraded = true; shouldTryToTrade = true; }