diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-03 13:41:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-03 13:41:30 +0000 |
commit | 22e5db9d1ec1a8119185f3806387519195497b1c (patch) | |
tree | 17b15cfe34c5bf87882721b9e74cd3918378380f /crawl-ref/source/delay.cc | |
parent | f553db7a4eb41ef94962728d8520bb5652a46751 (diff) | |
download | crawl-ref-22e5db9d1ec1a8119185f3806387519195497b1c.tar.gz crawl-ref-22e5db9d1ec1a8119185f3806387519195497b1c.zip |
Implementing patch 1772497 (improvement to runrest.lua by
zelgadis).
Also added notes for getting penance, and small fix (patch
1786893 by dolorous).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2047 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index d83e93118b..1638195697 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -995,9 +995,36 @@ inline static void monster_warning(activity_interrupt_type ai, #ifndef DEBUG_DIAGNOSTICS if (at.context != "uncharm") { - std::string text = get_monster_desc(mon, false); - text += " comes into view."; - print_formatted_paragraph(text, get_number_of_cols(), MSGCH_WARN); + // Only say "comes into view" if the monster wasn't in view + // during the previous turn. + if (testbits(mon->flags, MF_WAS_IN_VIEW)) + { + switch(random2(4)) + { + case 0: + mprf(MSGCH_WARN, "%s's nearness makes you nervous.", + mon->name(DESC_CAP_THE).c_str()); + break; + case 1: + mprf(MSGCH_WARN, "%s is too close now for your liking.", + mon->name(DESC_CAP_THE).c_str()); + break; + case 2: + mprf(MSGCH_WARN, "You feel that %s is too close now for comfort.", + mon->name(DESC_NOCAP_THE).c_str()); + break; + default: + mprf(MSGCH_WARN, "%s's presence makes you stop your activity.", + mon->name(DESC_CAP_THE).c_str()); + break; + } + } + else + { + std::string text = get_monster_desc(mon, false); + text += " comes into view."; + print_formatted_paragraph(text, get_number_of_cols(), MSGCH_WARN); + } } if (Options.tutorial_left) |