RecruitHero.h 920 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * RecruitHero.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 RecruitHero : public ElementarGoal<RecruitHero>
  20. {
  21. public:
  22. RecruitHero(const CGTownInstance * townWithTavern, const CGHeroInstance * heroToBuy)
  23. : RecruitHero(townWithTavern)
  24. {
  25. objid = heroToBuy->id.getNum();
  26. }
  27. RecruitHero(const CGTownInstance * townWithTavern)
  28. : ElementarGoal(Goals::RECRUIT_HERO)
  29. {
  30. priority = 1;
  31. town = townWithTavern;
  32. }
  33. virtual bool operator==(const RecruitHero & other) const override
  34. {
  35. return true;
  36. }
  37. virtual std::string toString() const override;
  38. void accept(AIGateway * ai) override;
  39. };
  40. }
  41. }