Invalid.h 662 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Invalid.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. namespace Goals
  15. {
  16. class DLL_EXPORT Invalid : public CGoal<Invalid>
  17. {
  18. public:
  19. Invalid()
  20. : CGoal(Goals::INVALID)
  21. {
  22. priority = -1e10;
  23. }
  24. TGoalVec getAllPossibleSubgoals() override
  25. {
  26. return TGoalVec();
  27. }
  28. TSubgoal whatToDoToAchieve() override
  29. {
  30. return iAmElementar();
  31. }
  32. bool operator==(const Invalid & other) const override
  33. {
  34. return true;
  35. }
  36. };
  37. }