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.

49 lines
916 B

4 years ago
  1. #ifndef SPELL_WARZ_CHARACTER_HPP
  2. #define SPELL_WARZ_CHARACTER_HPP 1
  3. #include "Spell.hpp"
  4. class Character
  5. {
  6. protected:
  7. static const int maxLevel = 100;
  8. static const int maxEperience = 999999999;
  9. const char *name;
  10. int level;
  11. int experience;
  12. int maxHP;
  13. int curHP;
  14. int maxMP;
  15. int curMP;
  16. int atk;
  17. int def;
  18. public:
  19. Character(const char *, int, int, int, int, int, int);
  20. void restoreHP(int);
  21. void restoreMP(int);
  22. void reduceHP(int);
  23. void reduceMP(int);
  24. void castSpell(Spell *, Character *);
  25. bool canCastSpell(Spell *);
  26. const char *getName();
  27. int getLevel();
  28. int getExperience();
  29. int getMaxHP();
  30. int getCurHP();
  31. int getMaxMP();
  32. int getCurMP();
  33. int getAtk();
  34. int getDef();
  35. int toNextLevel();
  36. bool readytoLevelUp();
  37. bool isAlive();
  38. void levelUp();
  39. void increaseExperience(int n);
  40. };
  41. #endif