From 74ecb4ad57ac84d6e8471a6d6aa2ac1030ef0dcb Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 25 Nov 2008 16:03:36 +0000 Subject: 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 --- crawl-ref/source/acr.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/acr.cc') 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), -- cgit v1.2.3-54-g00ecf