BuyArmy.h 839 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. namespace NKAI
  13. {
  14. struct HeroPtr;
  15. class AIGateway;
  16. class FuzzyHelper;
  17. namespace Goals
  18. {
  19. class DLL_EXPORT BuyArmy : public ElementarGoal<BuyArmy>
  20. {
  21. private:
  22. BuyArmy()
  23. : ElementarGoal(Goals::BUY_ARMY)
  24. {
  25. }
  26. public:
  27. BuyArmy(const CGTownInstance * Town, int val)
  28. : ElementarGoal(Goals::BUY_ARMY)
  29. {
  30. town = Town; //where to buy this army
  31. value = val; //expressed in AI unit strength
  32. priority = 3;//TODO: evaluate?
  33. }
  34. bool operator==(const BuyArmy & other) const override;
  35. std::string toString() const override;
  36. void accept(AIGateway * ai) override;
  37. };
  38. }
  39. }