Q about gnolls

adev

Well-Known Member
Apr 27, 2017
263
71
I was going over the code of the gnolls (the one with the club). I noticed that she has a double physical attack (chance) and I'm not quite sure if that is intentional or a bug.

The game has a system for repeated attacks, but this is not used. Instead the code for the physical attack actually exists 3 times in the code

1) in a separate function (ominously called gnollAttackText) - which would be normal for CoC
2) in the standard enemy attack function (eAttack) - which would also be a place to expect this code but this copy is actually never called because
3) the function intended to select the attack functions contains and executes the same code and then calls the first function ignoring the eAttack fn completely

Going though the source, reading the wiki, comparing it to the spear thrower variant all were no real help to determine if this (the double attack) is a bug or intentional and just coded in a weird way.

Anyone has insight on this?