I changed Troll item (trollreg.itm) to check current HP each time the Troll is getting hit, through changing the condition on opcode 232. The check itself happens in trollreg.spl, which is cast after each hit. If the Troll has at least 13HP, nothing happens, but if it does not, then sleep opcode (39) is applied through opcode 283 (curse: use eff file), which bypasses any potential immunity to sleep opcode from opcode 101. The rest of the behavior is left intact.
I changed Troll item (trollreg.itm) to check current HP each time the Troll is getting hit, through changing the condition on opcode 232. The check itself happens in trollreg.spl, which is cast after each hit. If the Troll has at least 13HP, nothing happens, but if it does not, then sleep opcode (39) is applied through opcode 283 (curse: use eff file), which bypasses any potential immunity to sleep opcode from opcode 101. The rest of the behavior is left intact.