GatherArmyBehavior.h 816 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * GatherArmyBehavior.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 GatherArmyBehavior : public CGoal<GatherArmyBehavior>
  17. {
  18. public:
  19. GatherArmyBehavior()
  20. :CGoal(Goals::GATHER_ARMY)
  21. {
  22. }
  23. virtual TGoalVec decompose() const override;
  24. virtual std::string toString() const override;
  25. virtual bool operator==(const GatherArmyBehavior & other) const override
  26. {
  27. return true;
  28. }
  29. private:
  30. TGoalVec deliverArmyToHero(const CGHeroInstance * hero) const;
  31. TGoalVec upgradeArmy(const CGTownInstance * upgrader) const;
  32. };
  33. }