#include "stdafx.h"
#include "Creature.h"
-static const SOUL soulLevel[CREATURE_MAX_LEVEL] =
+const SOUL Creature::soulLevel[CREATURE_MAX_LEVEL] =
{
// 0
45,
return name;
}
+LEVEL Creature::GetLevel(void)
+{
+ LEVEL level;
+ for(level = 1; level < CREATURE_MAX_LEVEL; level++)
+ {
+ if(Creature::soulLevel[level - 1] > this->currentSoul) return level;
+ }
+ return level;
+}
+
HP Creature::GetCurHP(void)
{
return currentHp;
{
private:
- static const SOUL soulLevel; //!< \95K\97v\83\\83E\83\8b\83\8c\83x\83\8b\83e\81[\83u\83\8b
+ static const SOUL soulLevel[CREATURE_MAX_LEVEL]; //!< \95K\97v\83\\83E\83\8b\83\8c\83x\83\8b\83e\81[\83u\83\8b
string name; //!< \83N\83\8a\81[\83`\83\83\81[\82Ì\96¼\91O
HP currentHp; //!< \8c»\8dÝ\82ÌHP
*/
bool Creature::TakeEffect(Effect* effectPtr, POWER amount);
+ /*!
+ * @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»\83\8c\83x\83\8b\82ð\95Ô\82·
+ * @return \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»\83\8c\83x\83\8b
+ */
+ LEVEL Creature::GetLevel(void);
+
/*!
* @brief \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»HP\82ð\95Ô\82·
* @return \83N\83\8a\81[\83`\83\83\81[\82Ì\8c»HP
class Trap;
typedef int BASE_STATUS; //!< \8aî\91b\94\\97Í\92l\82Ì\95Ï\90\94\8c^
+typedef int LEVEL; //!< LEVEL\82Ì\95Ï\90\94\8c^
typedef int HP; //!< HP\82Ì\95Ï\90\94\8c^
typedef int MP; //!< MP\82Ì\95Ï\90\94\8c^
typedef int64_t SOUL; //!< \83\\83E\83\8b\82Ì\95Ï\90\94\8c^