DigAtTile.cpp 913 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * DigAtTile.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "DigAtTile.h"
  12. #include "../AIGateway.h"
  13. #include "../AIUtility.h"
  14. namespace NKAI
  15. {
  16. using namespace Goals;
  17. bool DigAtTile::operator==(const DigAtTile & other) const
  18. {
  19. return other.hero.h == hero.h && other.tile == tile;
  20. }
  21. //
  22. //TSubgoal DigAtTile::decomposeSingle() const
  23. //{
  24. // const CGObjectInstance * firstObj = vstd::frontOrNull(cb->getVisitableObjs(tile));
  25. // if(firstObj && firstObj->ID == Obj::HERO && firstObj->tempOwner == ai->playerID) //we have hero at dest
  26. // {
  27. // const CGHeroInstance * h = dynamic_cast<const CGHeroInstance *>(firstObj);
  28. // sethero(h).setisElementar(true);
  29. // return sptr(*this);
  30. // }
  31. //
  32. // return sptr(VisitTile(tile));
  33. //}
  34. }