Merge race and monster type enums

This commit is contained in:
2014-12-03 18:27:34 -05:00
parent efa552a366
commit 5b7649543f
11 changed files with 57 additions and 74 deletions

View File

@@ -23,7 +23,10 @@ cMonster& cMonster::operator = (legacy::monster_record_type& old){
for(int i = 0; i < 3; i++) a[i] = old.a[i];
a[0].type = old.a1_type;
a[1].type = a[2].type = old.a23_type;
m_type = (eMonsterType) old.m_type;
// Unless human, add 3 to the monster's type to get its race
// This is because nephil, slith, and vahnatai were inserted
if(old.m_type) m_type = eRace(old.m_type + 3);
else m_type = RACE_HUMAN;
speed = old.speed;
mu = old.mu;
cl = old.cl;

View File

@@ -110,7 +110,7 @@ public:
unsigned char armor;
unsigned char skill;
cAttack a[3];
eMonsterType m_type;
eRace m_type;
unsigned char speed;
unsigned char mu;
unsigned char cl;

View File

@@ -77,7 +77,7 @@ enum eRace {
RACE_MAGICAL = 17,
RACE_PLANT = 18,
RACE_BIRD = 19,
}; // TODO: Expand and merge with eMonsterType
};
/* adven[i].status*/ //complete - assign a positive value for a help pc effect, a negative for harm pc
enum eStatus {
@@ -97,27 +97,6 @@ enum eStatus {
STATUS_ACID = 13,
};
/* Monster Type */
enum eMonsterType {
MONSTER_TYPE_UNKNOWN = -1, // for parameters to some functions; not valid in the class
MONSTER_TYPE_HUMAN = 0,
MONSTER_TYPE_REPTILE = 1,
MONSTER_TYPE_BEAST = 2,
MONSTER_TYPE_IMPORTANT = 3,
MONSTER_TYPE_MAGE = 4,
MONSTER_TYPE_PRIEST = 5,
MONSTER_TYPE_HUMANOID = 6,
MONSTER_TYPE_DEMON = 7,
MONSTER_TYPE_UNDEAD = 8,
MONSTER_TYPE_GIANT = 9,
MONSTER_TYPE_SLIME = 10,
MONSTER_TYPE_STONE = 11,
MONSTER_TYPE_BUG = 12,
MONSTER_TYPE_DRAGON = 13,
MONSTER_TYPE_MAGICAL = 14,
};
/* Special Ability a.k.a spec_skill */
enum eMonstAbil {