diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-02 19:57:43 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-02 19:57:43 +0000 |
commit | 73e93cb36fd23c84328abe78555a35009a57d2e7 (patch) | |
tree | 1545802d84da3401728b0bb55adc7dc16bde5dd7 /crawl-ref/source | |
parent | 37a4ac33578a9a8e9366ce1e0686dbea42dc66b8 (diff) | |
download | crawl-ref-73e93cb36fd23c84328abe78555a35009a57d2e7.tar.gz crawl-ref-73e93cb36fd23c84328abe78555a35009a57d2e7.zip |
Make being caught in a net interrupt the stair delay, and disallow beholding
attempts (mermaid) while the player is taking some stairs.
Also add a message for wielding a weapon of distortion. (I'm afraid there
already used to be one that I've accidentally removed.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3385 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/delay.cc | 15 | ||||
-rw-r--r-- | crawl-ref/source/delay.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/traps.cc | 3 |
5 files changed, 27 insertions, 4 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index e08e74998a..6877e9b598 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -236,7 +236,7 @@ void start_delay( delay_type type, int turns, int parm1, int parm2 ) push_delay( delay ); } -void stop_delay( void ) +void stop_delay( bool stop_stair_travel ) /*********************/ { if ( you.delay_queue.empty() ) @@ -355,10 +355,19 @@ void stop_delay( void ) // and would have to have a prompt... this works just fine. -- bwr break; - case DELAY_WEAPON_SWAP: // one turn... too much trouble - case DELAY_DROP_ITEM: // one turn... only used for easy armour drops case DELAY_ASCENDING_STAIRS: // short... and probably what people want case DELAY_DESCENDING_STAIRS: // short... and probably what people want + if (stop_stair_travel) + { +#ifdef DEBUG_DIAGNOSTICS + mpr("Stop ascending/descending stairs."); +#endif + pop_delay(); + } + break; + + case DELAY_WEAPON_SWAP: // one turn... too much trouble + case DELAY_DROP_ITEM: // one turn... only used for easy armour drops case DELAY_UNINTERRUPTIBLE: // never stoppable case DELAY_JEWELLERY_ON: // one turn default: diff --git a/crawl-ref/source/delay.h b/crawl-ref/source/delay.h index 0e3f57f06c..d82a369d53 100644 --- a/crawl-ref/source/delay.h +++ b/crawl-ref/source/delay.h @@ -71,7 +71,7 @@ struct ait_hp_loss }; void start_delay( delay_type type, int turns, int parm1 = 0, int parm2 = 0 ); -void stop_delay( void ); +void stop_delay( bool stop_stair_travel = false ); bool you_are_delayed( void ); delay_type current_delay_action( void ); int check_recital_audience( void ); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 58c6c760fd..463d10a27a 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -617,6 +617,8 @@ void wield_effects(int item_wield_2, bool showMsgs) break; case SPWPN_DISTORTION: + mpr("Space warps around you for a moment!"); + if (!was_known) xom_is_stimulated(32); break; diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 384af756ca..ac09d2fae2 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2889,6 +2889,15 @@ static bool handle_special_ability(monsters *monster, bolt & beem) case MONS_MERMAID: { + // Don't behold player already half down or up the stairs + if ( !you.delay_queue.empty() && you.delay_queue.front().type ) + { +#ifdef DEBUG_DIAGNOSTICS + mpr("Taking stairs, don't behold.", MSGCH_DIAGNOSTICS); +#endif + break; + } + // won't sing if either of you silenced, or it's friendly or confused if (monster->has_ench(ENCH_CONFUSION) || mons_friendly(monster) || silenced(monster->x, monster->y) || silenced(you.x_pos, you.y_pos)) diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 2635663816..ffa51a64e1 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -17,6 +17,7 @@ #include "beam.h" #include "branch.h" +#include "delay.h" #include "direct.h" #include "it_use2.h" #include "items.h" @@ -171,6 +172,8 @@ void player_caught_in_net() mpr("You fall like a stone!"); fall_into_a_pool(you.x_pos, you.y_pos, false, grd(you.pos())); } + + stop_delay(true); // even stair delays } } |