DefenceBehavior.h 753 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 Goals
  15. {
  16. class DefenceBehavior : public CGoal<DefenceBehavior>
  17. {
  18. public:
  19. DefenceBehavior()
  20. :CGoal(DEFENCE)
  21. {
  22. }
  23. virtual Goals::TGoalVec decompose() const override;
  24. virtual std::string toString() const override;
  25. virtual bool operator==(const DefenceBehavior & other) const override
  26. {
  27. return true;
  28. }
  29. private:
  30. void evaluateDefence(Goals::TGoalVec & tasks, const CGTownInstance * town) const;
  31. };
  32. }