summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mutation.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2011-12-13 02:47:06 -0500
committerNeil Moore <neil@s-z.org>2011-12-13 03:23:19 -0500
commit9d84733e4588e31770fd317cef1001674299ae87 (patch)
treec8f70b11558d5ea2247a9872a7bef09a01fbd5e1 /crawl-ref/source/mutation.h
parent1243efd587a54459686681c4b70fd808c30360fc (diff)
downloadcrawl-ref-9d84733e4588e31770fd317cef1001674299ae87.tar.gz
crawl-ref-9d84733e4588e31770fd317cef1001674299ae87.zip
Further clean up form/mutation interactions.
Mutations have a new flag, form_based, that indicates whether they depend on the player's form (and are thus suppressed by most forms). Antennae, stinger, big wings, eyeballs, acidic bite, deformed, speed, and slowness are made form-based. For consistency, yellow draconian rAcid now applies in statue form. mutation_is_fully_active() becomes mutation_activity_level(). Any special-case code for mutation-form interactions should go here if possible. player_mutation_level() returns the current active level, unless false is passed as the optional second parameter, in which case it returns the true mutation level ignoring forms and vampire thirst. In the mutation display screen ('A'), mutations are marked with "(( ))" when fully suppressed and "( )" when partially suppressed; different colours are also used (as before, except now non-innate partially suppressed mutations are coloured brown rather than lightgrey). Form-based mutations are marked with a '*', and (for vampires only) non-physical mutations with a '+'. In the status screen ('%'), fully disabled mutations are surrounded with parentheses. Fake mutations still need work; currently only yellow draconian rAcid and Naga/Draconian AC show the effects of forms.
Diffstat (limited to 'crawl-ref/source/mutation.h')
-rw-r--r--crawl-ref/source/mutation.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/crawl-ref/source/mutation.h b/crawl-ref/source/mutation.h
index 0090e43366..129732741f 100644
--- a/crawl-ref/source/mutation.h
+++ b/crawl-ref/source/mutation.h
@@ -11,6 +11,13 @@
class formatted_string;
+enum mutation_activity_type
+{
+ MUTACT_INACTIVE,
+ MUTACT_PARTIAL,
+ MUTACT_FULL,
+};
+
struct body_facet_def
{
equipment_type eq;
@@ -38,18 +45,19 @@ struct demon_mutation_info
struct mutation_def
{
mutation_type mutation;
- short rarity; // Rarity of the mutation.
- short levels; // The number of levels of the mutation.
- bool bad; // A mutation that's more bad than good. Xom uses
- // this to decide which mutations to hand out as
- // rewards.
- bool physical; // A mutation affecting a character's outward
- // appearance.
- const char* short_desc;// What appears on the '%' screen.
- const char* have[3]; // What appears on the 'A' screen.
- const char* gain[3]; // Message when you gain the mutation.
- const char* lose[3]; // Message when you lose the mutation.
- const char* wizname; // For gaining it in wizmode.
+ short rarity; // Rarity of the mutation.
+ short levels; // The number of levels of the mutation.
+ bool bad; // A mutation that's more bad than good. Xom uses
+ // this to decide which mutations to hand out as
+ // rewards.
+ bool physical; // A mutation affecting a character's outward
+ // appearance; active for thirsty semi-undead.
+ bool form_based; // A mutation that is suppressed when shapechanged.
+ const char* short_desc; // What appears on the '%' screen.
+ const char* have[3]; // What appears on the 'A' screen.
+ const char* gain[3]; // Message when you gain the mutation.
+ const char* lose[3]; // Message when you lose the mutation.
+ const char* wizname; // For gaining it in wizmode.
};
void init_mut_index();
@@ -72,7 +80,7 @@ inline bool give_bad_mutation(bool failMsg = true, bool force_mutation = false)
}
void display_mutations();
-bool mutation_is_fully_active(mutation_type mut);
+mutation_activity_type mutation_activity_level(mutation_type mut);
formatted_string describe_mutations();
bool delete_mutation(mutation_type which_mutation, bool failMsg = true,