ArmyUpgrade.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * ArmyUpgrade.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 "../Goals/CGoal.h"
  12. #include "../Pathfinding/AINodeStorage.h"
  13. #include "../Analyzers/ArmyManager.h"
  14. namespace NKAI
  15. {
  16. namespace Goals
  17. {
  18. class DLL_EXPORT ArmyUpgrade : public CGoal<ArmyUpgrade>
  19. {
  20. private:
  21. const CGObjectInstance * upgrader;
  22. uint64_t initialValue;
  23. uint64_t upgradeValue;
  24. uint64_t goldCost;
  25. public:
  26. ArmyUpgrade(const AIPath & upgradePath, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade);
  27. ArmyUpgrade(const CGHeroInstance * targetMain, const CGObjectInstance * upgrader, const ArmyUpgradeInfo & upgrade);
  28. bool operator==(const ArmyUpgrade & other) const override;
  29. std::string toString() const override;
  30. uint64_t getUpgradeValue() const { return upgradeValue; }
  31. uint64_t getInitialArmyValue() const { return initialValue; }
  32. };
  33. }
  34. }