AbilityCaster.h 916 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_, int baseSpellLevel_);
  18. virtual ~AbilityCaster();
  19. ui8 getSpellSchoolLevel(const Spell * spell, int * outSelectedSchool = nullptr) const override;
  20. int 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(const PacketSender * server, const int spellCost) const override;
  23. private:
  24. const battle::Unit * actualCaster;
  25. int baseSpellLevel;
  26. };
  27. } // namespace spells