-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[MoM] Psi equation fixes #70536
Merged
Maleclypse
merged 9 commits into
CleverRaven:master
from
Standing-Storm:psi-equation-fixes
Dec 31, 2023
Merged
[MoM] Psi equation fixes #70536
Maleclypse
merged 9 commits into
CleverRaven:master
from
Standing-Storm:psi-equation-fixes
Dec 31, 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]
Changes (can be) made in JSON
Mods
Issues related to mods or modding
[C++]
Changes (can be) made in C++. Previously named `Code`
Mods: Mind Over Matter
labels
Dec 30, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…m/Cataclysm-DDA into psi-equation-fixes
github-actions
bot
added
json-styled
JSON lint passed, label assigned by github actions
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
labels
Dec 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
Mods: Mind Over Matter
Mods
Issues related to mods or modding
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
Mods "[MoM] Psi equation fixes"
Purpose of change
I made a mistake in the equation--in order to prevent the psi equation from influencing the magic equation, I took out the cap for psi_effective_skill. Unfortunately, that led to very strange behavior, since when effective skill was above 30 it stated to come back down the other side of the convex function. And it didn't even work, since when it hit 30 effective skill by Magiclysm's formula it suddenly snapped to zero.
Describe the solution
Re-work the formula slightly so that powers with the
PSIONIC
flag check up to 40 effective skill instead of 30:This makes sure that magic follows the magic formula and psi follows the psi formula, and it also gives psi more room to breathe so that focus can take effect--previously it was very easy to hit the 30 effectiveness skill cap and jump straight to "no failure chance" since focus calculations take place further down the function.
I also went through and added
"skill": "metaphysics"
to every power that was missing it.Describe alternatives you've considered
Testing
At metaphysics 0 with high focus, fail chance is a coinflip. At metaphysics 0 with low focus, powers are unusable. That's fine with me--this is the equivalent of attacking a zombie with melee skill 0 at high stamina and low stamina. Train your skills if you want to be successful.
At metaphysics 6 with high focus, fail chance is basically nil. At metaphysics 6 with low focus, fail chance ranged from 5% to 20% depending on power level.
At metaphysics 10, low-Difficulty powers always succeeded even at low focus and even at extremely high (500+) levels of pain reducing Intelligence to 0. Even high-Difficulty powers only had a 20% failure chance.
(I might want to do something with flags or something to make pain itself have an effect on psi above and beyond loss of intelligence, since even Professor X would have trouble if all of his limbs were broken and he was suffering from arterial bleeding, but that's out of scope for this PR)
At no point did I witness higher skill or power level causing an increase in failure chance.
Additional context
Lesson to self--always test with a slime mutant.