Magic.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * spells/Magic.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class MetaString;
  13. namespace battle
  14. {
  15. class Unit;
  16. class Destination;
  17. }
  18. namespace spells
  19. {
  20. class Caster;
  21. class Spell;
  22. class Mechanics;
  23. class BattleCast;
  24. using Destination = battle::Destination;
  25. using Target = std::vector<Destination>;
  26. enum class Mode
  27. {
  28. //ACTIVE, //todo: use
  29. HERO, //deprecated
  30. MAGIC_MIRROR,
  31. CREATURE_ACTIVE, //deprecated
  32. ENCHANTER,
  33. SPELL_LIKE_ATTACK,
  34. PASSIVE//f.e. opening battle spells
  35. };
  36. enum class AimType
  37. {
  38. NO_TARGET,
  39. CREATURE,
  40. OBSTACLE,
  41. LOCATION
  42. };
  43. class DLL_LINKAGE Problem
  44. {
  45. public:
  46. using Severity = int;
  47. enum ESeverity
  48. {
  49. LOWEST = std::numeric_limits<Severity>::min(),
  50. NORMAL = 0,
  51. CRITICAL = std::numeric_limits<Severity>::max()
  52. };
  53. virtual ~Problem() = default;
  54. virtual void add(MetaString && description, Severity severity = CRITICAL) = 0;
  55. virtual void getAll(std::vector<std::string> & target) const = 0;
  56. };
  57. }
  58. VCMI_LIB_NAMESPACE_END