summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-07-25 21:48:12 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-07-25 21:50:26 -0700
commitf054a6457fa0f54580893607c794b7356a9fa5f8 (patch)
treeabab95239f37583619af1e92a7926403f4848cd4 /crawl-ref/source/player.cc
parenta02710520930951c3f3b6685483d157d3b32bfcb (diff)
downloadcrawl-ref-f054a6457fa0f54580893607c794b7356a9fa5f8.tar.gz
crawl-ref-f054a6457fa0f54580893607c794b7356a9fa5f8.zip
Make torpor snail slow end immediately after LOS is broken
Or after they die, etc. Also no longer require the torpor snail to be visible, thus preventing powerful /invis secret tech. rip :(
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 43773c3f6a..ad50d699d2 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -54,6 +54,7 @@
#include "melee_attack.h"
#include "message.h"
#include "misc.h"
+#include "mon-abil.h"
#include "mon-death.h"
#include "mon-place.h"
#include "mon-util.h"
@@ -5286,12 +5287,21 @@ void dec_slow_player(int delay)
if (!you.duration[DUR_SLOW])
return;
- if (you.duration[DUR_SLOW] > BASELINE_DELAY)
+ if (you.duration [DUR_SLOW] > BASELINE_DELAY)
{
// Make slowing and hasting effects last as long.
you.duration[DUR_SLOW] -= you.duration[DUR_HASTE]
? haste_mul(delay) : delay;
}
+
+ if (you.torpor_slowed())
+ {
+ you.duration[DUR_SLOW] = 1;
+ return;
+ }
+ if (you.props.exists(TORPOR_SLOWED_KEY))
+ you.props.erase(TORPOR_SLOWED_KEY);
+
if (you.duration[DUR_SLOW] <= BASELINE_DELAY)
{
mprf(MSGCH_DURATION, "You feel yourself speed up.");