QuestAction.h 969 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * QuestAction.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 "SpecialAction.h"
  12. #include "../../../../lib/gameState/QuestInfo.h"
  13. namespace NKAI
  14. {
  15. namespace AIPathfinding
  16. {
  17. class QuestAction : public SpecialAction
  18. {
  19. private:
  20. QuestInfo questInfo;
  21. public:
  22. QuestAction(QuestInfo questInfo)
  23. :questInfo(questInfo)
  24. {
  25. }
  26. bool canAct(const Nullkiller * ai, const AIPathNode * node) const override;
  27. bool canAct(const Nullkiller * ai, const AIPathNodeInfo & node) const override;
  28. bool canAct(const Nullkiller * ai, const CGHeroInstance * hero) const;
  29. Goals::TSubgoal decompose(const Nullkiller * ai, const CGHeroInstance * hero) const override;
  30. void execute(AIGateway * ai, const CGHeroInstance * hero) const override;
  31. std::string toString() const override;
  32. };
  33. }
  34. }