⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rolebase.h

📁 MUD文字游戏开发
💻 H
字号:
#pragma once
#include <string>
using namespace std;

class CRoleBase
{
protected:
	string m_name;
	int m_nHP;
	int m_nMP;
	int m_nCurrentHP;
	int m_nCurrentMP;
	int m_nAttack;
	int m_nDefence;
	int m_nMoney;
	unsigned m_unExperience;
public:
	CRoleBase(void);
	CRoleBase(string name,
		int nHP,
		int nMP,
		int nCurrentHP,
		int nCurrentMP,
		int nAttack,
		int nDefence,
		int nMoney,
		unsigned unExperience);
	~CRoleBase(void);
	const string& GetName()const
	{
		return m_name;
	}
	int GetHP()const
	{
		return m_nHP;
	}
	int GetMP()const
	{
		return m_nMP;
	}
	int GetCurrentHP()const
	{
		return m_nCurrentHP;
	}
	int GetCurrentMP()const
	{
		return m_nCurrentMP;
	}
	int GetAttack()const
	{
		return m_nAttack;
	}
	int GetDefence()const
	{
		return m_nDefence;
	}
	int GetMoney()const
	{
		return m_nMoney;
	}

	unsigned GetEXP()const
	{
		return m_unExperience;
	}

	int CalculatorHP(int nAttack);//HP计算函数
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -