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): gain dodge experience at reduced rate on taking hits #5694

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

chaosvolt
Copy link
Member

Checklist

Required

Optional

Purpose of change

One noted issue with dodging is that failed dodges don't generate any EXP, only successful ones. This may be a potential issue since base dodge rate has recently been nerfed, and not every player can count on book-grinding using the recently-buffed books (nor do we want book-grinding to be the optimal solution).

A quick search through the files confirms that melee attacks do generate EXP at a reduced rate when you miss, so it's perfectly reasonable to allow failed dodges to also generate EXP at a reduced rate.

Describe the solution

  1. In character.cpp, updated Character::on_hit so that getting hit by an attack still practices dodge skill, at half the EXP gained in Character::on_dodge. Unlike the on-dodge one it's set to silence messages about not gaining EXP if you're being slapped by attacks too pathetic to learn anything from (though in practice if you can't learn dodging EXP from it then you're in a weird situation if you're still getting hit by it a bunch of times).

Describe alternatives you've considered

Making it grant 25% the EXP of a successful dodge or some other further reduction below 50%.

Testing

  1. Compiled and load-tested.
  2. Spawned in a manhack as a character with zero skills.
  3. Took a hit, observed I gained 10% EXP from it despite not dodging.
  4. Re-tested with 100 dexterity, observed I gained 20% EXP from dodging, correctly double the previous amount.
  5. Checked affected files for syntax and lint errors.

Additional context

@github-actions github-actions bot added the src changes related to source code. label Nov 11, 2024
@RoyalFox2140
Copy link
Collaborator

@chaosvolt We need to determine if book skill has to go back down to what it was. 5 Dodge skill on book of dances may be too high with this, but we'll see.

@chaosvolt chaosvolt merged commit d023fc3 into cataclysmbnteam:main Nov 11, 2024
12 checks passed
@chaosvolt chaosvolt deleted the dodge-exp-on-fail branch November 11, 2024 01:09
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.

2 participants