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

Move more player functions into character #43408

Merged

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Sep 2, 2020

Summary

SUMMARY: Infrastructure "Move more player functions into Character"

Purpose of change

part of #34721

moves the following functions:

  • on_dodge
  • on_hit
  • dodge_roll
  • get_dodge
  • uncanny_dodge
  • get_melee
  • is_dead_state
  • is_stealthy
  • can_melee
  • stability_roll
  • can_autolearn
  • can_grab_break

Describe the solution

change the scope of a selection of functions that seemed like low-hanging fruit, and then move their definitions.

Testing

Builds fine, game runs without errors.

Additional context

Character::on_hit() had some code that existed already so it just absorbed the rest of player::on_hit() because that actually had some npc and avatar logic, so i didn't feel like pulling those apart. it might be worth doing later maybe? but it looked like it was just messaging.

@KorGgenT KorGgenT added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Sep 2, 2020
@ZhilkinSerg ZhilkinSerg merged commit f431e8d into CleverRaven:master Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants