AbilityCaster.h 986 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. const battle::Unit * actualCaster;
  26. int32_t baseSpellLevel;
  27. };
  28. } // namespace spells
  29. VCMI_LIB_NAMESPACE_END