This is an old revision of the document!
Afflictions and Healing
Looks like there is a defined (and unintuitive) order to healing afflictions.
There's some other stuff that seems to prevent units being healed but I don't know what that is about.
Battle fright, 50%
Feeblemind, 25%
Undocumented 137438953472, 50% heal rate, only healed if unit is not feebleminded as well
Disease, 50%
Crippled, 25%
Blind, 25%, only if unknown affliction 2147483648 not also suffered
One lost eye, 50%, only if affliction 2147483648 not also suffered
Weakness, 50%
Mute, 25%, only if unknown affliction 2147483648 not also suffered
Undocumented 2147483648, 20%
Undocumented 16, 25%
One lost arm, 25%
One lost eye, 50%, another chance
Chest wound, 50%
Limp, 50%
Never healing wound, 10%
2147483648 is likely lost head
137438953472 is likely dementia
Gaining Afflictions when Damaged
Calculate (damage done*1000)/unit's max hp. Call this Value 1 and keep it for later.
Calc value 2: Multiply value 1 by the value of unknown unit effect 0x12d (I have no idea what this does). Then divide this by 100.
Final affliction value: Add 1 and 2 together
If cursed, add 150 to this sum
If active regen percentage is greater than 5, the value instead becomes (value * 100)/(regen percentage * 20)
Get affliction resistance. If liquid body is active, add 1 to this.
If (100/(affliction res + 1)) < random 0-99, set the value to 5.
If the final value is 5 or less, set it to 5.
First random roll: if the final value is not greater than a random number 0-999, do nothing. Otherwise, you get some kind of affliction (of which there are two different applying functions I don't yet know the difference between)
Practically, this means that regen reduces affliction chance to (500/regen %) percent.