GatherTroops.h 855 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * GatherTroops.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 "CGoal.h"
  12. struct HeroPtr;
  13. class VCAI;
  14. class FuzzyHelper;
  15. namespace Goals
  16. {
  17. class DLL_EXPORT GatherTroops : public CGoal<GatherTroops>
  18. {
  19. public:
  20. GatherTroops()
  21. : CGoal(Goals::GATHER_TROOPS)
  22. {
  23. priority = 2;
  24. }
  25. GatherTroops(int type, int val)
  26. : CGoal(Goals::GATHER_TROOPS)
  27. {
  28. objid = type;
  29. value = val;
  30. priority = 2;
  31. }
  32. TGoalVec getAllPossibleSubgoals() override;
  33. TSubgoal whatToDoToAchieve() override;
  34. bool fulfillsMe(TSubgoal goal) override;
  35. bool operator==(const GatherTroops & other) const override;
  36. private:
  37. int getCreaturesCount(const CArmedInstance * army);
  38. };
  39. }