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

Intelligence affects exp rates based on current int, not max int #39902

Merged
merged 2 commits into from
Apr 26, 2020

Conversation

CodeBandit
Copy link
Contributor

@CodeBandit CodeBandit commented Apr 25, 2020

Summary

SUMMARY: Bugfixes "Use current int instead of max int for exp calculations"

Purpose of change

Leverage get_int() instead of get_int_base() so the player's current int is used instead of maximum int for experience calculation. If the player currently has 0 int due to debuffs, they shouldn't be retaining information as well as if they had 8 int (assuming that's their max base int).

Describe the solution

Change get_int_base() to get_int()

@anothersimulacrum
Copy link
Member

anothersimulacrum commented Apr 25, 2020

This is already done in Character::adjust_for_focus. Which is called on the line above these changes.

@CodeBandit
Copy link
Contributor Author

CodeBandit commented Apr 25, 2020

@anothersimulacrum

This is already done in Character::adjust_for_focus. Which is called on the line above these changes.

Thanks for pointing that out! I took a look and it does look to be doing that. I changed the functionality to go from get_int_base() to get_int() so it's actually using the player's current int value instead of the player's max int. Changing the PR to a bug-fix.

@CodeBandit CodeBandit changed the title Intelligence affects exp rates Intelligence affects exp rates based on current int, not max int Apr 25, 2020
@anothersimulacrum
Copy link
Member

Bugfixes is the correct category for bugfixes, not Bug-fix.

@curstwist curstwist added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics labels Apr 25, 2020
@kevingranade kevingranade merged commit f7bd23a into CleverRaven:master Apr 26, 2020
@CodeBandit CodeBandit deleted the Intelligence-buff branch April 28, 2020 17:16
Drewscriver pushed a commit to Drewscriver/Cataclysm-DDA that referenced this pull request Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants