weapons: add tests to confirm melee weapon value and adjust some weapons (part 3) #41163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Balance "weapons: add tests to confirm melee weapon value and adjust some weapons (part 3)"
Purpose of change
As part of the great melee weapon rebalance (#39644 et al), @Brian-Otten unfortunately forgot to adjust a couple of weapons' accuracy values. Also, although effective DPS tests were added around this time, no tests were added to make sure that melee weapon's have appropriate value and to
detect future changes that would change the value of melee weapons.
Rectify these issues by adding an additional set of tests that calculate the weapon value of various weapons against a fairly beefy reference avatar (all stats 10, all skills 4). Then rebalance some weapons.
This is part 3, which follows #41089 and covers two handed swords, swords, and knives.
Describe the solution
The tests just check if a given weapon has a given weapon_value, +/- 0.75.
Some weapons had their to-hit, mass, volume, and/or damages updated to bring them in line with expected values for similar weapons. Most noticeably, many knives got their accuracy reduced since they are extremely short weapons with point strike surfaces, and in the case of kitchen and utility knives, aren't balanced for combat.
Describe alternatives you've considered
"to_hit"
as a static number needs to be replaced by an object:with the meaning of the terms taken from
doc/GAME_BALANCE.md
and itemfactory.cpp parsing the descriptive terms and generating an actual to_hit value. The object would make it a lot clearer as to what was going on. It would also be a lot more work, so I didn't do it in this PR series but will probably start on it soon. I'll keep the legacy"to_hit"
values around for compatibility for out of tree mods.