summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.cc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-08-03 00:00:13 -0400
committerJesse Luehrs <doy@tozt.net>2014-08-03 00:02:37 -0400
commit9c2101feaf70c73fa1af6fd4a4c1680a560cccb1 (patch)
tree4052e59b30a60a39ae8e6a9dcea27b2f1f6a971d /crawl-ref/source/delay.cc
parent3bfcae4341b28a616fad02823f0487faa81e450c (diff)
downloadcrawl-ref-9c2101feaf70c73fa1af6fd4a4c1680a560cccb1.tar.gz
crawl-ref-9c2101feaf70c73fa1af6fd4a4c1680a560cccb1.zip
prompt for stasis in between swapping amulets too (8708)
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r--crawl-ref/source/delay.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index a6a10ccaf8..2cfe33d0f0 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -864,8 +864,31 @@ static void _finish_delay(const delay_queue_item &delay)
break;
case DELAY_JEWELLERY_ON:
+ {
+ const item_def &item = you.inv[delay.parm1];
+
+ // recheck stasis here, since our condition may have changed since
+ // starting the amulet swap process
+ // just breaking here is okay because swapping jewellery is a one-turn
+ // action, so conceptually there is nothing to interrupt - in other
+ // words, this is equivalent to if the user took off the previous
+ // amulet and was slowed before putting the amulet of stasis on as a
+ // separate action on the next turn
+ if (nasty_stasis(item, OPER_PUTON))
+ {
+ string prompt = "Really put on ";
+ prompt += item.name(DESC_INVENTORY);
+ prompt += string(" while ")
+ + (you.duration[DUR_TELEPORT] ? "about to teleport" :
+ you.duration[DUR_SLOW] ? "slowed" : "hasted");
+ prompt += "?";
+ if (!yesno(prompt.c_str(), false, 'n'))
+ break;
+ }
+
puton_ring(delay.parm1, false);
break;
+ }
case DELAY_ARMOUR_ON:
_armour_wear_effects(delay.parm1);