From 167ae03b160a0ccadd7934b2bfe557d491f1cb1f Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 7 Jul 2008 11:58:54 +0000 Subject: 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 --- crawl-ref/source/misc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/misc.cc') 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); -- cgit v1.2.3-54-g00ecf