- Create a temporary variable (ret), starting at the base value
- If we're not factoring in juice (either because we actually want the base value or because of a wisdom/heart alignment mismatch), just return ret straight away and skip the next steps
- Otherwise, if juice is...
- At or less than -50, set ret to 1 - Damn worthless
- Greater than -50 and at or less than -10, multiply ret by 0.6 and round it down - Society's dregs
- Greater than -10 and at or less than 0, multiply ret by 0.8 and round it down - Punk
- Greater than 0 and at or less than 10, keep ret as is - Civilian
- Greater than 10 and less than 50, add 1 to ret and round it down - Activist
- At or greater than 50 and less than 100, multiply ret by 1.1, add 2 to it and then round it down - Socialist Threat
- At or greater than 100 and less than 200, multiply ret by 1.2, add 3 to it and then round it down - Revolutionary
- At or greater than 200 and less than 500, multiply ret by 1.3, add 4 to it and then round it down - Urban Guerrilla
- At or greater than 500 and less than 1000, multiply ret by 1.4, add 5 to it and then round it down - Liberal Guardian
- At 1000, multiply ret by 1.5, add 6 to it and then round it down - Liberal Guardian
- Then make a temporary variable called disfigs and start it at 0 - it tells the game how disfigured the character is.
- Then if...
- He's missing any teeth, add 1 to disfigs
- He's missing more than half his teeth, add 1 to disfigs
- He's missing all his teeth, add 1 to disfigs
- He's missing his right eye, add 2 to disfigs
- He's missing his left eye, add 2 to disfigs
- He's missing his tongue, add 3 to disfigs
- He's missing his nose, add 3 to disfigs
- Then calculate how many legs are intact
- The age and injury process is then applied (as above, with more detail for injuries - I might add that later)
- For strength, agility or charisma:
- If you are down to 20 blood or less (it's a percentage, basically), quarter ret (rounded down)
- If you are between 20 and 50 blood, halve ret (rounded down)
- If you are between 75 and 100 blood, multiply ret by 3 and then halve it (rounded down)**
- Lastly, clamp ret in the range [1,20] and return it
**This might be intended or might be a bug, but it means that, at a certain level of bloodloss, you are stronger, more agile and more charismatic than with all your blood