diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2013-07-16 19:51:19 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2013-07-16 21:52:26 -0600 |
commit | 18489159b62e2d848afb5dd82853b9541510c631 (patch) | |
tree | a88c4387c4b0cdf8b807b932ad218b8fe90b4615 /crawl-ref/source/delay.cc | |
parent | 334f978988fcae4f8b79fa9c1e93b865365a5a87 (diff) | |
download | crawl-ref-18489159b62e2d848afb5dd82853b9541510c631.tar.gz crawl-ref-18489159b62e2d848afb5dd82853b9541510c631.zip |
Turn Recite into a duration instead of a delay.
It triggers three times over 30 aut, just as the current implementation
does, only the player can otherwise act during that time.
Reading a scroll or casting a spell interrupts the recitation - you
can't pronounce two things at once, after all.
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index f888cec337..593d9e663b 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -84,24 +84,6 @@ static void _handle_macro_delay(); static void _finish_delay(const delay_queue_item &delay); static const char *_activity_interrupt_name(activity_interrupt_type ai); -static int _zin_recite_to_monsters(coord_def where, int prayertype, int, actor *) -{ - ASSERT_RANGE(prayertype, 0, NUM_RECITE_TYPES); - return zin_recite_to_single_monster(where, (recite_type)prayertype); -} - -static string _get_zin_recite_speech(int trits[], size_t len, int prayertype, int step) -{ - const string str = zin_recite_text(trits, len, prayertype, step); - - if (str.empty()) - { - // In case nothing is found. - return "mumble mumble buggy mumble"; - } - return str; -} - // Returns true if this delay can act as a parent to other delays, i.e. if // other delays can be spawned while this delay is running. If is_parent_delay // returns true, new delays will be pushed immediately to the front of the @@ -261,12 +243,6 @@ void stop_delay(bool stop_stair_travel, bool force_unsafe) _pop_delay(); break; - case DELAY_RECITE: - mprf(MSGCH_PLAIN, "Your recitation is interrupted."); - mpr("You feel short of breath."); - _pop_delay(); - break; - case DELAY_RUN: case DELAY_REST: case DELAY_TRAVEL: @@ -709,21 +685,6 @@ void handle_delay() mpr("You begin to meditate on the wall.", MSGCH_MULTITURN_ACTION); break; - case DELAY_RECITE: - { - // We need to handle training here. - practise(EX_USED_ABIL, ABIL_ZIN_RECITE); - - // We don't actually start reciting on this turn, because we haven't "said" anything yet. - delay.len = 7; - for (size_t n = 0; n < delay.len; n++) - delay.trits[n] = random2(3); - mprf(MSGCH_PLAIN, "You clear your throat and prepare to recite %s.", - _get_zin_recite_speech(delay.trits, delay.len, - delay.parm1, -1).c_str()); - break; - } - default: break; } @@ -865,14 +826,6 @@ void handle_delay() return; } } - else if (delay.type == DELAY_RECITE) - { - if (you.hp*2 < delay.parm2) // ...or significant health drop. - { - stop_delay(); - return; - } - } // Handle delay: if (delay.duration > 0) @@ -924,42 +877,6 @@ void handle_delay() MSGCH_MULTITURN_ACTION); break; - case DELAY_RECITE: - { - mprf(MSGCH_MULTITURN_ACTION, "\"%s\"", - _get_zin_recite_speech(delay.trits, delay.len, - delay.parm1, delay.duration).c_str()); - if (apply_area_visible(_zin_recite_to_monsters, delay.parm1, &you)) - viewwindow(); - - // Recite trains more than once per use, because it has a - // long timer in between uses and actually takes up multiple - // turns. - practise(EX_USED_ABIL, ABIL_ZIN_RECITE); - - const string shout_verb = you.shout_verb(); - - int noise_level = 12; // "shout" - - // Tweak volume for different kinds of vocalisation. - if (shout_verb == "roar") - noise_level = 18; - - else if (shout_verb == "hiss") - noise_level = 8; - else if (shout_verb == "squeak") - noise_level = 4; - else if (shout_verb == "__NONE") - noise_level = 0; - else if (shout_verb == "yell") - noise_level = 14; - else if (shout_verb == "scream") - noise_level = 16; - - noisy(noise_level, you.pos()); - break; - } - case DELAY_MULTIDROP: if (!drop_item(items_for_multidrop[0].slot, items_for_multidrop[0].quantity)) @@ -1098,25 +1015,6 @@ static void _finish_delay(const delay_queue_item &delay) break; } - case DELAY_RECITE: - { - string speech = _get_zin_recite_speech(const_cast<int*>(delay.trits), - delay.len, delay.parm1, -1); - speech += "."; - if (one_chance_in(9)) - { - const string closure = getSpeakString("recite_closure"); - if (!closure.empty() && one_chance_in(3)) - { - speech += " "; - speech += closure; - } - } - mprf(MSGCH_PLAIN, "You finish reciting %s", speech.c_str()); - mpr("You feel short of breath."); - break; - } - case DELAY_PASSWALL: { mpr("You finish merging with the rock."); |