您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

55 行
1.0 KiB

#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