summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 19:50:18 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-20 19:50:18 +0000
commitcb57dfea1ea5e58d45f8f1d4378369bdaf975fe5 (patch)
tree24f6b63381415029b59b676329ddeec1e9f341dd /crawl-ref/source/acr.cc
parentbf3897048c960a93d6bc1485b32060868c955da1 (diff)
downloadcrawl-ref-cb57dfea1ea5e58d45f8f1d4378369bdaf975fe5.tar.gz
crawl-ref-cb57dfea1ea5e58d45f8f1d4378369bdaf975fe5.zip
* Fix wizmode autoexplore (used for debugging) not nuking traps, as it
claimed to do. * Fix post-berserk exhaustion not cancelling haste if not wearing the "RS. * Update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10752 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc57
1 files changed, 34 insertions, 23 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index e79c2508a6..42a1b8a72a 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1124,15 +1124,16 @@ static void _input()
// as a resting turn, rather than "other".
static bool prev_was_rest = false;
- if (!you.delay_queue.empty() &&
- you.delay_queue.front().type == DELAY_REST)
+ if (!you.delay_queue.empty()
+ && you.delay_queue.front().type == DELAY_REST)
+ {
prev_was_rest = true;
+ }
if (prev_was_rest)
{
delta.turns_resting++;
delta.elapsed_resting += you.time_taken;
-
}
else
{
@@ -1140,10 +1141,11 @@ static void _input()
delta.elapsed_other += you.time_taken;
}
- if (you.delay_queue.empty() ||
- you.delay_queue.front().type != DELAY_REST)
+ if (you.delay_queue.empty()
+ || you.delay_queue.front().type != DELAY_REST)
+ {
prev_was_rest = false;
-
+ }
break;
}
@@ -2363,22 +2365,6 @@ static void _decrement_durations()
int dur = 12 + roll_dice(2, 12);
you.duration[DUR_EXHAUSTED] += dur;
- // While the amulet of resist slowing does prevent the post-berserk
- // slowing, exhaustion still ends haste.
- if (you.duration[DUR_HASTE] > 0 && wearing_amulet(AMU_RESIST_SLOW))
- {
- if (you.duration[DUR_HASTE > 6])
- {
- you.duration[DUR_HASTE] = 2 + coinflip();
- mpr("Your extra speed is starting to run out.", MSGCH_DURATION);
- }
- else
- {
- mpr("You feel yourself slow down.", MSGCH_DURATION);
- you.duration[DUR_HASTE] = 0;
- }
- }
-
// Don't trigger too many tutorial messages.
const bool tut_slow = Options.tutorial_events[TUT_YOU_ENCHANTED];
Options.tutorial_events[TUT_YOU_ENCHANTED] = false;
@@ -2386,7 +2372,32 @@ static void _decrement_durations()
{
// Don't give duplicate 'You feel yourself slow down' messages.
no_messages nm;
- slow_player(dur);
+
+ // While the amulet of resist slowing does prevent the post-berserk
+ // slowing, exhaustion still ends haste.
+ if (you.duration[DUR_HASTE] > 0)
+ {
+ if (wearing_amulet(AMU_RESIST_SLOW))
+ {
+ if (you.duration[DUR_HASTE > 6])
+ {
+ you.duration[DUR_HASTE] = 2 + coinflip();
+ mpr("Your extra speed is starting to run out.",
+ MSGCH_DURATION);
+ }
+ else
+ {
+ mpr("You feel yourself slow down.", MSGCH_DURATION);
+ you.duration[DUR_HASTE] = 0;
+ }
+ }
+ else
+ {
+ // Silently cancel haste, then slow player.
+ you.duration[DUR_HASTE] = 0;
+ slow_player(dur);
+ }
+ }
}
make_hungry(700, true);