diff options
-rw-r--r-- | crawl-ref/docs/crawl_options.txt | 16 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 32 |
3 files changed, 41 insertions, 9 deletions
diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt index 4270556da8..ddb574ac42 100644 --- a/crawl-ref/docs/crawl_options.txt +++ b/crawl-ref/docs/crawl_options.txt @@ -711,9 +711,12 @@ stash_tracking = (all | explicit | dropped) want it to keep track of. You do that by stepping onto the square containing your stash of goodies and hitting Ctrl+S. The game will now keep track of what's on the square, when you add and remove stuff from - your stash. If you remove everything from that square, the game will - stop tracking the square altogether. You can also erase a stash square - with Ctrl-E. + your stash. You can also inscribe an item with "=s" to automatically + mark a square as a stash whenever that item is dropped. If you + remove everything from that square, the game will stop tracking + the square altogether. You can also erase a stash square with + Ctrl-E. Explicitly marked stashes will never be sacrificed by a + Nemelex Xobeh worshipper. When stash_tracking is set to 'dropped', any square where you drop something becomes a stash, and the game keeps track of all such @@ -1112,7 +1115,12 @@ functional, namely all containing one of the following !w -- before wielding this item, Crawl will ask for confirmation !* -- any action with this item causes a prompt !p -- Nemelex Xobeh worshippers will be prompted before - sacrificing this item at the portable altar + sacrificing a stack of items containing an item with this + inscription; if the answer is "no", the whole stack will be + skipped, and none of the items sacrificed. + =p -- Nemelex Xobeh worshippers will be prompted before + sacrificing this particular item; if the answer is "no", + then Crawl will go on to sacrifice further items in the stack. =g -- item will be picked up automatically if autopickup is on =k -- item will be ignored in all listings on the ground (it can still be picked up if it's the only item on the ground) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 7ec5fd1ea5..169a83af6f 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -3949,7 +3949,7 @@ static std::string religion_help( god_type god ) case GOD_NEMELEX_XOBEH: result += "You can pray to sacrifice all items on your square. " - "Inscribe items with !p or !* to avoid sacrificing " + "Inscribe items with !p, !* or =p to avoid sacrificing " "them accidentally."; break; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index b3d48ea41b..76371d0065 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -67,6 +67,7 @@ #include "spl-book.h" #include "spl-cast.h" #include "spl-util.h" +#include "stash.h" #include "state.h" #include "stuff.h" #include "terrain.h" @@ -742,6 +743,13 @@ static bool is_risky_sacrifice(const item_def& item) static bool confirm_pray_sacrifice() { + if (Options.stash_tracking == STM_EXPLICIT + && is_stash(you.x_pos, you.y_pos)) + { + mpr("You can't sacrifice explictly marked stashes."); + return false; + } + for ( int i = igrd[you.x_pos][you.y_pos]; i != NON_ITEM; i = mitm[i].link ) { @@ -749,9 +757,9 @@ static bool confirm_pray_sacrifice() if ( is_risky_sacrifice(item) || has_warning_inscription(item, OPER_PRAY) ) { - std::string prompt = "Really sacrifice "; + std::string prompt = "Really sacrifice stack with "; prompt += item.name(DESC_NOCAP_A); - prompt += '?'; + prompt += " in it?"; if ( !yesno(prompt.c_str(), false, 'n') ) return false; } @@ -2837,8 +2845,10 @@ void offer_items() int i = igrd[you.x_pos][you.y_pos]; while (i != NON_ITEM) { - const int next = mitm[i].link; // in case we can't get it later. - const int value = item_value( mitm[i], true ); + item_def &item(mitm[i]); + const int next = item.link; // in case we can't get it later. + const int value = item_value( item, true ); + if (!god_likes_item(you.religion, mitm[i])) { @@ -2855,6 +2865,20 @@ void offer_items() switch (you.religion) { case GOD_NEMELEX_XOBEH: + if ( is_risky_sacrifice(item) || + item.inscription.find("=p") != std::string::npos) + { + std::string msg = "Really sacrifice "; + msg += item.name(DESC_NOCAP_A); + msg += "?"; + + if (!yesno(msg.c_str())) + { + i = next; + continue; + } + } + you.sacrifice_value[mitm[i].base_type] += value; if (you.attribute[ATTR_CARD_COUNTDOWN] && random2(800) < value) { |