summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-18 22:50:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-18 22:50:26 +0000
commit190bfa1c55dfc90851d5259f10ce6d7ff1485f86 (patch)
tree1213134dfdd881cf1482bcda1e4a8a6a6aa4f24c
parentf7c519b39389608cede7a87729d6527db87b756e (diff)
downloadcrawl-ref-190bfa1c55dfc90851d5259f10ce6d7ff1485f86.tar.gz
crawl-ref-190bfa1c55dfc90851d5259f10ce6d7ff1485f86.zip
And simplify Jiyva's curing of bad mutations.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10291 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/religion.cc25
1 files changed, 2 insertions, 23 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 032385ecd9..ba22cbb666 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -938,29 +938,8 @@ bool jiyva_remove_bad_mutation()
return (false);
}
- // delete_mutation(RANDOM_BAD_MUTATION) defaults to removing a
- // random mutation if the player has no bad mutations, so any newly
- // added bad mutations need to be included here.
-
- const mutation_type bad_muts[] = {
- MUT_HERBIVOROUS, MUT_CARNIVOROUS, MUT_FRAIL,
- MUT_SLOW_HEALING, MUT_FAST_METABOLISM, MUT_WEAK,
- MUT_DOPEY, MUT_CLUMSY, MUT_DEFORMED,
- MUT_TELEPORT, MUT_SCREAM, MUT_BERSERK,
- MUT_BLURRY_VISION, MUT_LOW_MAGIC, MUT_DETERIORATION
- };
-
- bool done = false;
-
- for (int tries = 0; !done && tries < 100; ++tries)
- {
- mutation_type mutat = RANDOM_ELEMENT(bad_muts);
-
- if (you.mutation[mutat] > 0)
- done = delete_mutation(mutat, true, false, true);
- }
-
- if (!done)
+ // Ensure that only bad mutations are removed.
+ if (!delete_mutation(RANDOM_BAD_MUTATION, false, false, true, true))
{
canned_msg(MSG_NOTHING_HAPPENS);
return (false);