2021-05-15 18:22:44 +02:00
|
|
|
/*
|
|
|
|
* DigAtTile.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 "DigAtTile.h"
|
2021-05-16 14:39:38 +02:00
|
|
|
#include "../AIGateway.h"
|
2021-05-15 18:22:44 +02:00
|
|
|
#include "../AIUtility.h"
|
|
|
|
|
|
|
|
|
2022-09-26 20:01:07 +02:00
|
|
|
namespace NKAI
|
|
|
|
{
|
|
|
|
|
2021-05-15 18:22:44 +02:00
|
|
|
using namespace Goals;
|
|
|
|
|
|
|
|
bool DigAtTile::operator==(const DigAtTile & other) const
|
|
|
|
{
|
2024-04-14 14:23:44 +02:00
|
|
|
return other.hero == hero && other.tile == tile;
|
2021-05-15 18:22:44 +02:00
|
|
|
}
|
2021-05-16 13:38:26 +02:00
|
|
|
//
|
|
|
|
//TSubgoal DigAtTile::decomposeSingle() const
|
|
|
|
//{
|
|
|
|
// const CGObjectInstance * firstObj = vstd::frontOrNull(cb->getVisitableObjs(tile));
|
|
|
|
// if(firstObj && firstObj->ID == Obj::HERO && firstObj->tempOwner == ai->playerID) //we have hero at dest
|
|
|
|
// {
|
|
|
|
// const CGHeroInstance * h = dynamic_cast<const CGHeroInstance *>(firstObj);
|
|
|
|
// sethero(h).setisElementar(true);
|
|
|
|
// return sptr(*this);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// return sptr(VisitTile(tile));
|
|
|
|
//}
|
2022-09-26 20:01:07 +02:00
|
|
|
|
|
|
|
}
|