All creatures have bodies. All bodies have cells. The cells contain the organs / part of organs. Organs responsible for the actions of creatures possibility. I.e.:
class body {
bodycell cell[50][50];
…
}
class bodycell
{
vector cells; //e.g. [0]-skin [1]-fat [2]-muscle [3]-bones …
vector armor; //armor layers
…
}
class organs {
string name; // skin/fat/muscle/bone/lung/guts …
int max_hp;
int hp;
int damage_reset;
int damage_absorb; //in percent -> damage*=damage_absorb; damage-=damage_reset;
organfunction orgfunction; // +
int coverage; //++
}
class armorcell
{
int hp,max_hp,danage_reset,absorb …
}
[+] if organ.hp=0 creature lost function, writed in orgfunctions.
[++] coverage system:
incoming damage (dmg=30) ->
{skin hp=5 cover=100%;
fat hp=10 cover=100%;
muscle hp=10 cover=100%;
bone hp=30 cover=50%;
lung hp=5 cover=50%;}
algorithm:
dmg 30 -> skin -> 25 -> fat -> 15 -> muscle -> 5 -> 50/50: bone(25 hp left)/lung(0 hp left)
bash strikes ingore 50% damage_reset of each organ/armor and hit many cells, but less damage.
cut strikes hit cells on line, but damage_reset of organ/armor +200%
point strikes hit 1 cell with standart damage_reset.
It will look something like this:
//###___
//000
//0
//#######
//0###X
//0###0
//#####_
//___###___
//__##___
//__##___
//0_0
//0_0
//__##___
[#] - armor
[0] - body
If hp of all ornans in cell marked X=0 then creature lost arm.