diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-26 15:43:29 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-26 15:43:29 +0000 |
commit | 13d0f16c1a40183c0561bd1ca6d5ac645788cd30 (patch) | |
tree | ddb54cd5a46f47afb5a4a0428bc040dbaac99805 /crawl-ref/source/misc.cc | |
parent | 265597e3aacbd17cb2ea57610209fccadf5e6ee5 (diff) | |
download | crawl-ref-13d0f16c1a40183c0561bd1ca6d5ac645788cd30.tar.gz crawl-ref-13d0f16c1a40183c0561bd1ca6d5ac645788cd30.zip |
Add blood and glass to labyrinths.
In ASCII wizard mode these features are highlighted in the level map
(&{) and can then easily be reached via xm (normal map), but only until the
first shift takes place. Feedback welcome!
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7637 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 43b9951ba1..7e4dd3fdd0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1127,8 +1127,9 @@ static bool allow_bleeding_on_square(const coord_def& where) return (true); } -static void maybe_bloodify_square(const coord_def& where, int amount, - bool spatter = false) +static void _maybe_bloodify_square(const coord_def& where, int amount, + bool spatter = false, + bool smell_alert = true) { if (amount < 1) return; @@ -1146,22 +1147,25 @@ static void maybe_bloodify_square(const coord_def& where, int amount, if (allow_bleeding_on_square(where)) env.map(where).property |= FPROP_BLOODY; - // If old or new blood on square, the smell reaches further. - if (testbits(env.map(where).property, FPROP_BLOODY)) - blood_smell(12, where); - else // Still allow a lingering smell. - blood_smell(7, where); + if (smell_alert) + { + // If old or new blood on square, the smell reaches further. + if (testbits(env.map(where).property, FPROP_BLOODY)) + blood_smell(12, where); + else // Still allow a lingering smell. + blood_smell(7, where); + } if (spatter) { // Smaller chance of spattering surrounding squares. - for ( adjacent_iterator ai(where); ai; ++ai ) + for (adjacent_iterator ai(where); ai; ++ai) { // Spattering onto walls etc. less likely. if (grd(*ai) < DNGN_MINMOVE && !one_chance_in(3)) continue; - maybe_bloodify_square(*ai, amount/15); + _maybe_bloodify_square(*ai, amount/15); } } } @@ -1171,18 +1175,18 @@ static void maybe_bloodify_square(const coord_def& where, int amount, // "damage" depends on damage taken (or hitpoints, if damage higher), // or, for sacrifices, on the number of chunks possible to get out of a corpse. void bleed_onto_floor(const coord_def& where, int montype, - int damage, bool spatter) + int damage, bool spatter, bool smell_alert) { ASSERT(in_bounds(where)); if (!victim_can_bleed(montype)) return; - maybe_bloodify_square(where, damage, spatter); + _maybe_bloodify_square(where, damage, spatter, smell_alert); } static void _spatter_neighbours(const coord_def& where, int chance) { - for ( adjacent_iterator ai(where, false); ai; ++ai ) + for (adjacent_iterator ai(where, false); ai; ++ai) { if (!allow_bleeding_on_square(*ai)) continue; @@ -2477,7 +2481,7 @@ void new_level(void) } else take_note(Note(NOTE_DUNGEON_LEVEL_CHANGE)); - + print_stats_level(); #ifdef DGL_WHEREIS whereis_record(); |