DefenceBehavior.h 773 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * BuyArmyBehavior.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 "lib/VCMI_Lib.h"
  12. #include "../Goals/CGoal.h"
  13. #include "../AIUtility.h"
  14. namespace NKAI
  15. {
  16. namespace Goals
  17. {
  18. class DefenceBehavior : public CGoal<DefenceBehavior>
  19. {
  20. public:
  21. DefenceBehavior()
  22. :CGoal(DEFENCE)
  23. {
  24. }
  25. virtual Goals::TGoalVec decompose() const override;
  26. virtual std::string toString() const override;
  27. virtual bool operator==(const DefenceBehavior & other) const override
  28. {
  29. return true;
  30. }
  31. private:
  32. void evaluateDefence(Goals::TGoalVec & tasks, const CGTownInstance * town) const;
  33. };
  34. }
  35. }