فهرست منبع

[AI] relaxed logging

AlexVinS 9 سال پیش
والد
کامیت
dd70e74769
3فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 2 2
      AI/BattleAI/BattleAI.cpp
  2. 0 1
      AI/EmptyAI/CEmptyAI.cpp
  3. 1 1
      AI/StupidAI/StupidAI.cpp

+ 2 - 2
AI/BattleAI/BattleAI.cpp

@@ -283,7 +283,7 @@ BattleAction CBattleAI::goTowards(const CStack * stack, BattleHex destination)
 	auto destNeighbours = destination.neighbouringTiles();
 	if(vstd::contains_if(destNeighbours, [&](BattleHex n) { return stack->coversPos(destination); }))
 	{
-		logAi->warnStream() << "Warning: already standing on neighbouring tile!";
+		logAi->warn("Warning: already standing on neighbouring tile!");
 		//We shouldn't even be here...
 		return BattleAction::makeDefend(stack);
 	}
@@ -457,7 +457,7 @@ void CBattleAI::attemptCastingSpell()
 		case OFFENSIVE_SPELL:
 			{
 				int damageDealt = 0, damageReceived = 0;
-				
+
 				auto stacksSuffering = ps.spell->getAffectedStacks(cb.get(), ECastingMode::HERO_CASTING, playerID, skillLevel, ps.dest, hero);
 
 				if(stacksSuffering.empty())

+ 0 - 1
AI/EmptyAI/CEmptyAI.cpp

@@ -8,7 +8,6 @@ void CEmptyAI::init(std::shared_ptr<CCallback> CB)
 	cb = CB;
 	human=false;
 	playerID = *cb->getMyColor();
-	//logAi->infoStream() << "EmptyAI initialized.";
 }
 void CEmptyAI::yourTurn()
 {

+ 1 - 1
AI/StupidAI/StupidAI.cpp

@@ -276,7 +276,7 @@ BattleAction CStupidAI::goTowards(const CStack * stack, BattleHex destination)
 	auto destNeighbours = destination.neighbouringTiles();
 	if(vstd::contains_if(destNeighbours, [&](BattleHex n) { return stack->coversPos(destination); }))
 	{
-		logAi->warnStream() << "Warning: already standing on neighbouring tile!";
+		logAi->warn("Warning: already standing on neighbouring tile!");
 		//We shouldn't even be here...
 		return BattleAction::makeDefend(stack);
 	}