mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-03 23:19:22 +02:00
40 lines
862 B
C++
40 lines
862 B
C++
|
|
/*
|
||
|
|
* HeroExchange.cpp, part of VCMI engine
|
||
|
|
*
|
||
|
|
* Authors: listed in file AUTHORS in main folder
|
||
|
|
*
|
||
|
|
* License: GNU General Public License v2.0 or later
|
||
|
|
* Full text of license available in license.txt file, in main folder
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
#include "StdInc.h"
|
||
|
|
#include "HeroExchange.h"
|
||
|
|
#include "../AIGateway.h"
|
||
|
|
#include "../Engine/Nullkiller2.h"
|
||
|
|
#include "../AIUtility.h"
|
||
|
|
#include "../Analyzers/ArmyManager.h"
|
||
|
|
|
||
|
|
namespace NKAI
|
||
|
|
{
|
||
|
|
|
||
|
|
using namespace Goals;
|
||
|
|
|
||
|
|
bool HeroExchange::operator==(const HeroExchange & other) const
|
||
|
|
{
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
std::string HeroExchange::toString() const
|
||
|
|
{
|
||
|
|
return "Hero exchange for " +hero->getObjectName() + " by " + exchangePath.toString();
|
||
|
|
}
|
||
|
|
|
||
|
|
uint64_t HeroExchange::getReinforcementArmyStrength(const Nullkiller2 * ai) const
|
||
|
|
{
|
||
|
|
uint64_t armyValue = ai->armyManager->howManyReinforcementsCanGet(hero, exchangePath.heroArmy);
|
||
|
|
|
||
|
|
return armyValue;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|