unit.h 2.1 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* to) {
  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. //connect with events
  26. double active_points_;
  27. double initiative_;
  28. //movement
  29. Cell* location_;
  30. double movement_speed_; //how many cells can move for one activity point
  31. //attack action
  32. double agility_;
  33. double attack_range_;
  34. double damage_per_hit_;
  35. double energy_points_; //for physical attacks
  36. double intelligence_;
  37. double mana_points_; //for magic attacks
  38. double strength_;
  39. //durability
  40. double health_points_;
  41. double magic_defence_; //less or equal 40
  42. double physic_defence_; //less or equal 40
  43. public:
  44. Unit();
  45. virtual ~Unit() = delete;
  46. double getExperience();
  47. void setExperience(double value);
  48. double getLevel();
  49. void setLevel(double value);
  50. double getHealthPoints();
  51. void setHealthPoints(double value);
  52. double getManaPoints();
  53. void setManaPoints(double value);
  54. double getEnergyPoints();
  55. void setEnergyPoints(double value);
  56. double getActivePoints();
  57. void setActivePoints(double value);
  58. double getAttackRange();
  59. void setAttackRange(double value);
  60. Cell* getLocation();
  61. void setLocation(Cell* to);
  62. double getMovementSpeed();
  63. void setMovementSpeed(double value);
  64. double getInitiative();
  65. void setInitiative(double value);
  66. double getDamagePerHit();
  67. void setDamagePerHit(double value);
  68. double getIntelligence();
  69. void setIntelligence(double value);
  70. double getStrength();
  71. void setStrength(double value);
  72. double getAgility();
  73. void setAgility(double value);
  74. double getMagicDefence();
  75. void setMagicDefence(double value);
  76. double getPhysicDefence();
  77. void setPhysicDefence(double value);
  78. virtual void calculateDamagePerHit();
  79. double reduceIncomingDamage(std::string damageType, int value);
  80. bool canMoveForDistance(int distance);
  81. bool Unit::canMoveToCell(Cell* to);
  82. // bool canAttackForDistance(int distance);
  83. };