#ifndef SPELL_WARZ_CHARACTER_HPP
|
|
#define SPELL_WARZ_CHARACTER_HPP 1
|
|
|
|
#include <vector>
|
|
|
|
#include "Spell.hpp"
|
|
|
|
class Character
|
|
{
|
|
protected:
|
|
static const int maxLevel = 100;
|
|
static const int maxEperience = 999999999;
|
|
char name[16];
|
|
|
|
int level;
|
|
int experience;
|
|
int maxHP;
|
|
int curHP;
|
|
int maxMP;
|
|
int curMP;
|
|
int atk;
|
|
int def;
|
|
|
|
void restoreHP(int);
|
|
void restoreMP(int);
|
|
void reduceHP(int);
|
|
void reduceMP(int);
|
|
|
|
public:
|
|
Character(char *name, int level, int exp, int hp, int mp, int atk, int def);
|
|
Character(const char *name, int level, int exp, int hp, int mp, int atk, int def);
|
|
|
|
void castSpell(Spell *src, Character *dst);
|
|
bool canCastSpell(Spell *src);
|
|
|
|
char *getName();
|
|
int getLevel();
|
|
int getExperience();
|
|
int getMaxHP();
|
|
int getCurHP();
|
|
int getMaxMP();
|
|
int getCurMP();
|
|
int getAtk();
|
|
int getDef();
|
|
int toNextLevel();
|
|
|
|
bool readytoLevelUp();
|
|
bool isAlive();
|
|
void levelUp();
|
|
void kill();
|
|
void rest();
|
|
void revive();
|
|
void increaseExperience(int n);
|
|
};
|
|
|
|
#endif
|