diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-27 22:37:11 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-27 22:37:11 -0700 |
commit | d60393247bf21b88a7ab7f02af329e43fb6ba21a (patch) | |
tree | 816da6dd59a60f2b35415e6f368b7779b3d840fb /crawl-ref/source/message.cc | |
parent | 8821a77a8778b39e8abbadf1515ab905c596042d (diff) | |
download | crawl-ref-d60393247bf21b88a7ab7f02af329e43fb6ba21a.tar.gz crawl-ref-d60393247bf21b88a7ab7f02af329e43fb6ba21a.zip |
Move canned_message() from stuff.cc to message.cc
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 6fb63980c3..01ad5bad05 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -1547,6 +1547,133 @@ void more(bool user_forced) clear_messages(); } +void canned_msg(canned_message_type which_message) +{ + switch (which_message) + { + case MSG_SOMETHING_APPEARS: + mprf("Something appears %s!", + player_has_feet() ? "at your feet" : "before you"); + break; + case MSG_NOTHING_HAPPENS: + mpr("Nothing appears to happen."); + break; + case MSG_YOU_UNAFFECTED: + mpr("You are unaffected."); + break; + case MSG_YOU_RESIST: + mpr("You resist."); + learned_something_new(HINT_YOU_RESIST); + break; + case MSG_YOU_PARTIALLY_RESIST: + mpr("You partially resist."); + break; + case MSG_TOO_BERSERK: + mpr("You are too berserk!"); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_TOO_CONFUSED: + mpr("You're too confused!"); + break; + case MSG_PRESENT_FORM: + mpr("You can't do that in your present form."); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_NOTHING_CARRIED: + mpr("You aren't carrying anything."); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_CANNOT_DO_YET: + mpr("You can't do that yet."); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_OK: + mprf(MSGCH_PROMPT, "Okay, then."); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_UNTHINKING_ACT: + mpr("Why would you want to do that?"); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_NOTHING_THERE: + mpr("There's nothing there!"); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_NOTHING_CLOSE_ENOUGH: + mpr("There's nothing close enough!"); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_NO_ENERGY: + mpr("You don't have the energy to cast that spell."); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_SPELL_FIZZLES: + mpr("The spell fizzles."); + break; + case MSG_HUH: + mprf(MSGCH_EXAMINE_FILTER, "Huh?"); + crawl_state.cancel_cmd_repeat(); + break; + case MSG_EMPTY_HANDED_ALREADY: + case MSG_EMPTY_HANDED_NOW: + { + const char* when = + (which_message == MSG_EMPTY_HANDED_ALREADY ? "already" : "now"); + if (you.species == SP_FELID) + mprf("Your mouth is %s empty.", when); + else if (you.has_usable_claws(true)) + mprf("You are %s empty-clawed.", when); + else if (you.has_usable_tentacles(true)) + mprf("You are %s empty-tentacled.", when); + else + mprf("You are %s empty-handed.", when); + break; + } + case MSG_YOU_BLINK: + mpr("You blink."); + break; + case MSG_STRANGE_STASIS: + mpr("You feel a strange sense of stasis."); + break; + case MSG_NO_SPELLS: + mpr("You don't know any spells."); + break; + case MSG_MANA_INCREASE: + mpr("You feel your magic capacity increase."); + break; + case MSG_MANA_DECREASE: + mpr("You feel your magic capacity decrease."); + break; + case MSG_DISORIENTED: + mpr("You feel momentarily disoriented."); + break; + case MSG_TOO_HUNGRY: + mpr("You're too hungry."); + break; + case MSG_DETECT_NOTHING: + mpr("You detect nothing."); + break; + case MSG_CALL_DEAD: + mpr("You call on the dead to rise..."); + break; + case MSG_ANIMATE_REMAINS: + mpr("You attempt to give life to the dead..."); + break; + case MSG_DECK_EXHAUSTED: + mpr("The deck of cards disappears in a puff of smoke."); + break; + case MSG_BEING_WATCHED: + mpr("You feel you are being watched by something."); + break; + case MSG_CANNOT_MOVE: + mpr("You cannot move."); + break; + case MSG_YOU_DIE: + mpr_nojoin(MSGCH_PLAIN, "You die..."); + break; + } +} + static bool is_channel_dumpworthy(msg_channel_type channel) { return channel != MSGCH_EQUIPMENT |