spell.h 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // Created by IgorBat on 17.03.2018.
  3. //
  4. #ifndef THE_GAME_SPELL_H
  5. #define THE_GAME_SPELL_H
  6. #pragma once
  7. #include <iostream>
  8. #include <vector>
  9. #include <list>
  10. //#include "AbstractFactory.h"
  11. #include "effect.h"
  12. class Unit{
  13. std :: list <Effect> effectsOnUnit;
  14. };
  15. class Cell{
  16. std :: list <Effect> effectsOnCell;
  17. };
  18. class Spell {
  19. protected:
  20. std :: list <Effect> effects_;
  21. private:
  22. int distance_;
  23. bool forCell_;
  24. public:
  25. Spell() = delete;
  26. Spell(std::string path) {
  27. }
  28. virtual ~Spell() = delete;
  29. int getDistance();
  30. void setDistance(int value);
  31. bool getForCell();
  32. void setForCell(bool value);
  33. //int lenOfSmallestPath(Cell* destination);
  34. virtual bool canCastForDistance(int distance);
  35. virtual bool canCastToCell(Cell* destination);
  36. virtual void castToCell(Cell* destination);
  37. void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom);
  38. };
  39. #endif //THE_GAME_SPELL_H