feat: add MUTATE_THRESH spell flag for mutation spells#8554
Conversation
|
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
|
Remember that we'll also need a field / flag / bool / ;_; that lets a mutation be ignored by the point system entirely. Otherwise, your special mutations will just get removed when a Shaggoth dunks you in nuclear waste off the top rope. |
|
That's gonna require work on my PR, though (I assume) |
|
Ah, fair. For a starting point on that, does it properly ignore profession mutations? If so then there should be points in the functions that check whether a trait is a profession trait both when trying to figure out your total point value and when deciding whether it wants to modify a mutation at all. Those would be the points where you're want to inject a specific trait flag. |
|
To help with this I also aim to make spell-granting traits in Arcana zero points (though I've yet to decide how I'll handle magic signs since those can be bought in chargen) so they should be entirely unaffected by this, I assume it never touches zero-point mutations, right? |
|
0 point mutations can be added or removed, it would be a problem if they weren't, no? |
|
Ah, damn. That axes one potential workaround, yeah. I guess we'll need a specific mutation flag for it then. Like I said, start with checking how it treats profession mutations, those already need to be excluded from this system entirely (chugging mutagen should not remove your MD trait, even if mutagenic experiments would probably get your medical license revoked XP) so if you make sure those are made untouchable those create natural points where we can inject flag checks too. |
|
Oh, profession mutations have a field? Yeah, I should make sure that's accounted for too. |
Yeah, profession mutations have |
Co-Authored-By: RobbieNeko <30732426+RobbieNeko@users.noreply.github.com>
RobbieNeko
left a comment
There was a problem hiding this comment.
Looks good to me, I personally would have chosen pierce over accuracy for the tier deciding but that's minor.
Purpose of change (The Why)
A sort of side project to #8510 so that mods will have a way to mutate without worrying about point balance if they need it.
Describe the solution (The How)
C++ changes:
MUTATE_THRESHspell flag.spell_effect::mutateso that, if it's mutating you in a specific category (i.e.effectis specified andMUTATE_TRAITis absent), it will test for crossing that category's threshold after it mutates you. This allows for mutation-granting spells to replicate the effects of serums as well regular mutagen. In addition per feedback, it pings threshold tier based on spell accuracy, defaulting to tier-1 since most thresholds have only 1 tier.Documentation changes:
Describe alternatives you've considered
Hacking in support for currently-unimplemented threshold tiers? For now it uses the default tier, dunno how we'd handle that at present. Presumably something like how damage is used for chance of mutation, glom onto some existing spell property when the spell effect is mutation?
Testing
Additional context
Checklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.mainso it won't cause conflict when updatingmainbranch later.