feat: armor penetration for melee weapons [WIP] #5600
Draft
+105
−8
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.
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
Purpose of change
The game supports armour penetration values for attacks, both flat and percentage. These were actually possible to define for melee weapons, but weren't considered in the melee weapon damage rolls.
I'm not sure if it's really a good idea to add armour penetration to real items, but it's still nice to have the functionality.
Describe the solution
So far I've just added a couple helper functions to
damage_instance
to get the armour modifiers, and checked them in melee attacks. The numbers aren't correctly displayed when examining an item, but from initial testing they're clearly doing somethingDescribe alternatives you've considered
Testing
Use the provided chaos dagger.
Additional context