AbilityCaster.h 950 B

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