Sorry for the doublepost & mininecro, but would this work?
enum Status
{
UNSCATHED,
SUPERFICIAL,
MINOR_DAMAGE,
MODERATE_DAMAGE,
HEAVY_DAMAGE,
FUNCTION_LOSS,
DEVASTATING,
MISSING
};
enum SpecProperties
{
BLANK,
BRAIN,
BREATHING,
LOADBEARING,
SEEING
};
class BodyPart
{
public:
int nSize; //Use heads as a metric. NOT THE SAME AS CREATURE SIZE
int nToughness;
int nHealth;
int nPainDelta; //How much "Pain" added per stage
int nBloodDelta; //How much blood is lost per turn per stage
int nOxygenDelta; //How much oxygen is lost per turn per stage
bool bEssential; //Essential to life, really.
Status eStatus;
SpecProperties eProperty;
BodyPart(int Size = 1, int Toughness = 1,
int Health = 100, bool Essential = false, SpecProperties Property = BLANK, int PainDelta = 25, int BloodDelta = 25, int OxygenDelta = 0)
{
nSize = Size;
nToughness = Toughness;
nHealth = Health;
bEssential = Essential;
eStatus = UNSCATHED;
eProperty = Property;
nPainDelta = PainDelta;
nBloodDelta = BloodDelta;
nOxygenDelta = OxygenDelta;
};
private:
}
class Humanoid
{
public:
bool bIsAlive;
int nCurrentBlood;
const int nCurrentBlood = 5000;
BodyPart Head(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = true);
BodyPart Torso(int Size = 6, int Toughness = 60,
int Health = 600, bool Essential = false);
BodyPart UpperlegL(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart UpperlegR(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart LowerlegL(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart LowerlegR(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart FootL(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart FootR(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart HandL(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart HandR(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart UpperarmL(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart UpperarmR(int Size = 2, int Toughness = 20,
int Health = 200, bool Essential = false);
BodyPart LowerarmL(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart LowerarmR(int Size = 1, int Toughness = 10,
int Health = 100, bool Essential = false);
BodyPart Brain(int Size = 1, int Toughness = 0,
int Health = 30, bool Essential = true);
BodyPart Guts(int Size = 4, int Toughness = 20,
int Health = 300, bool Essential = false);
}
Or should I just make a constructor for that?