AdventureSpellCast.h 781 B

12345678910111213141516171819202122232425262728293031323334353637
  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 ElementarGoal<AdventureSpellCast>
  15. {
  16. private:
  17. SpellID spellID;
  18. public:
  19. AdventureSpellCast(HeroPtr hero, SpellID spellID)
  20. : ElementarGoal(Goals::ADVENTURE_SPELL_CAST), spellID(spellID)
  21. {
  22. sethero(hero);
  23. }
  24. const CSpell * getSpell() const
  25. {
  26. return spellID.toSpell();
  27. }
  28. void accept(AIGateway * ai) override;
  29. std::string toString() const override;
  30. virtual bool operator==(const AdventureSpellCast & other) const override;
  31. };
  32. }