critto-bg / ImprovedAnvil

Improved Anvil, a mod for BG2:EE
http://forums.blackwyrmlair.net/index.php?showforum=99
5 stars 7 forks source link

Implement instant falling for Trolls after they get enough damage #35

Closed SparrowJacek closed 9 months ago

SparrowJacek commented 9 months ago

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.

critto-bg commented 9 months ago

Fixed and merged locally.