TomenetGame / tomenet

TomeNET is an online multiplayer roguelike role-playing game
https://www.tomenet.eu/
Other
70 stars 12 forks source link

Apply ranged brands only to ammo dice in ranged damage calculation. #40

Closed char-lotl closed 1 year ago

char-lotl commented 1 year ago

Address an issue where, in the shift+I screen average damage calculations, ammo brands are incorrectly being calculated as applied to additive damage modifiers as well as to damage dice.

Also fix an issue specific to calculations for damage vs. brand-susceptible monsters (which use a different piece of code) where the tmul multiplier is applied too early.

char-lotl commented 1 year ago

Specifically: bring the shift+I screen average damage calculations more in line with the actual in-game damage calculation.

[The calculation is still not perfect, as it still neglects slay/kill/brand flat bonus damage; however, that's a slightly more involved change that I felt deserved its own PR, and this change is still very much an improvement.]

CBlueGH commented 1 year ago

Thanks! Btw, there is "s16b tot_dam_aux()" in cmd1.c which handles branding calcs. Might be of help.

char-lotl commented 1 year ago

I referenced tot_dam_aux heavily when making this PR and the next one in order to ensure correctness ^^