diff options
-rw-r--r-- | crawl-ref/source/itemname.cc | 17 | ||||
-rw-r--r-- | crawl-ref/source/mutation.cc | 30 | ||||
-rw-r--r-- | crawl-ref/source/mutation.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/potion.cc | 6 |
5 files changed, 18 insertions, 40 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 0b9033bb57..eeee364d57 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -3074,11 +3074,6 @@ bool is_bad_item(const item_def &item, bool temp) // Poison is not that bad if you're poison resistant. return player_res_poison(false) <= 0 || !temp && you.species == SP_VAMPIRE; - case POT_MUTATION: - // Not bad_item, just useless, for mummies, ghouls, and liches, - // as they can't even drink known mutation potions. - return temp && you.species == SP_VAMPIRE - && you.hunger_state < HS_SATIATED; default: return false; } @@ -3147,8 +3142,11 @@ bool is_dangerous_item(const item_def &item, bool temp) switch (item.sub_type) { case POT_MUTATION: + // Non-vampire undead can't be mutated. + return !you.is_undead + || you.is_undead == US_SEMI_UNDEAD; case POT_LIGNIFY: - // Only living characters can mutate or change form + // Only living characters can change form. return !you.is_undead || temp && you.species == SP_VAMPIRE && you.hunger_state >= HS_SATIATED; @@ -3353,14 +3351,9 @@ bool is_useless_item(const item_def &item, bool temp) case POT_GAIN_INTELLIGENCE: case POT_GAIN_DEXTERITY: #endif - if (you.species == SP_VAMPIRE) - { - return temp && you.hunger_state < HS_SATIATED - && item.sub_type != POT_BENEFICIAL_MUTATION; - } if (you.form == TRAN_LICH) return temp; - return you.is_undead; + return you.is_undead && you.is_undead != US_SEMI_UNDEAD; case POT_LIGNIFY: return you.is_undead diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 446733a3d9..13ef821a36 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -742,7 +742,7 @@ static void _display_vampire_attributes() string result; - const int lines = 14; + const int lines = 13; string column[lines][7] = { {" ", "<lightgreen>Alive</lightgreen> ", "<green>Full</green> ", @@ -769,9 +769,7 @@ static void _display_vampire_attributes() {"Torment resistance ", " ", " ", " ", " ", " ", " + "}, {"\n<w>Other effects</w>\n" - "Mutation chance ", "always ", "often ", "sometimes ", "never ", "never ", "never "}, - - {"Non-physical \n" + "Non-physical \n" "mutation effects ", "full ", "capped ", "capped ", "none ", "none ", "none "}, {"Bat Form ", "no ", "no ", "yes ", "yes ", "yes ", "yes "}, @@ -1484,23 +1482,11 @@ static const char* _stat_mut_desc(mutation_type mut, bool gain) return stat_desc(stat, positive ? SD_INCREASE : SD_DECREASE); } -bool undead_mutation_rot(bool is_beneficial_mutation) +// Undead can't be mutated, and fall apart instead. +// Vampires mutate as normal. +bool undead_mutation_rot() { - if (you.is_undead == US_SEMI_UNDEAD) - { - if (is_beneficial_mutation) - return false; - switch (you.hunger_state) - { - case HS_SATIATED: return !one_chance_in(3); - case HS_FULL: return coinflip(); - case HS_VERY_FULL: return one_chance_in(3); - case HS_ENGORGED: return false; - default: return true; - } - } - - return you.is_undead; + return you.is_undead && you.is_undead != US_SEMI_UNDEAD; } bool mutate(mutation_type which_mutation, const string &reason, bool failMsg, @@ -1560,7 +1546,7 @@ bool mutate(mutation_type which_mutation, const string &reason, bool failMsg, // Undead bodies don't mutate, they fall apart. -- bwr // except for demonspawn (or other permamutations) in lichform -- haranp - if (undead_mutation_rot(beneficial) && !demonspawn) + if (undead_mutation_rot() && !demonspawn) { if (no_rot) return false; @@ -1934,7 +1920,7 @@ bool delete_mutation(mutation_type which_mutation, const string &reason, } } - if (undead_mutation_rot(false)) + if (undead_mutation_rot()) return false; } diff --git a/crawl-ref/source/mutation.h b/crawl-ref/source/mutation.h index 20c52eb6ad..9b6e23b38e 100644 --- a/crawl-ref/source/mutation.h +++ b/crawl-ref/source/mutation.h @@ -64,7 +64,7 @@ void init_mut_index(); bool is_body_facet(mutation_type mut); const mutation_def& get_mutation_def(mutation_type mut); -bool undead_mutation_rot(bool is_beneficial_mutation); +bool undead_mutation_rot(); bool mutate(mutation_type which_mutation, const string &reason, bool failMsg = true, diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index b5ffa315a5..33187afb08 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7771,8 +7771,7 @@ bool player::can_safely_mutate() const return false; return !is_undead - || is_undead == US_SEMI_UNDEAD - && hunger_state == HS_ENGORGED; + || is_undead == US_SEMI_UNDEAD; } // Is the player too undead to bleed, rage, and polymorph? diff --git a/crawl-ref/source/potion.cc b/crawl-ref/source/potion.cc index 3bd7172b3a..0778598212 100644 --- a/crawl-ref/source/potion.cc +++ b/crawl-ref/source/potion.cc @@ -463,7 +463,7 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know break; case POT_CURE_MUTATION: - if (potion && was_known && undead_mutation_rot(true)) + if (potion && was_known && undead_mutation_rot()) { mpr(you.form == TRAN_LICH ? "You cannot mutate at present." : "You cannot mutate."); @@ -476,7 +476,7 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know break; case POT_MUTATION: - if (potion && was_known && undead_mutation_rot(true)) + if (potion && was_known && undead_mutation_rot()) { mpr(you.form == TRAN_LICH ? "You cannot mutate at present." : "You cannot mutate."); @@ -492,7 +492,7 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know break; case POT_BENEFICIAL_MUTATION: - if (undead_mutation_rot(true)) + if (undead_mutation_rot()) { if (potion && was_known) { |