From f2bec3cbdf98876893d9562e88567a8fc50c7d76 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 6 Jul 2008 17:12:09 +0000 Subject: Fix two erroneous replacements with x_chance_in_y(). The rest were correct. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6429 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/it_use2.cc | 2 +- crawl-ref/source/religion.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index 3f6e8df4b3..5d7c6413e3 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -349,7 +349,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) case POT_CURE_MUTATION: mpr("It has a very clean taste."); for (int i = 0; i < 7; i++) - if (x_chance_in_y(i, 10)) + if (random2(10) > i) delete_mutation(RANDOM_MUTATION, false); break; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 094dc87a02..5685844599 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3446,7 +3446,7 @@ static bool _zin_retribution() // angels/creeping doom theme int punishment = random2(10); - // if little mutated or can't unmutate, do something else instead + // If little mutated or can't unmutate, do something else instead. if (punishment < 2 && (how_mutated() <= random2(3) || player_mutation_level(MUT_MUTATION_RESISTANCE) == 3)) @@ -3457,12 +3457,12 @@ static bool _zin_retribution() switch (punishment) { case 0: - case 1: // remove good mutations (20%) + case 1: // Remove good mutations. (20%) { simple_god_message(" draws some chaos from your body!", god); bool success = false; for (int i = 0; i < 7; ++i) - if (x_chance_in_y(i, 10) && delete_mutation(RANDOM_GOOD_MUTATION)) + if (random2(10) > i && delete_mutation(RANDOM_GOOD_MUTATION)) success = true; if (success && !how_mutated()) @@ -3475,7 +3475,7 @@ static bool _zin_retribution() } case 2: case 3: - case 4: // summon angels or bugs (pestilence) (30%) + case 4: // Summon angels or bugs (pestilence). (30%) if (random2(you.experience_level) > 7 && !one_chance_in(5)) { const int how_many = 1 + (you.experience_level / 10) + random2(3); -- cgit v1.2.3-54-g00ecf