summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-damage.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-06-14 12:27:42 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-06-14 12:27:42 +0100
commit2fbdc9b8aa11a89ac88aa1bbb054df123bfabc24 (patch)
tree2b534927361d27296112e8ac0e9dac30b181c97d /crawl-ref/source/spl-damage.cc
parent7a9398ca67e65dab3693e394ebc2dc77cee72c7b (diff)
downloadcrawl-ref-2fbdc9b8aa11a89ac88aa1bbb054df123bfabc24.tar.gz
crawl-ref-2fbdc9b8aa11a89ac88aa1bbb054df123bfabc24.zip
Don't let the Singing Sword scream while in a sanctuary
If you leave the sanctuary but a monster remains inside it somehow, it can still break the sanctuary that way.
Diffstat (limited to 'crawl-ref/source/spl-damage.cc')
-rw-r--r--crawl-ref/source/spl-damage.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc
index 6f5547c5e5..a6fae8f4e0 100644
--- a/crawl-ref/source/spl-damage.cc
+++ b/crawl-ref/source/spl-damage.cc
@@ -782,6 +782,9 @@ spret_type cast_los_attack_spell(spell_type spell, int pow, actor* agent,
// Screaming Sword
void sonic_damage(bool scream)
{
+ if (is_sanctuary(you.pos()))
+ return;
+
// First build the message.
counted_monster_list affected_monsters;
@@ -831,7 +834,7 @@ void sonic_damage(bool scream)
dprf("damage done: %d", hurt);
mi->hurt(&you, hurt);
- if (is_sanctuary(you.pos()) || is_sanctuary(mi->pos()))
+ if (is_sanctuary(mi->pos()))
remove_sanctuary(true);
}
}