Summon.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Summon.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 "Effect.h"
  12. #include "../../GameConstants.h"
  13. namespace spells
  14. {
  15. namespace effects
  16. {
  17. class Summon : public Effect
  18. {
  19. public:
  20. CreatureID creature;
  21. Summon();
  22. virtual ~Summon();
  23. void adjustAffectedHexes(std::set<BattleHex> & hexes, const Mechanics * m, const Target & spellTarget) const override;
  24. void adjustTargetTypes(std::vector<TargetType> & types) const override;
  25. bool applicable(Problem & problem, const Mechanics * m) const override;
  26. void apply(BattleStateProxy * battleState, RNG & rng, const Mechanics * m, const EffectTarget & target) const override;
  27. EffectTarget filterTarget(const Mechanics * m, const EffectTarget & target) const override;
  28. EffectTarget transformTarget(const Mechanics * m, const Target & aimPoint, const Target & spellTarget) const override;
  29. protected:
  30. void serializeJsonEffect(JsonSerializeFormat & handler) override final;
  31. private:
  32. bool permanent;
  33. bool exclusive;
  34. };
  35. }
  36. }