summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 11:58:54 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 11:58:54 +0000
commit167ae03b160a0ccadd7934b2bfe557d491f1cb1f (patch)
treec1ee0ef626b416c5eee0f62082da72cb9f4137c3 /crawl-ref/source/acr.cc
parent33dc7cedd5a65d3bd1ce8eff9006e4517a3390dd (diff)
downloadcrawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.tar.gz
crawl-ref-167ae03b160a0ccadd7934b2bfe557d491f1cb1f.zip
Another clean up, and add some new weapon speech.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 80e55b8fc9..2e7a26b559 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2851,7 +2851,7 @@ static void _decrement_durations()
// Note the beauty of Trog! They get an extra save that's at
// the very least 20% and goes up to 100%.
- if (you.religion == GOD_TROG && you.piety > random2(150)
+ if (you.religion == GOD_TROG && x_chance_in_y(you.piety, 150)
&& !player_under_penance())
{
mpr("Trog's vigour flows through your veins.");
@@ -2949,7 +2949,7 @@ static void _decrement_durations()
// to even start rotting right now, but that could be changed. -- bwr
if (you.species == SP_MUMMY)
you.rotting = 0;
- else if (random2(20) <= (you.rotting - 1))
+ else if (x_chance_in_y(you.rotting, 20))
{
mpr("You feel your flesh rotting away.", MSGCH_WARN);
ouch(1, 0, KILLED_BY_ROTTING);
@@ -2980,7 +2980,7 @@ static void _decrement_durations()
if (you.duration[DUR_POISONING] > 0)
{
- if (random2(5) <= (you.duration[DUR_POISONING] - 1))
+ if (x_chance_in_y(you.duration[DUR_POISONING], 5))
{
if (you.duration[DUR_POISONING] > 10 && random2(you.duration[DUR_POISONING]) >= 8)
{
@@ -3096,15 +3096,15 @@ static void _world_reacts()
run_environment_effects();
- if ( !you.cannot_act() && !player_mutation_level(MUT_BLURRY_VISION)
- && random2(50) < you.skills[SK_TRAPS_DOORS] )
+ if (!you.cannot_act() && !player_mutation_level(MUT_BLURRY_VISION)
+ && x_chance_in_y(you.skills[SK_TRAPS_DOORS], 50))
{
- search_around(false); // check nonadjacent squares too
+ search_around(false); // Check nonadjacent squares too.
}
stealth = check_stealth();
-#if 0
+#ifdef DEBUG_STEALTH
// Too annoying for regular diagnostics.
mprf(MSGCH_DIAGNOSTICS, "stealth: %d", stealth );
#endif