diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-07 11:58:54 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-07 11:58:54 +0000 |
commit | 167ae03b160a0ccadd7934b2bfe557d491f1cb1f (patch) | |
tree | c1ee0ef626b416c5eee0f62082da72cb9f4137c3 /crawl-ref/source/misc.cc | |
parent | 33dc7cedd5a65d3bd1ce8eff9006e4517a3390dd (diff) | |
download | crawl-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/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 14f1e568d5..aa560a50d4 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1125,7 +1125,7 @@ static void maybe_bloodify_square(int x, int y, int amount, bool spatter = false if (!spatter && !allow_bleeding_on_square(x,y)) return; - if (amount > random2(20)) + if (x_chance_in_y(amount, 20)) { #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, @@ -1269,14 +1269,14 @@ void search_around( bool only_adjacent ) int effective = you.skills[SK_TRAPS_DOORS] / (2*dist - 1); if (grd[srx][sry] == DNGN_SECRET_DOOR - && random2(17) <= effective) + && x_chance_in_y(effective + 1, 17)) { mpr("You found a secret door!"); reveal_secret_door(srx, sry); exercise(SK_TRAPS_DOORS, (coinflip() ? 2 : 1)); } else if (grd[srx][sry] == DNGN_UNDISCOVERED_TRAP - && random2(17) <= effective) + && x_chance_in_y(effective + 1, 17)) { i = trap_at_xy(srx, sry); |