DefendTown.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 DefendTown : public CGoal<DefendTown>
  20. {
  21. private:
  22. uint64_t defenceArmyStrength;
  23. HitMapInfo treat;
  24. uint8_t turn;
  25. public:
  26. DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const AIPath & defencePath);
  27. DefendTown(const CGTownInstance * town, const HitMapInfo & treat, const CGHeroInstance * defender);
  28. virtual bool operator==(const DefendTown & other) const override;
  29. virtual std::string toString() const override;
  30. const HitMapInfo & getTreat() const { return treat; }
  31. uint64_t getDefenceStrength() const { return defenceArmyStrength; }
  32. uint8_t getTurn() const { return turn; }
  33. };
  34. }
  35. }