StayAtTown.h 805 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * ArmyUpgrade.h, 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. #pragma once
  11. #include "../Goals/CGoal.h"
  12. #include "../Pathfinding/AINodeStorage.h"
  13. #include "../Analyzers/ArmyManager.h"
  14. #include "../Analyzers/DangerHitMapAnalyzer.h"
  15. namespace NKAI
  16. {
  17. namespace Goals
  18. {
  19. class DLL_EXPORT StayAtTown : public ElementarGoal<StayAtTown>
  20. {
  21. private:
  22. float movementWasted;
  23. public:
  24. StayAtTown(const CGTownInstance * town, AIPath & path);
  25. bool operator==(const StayAtTown & other) const override;
  26. std::string toString() const override;
  27. void accept(AIGateway * ai) override;
  28. float getMovementWasted() const { return movementWasted; }
  29. };
  30. }
  31. }