unit.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #pragma once
  2. #include <iostream>
  3. #include <vector>
  4. class Spell {
  5. //waiting for a realisation
  6. };
  7. class Cell {
  8. //waiting for a realisation
  9. public:
  10. bool isEmpty() {
  11. return true;
  12. }
  13. std::vector <Cell*> actualPath(Cell* destination) { //the shortest existing path from (*this) to (*destination)
  14. std::vector <Cell*> path;
  15. return path;
  16. }
  17. };
  18. class Unit {
  19. protected:
  20. std::vector <Spell> skills_;
  21. private:
  22. //personal growth
  23. double experience_;
  24. double level_;
  25. //actions and events
  26. double initiative_;
  27. //movement
  28. Cell* location_;
  29. double movement_points_; //how many cells can move for one activity point
  30. //attack action
  31. double agility_;
  32. double attack_range_;
  33. double damage_per_hit_;
  34. double energy_points_; //for physical attacks
  35. double intelligence_;
  36. double mana_points_; //for magic attacks
  37. double strength_;
  38. //durability
  39. double health_points_;
  40. double magic_defence_; //less or equal 40
  41. double physic_defence_; //less or equal 40
  42. public:
  43. Unit();
  44. virtual ~Unit() = delete;
  45. double getExperience();
  46. void setExperience(double value);
  47. double getLevel();
  48. void setLevel(double value);
  49. double getHealthPoints();
  50. void setHealthPoints(double value);
  51. double getManaPoints();
  52. void setManaPoints(double value);
  53. double getEnergyPoints();
  54. void setEnergyPoints(double value);
  55. double getAttackRange();
  56. void setAttackRange(double value);
  57. Cell* getLocation();
  58. void setLocation(Cell* to);
  59. int getMovementPoints();
  60. void setMovementPoints(int value);
  61. double getInitiative();
  62. void setInitiative(double value);
  63. double getDamagePerHit();
  64. void setDamagePerHit(double value);
  65. double getIntelligence();
  66. void setIntelligence(double value);
  67. double getStrength();
  68. void setStrength(double value);
  69. double getAgility();
  70. void setAgility(double value);
  71. double getMagicDefence();
  72. void setMagicDefence(double value);
  73. double getPhysicDefence();
  74. void setPhysicDefence(double value);
  75. virtual void calculateDamagePerHit();
  76. double reduceIncomingDamage(std::string damageType, int value);
  77. int lenOfActualPath(Cell* destination);
  78. bool canMoveForDistance(int distance);
  79. bool canMoveToCell(Cell* destination);
  80. void moveToCell(Cell* destination);
  81. // bool canAttackForDistance(int distance);
  82. };