diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 19:10:36 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 19:10:36 +0000 |
commit | 0aff0188aadd0a8661abc5b2d2bd33d763243796 (patch) | |
tree | 7b82b7c741a72b0c896ac77110fd904feeebb782 /crawl-ref/source/xom.cc | |
parent | 498c31fefe581e3d2e7a6662223a8b37e1a66491 (diff) | |
download | crawl-ref-0aff0188aadd0a8661abc5b2d2bd33d763243796.tar.gz crawl-ref-0aff0188aadd0a8661abc5b2d2bd33d763243796.zip |
Simplify Xom's mutating the player.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6122 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 927ce9da47..3a737d2763 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -626,29 +626,30 @@ static bool _xom_is_good(int sever) else if (random2(sever) <= 8) { _xom_gives_item(sever); + done = true; } else if (random2(sever) <= 9) { - if (!you.can_safely_mutate() - || player_mutation_level(MUT_MUTATION_RESISTANCE) == 3) + if (you.can_safely_mutate() + && player_mutation_level(MUT_MUTATION_RESISTANCE) < 3) { - goto try_again; - } + god_speaks(GOD_XOM, _get_xom_speech("good mutations")); - god_speaks(GOD_XOM, _get_xom_speech("good mutations")); - mpr("Your body is suffused with distortional energy."); + mpr("Your body is suffused with distortional energy."); - set_hp(1 + random2(you.hp), false); - deflate_hp(you.hp_max / 2, true); + set_hp(1 + random2(you.hp), false); + deflate_hp(you.hp_max / 2, true); - bool failMsg = true; - for (int i = random2(4); i >= 0; --i) - { - if (mutate(RANDOM_GOOD_MUTATION, failMsg, false, true)) - done = true; - else - failMsg = false; + bool failMsg = true; + + for (int i = random2(4); i >= 0; --i) + { + if (mutate(RANDOM_GOOD_MUTATION, failMsg, false, true)) + done = true; + else + failMsg = false; + } } } else if (random2(sever) <= 10) @@ -768,25 +769,25 @@ static bool _xom_is_bad(int sever) } else if (random2(sever) <= 6) { - if (!you.can_safely_mutate() - || player_mutation_level(MUT_MUTATION_RESISTANCE) == 3) + if (you.can_safely_mutate() + && player_mutation_level(MUT_MUTATION_RESISTANCE) < 3) { - goto try_again; - } + god_speaks(GOD_XOM, _get_xom_speech("random mutations")); - god_speaks(GOD_XOM, _get_xom_speech("random mutations")); - mpr("Your body is suffused with distortional energy."); + mpr("Your body is suffused with distortional energy."); - set_hp(1 + random2(you.hp), false); - deflate_hp(you.hp_max / 2, true); + set_hp(1 + random2(you.hp), false); + deflate_hp(you.hp_max / 2, true); - bool failMsg = true; - for (int i = random2(4); i >= 0; --i) - { - if (mutate(RANDOM_XOM_MUTATION, failMsg, false, true)) - done = true; - else - failMsg = false; + bool failMsg = true; + + for (int i = random2(4); i >= 0; --i) + { + if (mutate(RANDOM_XOM_MUTATION, failMsg, false, true)) + done = true; + else + failMsg = false; + } } } else if (random2(sever) <= 7) |