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.
 
 
 
 

59 lines
1.1 KiB

#ifndef SPELL_WARZ_CHARACTER_HPP
#define SPELL_WARZ_CHARACTER_HPP 1
#include <vector>
#include "Spell.hpp"
class Character
{
protected:
static const int maxLevel;
static const int maxExperience;
char name[16];
int experience;
int level;
int atk;
int def;
int curHP;
int curMP;
int maxHP;
int maxMP;
void restoreHP(int);
void restoreMP(int);
void reduceHP(int);
void reduceMP(int);
public:
Character();
Character(char *name);
Character(const char *name);
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