Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

65 rindas
1.3 KiB

#ifndef SPELL_WARZ_CHARACTER_HPP
#define SPELL_WARZ_CHARACTER_HPP 1
#include <string>
#include "Spell.hpp"
#include "Element.hpp"
class Character
{
protected:
static const int maxLevel;
static const int maxExperience;
std::string name;
Element *affinity;
int level;
int experience;
int maxHP;
int maxMP;
int curHP;
int curMP;
void restoreHP(int);
void restoreMP(int);
void reduceHP(int);
void reduceMP(int);
public:
Character(std::string characterName,
Element *characterAffinity);
Character(std::string characterName,
Element *characterAffinity,
int characterLevel);
Character(std::string characterName,
Element *characterAffinity,
int characterLevel,
int characterHP,
int characterMP);
bool castSpell(Spell *src, Character *dst);
bool canCastSpell(Spell *src);
std::string getName();
Element *getAffinity();
int getLevel();
int getExperience();
int getMaxHP();
int getMaxMP();
int getCurHP();
int getCurMP();
int toNextLevel();
bool readytoLevelUp();
bool isAlive();
void levelUp();
void kill();
void rest();
void revive();
void increaseExperience(int n);
};
#endif