RemoveObjectEffect.h 995 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * RemoveObjectEffect.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 "AdventureSpellEffect.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. class RemoveObjectEffect final : public AdventureSpellRangedEffect
  14. {
  15. const CSpell * owner;
  16. std::vector<MapObjectID> removedObjects;
  17. MetaString failMessage;
  18. std::string cursor;
  19. public:
  20. RemoveObjectEffect(const CSpell * s, const JsonNode & config);
  21. private:
  22. bool canBeCastAtImpl(spells::Problem & problem, const IGameInfoCallback * cb, const spells::Caster * caster, const int3 & pos) const final;
  23. ESpellCastResult applyAdventureEffects(SpellCastEnvironment * env, const AdventureSpellCastParameters & parameters) const final;
  24. std::string getCursorForTarget(const IGameInfoCallback * cb, const spells::Caster * caster, const int3 & pos) const final;
  25. };
  26. VCMI_LIB_NAMESPACE_END