summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-08-03 19:33:50 -0400
committerNeil Moore <neil@s-z.org>2014-08-03 19:34:15 -0400
commitf68c32e264f3f32ed30a177f0118c6134391cffe (patch)
treeace55598d1e98a6ce89e40f06c123cee1fffa461 /crawl-ref/source/travel.cc
parent9858ce8f8c97380418f4b12eb725e7a9b81d5e3d (diff)
downloadcrawl-ref-f68c32e264f3f32ed30a177f0118c6134391cffe.tar.gz
crawl-ref-f68c32e264f3f32ed30a177f0118c6134391cffe.zip
Allow autosacrifice on altars and when silenced (minmay)
In the former case, without displaying the normal altar prompts.
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 5a53ebf797..4fc4564afa 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -908,13 +908,6 @@ void explore_pickup_event(int did_pickup, int tried_pickup)
}
}
-static bool _can_sacrifice(const coord_def p)
-{
- const dungeon_feature_type feat = grd(p);
- return !you.cannot_speak()
- && (!feat_is_altar(feat) || feat_is_player_altar(feat));
-}
-
static bool _sacrificeable_at(const coord_def& p)
{
for (stack_iterator si(p, true); si; ++si)
@@ -1040,7 +1033,7 @@ command_type travel()
if ((stack && _prompt_stop_explore(ES_GREEDY_VISITED_ITEM_STACK)
|| sacrificeable && _prompt_stop_explore(ES_GREEDY_SACRIFICEABLE))
&& (Options.auto_sacrifice != AS_YES || !sacrificeable
- || stack || !_can_sacrifice(newpos)))
+ || stack))
{
explore_stopped_pos = newpos;
stop_running();
@@ -3035,7 +3028,7 @@ void start_explore(bool grab_items)
&& (Options.auto_sacrifice == AS_YES
|| Options.auto_sacrifice == AS_BEFORE_EXPLORE)))
{
- pray();
+ pray(false);
}
}
@@ -3059,10 +3052,9 @@ void start_explore(bool grab_items)
if ((Options.auto_sacrifice == AS_YES
|| Options.auto_sacrifice == AS_BEFORE_EXPLORE
|| Options.auto_sacrifice == AS_PROMPT
- && yesno("Do you want to sacrifice the items here? ", true, 'n'))
- && _can_sacrifice(you.pos()))
+ && yesno("Do you want to sacrifice the items here? ", true, 'n')))
{
- pray();
+ pray(false);
}
else if (Options.auto_sacrifice == AS_PROMPT_IGNORE)
{