If you have a str that gives negative damage and you bash and get to player-attack.c
/* Encourage the player to keep wearing that heavy shield. */
if (randint1(bash_dam) > 30 + randint1(bash_dam / 2)) {
with bash_dam less than 0 you get an assert fail in Rand_div
/* Division by zero will result if m is larger than 0x10000000 */
assert(m <= 0x10000000);
looks like this is a very old bug and only got seen because the stupid borg put on gloves of weakness and proceeded to attack (have to check into that part)
Not sure if you want to induce a stumble in that case or just give a "fail to harm".
/* Encourage the player to keep wearing that heavy shield. */
if (randint1(bash_dam) > 30 + randint1(bash_dam / 2)) {
with bash_dam less than 0 you get an assert fail in Rand_div
/* Division by zero will result if m is larger than 0x10000000 */
assert(m <= 0x10000000);
looks like this is a very old bug and only got seen because the stupid borg put on gloves of weakness and proceeded to attack (have to check into that part)
Not sure if you want to induce a stumble in that case or just give a "fail to harm".
Comment