Clone.h 774 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Clone.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. namespace spells
  13. {
  14. namespace effects
  15. {
  16. class Clone : public UnitEffect
  17. {
  18. public:
  19. Clone();
  20. virtual ~Clone();
  21. void apply(BattleStateProxy * battleState, RNG & rng, const Mechanics * m, const EffectTarget & target) const override;
  22. protected:
  23. bool isReceptive(const Mechanics * m, const battle::Unit * s) const override;
  24. bool isValidTarget(const Mechanics * m, const battle::Unit * s) const override;
  25. void serializeJsonUnitEffect(JsonSerializeFormat & handler) override final;
  26. private:
  27. int maxTier;
  28. };
  29. }
  30. }