hyvanmielenpelit / GnollHack

Rogue-like game based on NetHack
Other
58 stars 7 forks source link

Silver-searing damage incorrect for most +X%-damage artifacts #2073

Closed NeroOneTrueKing closed 3 months ago

NeroOneTrueKing commented 3 months ago

There's this vanilla kludge, that halves silver-searing for double-damage artifacts: https://github.com/hyvanmielenpelit/GnollHack/blob/7151dce21ed8c45d5fe58435946dcacd6852fc0a/src/weapon.c#L598-L601

The reason is that spec_dbon is going to be called later and would (in vanilla) double the damage, so this preemptive halving serves to maintain the bonus silver damage to (about) 1-20.

However, in gnollhack, there's a variety of damage multiplying artifacts. Ie, an artifact that does 150% damage like Sunsword will actually only get [1-20] /2 *1.5 = about 1-15 bonus silver damage.

This applies to all 'bonus' damage: blessed-hating, cursed-hating, silver-hating, light-hating, and axes-vs-wood.

janne-hmp commented 3 months ago

Fixed. This in fact halved the damage of double damage and higher (and did nothing to < 200% damage), so less than double damage and more than double damage in fact caused more damage than intended, and double damage was correct.