DigAtTile.cpp 1006 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 "../VCAI.h"
  13. #include "../AIUtility.h"
  14. extern boost::thread_specific_ptr<CCallback> cb;
  15. extern boost::thread_specific_ptr<VCAI> ai;
  16. extern FuzzyHelper * fh;
  17. using namespace Goals;
  18. bool DigAtTile::operator==(const DigAtTile & other) const
  19. {
  20. return other.hero.h == hero.h && other.tile == tile;
  21. }
  22. //
  23. //TSubgoal DigAtTile::decomposeSingle() const
  24. //{
  25. // const CGObjectInstance * firstObj = vstd::frontOrNull(cb->getVisitableObjs(tile));
  26. // if(firstObj && firstObj->ID == Obj::HERO && firstObj->tempOwner == ai->playerID) //we have hero at dest
  27. // {
  28. // const CGHeroInstance * h = dynamic_cast<const CGHeroInstance *>(firstObj);
  29. // sethero(h).setisElementar(true);
  30. // return sptr(*this);
  31. // }
  32. //
  33. // return sptr(VisitTile(tile));
  34. //}