summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-08 14:01:16 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-08 14:01:16 +0000
commitc7ab36b8b51c2fa925fd5245d31e5f98cfa466e0 (patch)
treef121170da25495ab7f6deaedfeac493c4fb201e2 /crawl-ref/source/acr.cc
parentc0976eb78b1c1319e427b449073d532d033dee50 (diff)
downloadcrawl-ref-c7ab36b8b51c2fa925fd5245d31e5f98cfa466e0.tar.gz
crawl-ref-c7ab36b8b51c2fa925fd5245d31e5f98cfa466e0.zip
Ghosts can use ensorcelled hibernation. Breaks saves, needs some work on PC sleep and wake-up correctness.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2377 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 8d7af5c50d..7385ce5c68 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1276,9 +1276,9 @@ static void input()
learned_something_new(TUT_RETREAT_CASTER);
}
- if ( you.duration[DUR_PARALYSIS] )
+ if ( you.cannot_move() )
{
- crawl_state.cancel_cmd_repeat("Paralyzed, cancelling command "
+ crawl_state.cancel_cmd_repeat("Cannot move, cancelling command "
"repetition.");
world_reacts();
@@ -2228,6 +2228,9 @@ static void decrement_durations()
if (decrement_a_duration(DUR_BUILDING_RAGE))
go_berserk(false);
+ if (decrement_a_duration(DUR_SLEEP))
+ you.awake();
+
// paradox: it both lasts longer & does more damage overall if you're
// moving slower.
// rationalisation: I guess it gets rubbed off/falls off/etc if you
@@ -2691,10 +2694,12 @@ static void world_reacts()
run_environment_effects();
- if ( !you.duration[DUR_PARALYSIS] && !you.mutation[MUT_BLURRY_VISION] &&
+ if ( !you.cannot_move() && !you.mutation[MUT_BLURRY_VISION] &&
(you.mutation[MUT_ACUTE_VISION] >= 2 ||
random2(50) < you.skills[SK_TRAPS_DOORS]) )
+ {
search_around(false); // check nonadjacent squares too
+ }
stealth = check_stealth();
@@ -2793,7 +2798,7 @@ static void world_reacts()
// food death check:
if (you.is_undead != US_UNDEAD && you.hunger <= 500)
{
- if (!you.duration[DUR_PARALYSIS] && one_chance_in(40))
+ if (!you.cannot_move() && one_chance_in(40))
{
mpr("You lose consciousness!", MSGCH_FOOD);
you.duration[DUR_PARALYSIS] += 5 + random2(8);
@@ -2834,7 +2839,7 @@ static void world_reacts()
*/
viewwindow(true, false);
- if (you.duration[DUR_PARALYSIS] > 0 && any_messages())
+ if (you.cannot_move() && any_messages())
more();
spawn_random_monsters();
@@ -2856,8 +2861,6 @@ static void show_message_line(std::string line)
std::string sender = line.substr(0, sender_pos);
line = line.substr(sender_pos + 1);
trim_string(line);
- // XXX: Eventually fix mpr so it can do a different colour for
- // the sender.
formatted_string fs;
fs.textcolor(WHITE);
fs.cprintf("%s: ", sender.c_str());