BuyArmy.h 832 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * BuyArmy.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 BuyArmy : public ElementarGoal<BuyArmy>
  18. {
  19. private:
  20. BuyArmy()
  21. : ElementarGoal(Goals::BUY_ARMY)
  22. {
  23. }
  24. public:
  25. BuyArmy(const CGTownInstance * Town, int val)
  26. : ElementarGoal(Goals::BUY_ARMY)
  27. {
  28. town = Town; //where to buy this army
  29. value = val; //expressed in AI unit strength
  30. priority = 3;//TODO: evaluate?
  31. }
  32. virtual bool operator==(const BuyArmy & other) const override;
  33. virtual std::string toString() const override;
  34. virtual void accept(VCAI * ai) override;
  35. };
  36. }