Mirror image is bypassed by the following
spec values: 131072 (no effect on mindless), 1073741824, 34359738368, 18014398509481984 (likely "true" damage, inflicted by BV and blood bond), 36028797018963968 (internal damage), or the damage being 900+
Prot force is bypassed by only true, internal and AN, or if the damage is 900+
Mistform and mossbody are bypassed if the damage is 900+, or is true/internal
Ethereal seems to have no such checks, but all the special damage things it might want to ignore are magical anyway
Twist fate comes next, applying to damage less than 900, without the true damage modifier. Twist fate also won't apply to 1 damage, so long as you have more than 2hp.
If the time is appropriate, fools luck will negate damage that is less than 900 and not true damage, but only if the damage is greater than 1 or your hitpoints are less than 3
If the time is appropriate, fools luck will double damage that is less than 900 and not true damage, but only if the damage is greater than 1
Luck negates damage if the amount is less than 900, the damage is not true damage, the damage would be fatal, cursed luck is not active, the unit is not inanimate or undead, and a 75% random chance is passed.
Damage reversal activates if the damage is less than 9000, the damage is not true damage, the attacker and victim are different creatures, there is an attacker for this damage that is alive, and the attacker's current province is positive (
IE not in another plane)
Blood vengeance activates if the damage is less than 9000, the damage is not true damage, the attacker and victim are different creatures, there is an attacker for this damage that is alive, and the attacker's current province is positive
Blood bond shares damage if the damage is not true damage, one of the unit's coordinates on the battlefield is greater than -1, there is an attacker for this damage that is alive, and the attacker's current province is positive
Holy avenger adds one strike on any nonzero damage that is not true damage
Limb damage cap (and presumably severing) is applied to non-true damage now
Spellcasting interrupting is checked
If damage is nonzero at this point and the damage is not true damage, mirror image is removed
If damage is nonzero and not poison damage, remove unknown (affliction 1024)
Unseen pops if the unit survives and if affliction 2048 not suffered: (add mirror image and affliction 2048)
If damage less than 9000, roll for afflictions
Returning on damage triggers if the unit survives. Note that being knocked into a secondshape doesn't count here, because you're technically dead until the shapechange code below "heals" you. The same thing likely happens with ppyre and simiilar effects.
Something I don't understand happens, it has to do with putting units on a list to make morale checks but may be more involved
Eligible berserkers roll 3d6 exploding. If this is less than their max morale, they get angry
Shrink/growshapes occur
Various secondshape things occur
some things I don't understand
If the target does not have positive hp at this point and
spec 256, add the soul slayed affliction
Phoenix pyre, if the damage was less than 9000, explode. If your fatigue is less than 100 and you weren't soul slayed, reappear.
Inner fire, if the damage was less than 9000 and fatal.
Death explosion bless, if the damage was less than 9000 and fatal.
Deathfire, if damage was less than 9000 and fatal.
Disease explosion, if damage less than 9000 and fatal.
Deathwail (accepts pen bonus), if damage less than 9000 and fatal
Extra life, if damage less than 9000, fatal, and not soul slayed
Spawn a horror if dying with a horror seed value of greater than 1 and damage less than 9000
Reforming, if damage less than 9000, fatigue less than 100, and not soul slayed: adds 1d6 exploding + 6 fatigue when it happens
Swarm body, if damage less than 9000 and not soul slayed: a bit involved
Gain (openended d6) + 6 fatigue
Turn into your soul vessel type: bug on land, shrimp if underwater
Heal to the soul vessel form's max health
Lose all items if you are a commander
Set effect 339 in slots with value = your old unit type
Become feebleminded.
Pick a random square in a 3x3 box around where you died. If belonging to the nation on the left, move 2 squares left. If belonging to the nation on the right, move 2 squares right instead.
Spawn a number of normal bugs equal to your swarm body ability value, in addition to your soul vessel
After battle, you should get unfeebleminded and return to your normal body
Otherwise, there is a 20% chance per turn that a soul vessel turns back to its normal body, so long as its fatigue < 100. This also unfeebleminds it
At this point, if you are alive, in a province > 0 (not in another plane), and have lost your head, you die unless you're one of the types of creatures that can survive that.
Some preparations for immortal/twiceborn/reincarnation/mummify. None of these happen unless the fatal damage was less than 9000
If the unit died, it adds one to the province's armed corpse count if it is not an animal, undead, need not eat, naturally ethereal, or inanimate
If the unit was not undead and not inanimate, and haunted forest is active, and the battle is taking place in the relevant dominion, you get a manikin for someone (probably the enchantment owner)