From 672df2f6a49ff8683255e5bad316674d16285f0c Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 10 Nov 2009 14:34:37 +0100 Subject: Add conditional bloodifying function and use it in some places. This might help the reported blood-covered deep water, though I didn't see any obvious case that was a likely cause. --- crawl-ref/source/effects.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index cc50b7c8c3..c3be41fa8b 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -3271,17 +3271,14 @@ void change_labyrinth(bool msg) if (feat_is_wall(grd(*ai)) && one_chance_in(++wall_count)) old_adj = *ai; - if (old_adj != c && !is_bloodcovered(old_adj)) - { - env.pgrid(old_adj) |= FPROP_BLOODY; + if (old_adj != c && maybe_bloodify_square(old_adj)) env.pgrid(c) &= (~FPROP_BLOODY); - } } } else if (one_chance_in(500)) { // Rarely add blood randomly, accumulating with time... - env.pgrid(c) |= FPROP_BLOODY; + maybe_bloodify_square(c); } // Rather than use old_grid directly, replace with an adjacent @@ -3323,17 +3320,14 @@ void change_labyrinth(bool msg) if (_is_floor(grd(*ai)) && one_chance_in(++floor_count)) new_adj = *ai; - if (new_adj != p && !is_bloodcovered(new_adj)) - { - env.pgrid(new_adj) |= FPROP_BLOODY; + if (new_adj != p && maybe_bloodify_square(new_adj)) env.pgrid(p) &= (~FPROP_BLOODY); - } } } else if (one_chance_in(100)) { // Occasionally add blood randomly, accumulating with time... - env.pgrid(p) |= FPROP_BLOODY; + maybe_bloodify_square(p); } } -- cgit v1.2.3-54-g00ecf