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.

54 lines
1.0 KiB

4 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 = 100;
  9. static const int maxEperience = 999999999;
  10. const char *name;
  11. int level;
  12. int experience;
  13. int maxHP;
  14. int curHP;
  15. int maxMP;
  16. int curMP;
  17. int atk;
  18. int def;
  19. public:
  20. static std::vector<Character *> Enemies;
  21. static std::vector<const char *> playerNames;
  22. Character(const char *, int, int, int, int, int, int);
  23. void restoreHP(int);
  24. void restoreMP(int);
  25. void reduceHP(int);
  26. void reduceMP(int);
  27. void castSpell(Spell *, Character *);
  28. bool canCastSpell(Spell *);
  29. const char *getName();
  30. int getLevel();
  31. int getExperience();
  32. int getMaxHP();
  33. int getCurHP();
  34. int getMaxMP();
  35. int getCurMP();
  36. int getAtk();
  37. int getDef();
  38. int toNextLevel();
  39. bool readytoLevelUp();
  40. bool isAlive();
  41. void levelUp();
  42. void increaseExperience(int n);
  43. };
  44. #endif