#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;
|
|
const char *name;
|
|
|
|
int level;
|
|
int experience;
|
|
int maxHP;
|
|
int curHP;
|
|
int maxMP;
|
|
int curMP;
|
|
int atk;
|
|
int def;
|
|
|
|
public:
|
|
static std::vector<Character *> Enemies;
|
|
static std::vector<const char *> playerNames;
|
|
|
|
Character(const char *, int, int, int, int, int, int);
|
|
|
|
void restoreHP(int);
|
|
void restoreMP(int);
|
|
void reduceHP(int);
|
|
void reduceMP(int);
|
|
|
|
void castSpell(Spell *, Character *);
|
|
bool canCastSpell(Spell *);
|
|
|
|
const 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 increaseExperience(int n);
|
|
};
|
|
|
|
#endif
|