From 400f2b68e5b68aae60af8465a9f5a5f07b05e714 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 15 Apr 2008 18:40:14 +0000 Subject: 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 --- crawl-ref/source/it_use2.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/it_use2.cc') diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index f9914847e3..3245babafb 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -96,7 +96,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) mpr("Yummy - fresh blood!"); else // coagulated mpr("This tastes delicious!"); - + lessen_hunger(1000, true); // healing depends on hunger @@ -116,7 +116,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) } else { - if (you.omnivorous() || you.mutation[MUT_CARNIVOROUS]) + if (you.omnivorous() || player_mutation_level(MUT_CARNIVOROUS)) { // Likes it mpr("This tastes like blood."); @@ -125,7 +125,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) else { mpr("Blech - this tastes like blood!"); - if (!you.mutation[MUT_HERBIVOROUS] && one_chance_in(3)) + if (!player_mutation_level(MUT_HERBIVOROUS) && one_chance_in(3)) lessen_hunger(100, true); else { @@ -144,7 +144,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) case POT_MIGHT: { const bool were_mighty = (you.duration[DUR_MIGHT] > 0); - + mprf(MSGCH_DURATION, "You feel %s all of a sudden.", were_mighty ? "mightier" : "very mighty"); @@ -155,7 +155,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) // conceivable max gain of +184 {dlb} you.duration[DUR_MIGHT] += (35 + random2(pow)) / factor; - + // files.cc permits values up to 215, but ... {dlb} if (you.duration[DUR_MIGHT] > 80) you.duration[DUR_MIGHT] = 80; @@ -206,7 +206,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) mprf("That liquid tasted %s nasty...", (pot_eff == POT_POISON) ? "very" : "extremely" ); - poison_player( ((pot_eff == POT_POISON) ? 1 + random2avg(5, 2) + poison_player( ((pot_eff == POT_POISON) ? 1 + random2avg(5, 2) : 3 + random2avg(13, 2)) ); xom_is_stimulated(128); } @@ -247,7 +247,8 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) break; case POT_PORRIDGE: // oatmeal - always gluggy white/grey? - if (you.species == SP_VAMPIRE || you.mutation[MUT_CARNIVOROUS] == 3) + if (you.species == SP_VAMPIRE + || player_mutation_level(MUT_CARNIVOROUS) == 3) { mpr("Blech - that potion was really gluggy!"); } @@ -353,19 +354,19 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) mpr("You feel extremely strange."); for (int i = 0; i < 3; i++) mutate(RANDOM_MUTATION, false); - + learned_something_new(TUT_YOU_MUTATED); did_god_conduct(DID_DELIBERATE_MUTATING, 10, was_known); did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known); break; - + case POT_RESISTANCE: mpr("You feel protected."); you.duration[DUR_RESIST_FIRE] += (random2(pow) + 10) / factor; you.duration[DUR_RESIST_COLD] += (random2(pow) + 10) / factor; you.duration[DUR_RESIST_POISON] += (random2(pow) + 10) / factor; you.duration[DUR_INSULATION] += (random2(pow) + 10) / factor; - + // Just one point of contamination. These potions are really rare, // and contamination is nastier. contaminate_player(1, was_known); @@ -384,7 +385,7 @@ bool unwield_item(bool showMsgs) const int unw = you.equip[EQ_WEAPON]; if ( unw == -1 ) return (false); - + if (!safe_to_remove_or_wear(you.inv[unw], true)) return (false); -- cgit v1.2.3-54-g00ecf