summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-25 16:03:36 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-25 16:03:36 +0000
commit74ecb4ad57ac84d6e8471a6d6aa2ac1030ef0dcb (patch)
treebd739b6c2afd48a93568cf5f563c6bd0a049384e /crawl-ref/source/acr.cc
parent0afe4c455bf5a0358cf7f6688b413389a5080fcc (diff)
downloadcrawl-ref-74ecb4ad57ac84d6e8471a6d6aa2ac1030ef0dcb.tar.gz
crawl-ref-74ecb4ad57ac84d6e8471a6d6aa2ac1030ef0dcb.zip
Ditch baroque dgnevent veto mechanism in favour of marker-property-based veto, which is trivial to extend. Also fix turn loss when trying to use a toll portal without enough gold.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7611 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 613ea17f5a..bce6474961 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1678,6 +1678,11 @@ static bool _stairs_check_beheld()
return (false);
}
+static bool _marker_vetoes_stair()
+{
+ return marker_vetoes_operation("veto_stair");
+}
+
static void _go_downstairs();
static void _go_upstairs()
{
@@ -1713,6 +1718,9 @@ static void _go_upstairs()
if (!check_annotation_exclusion_warning())
return;
+ if (_marker_vetoes_stair())
+ return;
+
tag_followers(); // Only those beside us right now can follow.
start_delay( DELAY_ASCENDING_STAIRS,
1 + (you.burden_state > BS_UNENCUMBERED) );
@@ -1759,6 +1767,9 @@ static void _go_downstairs()
}
else
{
+ if (_marker_vetoes_stair())
+ return;
+
tag_followers(); // only those beside us right now can follow
start_delay( DELAY_DESCENDING_STAIRS,
1 + (you.burden_state > BS_UNENCUMBERED),