ViewWorldMechanics.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * ViewWorldMechanics.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 "AdventureSpellMechanics.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. class ViewMechanics : public AdventureSpellMechanics
  14. {
  15. public:
  16. ViewMechanics(const CSpell * s);
  17. protected:
  18. ESpellCastResult applyAdventureEffects(SpellCastEnvironment * env, const AdventureSpellCastParameters & parameters) const override;
  19. virtual bool filterObject(const CGObjectInstance * obj, const int32_t spellLevel) const = 0;
  20. virtual bool showTerrain(const int32_t spellLevel) const = 0;
  21. };
  22. class ViewAirMechanics final : public ViewMechanics
  23. {
  24. public:
  25. ViewAirMechanics(const CSpell * s);
  26. protected:
  27. bool filterObject(const CGObjectInstance * obj, const int32_t spellLevel) const override;
  28. bool showTerrain(const int32_t spellLevel) const override;
  29. };
  30. class ViewEarthMechanics final : public ViewMechanics
  31. {
  32. public:
  33. ViewEarthMechanics(const CSpell * s);
  34. protected:
  35. bool filterObject(const CGObjectInstance * obj, const int32_t spellLevel) const override;
  36. bool showTerrain(const int32_t spellLevel) const override;
  37. };
  38. VCMI_LIB_NAMESPACE_END