diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 11:13:35 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-06 11:13:35 +0000 |
commit | 0eccbe92f13c4522ac01496e09213f9209a5f14c (patch) | |
tree | 85be68d768f36ca857bb57bf1c90124cf691f8e3 /crawl-ref/source/delay.cc | |
parent | 1a3922fd4a76605598293aff58591a77f37c0bb1 (diff) | |
download | crawl-ref-0eccbe92f13c4522ac01496e09213f9209a5f14c.tar.gz crawl-ref-0eccbe92f13c4522ac01496e09213f9209a5f14c.zip |
FR [2163236]: Passwall should wake monsters it displaces.
Fix Passwall instadeaths not working for deep dwarves.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9344 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 141874dbd7..04c3b429bc 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1125,12 +1125,11 @@ static void _finish_delay(const delay_queue_item &delay) if (pass.x != 0 && pass.y != 0) { - switch (grd(pass)) { default: if (!you.can_pass_through_feat(grd(pass))) - ouch(1 + you.hp, NON_MONSTER, KILLED_BY_PETRIFICATION); + ouch(INSTANT_DEATH, NON_MONSTER, KILLED_BY_PETRIFICATION); break; case DNGN_SECRET_DOOR: // oughtn't happen @@ -1139,8 +1138,9 @@ static void _finish_delay(const delay_queue_item &delay) break; } - // Move any monsters out of the way: - if (monsters* m = monster_at(pass)) + // Move any monsters out of the way. + monsters *m = monster_at(pass); + if (m) { // One square, a few squares, anywhere... if (!shift_monster(m) && !monster_blink(m)) @@ -1148,6 +1148,11 @@ static void _finish_delay(const delay_queue_item &delay) } move_player_to_grid(pass, false, true, true); + + // Wake the monster if it's asleep. + if (m) + behaviour_event(m, ME_ALERT, MHITYOU); + redraw_screen(); } break; |