AbilityCaster.h 936 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * AbilityCaster.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 "ProxyCaster.h"
  12. namespace spells
  13. {
  14. class DLL_LINKAGE AbilityCaster : public ProxyCaster
  15. {
  16. public:
  17. AbilityCaster(const battle::Unit * actualCaster_, int32_t baseSpellLevel_);
  18. virtual ~AbilityCaster();
  19. int32_t getSpellSchoolLevel(const Spell * spell, int32_t * outSelectedSchool = nullptr) const override;
  20. int32_t getEffectLevel(const Spell * spell) const override;
  21. void getCastDescription(const Spell * spell, const std::vector<const battle::Unit *> & attacked, MetaString & text) const override;
  22. void spendMana(ServerCallback * server, const int32_t spellCost) const override;
  23. private:
  24. const battle::Unit * actualCaster;
  25. int32_t baseSpellLevel;
  26. };
  27. } // namespace spells