-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bullet damage type #38912
Add bullet damage type #38912
Conversation
This is a big improvement. |
cool now we can balance ESPAI vests |
db540f5
to
7cf8fc9
Compare
7cf8fc9
to
9ed0c61
Compare
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/cut-piercing-dmg-should-not-be-used-against-bullet-dmg/23217/5 |
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: |
c06a0f0
to
5f7e0e2
Compare
This pull request introduces 1 alert when merging 5f7e0e2 into 32e6aab - view on LGTM.com new alerts:
|
5f7e0e2
to
b344a88
Compare
This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there: https://discourse.cataclysmdda.org/t/esapi-armor-is-still-hilariously-broken/23258/3 |
c04d126
to
856a301
Compare
cb13669
to
6ecd878
Compare
6ecd878
to
ae63c1b
Compare
Currently, it's just 80% of cut, arithmetically rounded
Just set equivalent to stab damage, with arithmetical rounding
ae63c1b
to
f8e9091
Compare
Summary
SUMMARY: Features "Separate bullet damage type from cut/stab"
Purpose of change
Currently, bullet damage is modeled the same as cut/pierce damage. This is incorrect - bullets mechanically deal damage differently than a knife or lower velocity projectile, like an arrow, would. Because bullets deal damage in a different way than a knife or arrow, they are also protected against in a different. This is evident in materials like kevlar, which is excellent at blocking bullets, but performs less well against cutting/stabbing implements.
Describe the solution
Depends on #37329 and #38882.
The first three commits are from those two PRs.
Commit by commit:
Damage loading code
bullet_protec
member to bionics, holding the bullet protection armor that a CBM gives.bullet
type clothing mods.armor_bullet_bonus
member to Creaturebullet
type damage from damage objectsDT_BULLET
to the damage type enumbullet_resist
to materialsarmor_bullet
to monstersdebugmsg
) when an item is loaded using the old damage format, because this means it is likely a gun that should be using this damage type, not stab.Update logic for bullet resistance
Bullet damage UI bits
Update materials for bullet damage
Update guns to use bullet damage
stab
tobullet
for gunsUpdate ammo to bullet damage
stab
tobullet
for ammunition.Update monster bullet damage
Add documentation
There should be few changes to how guns damage and interact with monsters, the player, etc. in this PR, and the changes that there are should just be slight changes to armor due to rounding.
Describe alternatives you've considered
I considered setting the values for armor to be something other than largely what they were before (duplicates of piercing damage), but I decided that that probably deserved a more thorough and careful examination than I could do in this PR.
Testing
Bullet damage works correctly: Shooting a kevlar hulk with a .308 rifle does ~30 damage when their bullet damage field is populated, and ~70 when it is not.
Looking at clothing items shows bullet resistance.
Looking in the
+
menu shows bullet resistance.This is a pretty big PR, so I probably need to come up with some more tests.
Additional context
I considered JSON-izing damage types first, as requested by @ZhilkinSerg, but I figured this was more important to do now (I'll JSONize later).