Hello Lemming,
There are several problems with the Berserk spell, but the most important is indeed that attacked monsters are not activated. A fix for that can also be found in our notes, but I'll give the code here.
You will need 14 bytes of free space. We used location 0047A9B2, but that space might not be available to you. If so, find a sequence of 14 'nop' and adjust the call for it (or ask, and I'll gladly help).
This will only work for monsters that are attacked in melee, but that is the most common. In HF, Berserk only works on not magic immune creatures.
Melee Monster vs. Monster
Activation of target monster (for when attacked by Charmed monster):
File Offset 0003CFB6
:0043DBB6 39BE8CDC6900 cmp dword ptr [esi+0069DC8C], edi
change to
:0043DBB6 E8F7CD0300 call 0047A9B2 <- adjust this call if needed
:0043DBBB 90 nop
File Offset 00079DB2
:0047A9B2 90... 14*nop
change to
:0047A9B2 808E28DD6900FF or byte ptr [esi+0069DD28], FF <- code that activates target
:0047A9B9 39BE8CDC6900 cmp dword ptr [esi+0069DC8C], edi
:0047A9BF C3 ret
Sorry for the bad spacing. Can't get it right, it seems.
There are several problems with the Berserk spell, but the most important is indeed that attacked monsters are not activated. A fix for that can also be found in our notes, but I'll give the code here.
You will need 14 bytes of free space. We used location 0047A9B2, but that space might not be available to you. If so, find a sequence of 14 'nop' and adjust the call for it (or ask, and I'll gladly help).
This will only work for monsters that are attacked in melee, but that is the most common. In HF, Berserk only works on not magic immune creatures.
Melee Monster vs. Monster
Activation of target monster (for when attacked by Charmed monster):
File Offset 0003CFB6
:0043DBB6 39BE8CDC6900 cmp dword ptr [esi+0069DC8C], edi
change to
:0043DBB6 E8F7CD0300 call 0047A9B2 <- adjust this call if needed
:0043DBBB 90 nop
File Offset 00079DB2
:0047A9B2 90... 14*nop
change to
:0047A9B2 808E28DD6900FF or byte ptr [esi+0069DD28], FF <- code that activates target
:0047A9B9 39BE8CDC6900 cmp dword ptr [esi+0069DC8C], edi
:0047A9BF C3 ret
Sorry for the bad spacing. Can't get it right, it seems.