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

feat(balance): unarmed skill affects empty-handed damage again #4160

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

chaosvolt
Copy link
Member

Purpose of change

Every so often @Coolthulhu mentioned in the BN discord wanting to bring back some form of bonus damage to unarmed attacks scaling with skill, ideally in a form that would encourage the player to try fighting bare-handed at high unarmed skill as a viable alternative to unarmed weapons.

Describe the solution

In melee.cpp, set Character::roll_bash_damage so that the weap_dam value gains a bonus equal to double that of skill, IF the user is fighting truly unarmed with no wielded weapon. This sets weapon damage to 20 at 10 unarmed skill, matching the performance of the katar and only outclassed (in-repo) by the bionic unarmed weapons.

While this does get the same "you get double your unarmed skill in this value" effect of the old code, there are a couple main differences compared to the old bonus:

  • Does not stack with unarmed weapons, so you can't get even more swole hits by combining this with a punch dagger.
  • Applying this as weap_dam instead of skill means that it doesn't cause bash_cap and bash_mul to scale above the expected skill values.
  • In particular, prevents you from skipping the different scaling for bash_mul that applies when below 5 skill with only 3 unarmed skill.

Describe alternatives you've considered

Scaling it down to only 1x unarmed skill. Possibly in exchange for some combination of allowing it to be applied to unarmed weapons, and/or having truly unarmed attacks modify armor_mult or arpen based on unarmed skill?

This could either take the form of:

  1. bonus arpen equal to or 0.5x unarmed skill.
  2. armor_mult of something like 1.0f - (0.025 * skill) such that 10 unarmed skill provides a default armor multiplier of 0.75.

Testing

  1. First, slapped around a debug monster with 8 strength and 10 in all skills in my playthrough release to get an estimate of expected before value.
  2. Compiled and load-tested.
  3. Repeated above test to get a feel for how it's changed.
  4. Tested that damage numbers were indeed comparable to what I saw when using a katar.
  5. Checked affected file for astyle.

Before:
image

After:
image

And here is same character build with a katar for comparison:
image

Additional context

Relevent PR: nerf unarmed damage, by @kevingranade: CleverRaven/Cataclysm-DDA#31858

Checklist

@github-actions github-actions bot added the src changes related to source code. label Jan 26, 2024
Copy link
Member

@Coolthulhu Coolthulhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Would be better if we had a good way of showing it to player.

@chaosvolt
Copy link
Member Author

chaosvolt commented Jan 27, 2024

Would be better if we had a good way of showing it to player.

Could be written into the description for the unarmed skill maybe? Anywhere else that might fit?

EDIT: Though printing the actual value itself somewhere I assume would be better, but might be follow-up territory since delicious UI code.

@scarf005 scarf005 merged commit fcdf47f into cataclysmbnteam:main Jan 28, 2024
12 checks passed
@chaosvolt chaosvolt deleted the atatatatatatata branch January 28, 2024 01:17
@Ignaramico
Copy link

( i apologize in advance if i cant get my point through since english isnt my native language) does this upgrade work properly with martial art that are valid while unarmed?, iirc taekwondo unhindered buff still applies even if you are a carrying something in your hands (since the MA "forces" the player to use kicks) so if you use that and wield something, would it be canceled( i mean the unarmed bonus since it uses kicks)?.
i havent tested it but i always felt that even if you used unarmed weapons with that MA the damage didnt get buffed (and i remember reading a rumor that instead it scaled with the footwear), and since from what i understood the buff doesnt stack with unarmed weapons to avoid making it too OP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants