BonusCaster.h 849 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * BonusCaster.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. struct Bonus;
  14. namespace spells
  15. {
  16. class DLL_LINKAGE BonusCaster : public ProxyCaster
  17. {
  18. public:
  19. BonusCaster(const Caster * actualCaster_, std::shared_ptr<Bonus> bonus_);
  20. virtual ~BonusCaster();
  21. void getCasterName(MetaString & text) 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 int spellCost) const override;
  24. private:
  25. std::shared_ptr<Bonus> bonus;
  26. };
  27. } // namespace spells
  28. VCMI_LIB_NAMESPACE_END