diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-23 20:18:05 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-23 22:02:06 -0700 |
commit | adab47361d6abd64d4ff284d735120db6747ad3f (patch) | |
tree | b54aa98ca91530d63fb4f22febc58e6e89f3a546 /crawl-ref/source/delay.cc | |
parent | 51315a322579d9644b4f904d9c824d368541e3ef (diff) | |
download | crawl-ref-adab47361d6abd64d4ff284d735120db6747ad3f.tar.gz crawl-ref-adab47361d6abd64d4ff284d735120db6747ad3f.zip |
Reduce spamminess on some types of monster generation.
Namely, only print one message when a monster is generated from another
level or in the abyss; i.e. instead of "A kobold comes up the stairs. A
kobold comes into view." you only get the former.
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index c8dfb73d89..a176a40e8a 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -12,6 +12,7 @@ #include <string.h> #include "ability.h" +#include "areas.h" #include "artefact.h" #include "clua.h" #include "command.h" @@ -1495,6 +1496,36 @@ static bool _should_stop_activity(const delay_queue_item &item, || Options.activity_interrupts[item.type][ai]; } +static string _abyss_monster_creation_message(const monster* mon) +{ + if (mon->type == MONS_DEATH_COB) + { + return coinflip() ? " appears in a burst of microwaves!" + : " pops from nullspace!"; + } + + return make_stringf( + random_choose_weighted( + 17, " appears in a shower of translocational energy.", + 34, " appears in a shower of sparks.", + 45, " materialises.", + 13, " emerges from chaos.", + 26, " emerges from the beyond.", + 33, " assembles %s!", + 9, " erupts from nowhere!", + 18, " bursts from nowhere!", + 7, " is cast out of space!", + 14, " is cast out of reality!", + 5, " coalesces out of pure chaos.", + 10, " coalesces out of seething chaos.", + 2, " punctures the fabric of time!", + 7, " punctures the fabric of the universe.", + 3, " manifests%2$s!%1$.0s", + 0), + mon->pronoun(PRONOUN_REFLEXIVE).c_str(), + silenced(you.pos()) ? "" : " with a bang"); +} + static inline bool _monster_warning(activity_interrupt_type ai, const activity_interrupt_data &at, delay_type atype, @@ -1579,6 +1610,14 @@ static inline bool _monster_warning(activity_interrupt_type ai, } else if (at.context == SC_NONSWIMMER_SURFACES_FROM_DEEP) text += " emerges from the water."; + else if (at.context == SC_UPSTAIRS) + text += " comes up the stairs."; + else if (at.context == SC_DOWNSTAIRS) + text += " comes up the stairs."; + else if (at.context == SC_GATE) + text += " comes through the gate."; + else if (at.context == SC_ABYSS) + text += _abyss_monster_creation_message(mon); else text += " comes into view."; |