AdventureSpellCast.h 913 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * AdventureSpellCast.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 Goals
  13. {
  14. class DLL_EXPORT AdventureSpellCast : public CGoal<AdventureSpellCast>
  15. {
  16. private:
  17. SpellID spellID;
  18. public:
  19. AdventureSpellCast(HeroPtr hero, SpellID spellID)
  20. : CGoal(Goals::ADVENTURE_SPELL_CAST), spellID(spellID)
  21. {
  22. sethero(hero);
  23. }
  24. TGoalVec getAllPossibleSubgoals() override
  25. {
  26. return TGoalVec();
  27. }
  28. const CSpell * getSpell() const
  29. {
  30. return spellID.toSpell();
  31. }
  32. TSubgoal whatToDoToAchieve() override;
  33. void accept(VCAI * ai) override;
  34. std::string name() const override;
  35. std::string completeMessage() const override;
  36. bool operator==(const AdventureSpellCast & other) const override;
  37. };
  38. }