You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB

  1. #ifndef SPELL_WARZ_CHARACTER_HPP
  2. #define SPELL_WARZ_CHARACTER_HPP 1
  3. #include <string>
  4. #include "Spell.hpp"
  5. #include "Element.hpp"
  6. class Character
  7. {
  8. protected:
  9. static const int maxLevel;
  10. static const int maxExperience;
  11. std::string name;
  12. Element *affinity;
  13. int level;
  14. int experience;
  15. int maxHP;
  16. int maxMP;
  17. int curHP;
  18. int curMP;
  19. void restoreHP(int);
  20. void restoreMP(int);
  21. void reduceHP(int);
  22. void reduceMP(int);
  23. public:
  24. Character(std::string characterName,
  25. Element *characterAffinity);
  26. Character(std::string characterName,
  27. Element *characterAffinity,
  28. int characterLevel);
  29. Character(std::string characterName,
  30. Element *characterAffinity,
  31. int characterLevel,
  32. int characterHP,
  33. int characterMP);
  34. bool castSpell(Spell *src, Character *dst);
  35. bool canCastSpell(Spell *src);
  36. std::string getName();
  37. Element *getAffinity();
  38. int getLevel();
  39. int getExperience();
  40. int getMaxHP();
  41. int getMaxMP();
  42. int getCurHP();
  43. int getCurMP();
  44. int toNextLevel();
  45. bool readytoLevelUp();
  46. bool isAlive();
  47. void levelUp();
  48. void kill();
  49. void rest();
  50. void revive();
  51. void increaseExperience(int n);
  52. };
  53. #endif