Skip to content
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
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

NormalPerson7
Copy link
Contributor

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:

  • stasis (Fo)
  • digging (Fo)
  • almost no armour (Op)
  • no body armour (Dr)
  • poison immunity (also includes miasma and sickness immunity) (Gh, Mu, Gr, Dj)
  • tough serpentine skin (Na)
  • resilient stone body (Gr)
  • draconian scales (one for each colour of Dr)
  • draconian breaths (one for each colour of Dr except base)
  • amphibious (Op, Ba, grey Dr)

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.

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...
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant