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.

58 lines
1.1 KiB

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