GatherArmyBehavior.h 882 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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/GameLibrary.h"
  12. #include "../Goals/CGoal.h"
  13. #include "../AIUtility.h"
  14. namespace NKAI
  15. {
  16. namespace Goals
  17. {
  18. class GatherArmyBehavior : public CGoal<GatherArmyBehavior>
  19. {
  20. public:
  21. GatherArmyBehavior()
  22. :CGoal(Goals::GATHER_ARMY)
  23. {
  24. }
  25. TGoalVec decompose(const Nullkiller * ai) const override;
  26. std::string toString() const override;
  27. bool operator==(const GatherArmyBehavior & other) const override
  28. {
  29. return true;
  30. }
  31. private:
  32. TGoalVec deliverArmyToHero(const Nullkiller * ai, const CGHeroInstance * hero) const;
  33. TGoalVec upgradeArmy(const Nullkiller * ai, const CGTownInstance * upgrader) const;
  34. };
  35. }
  36. }