-
Notifications
You must be signed in to change notification settings - Fork 276
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
Cleanup and flesh out book morale interactions a bit #2910
Merged
scarf005
merged 10 commits into
cataclysmbnteam:upload
from
chaosvolt:book-morale-goes-nyoom
Oct 1, 2023
Merged
Cleanup and flesh out book morale interactions a bit #2910
scarf005
merged 10 commits into
cataclysmbnteam:upload
from
chaosvolt:book-morale-goes-nyoom
Oct 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
JSON
related to game datas in JSON format.
src
changes related to source code.
labels
May 29, 2023
This was referenced May 29, 2023
Converting to draft since I'm a bit stuck on the precursor PR. |
Good news is the precursor PR has been sorted out, but I may or may not end up having to close and remake this PR depending on how merge conflicts go once it's merged. |
And we should now be in business. |
|
scarf005
approved these changes
Sep 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged
via the queue into
cataclysmbnteam:upload
with commit Oct 1, 2023
c25952c
8 of 14 checks passed
olanti-p
pushed a commit
to olanti-p/Cataclysm-BN
that referenced
this pull request
Oct 6, 2023
…#2910) * Cleanup and flesh out book morale interactions a bit * Update character_functions.h * Also mods * Update character_functions.cpp * Update json_flags.md * style(autofix.ci): automated formatting * Update flags_mutation.json * Update character_functions.cpp --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This was referenced Oct 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Balance "Streamline book morale checks slightly, fix multiplier on spiritual books, add support for psychopaths liking morbid books"
Purpose of change
I'd been meaning to clean up some behavior with how Spiritual and Cannibal handle book morale for a while. Actually I wanted to just outright make it so that what traits or trait flags affected this was outright JSONized, but I was having trouble getting that to work so ech.
Now thanks to #2911 we can actually afford to make more use of
has_trait_flag
.Describe the solution
C++ changes:
is_book_morale_boosted
for the sake of unifying and streamlining the if/else logic buried inis_fun_to_read
andget_book_fun_for
. It takes the previous if/else stack and checks for trait and item flags for all of the relevant checks, allowing for more mod support and variety. It also makes it so the cannibal check asks forBOOK_CANNIBAL
instead of exactly just To Serve Man, for support of any other books we want to have use that. Also adds a separate if statement that supports "morbid but not for cannibal reasons" books.is_fun_to_read
to checkis_book_morale_boosted
instead of using its own big if/else chain.get_book_fun_for
to callis_book_morale_boosted
for determining whether to invert negative morale into positive morale, and split off the bonus morale for Spiritual into a separate check. This also turns it from a 3x multiplier to a +2 bonus. Idea here is this retains the same result of converting vanilla holy books from +1 to +3 morale, without doing wacky shit like making Oaths to The Chalice in Arcana go from -3 to +9.JSON changes:
BOOK_CANNIBAL
flag to To Serve Man.MORBID
flag to it, so that psychopath characters enjoy the authors' descent into insanity while spiritual characters actually read more into it.MORBID
flag to Visions in Solitude (the prisoner diary also seen in the cult quest line the priest's diary is a part of) and patient treatment records. This also fixes them both having innately positive morale due to inheriting from books that have that.SPIRITUAL
flag to Spiritual trait.MORBID
flag to the two mi-go books in Aftershock, and to the necromancy book in Magiclysm.Documentation changes:
CANNIBAL
,PSYCHOPATH
, andSAPIOVORE
trait flags along with theSPIRITUAL
trait.Describe alternatives you've considered
MORBID
flag if desired since they tend to deal in hilariously-unethical !!SCIENCE!! that a psychopath character might get a kick out of, but that might be a bit potent a bonus.Testing
Additional context