CreatureSpellMechanics.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * CreatureSpellMechanics.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 "ISpellMechanics.h"
  12. #include "CDefaultSpellMechanics.h"
  13. class DLL_LINKAGE AcidBreathDamageMechanics : public DefaultSpellMechanics
  14. {
  15. public:
  16. AcidBreathDamageMechanics(CSpell * s): DefaultSpellMechanics(s){};
  17. protected:
  18. void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
  19. };
  20. class DLL_LINKAGE DeathStareMechanics : public DefaultSpellMechanics
  21. {
  22. public:
  23. DeathStareMechanics(CSpell * s): DefaultSpellMechanics(s){};
  24. protected:
  25. void applyBattleEffects(const SpellCastEnvironment * env, const BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
  26. };
  27. class DLL_LINKAGE DispellHelpfulMechanics : public DefaultSpellMechanics
  28. {
  29. public:
  30. DispellHelpfulMechanics(CSpell * s): DefaultSpellMechanics(s){};
  31. void applyBattle(BattleInfo * battle, const BattleSpellCast * packet) const override final;
  32. ESpellCastProblem::ESpellCastProblem isImmuneByStack(const ISpellCaster * caster, const CStack * obj) const override;
  33. };