Skip to content
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

Slimy helps you escape grabs #69019

Merged
merged 9 commits into from
Nov 2, 2023

Conversation

fairyarmadillo
Copy link
Contributor

@fairyarmadillo fairyarmadillo commented Oct 30, 2023

Summary

Balance "Slimy mutation helps you escape grabs"

Purpose of change

Grabs check a number of factors to determine your escape chance, but one thing I realized is that they weren't checking any mutations apart from strength and possibly limb scores. Slimy is a mutation that would make sense here - fish and frogs are famously slippery, and holding onto an actual slime mutant should be pretty difficult.

Describe the solution

Having the Slimy or Viscous mutation (they're mutually exclusive) adds a flat 6% to your grab escape chance. This chance is then multiplied by the clothing_wetness_mult of the grabbed body part. This models the slime exuding from your skin and only soaking through your clothing according to its coverage and breathability.

Describe alternatives you've considered

There is an existing stopgap measure in clothing_wetness_mult that I became aware of while working on this:

    // always some evaporation even if completely covered
    // doesn't handle things that would be "air tight"
    clothing_mult = std::max( clothing_mult, .1f );
    return clothing_mult;

This means that even if you're totally covered, you'll always have a 0.6% bonus to escape grabs if you're slimy. This is pretty inconsequential and only really matters for power armor, which most mutants can't wear anyway. Since it's a preexisting issue and has a negligible impact, I don't think it needs to be addressed here. A proper fix might be to add an airtight tag to totally airtight items and check for it in clothing_wetness_mult.

The 6% was chosen after some basic testing, and could be adjusted if it's too weak or too strong. I picked a number that would still have some minor impact even if the player was clothed or lightly armored, but wouldn't be so high as to make grabs harmless while nude.

Testing

Turned on debug mode, got grabbed and escaped several times. Mutated Slimy and did the same, mutated Viscous and did the same. Saw that escape chances were properly being adjusted each time.

In testing with typical early to midgame armor setups, it was generally still adding 2 or 3% to the escape chance, which feels reasonable. Players can maximize the benefit of their slime by using lower-coverage and higher-breathability gear on their limbs, which seem to get grabbed the most and cause the most problems with escaping.

A naked slimy character with 5 Melee, a Grab Break tech, 16 strength, and Slimy was usually getting around 30% total escape chance from a torso grab by a debug strong grabber enemy, or 23% without slimy, as expected. Most characters will not be facing strong enemies while nude, so the usual escape chance for such a character would probably be in the high twenties.

Additional context

image
A strong grabber testing a grab against a naked slimy character.

image
A strong grabber testing a grab against a naked slimy character wearing a bathrobe.

image
A strong grabber testing a grab against a naked and non-slimy character.

@github-actions github-actions bot added Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies [C++] Changes (can be) made in C++. Previously named `Code` labels Oct 30, 2023
src/character_escape.cpp Outdated Show resolved Hide resolved
src/character_escape.cpp Outdated Show resolved Hide resolved
src/character_escape.cpp Outdated Show resolved Hide resolved
src/character_escape.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Oct 30, 2023
fairyarmadillo and others added 4 commits October 30, 2023 14:08
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Oct 30, 2023
@github-actions github-actions bot removed the astyled astyled PR, label is assigned by github actions label Oct 31, 2023
removed extraneous spaces
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Nov 1, 2023
@Maleclypse Maleclypse merged commit 262d672 into CleverRaven:master Nov 2, 2023
26 checks passed
Maleclypse pushed a commit to Maleclypse/Cataclysm-DDA that referenced this pull request Nov 16, 2023
* Slime helps you escape grabs

* add viscous, update descriptions

* Update src/character_escape.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update src/character_escape.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update src/character_escape.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update src/character_escape.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Adjusted slime bonus

* Update character_escape.cpp

removed extraneous spaces

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants