Teleport.h 925 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Teleport.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 "UnitEffect.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. struct BattleStackMoved;
  14. namespace spells
  15. {
  16. namespace effects
  17. {
  18. class Teleport : public UnitEffect
  19. {
  20. public:
  21. Teleport();
  22. virtual ~Teleport();
  23. void adjustTargetTypes(std::vector<TargetType> & types) const override;
  24. bool applicable(Problem & problem, const Mechanics * m) const override;
  25. void apply(ServerCallback * server, const Mechanics * m, const EffectTarget & target) const override;
  26. EffectTarget transformTarget(const Mechanics * m, const Target & aimPoint, const Target & spellTarget) const override;
  27. protected:
  28. void serializeJsonUnitEffect(JsonSerializeFormat & handler) override;
  29. };
  30. }
  31. }
  32. VCMI_LIB_NAMESPACE_END