summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_view.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-28 16:26:04 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:26 -0600
commitc68c42023e7301a23d34887e07594932b1bc4bb5 (patch)
treec8c0ca68f21fb370e476d663014a0975ecd24f8e /crawl-ref/source/l_view.cc
parent2d10356caffcc075cc8e348548a8fb60391a5ba0 (diff)
downloadcrawl-ref-c68c42023e7301a23d34887e07594932b1bc4bb5.tar.gz
crawl-ref-c68c42023e7301a23d34887e07594932b1bc4bb5.zip
Let clua view.is_safe_square interact correctly with Qazlal displacement.
Fixes tab behaviour with Qazlal.
Diffstat (limited to 'crawl-ref/source/l_view.cc')
-rw-r--r--crawl-ref/source/l_view.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/l_view.cc b/crawl-ref/source/l_view.cc
index ca17326917..0cff434745 100644
--- a/crawl-ref/source/l_view.cc
+++ b/crawl-ref/source/l_view.cc
@@ -13,6 +13,7 @@
#include "env.h"
#include "libutil.h"
#include "player.h"
+#include "religion.h"
#include "terrain.h"
#include "cloud.h"
#include "travel.h"
@@ -35,7 +36,12 @@ LUAFN(view_is_safe_square)
if (!map_bounds(p))
return 1;
cloud_type c = env.map_knowledge(p).cloud();
- if (c != CLOUD_NONE && is_damaging_cloud(c, true))
+ if (c != CLOUD_NONE
+ && is_damaging_cloud(c, true)
+ && (!you_worship(GOD_QAZLAL)
+ || !YOU_KILL(env.map_knowledge(p).cloudinfo()->killer)
+ || adjacent(p, you.pos())
+ && env.map_knowledge(you.pos()).cloud() != CLOUD_NONE))
{
PLUARET(boolean, false);
return 1;