소스 검색

Update Nullkiller.cpp

Don't trade away gold when the gold-pressure is high.
Xilmi 1 년 전
부모
커밋
284f276108
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      AI/Nullkiller/Engine/Nullkiller.cpp

+ 2 - 2
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;
 				}