//From Race/interfaces/Race.java
/** the number of body part constants*/
public final static int BODY_PARTS=16;
/** constant string list naming each of the BODY_* constants in the order of their value*/
public final static String[] BODYPARTSTR={
"ANTENEA","EYE","EAR","HEAD","NECK","ARM","HAND","TORSO","LEG","FOOT",
"NOSE","GILL","MOUTH","WAIST","TAIL","WING"};
//From Race/StdRace.java
// an ey ea he ne ar ha to le fo no gi mo wa ta wi
private static final int[] parts={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
public int[] bodyMask(){return parts;}
// an ey ea he ne ar ha to le fo no gi mo wa ta wi
private static final int[] parts={0 ,10 ,0 ,1 ,0 ,0 ,0 ,1 ,8 ,8 ,0 ,0 ,1 ,0 ,0 ,0 };
// an ey ea he ne ar ha to le fo no gi mo wa ta wi
private static final int[] parts={0 ,2 ,2 ,1 ,1 ,2 ,2 ,1 ,2 ,2 ,1 ,0 ,1 ,1 ,0 ,0 };
{ // Spider
{ PART_EYE, 8 },
{ PART_HEAD, 1 },
{ PART_TORSO, 1 },
{ PART_LEG, 8 },
{ PART_FOOT, 8 },
{ PART_MOUTH, 1 }
},
I therefore resolved a few weeks ago to come up with a system for allowing builders in the OLC to define what limbs their mobs have. If they're humanoid mobs, well and good, they just leave things the way they are and use the existing system to deal with damaging that way. If they're not, however…I present my mission statement and the basic structure for your opinionating.
* Limbs have user-defined names, and predefined purposes. They can use either a boolean to indicate the anatomy
of the limb is like a human, or not have the value in which case they can perform only generic actions, such
as making cuts, breaking and severing the limb.
* The mob will also store boolean values for heads, torsos and cuttable -
possessing a head or torso presumes mammalian bone structure; jaw and teeth in the head, ribs and spine in the torso.
A nose, ears and stomach will be presumed if cuttable is true. Eyes are defined as limbs.
* Limbs can be defined as miscellaneous so as to not serve any mechanical gameplay purpose, but still be accessible for
cutting/breaking/severing (cutting and breaking will be user-defined). Mobs will have an integer array of how many limbs of each type they
have (there will be a random chance to hit a misc instead of an arm/leg if any are present), and will also store an integer array of how of
each type is currently severed (this can be used to check whether they are able to stand, hold things, see, etc.).