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
Convert most remaining species fake mutations to real mutations #3724
Open
NormalPerson7
wants to merge
8
commits into
crawl:master
Choose a base branch
from
NormalPerson7:more-real-mutations
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Replace the old fake mutations for formicids' stasis and digging abilities, and octopodes'/draconians' armour restrictions, with real mutations. This allows them to be described in detail in the mutation description. This leaves species::bans_eq in a rather sorry place, but it still functions so we'll deal with it later.
Replace the old nonliving/undead check for poison immunity, and the special-cased, weirdly behaving fake mutation for it. Ghouls, mummies, gargoyles and djinn start with this mutation. Bloodless vampires remain special-cased. The poison immunity mutation also implies miasma and sickness immunity, and this is added to the text of the mutation, rather than having a separate fake mutation for this that, inconsistently, appeared for gargoyles and djinn but not for undead species. [Sidenote: The only source of rPois+++ that doesn't also grant rMiasma is the staff of Olgreb; perhaps this should be changed--- after all, in this case, miasma only causes slowing anyway.] Due to the special cases of bloodless vampires and petrification respectively, I have not removed the undead/nonliving checks from the poison/miasma immunity functions. Also, fix the form fake mutation for poison immunity not showing up if you had a mutation that gave you rPois.
Add mutations for each type of draconian breath, each type of draconian scales, and gargoyle and naga innate AC. In particular, the new racial AC mutations describe how their AC increases with XL. A few notes about this: - The number of draconian scales mutations that are functionally identical and added for flavour reasons only is somewhat excessive. I do wonder about giving the scales mutations the resistances instead of giving draconians the resistance mutations. (A change like this would be a nerf to statue form only.) - Draconians' special treatment in dragon form is simplified by adding a new mutflag, mutflag::draconian, to all of the draconian mutations that are preserved by dragon form. - The racial AC calculation is switched over to use the mutations. I'll admit the implementation is somewhat clunky. - The messages draconians get on colourisation at XL 7 are now red instead of green. This will be improved later, by adjusting all innate level-ups to use MSGCH_INTRINSIC_GAIN. The order they appear in is suboptimal, but this can easily be adjusted by reordering mutation-data.h. - Mottled draconians get plain brown scales, if anyone still has a save file with a mottled draconian...
NormalPerson7
force-pushed
the
more-real-mutations
branch
from
March 22, 2024 23:01
9718c58
to
57b809b
Compare
Makes draconian colourisation at XL 7 look pretty again after the previous commit. Has various other applications. Hopefully not too confusing; this is what MSGCH_INTRINSIC_GAIN was designed for, after all.
Replaces the old convoluted approach. Barachim and octopodes start with this mutation, and grey draconians now develop it at XL 7, giving them a message to indicate their new swimming ability. It might be interesting in future to open this up to some/all species as a random mutation. I am leaving in the special-casing that allows merfolk to benefit from amphibiousness with MUT_MERTAIL because it remains the case that the text description for the amphibious mutation may be confusing when merfolk's nimble swimmer 2 is strictly stronger. It would probably be more consistent to let MUT_AMPHIBIOUS do the work, though.
Now redundant. MUT_AMPHIBIOUS and MUT_MERTAIL now tell species-gen.py to set the habitat as HT_WATER instead of HT_LAND.
The two uses for this are now handled correctly by mutflag::draconian, so this function is unused. In a separate commit to allow either previous commit to be cherry-picked without breaking things.
Mark fake_mutations as a deprecated field. I'm not going to demarcate it with `#if TAG_MAJOR_VERSION == 34` in the main codebase yet, but this seems like a reasonable place to softly deprecate them. Let's use real mutations for any new species features now. Also note the fact that create_enum = true isn't currently supported, according to species-type-header.txt. Add a Mutations section, briefly describing the process of adding new species mutations.
NormalPerson7
force-pushed
the
more-real-mutations
branch
from
March 22, 2024 23:08
57b809b
to
f714741
Compare
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.
The objective of this PR is to add detailed descriptions for most species fake mutations that currently exist, by converting them to real mutations and adding descriptions to
/dat/descript/mutations.txt
. I am not touching bloodless vampires or forms.After this PR, the only remaining species fake mutations for non-deprecated species are octopodes' eight rings, and the effects of size. The former should be reasonably simple to deal with.. I am wary of adding mutations for size, because it affects so much and there are many separate cases (spriggan, felid, kobold, ogre/troll, armataur/naga all have slightly different behaviour), but ideally we would have descriptions that indicate the effect size has on EV, attack penalty in water, item use, etc.
This PR is broken down into several commits, designed to be able to be cherry-picked if only some of these changes are favoured, or if some are approved more quickly than others. The mutations added are:
Save compatibility has been added. The first five of the above mutations I expect to be relatively uncontroversial. The biggest change is with the scales mutations, where I have refactored the racial AC code. I have added two new mutflags to deal with Dr dragon form and calculating racial AC; I hope this approach is acceptable but if not I can change things to use a more awkward setup. Individual commits go into more detail.
I would of course like feedback on the mutations.txt descriptions and the gain/loss flavour in mutation-data.h. Any other help is also welcome.