diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-15 18:40:14 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-15 18:40:14 +0000 |
commit | 400f2b68e5b68aae60af8465a9f5a5f07b05e714 (patch) | |
tree | bc7507cc7a8cfa5351e4569f4eb1b6236778e16d /crawl-ref/source/effects.cc | |
parent | 2b03b7a4abe79bb22c4419bce69c7135bb1f0d2b (diff) | |
download | crawl-ref-400f2b68e5b68aae60af8465a9f5a5f07b05e714.tar.gz crawl-ref-400f2b68e5b68aae60af8465a9f5a5f07b05e714.zip |
Allow vampires to mutate when Satiated or higher, and make non-physical
mutations only apply at these hunger levels, too.
Differentiated mutations into physical (affecting a character's
appearance and stuff: scales, hooves, wings, ...) and internal
(resistances etc.). I guess this is what people usually refer to as
"cosmetic", which I think is an inaccurate description since it makes
it sound like they were completely superficial and had no real effect.
Here's a list of arbitrarily chosen "physical" mutations:
* tough skin, all scales, and fur
* strong/clever/agile, and weak/dopey/clumsy
* deformed
* strong but stiff, and flexible but weak
* frail, and robust
* claws, fangs, hooves, talons, and horns
* stinger, wings
* blue/green marks
Mutations currently not applying are still listed on the 'A' screen,
though in darkgrey and in (brackets).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4246 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index dfb511fa63..c93291bf89 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -815,7 +815,7 @@ static int find_acquirement_subtype(object_class_type class_wanted, // about special cases for carnivorous races (e.g. kobolds) type_wanted = FOOD_MEAT_RATION; - if (you.mutation[MUT_HERBIVOROUS]) + if (player_mutation_level(MUT_HERBIVOROUS)) type_wanted = FOOD_BREAD_RATION; // If we have some regular rations, then we're probably more @@ -1022,6 +1022,8 @@ static int find_acquirement_subtype(object_class_type class_wanted, // Do this here, before acquirement()'s call to can_wear_armour(), // so that caps will be just as common as helmets for those // that can't wear helmets. + // We could use player_mutation_level for the horns, but let's just + // check for the mutation directly to avoid acquirement fiddles. if (type_wanted == ARM_HELMET && ((you.species >= SP_OGRE && you.species <= SP_OGRE_MAGE) || player_genus(GENPC_DRACONIAN) @@ -2284,7 +2286,9 @@ static void rot_inventory_food(long time_delta) if (player_can_smell() && you.species != SP_TROLL) { int temp_rand = 0; // Grr. - int level = (you.species == SP_VAMPIRE) ? 1 : you.mutation[MUT_SAPROVOROUS]; + int level = player_mutation_level(MUT_SAPROVOROUS); + if (!level && you.species == SP_VAMPIRE) + level = 1; switch (level) { @@ -2388,8 +2392,8 @@ void handle_time( long time_delta ) } // Adjust the player's stats if s/he has the deterioration mutation - if (you.mutation[MUT_DETERIORATION] - && random2(200) <= you.mutation[MUT_DETERIORATION] * 5 - 2) + if (player_mutation_level(MUT_DETERIORATION) + && random2(200) <= player_mutation_level(MUT_DETERIORATION) * 5 - 2) { lose_stat(STAT_RANDOM, 1, false, "deterioration mutation"); } @@ -2568,8 +2572,8 @@ void handle_time( long time_delta ) // jmf: moved huge thing to religion.cc handle_god_time(); - if (you.mutation[MUT_SCREAM] - && (random2(100) <= 2 + you.mutation[MUT_SCREAM] * 3) ) + if (player_mutation_level(MUT_SCREAM) + && (random2(100) <= 2 + player_mutation_level(MUT_SCREAM) * 3) ) { yell(true); } |