[MIRROR] Rewrites unarmed attacks on fellow humans #1050
Merged
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.
Оригинальный PR: Baystation12#34055
🆑 emmanuelbassil
tweak: Rewrote unarmed attack code to use the same miss/parry code as melee attacks with weapons.
bugfix: Holo-boxing gloves no longer target the wrong limb 100% of the time.
bugfix: Punching simple animals should make a punching noise again.
bugfix: Fixed cigarette wrapping paper icons, now becomes empty when out of wrapping paper.
bugfix: Rapid pipe deployer no longer creates a pipe as you put it into storage.
/🆑
Let the record state, this initially started as a PR to just fix the trident wrapping paper icons. I don't know how it turned into this.
Extensively tested, numbers haven't been changed much except get_parry_chance which now gets the difference between skill instead of just the skill of the parrier. Past behavior had parry_chance increase by 10, 20, or 30 if trained/experienced/master. Now it checks difference between attacker/defender and increases parry chance by 5 for each difference in level; to a maximum of 20.
The old way it was designed, punches used to get a buff if they were 'accurate'. If so; damage always was 5. And given having a damage of 5 triggers things like a punch knocking you over, dizzying you, dropping your weapon, etc;
I did not want to have all punches rand(1,5). I kept that functionality in a more elegant way: If resolve_attack returned a different area than what you're targeting, it's considered an inaccurate attack and damage is from 1 to 5. If you land your punch where you intended, it becomes 4,5 meaning 'glancing' punches are not possible if you're accurate. Also increases the chance of special punches triggering. This is still technically a nerf, as in the past code all accurate attacks returned 5. Although nerf is counter-balanced by better accuracy code in general.The striked part is now inaccurate. Accurate punches/chance of special attacks will have the exact same chance post-refactor to minimize the number of changes. See comments below.
Also fixed a few bugs in a separate commit.