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

Fix MORALE_BOOK Bonuses #27508

Merged
merged 6 commits into from
Jan 9, 2019
Merged

Conversation

Inglonias
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fixes morale issues with books"

Purpose of change

Fixes #27496

Describe the solution

Changed the fun bonus from books away from zero and back to what it was supposed to be: The fun value of the book times 5.

Describe alternatives you've considered

N/A

Additional context

My bad. This should fix things, though.

Fixes a bug that causes book morale bonuses to vanish entirely.
Changed it so that fun values were identical to what they were before my change.
src/player.cpp Outdated
@@ -9539,7 +9539,7 @@ void player::do_read( item &book )

if( book_fun_for( book, *learner ) != 0 ) {
//Fun bonus is no longer calculated here.
learner->add_morale( MORALE_BOOK, 0, book_fun_for( book, *learner ) * 5, 6_minutes, 3_minutes, true,
learner->add_morale( MORALE_BOOK, book_fun_for( book, *learner ) * 5, book_fun_for( book, *learner ) * 5, 6_minutes, 3_minutes, true,
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional that the max morale is *5 instead of *15?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. It sure isn't.

Fixed max fun
@kevingranade kevingranade merged commit 7ef6b41 into CleverRaven:master Jan 9, 2019
@Inglonias Inglonias deleted the fix-books branch January 11, 2019 16:12
peperov pushed a commit to peperov/Cataclysm-DDA that referenced this pull request Jan 12, 2019
* Update player.cpp

Fixes a bug that causes book morale bonuses to vanish entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read recreational books
2 participants