-
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
Fix active transformable mutations not contributing instability #72919
Fix active transformable mutations not contributing instability #72919
Conversation
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>
The major limb mutations use long-term transformations into otherwise-imvalid mutations so this will still miss them - they do have changes_to generally, so you could filter there as well. What's the reason for the validity check in the first place? |
So, I'm checking validity because I'm counting all traits the player has, but not all traits they have that aren't base traits are mutations. The alternative would be to for each trait check if its category entry isn't empty if it wasn't a base trait or a threshold or negative which would work since Extended Claws for example belongs to Feline but isn't valid. I was using valid as a shorthand for "it is mutable". If there are other technically-mutable but invalid mutations then this solution might not work perfectly. But checking for a non empty category might be easier. |
Since we don't do category-less actual mutations that would be my suggestion, yeah. As long as you document that invalid traits still need a category to count for instability it shouldn't lead to too much breakage. (also, please document the new instability cal in mutations.md in some form) |
OK, I did this and confirmed it looks like it's working. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Bugfixes "Transformed active mutations (extended claws etc) properly cause instability"
Purpose of change
Someone asked how the new instability system interacts with mutations that transform, since their transformed variants have valid:false (you mutate only the inactive version of the trait). As a result when active they didn't cause instability.
Describe the solution
If the first check is failed, then also try checking to see if it has a transformed mutation target, and if it does, if that target is valid, and if it is, if either it or its transformed version has >-1 point cost.
Describe alternatives you've considered
n/a
Testing
Tried on mainline; mutated long fingernails -> claws -> retracted claws, extended my claws, and then used Alpha mutagen. Instability was 0.
Compiled the branch with my changes locally. Mutated long fingernails -> claws -> retracted claws, extended my claws, and then used Alpha mutagen. Instability was 6 as expected.
Additional context