summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fprop.cc
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-17 11:28:50 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2010-01-17 11:28:50 +0530
commit8d1fa5916d012588e2eaa62fcdcc62768dcb86e1 (patch)
tree2767c7dc72667e8ce9197dae92382a5043642a5b /crawl-ref/source/fprop.cc
parentc4246fc216beca0282bf281274a3756a10086f87 (diff)
downloadcrawl-ref-8d1fa5916d012588e2eaa62fcdcc62768dcb86e1.tar.gz
crawl-ref-8d1fa5916d012588e2eaa62fcdcc62768dcb86e1.zip
Add FPROP_NO_TIDE to tell the tide not to touch certain squares.
Wizmode &( now accepts fprop names to set the fprop on the current square.
Diffstat (limited to 'crawl-ref/source/fprop.cc')
-rw-r--r--crawl-ref/source/fprop.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/fprop.cc b/crawl-ref/source/fprop.cc
index 5ab09c5279..de4f5e2dde 100644
--- a/crawl-ref/source/fprop.cc
+++ b/crawl-ref/source/fprop.cc
@@ -24,7 +24,12 @@ bool is_bloodcovered(const coord_def& p)
return (testbits(env.pgrid(p), FPROP_BLOODY));
}
-int str_to_fprop ( const std::string &str)
+bool is_tide_immune(const coord_def &p)
+{
+ return (env.pgrid(p) & FPROP_NO_TIDE);
+}
+
+feature_property_type str_to_fprop(const std::string &str)
{
if (str == "bloody")
return (FPROP_BLOODY);
@@ -36,8 +41,8 @@ int str_to_fprop ( const std::string &str)
return (FPROP_NO_CTELE_INTO);
if (str == "no_tele_into")
return (FPROP_NO_TELE_INTO);
+ if (str == "no_tide")
+ return (FPROP_NO_TIDE);
return (FPROP_NONE);
}
-
-