From feac43075f424f624b6f4d75fc25c1edf52a5950 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 9 Nov 2006 15:14:37 +0000 Subject: [1593356] Fixed ghouls mutating. Fixed old b26 bug where the undead would decompose from mutation only when wearing an amulet of resist mutation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@375 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mutation.cc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index cfdf3e59ed..7e7122147b 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1126,8 +1126,17 @@ bool mutate(int which_mutation, bool failMsg) { int mutat = which_mutation; bool force_mutation = false; // is mutation forced? + bool demonspawn = false; // demonspawn mutation? int i; + if (which_mutation >= 2000) + { + demonspawn = true; + force_mutation = true; + mutat -= 2000; + which_mutation -= 2000; + } + if (which_mutation >= 1000) // must give mutation without failure { force_mutation = true; @@ -1137,9 +1146,10 @@ bool mutate(int which_mutation, bool failMsg) // Undead bodies don't mutate, they fall apart. -- bwr // except for demonspawn in lichform -- haranp - if (you.is_undead && !force_mutation) + if (you.is_undead && !demonspawn) { - if (wearing_amulet(AMU_RESIST_MUTATION) && coinflip()) + if ((!wearing_amulet(AMU_RESIST_MUTATION) && coinflip()) + || one_chance_in(10)) { mpr( "Your body decomposes!" ); @@ -2173,13 +2183,13 @@ bool perma_mutate(int which_mut, char how_much) { char levels = 0; - if (mutate(which_mut + 1000)) + if (mutate(which_mut + 2000)) levels++; - if (how_much >= 2 && mutate(which_mut + 1000)) + if (how_much >= 2 && mutate(which_mut + 2000)) levels++; - if (how_much >= 3 && mutate(which_mut + 1000)) + if (how_much >= 3 && mutate(which_mut + 2000)) levels++; you.demon_pow[which_mut] = levels; -- cgit v1.2.3-54-g00ecf