mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
[AI] relaxed logging
This commit is contained in:
parent
2a9ddadedd
commit
dd70e74769
@ -283,7 +283,7 @@ BattleAction CBattleAI::goTowards(const CStack * stack, BattleHex destination)
|
|||||||
auto destNeighbours = destination.neighbouringTiles();
|
auto destNeighbours = destination.neighbouringTiles();
|
||||||
if(vstd::contains_if(destNeighbours, [&](BattleHex n) { return stack->coversPos(destination); }))
|
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...
|
//We shouldn't even be here...
|
||||||
return BattleAction::makeDefend(stack);
|
return BattleAction::makeDefend(stack);
|
||||||
}
|
}
|
||||||
@ -457,7 +457,7 @@ void CBattleAI::attemptCastingSpell()
|
|||||||
case OFFENSIVE_SPELL:
|
case OFFENSIVE_SPELL:
|
||||||
{
|
{
|
||||||
int damageDealt = 0, damageReceived = 0;
|
int damageDealt = 0, damageReceived = 0;
|
||||||
|
|
||||||
auto stacksSuffering = ps.spell->getAffectedStacks(cb.get(), ECastingMode::HERO_CASTING, playerID, skillLevel, ps.dest, hero);
|
auto stacksSuffering = ps.spell->getAffectedStacks(cb.get(), ECastingMode::HERO_CASTING, playerID, skillLevel, ps.dest, hero);
|
||||||
|
|
||||||
if(stacksSuffering.empty())
|
if(stacksSuffering.empty())
|
||||||
|
@ -8,7 +8,6 @@ void CEmptyAI::init(std::shared_ptr<CCallback> CB)
|
|||||||
cb = CB;
|
cb = CB;
|
||||||
human=false;
|
human=false;
|
||||||
playerID = *cb->getMyColor();
|
playerID = *cb->getMyColor();
|
||||||
//logAi->infoStream() << "EmptyAI initialized.";
|
|
||||||
}
|
}
|
||||||
void CEmptyAI::yourTurn()
|
void CEmptyAI::yourTurn()
|
||||||
{
|
{
|
||||||
|
@ -276,7 +276,7 @@ BattleAction CStupidAI::goTowards(const CStack * stack, BattleHex destination)
|
|||||||
auto destNeighbours = destination.neighbouringTiles();
|
auto destNeighbours = destination.neighbouringTiles();
|
||||||
if(vstd::contains_if(destNeighbours, [&](BattleHex n) { return stack->coversPos(destination); }))
|
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...
|
//We shouldn't even be here...
|
||||||
return BattleAction::makeDefend(stack);
|
return BattleAction::makeDefend(stack);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user