From 884a020ab85f131212638b07913f9ec749c9ecb2 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 00:35:33 +0530 Subject: More call tide fixes: don't flash view if Ilsuiw is not in LOS, apply tide reset even if the player is not messaged about it. --- crawl-ref/source/dgn-shoals.cc | 13 ++++++++----- crawl-ref/source/mon-cast.cc | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index b91dc3a195..f48a146266 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -1116,12 +1116,15 @@ void shoals_apply_tides(int turns_elapsed, bool force) void shoals_release_tide(monsters *mons) { - if (player_in_branch(BRANCH_SHOALS) - && player_can_hear(you.pos())) + if (player_in_branch(BRANCH_SHOALS)) { - mprf(MSGCH_SOUND, "The tide is released from %s call.", - mons->name(DESC_NOCAP_YOUR, true).c_str()); - flash_view_delay(ETC_WATER, 150); + if (player_can_hear(mons->pos())) + { + mprf(MSGCH_SOUND, "The tide is released from %s call.", + mons->name(DESC_NOCAP_YOUR, true).c_str()); + if (you.see_cell(mons->pos())) + flash_view_delay(ETC_WATER, 150); + } shoals_apply_tides(0, true); } } diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 895466f322..fb9b5092d4 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1686,9 +1686,12 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER, tide_duration * 10)); monster->props[TIDE_CALL_TURN] = you.num_turns; - simple_monster_message(monster, - " sings a water chant to call the tide!"); - flash_view_delay(ETC_WATER, 300); + if (simple_monster_message( + monster, + " sings a water chant to call the tide!")) + { + flash_view_delay(ETC_WATER, 300); + } } return; -- cgit v1.2.3-54-g00ecf