diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-09 15:14:37 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-09 15:14:37 +0000 |
commit | feac43075f424f624b6f4d75fc25c1edf52a5950 (patch) | |
tree | 2baf04f153eb4a7bf886d5b8d946112eb3e682cb | |
parent | d8a4d57ac093cd8f677a7808f03fb190349b6b33 (diff) | |
download | crawl-ref-feac43075f424f624b6f4d75fc25c1edf52a5950.tar.gz crawl-ref-feac43075f424f624b6f4d75fc25c1edf52a5950.zip |
[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
-rw-r--r-- | crawl-ref/source/mutation.cc | 20 |
1 files 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; |