summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't do anything for more() or mesclr() if the game has crashed (they mightzelgadis2009-01-181-0/+6
| | | | | | | | get called during crash debug dumping from debug_item_scan() or debug_mons_scan() ) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8543 c06c8d41-db1a-0410-9941-cceddc491573
* Fix boundary condition error when computing the oldest stored message.zelgadis2009-01-181-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8537 c06c8d41-db1a-0410-9941-cceddc491573
* When dumping info upon a crash:zelgadis2009-01-181-1/+9
| | | | | | | | | | | | * For Unix builds, shut down curses in case the crash reporter can't open up a file and has to dump the crash directly to stderr. * Include all saved messages in the crash report. * Use EOL instead of \n or \r\n. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8535 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573
* Disallowing mouse clicks on force_more messages to help avoid accidental deaths.ennewalker2009-01-151-4/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8451 c06c8d41-db1a-0410-9941-cceddc491573
* [2499489] Allowing mouse clicks for picking up items and for --more-- prompts.ennewalker2009-01-121-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8421 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Assert in mpr() during arena mode if a channel innapropriate for arena modezelgadis2009-01-031-0/+27
| | | | | | | is used. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8164 c06c8d41-db1a-0410-9941-cceddc491573
* Added arena game options:zelgadis2009-01-011-0/+32
| | | | | | | | | | | | | | | | | * arena_dump_msgs, which if true will dump all mpr()'d messages into arena.result * arena_dump_msgs_all, which will cause arena_dump_msgs to dump all messages, not just ones considered "dump worthy" * arena_list_eq, which if true will cause all items the monsters came equipped with to be dumped to arena.result Also, made arena_delay option settable, so you can do "arena_delay = 0" to make the simulation zip by. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8071 c06c8d41-db1a-0410-9941-cceddc491573
* Add arena mode, activated on the command-line by 'crawl -arena "monster v ↵dshaligram2008-12-311-0/+7
| | | | | | monster"' (eg: crawl -arena "Sigmund v Jessica") to let monsters fight each other undisturbed by the player. Good to examine monster AI and monster behaviour when the player is AWOL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8059 c06c8d41-db1a-0410-9941-cceddc491573
* If a multi-line message matches message_colour or note_messages then apply themzelgadis2008-12-261-29/+61
| | | | | | | | | to the whole message before it gets split into lines, rather than to each individual line after it gets split. Breaks previous-messages savefile compatability. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7984 c06c8d41-db1a-0410-9941-cceddc491573
* If the user presses ESC in response to --more-- then automatically clearzelgadis2008-12-211-4/+22
| | | | | | | | | | | all --more--s until the player can enter a command again, the player gets a prompt, or an error message is given. Move where activity is interrupted on error messages, and also do that for error messages sent through formatted_mpr(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7893 c06c8d41-db1a-0410-9941-cceddc491573
* Don't take notes on messages in certain channels, like MSGCH_EXAMINEzelgadis2008-11-281-0/+8
| | | | | | | and MSGCH_TUTORIAL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7672 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the ASSERT when undetected traps run out of ammo and display "Youj-p-e-g2008-11-091-1/+1
| | | | | | | | hear a click" instead of "The trap is out of ammo". Also, fix the miscolouring of the lua eating prompt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7428 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed security issue in replay_messages(). Fixes part of 2029644.haranp2008-09-181-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6949 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2082716: clean colour tags from dumps.haranp2008-09-151-7/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6934 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-6/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1969858: Store message history across saves.j-p-e-g2008-09-141-3/+34
| | | | | | | | Spin-off from BR 2085502: Don't autoswap weapons if a monster turns invisible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6924 c06c8d41-db1a-0410-9941-cceddc491573
* 0.4->trunk r6760: Fix Crawl spinning in CPU-pegging loop on disconnect on ↵dshaligram2008-08-041-1/+1
| | | | | | death screen (sorear). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6761 c06c8d41-db1a-0410-9941-cceddc491573
* More cleanups and fixes.haranp2008-07-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6648 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2019860: beef jerky wasn't considered meat.haranp2008-07-161-1/+1
| | | | | | | | Fix 2019581: weapon flavour was flowing through to subsequent attacks. Fix 2001572: persistent --more-- after dying to explosions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6577 c06c8d41-db1a-0410-9941-cceddc491573
* Large tiles-related changes. Platform-specific rendering removed and ↵ennewalker2008-07-151-3/+0
| | | | | | replaced with SDL/OpenGL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 c06c8d41-db1a-0410-9941-cceddc491573
* [2017260] Fixing message alignment issue with extra space on some lines.ennewalker2008-07-131-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6537 c06c8d41-db1a-0410-9941-cceddc491573
* [2010665] Fixing some delay_message_clear-related bugs. Fixing issue ↵ennewalker2008-07-041-2/+10
| | | | | | | | | | | (console and tiles) where colored output was not getting indented properly. I also modified mpr_formatted_output to pass newline=true for the last bit of text when calling message_out. I couldn't figure out how the console version was scrolling mpr_formatted_output and the tiles version was not. However, any mpr function should always scroll the message window (in my opinion), so it seemed like the right thing to do. Also, fixing a tutorial message color formatting typo. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6399 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2007056 (misplaced cursor on colourful prompts.)haranp2008-07-021-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6352 c06c8d41-db1a-0410-9941-cceddc491573
* Many code cleanups, mostly involving using stack_iterator andharanp2008-07-021-1/+1
| | | | | | | radius_iterator instead of the previous setup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6347 c06c8d41-db1a-0410-9941-cceddc491573
* If mpr() is called with MSGCH_GOD and param == 0 then change param tozelgadis2008-07-011-0/+3
| | | | | | | you.religion, like the way mprf() does it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6283 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fixes.dolorous2008-06-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6137 c06c8d41-db1a-0410-9941-cceddc491573
* Swap '.' and '!' in the targetting interface.j-p-e-g2008-06-221-10/+12
| | | | | | | | | | Forbid bats wearing hats/caps or rings. (That makes amulets the only type of equipment Vampires can keep on when transforming.) To make up for it, increase their damage stats again. Also fix it being possible to (un)equip the allowed items in Tiles while in bat form. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6055 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1996837: Allow equipping spellcasters with ammunition on generation.j-p-e-g2008-06-191-2/+4
| | | | | | | Fix 1997179: Merge zombies correctly in the monster list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5977 c06c8d41-db1a-0410-9941-cceddc491573
* Added several new tutorial triggers including information on being caughtj-p-e-g2008-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | in a net, specific skills, magic resistance, and which stat to choose. In a given game you'll only ever see a small fraction of all tutorial events (we're at 71 now, and some of them are exclusive). In fact, a lot of the information is so generally useful (esp. on gods, skills and items) that I'm seriously considering opening up the general information (How do I use item x? What does Spellcasting do?) to a wider selection of characters. I don't think we'll want to explain the intricacies of Mummies, Ghouls, or Vampires, but a lot of this stuff even applies to them... (If we overhaul the tutorial, it's certainly not a 0.4 target, though.) Resetting the tutorial version to 8 as we somehow switched from digital version to binary and back to digital. It will take some time until we actually reach 110, and by then, I am sure the base files won't be save compatible anymore. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5777 c06c8d41-db1a-0410-9941-cceddc491573
* Added option msg_condense_repeats (defaults to true) which causes messagezelgadis2008-06-081-2/+24
| | | | | | | | | | | history to condense repeated messages into a single line, so that (for example) if you hear a Zot trap go off five times in a row while resting, message history will show: You hear a distant "Zot!" (x5) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5575 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix some issues with the new food colourings, and make it respectj-p-e-g2008-06-011-63/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vampires' drinking habits. * Allow other channels than MSGCH_TUTORIAL to use formatted strings and use it to send a coloured string through the butcher prompt, thus visibly setting off dangerous corpses. I'd like normal corpses (no patterns in food_colouring.txt matching) not to be highlighted at all, but they're currently shown in lightgrey, that will have to be improved. * Fix Vampire mutation screen displaying poison resistance wrongly. * Add a new option force_more_message whose syntax is copied from travel_stop_message. Any message containing a regex within this listing will enforce a -More- prompt. By default, it's only enabled for "You start to lose your buoyoncy." * Tweak the messages for Kenku flying to fix 1823833. * Make Xom be amused at players teleporting in a labyrinth or when becoming (Near) Starving while in a labyrinth and with little food at their disposal. Yes, it's one of those "Something for everyone" commits. :D git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5416 c06c8d41-db1a-0410-9941-cceddc491573
* Modify menu_colour_item_prefix() to also handle stuff like contaminatedj-p-e-g2008-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or poisonous chunks. Throw out all those special cases in food_colouring.txt and replace them with logic. I sure hope I got all special cases, but if not they should be easy enough to add. The functions are currently all in food.cc but they could easily be moved over to clua.cc and adapted accordingly if needed. New prefix shortcuts: * inedible (full herbi/carnivorousness, rotten food for non-saprovores) * preferred (respects foovorousness, rotten for ghouls, royal jelly for everyone) * poisonous * contaminated * mutagenic * rot-inducing (I also added one-liners to the descriptions of chunks of those types.) The changes apply to all menu types, but they don't handle messages. This is problematic in that you'd have to check the pickup menu to see which corpses are worth butchering, but I'm still against keeping all those manual checks for (currently) poisonous/mutagenic/... corpses, esp. as information like this can date quickly. Instead the butchering interface should be improved to somehow handle that, possibly by overriding the prompt colour with the specified colour if necessary. I don't think there are any other cases where this is important. Also add a prefix for equipped items and artefacts, so they can be easily checked for as well. I really think the identified/unidentified prefix should become default (and the option removed) - this allows for easy differentiation between identified and non-identified artefacts. The "known" prefix (for known wand charges or enchantments) is a bit less interesting but wouldn't hurt any (I think). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5373 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet another new channel MSGCH_FRIEND_ACTION thatj-p-e-g2008-05-271-1/+2
| | | | | | | | | | | | simple_monster_message uses instead of MSGCH_PLAIN if the monster in question is friendly, and such messages (e.g. "Your imp blinks", but also all other similar messages) won't interrupt resting nor running. Also clean up travel.cc a bit, esp. the traversable_grid check that now simply uses a for loop rather than list all traversable grids. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5297 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-2/+6
| | | | | | | | | used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [1967456]: Change "horribly wounded" to "severely wounded".dolorous2008-05-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5143 c06c8d41-db1a-0410-9941-cceddc491573
* Add two new channels, MSGCH_FRIEND_SPELL and MSGCH_FRIEND_ENCHANT,j-p-e-g2008-04-291-0/+3
| | | | | | | | | | | | | | | | | | whose sole purpose is to not interrupt resting if it's a friend doing the spellcasting or enchanting. Unspam the message handling for orcs going in a battle frenzy, and allow the message back into normal game. Fix 1953632: Named monsters' names are shown for unseen invisible monsters. Change general monster name handling to refer to friendly monsters as "your monster" rather than "the monster", like was already the case for monster speech. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4769 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Another one of those pesky spacing changes.j-p-e-g2008-04-151-18/+18
| | | | | | | | One of these days Crawl *will* win the Cleanest Code Championship, just you wait... :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4242 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more whitespace fixes.dolorous2008-04-081-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4155 c06c8d41-db1a-0410-9941-cceddc491573
* Yet Another Code Cleanup, this time concentrating on libx11.cc and j-p-e-g2008-04-011-1/+1
| | | | | | | view.cc. (Yes, this is semi-random.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4032 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up vampire biting attack, and call the new method whenever aj-p-e-g2008-03-281-3/+6
| | | | | | | | | | | | | | | | | | vampire successfully stabs one of those walking blood replenishers. All in all, vampires will bite monsters that don't yield blood less often (1/3 chance), though their overall biting chance has been slightly increases, and much so when stabbing. Weapons of vampiricism are now a distinct case, so vampiric biting (that also is signified by SPWPN_VAMPIRICISM, occasionally) consistently doesn't check for life protection (though that might be added) and instead always respects the mons_has_blood checks. Also, food messages ("You are very hungry.") are now displayed in green if your food level has increased. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3904 c06c8d41-db1a-0410-9941-cceddc491573
* Implement a basic version of "list monsters in LOS".j-p-e-g2008-03-241-18/+24
| | | | | | | | | | | | | | | | | | | | | | | New command on 'F' (one of the few free keys, not documented yet). What it does: List all monsters in sight, sorted first by attitude (hostile, neutral, friendly), then by monster type (number currently, but we could use any other measure instead). My four current wiz-mode testing games produced the following output: a) You can see three orcs, and two neutral orcs. b) You can see a friendly orc, and a friendly elf. c) There are no monsters in sight! d) You can see a red devil, a hairy devil, an iron devil, a lemure, three ufetubi, a midge, a neutral deep elf summoner, and a friendly rat. Also: * remove prompt for abilities with high food cost at near starving (just not possible now) * Fix 1864331: message_colour not working in message history git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3844 c06c8d41-db1a-0410-9941-cceddc491573
* [FR 1909388] Command key changesj-p-e-g2008-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | new key command old key ------- ------- ------- z cast spell Z Z zap wand z c chop up D, Dissect C close door c O open door o o auto-explore Ctrl-O Ctrl-O Dungeon overview O v evoke E E show experience C t shout ! ! annotate level Ctrl-I Also changed the entire tutorial to match the new settings, and modified several references in the game. Other changes: * Another tutorial cleanup, so you now can really change the channel colour and have it work. * A belated mon_glyph colour swap: giant newt (was lightgreen, now green) and giant lizard (was green, now lightgreen). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3553 c06c8d41-db1a-0410-9941-cceddc491573
* Fix trunk compile, and a bit of code clean-up.j-p-e-g2008-02-291-2/+14
| | | | | | | Oh, and filter MSGCH_PROMPT from message history. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3488 c06c8d41-db1a-0410-9941-cceddc491573
* Fix: messages with colors (like the new firing prompt) look funny inpauldubois2008-02-291-2/+11
| | | | | | | | | | | | | | | | | the message history. This is just a small patch; I'm not sure why message playback only parses formatted strings for the tutorial channel (but it's explicitly done, there's probably a good reason). For now, all channels except tutorial strip out <color> formatting before storing in history. Another fix might be to not let the fire prompt messages go into the history; they're just spam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3484 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up and applied 1895117: formatted_string and tutorial polish.pauldubois2008-02-291-14/+41
| | | | | | | | | | | | | | - formatted_message_history handles linebreaks within color spans properly, and now makes print_formatted_paragraph redundant. (changed tutorial.cc to take advantage of this) - formatted_string handles <color></color> properly (with nesting) instead of reverting to lightgrey. (changed tutorial.cc to take advantage of this, too) - The part of 1895117 that dealt with dec glyphs was already addressed in a previous patch, in a more robust way, so that got cut. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3481 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Monsters get multilevel resists (incomplete). Monster data needs to bedshaligram2008-01-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | adjusted per monster to hand out the right resists. The current MR_RES_FIRE gives one level of resistance only. Added a real ghost structure, discarded the old ghost values array. Adjusted bones file format so bones will work out-of-the-box with Hearse. Breaks bones format, older bones will be rejected. Fixed some maps with bad DEPTHs. Added more safe answers in Y/N prompts, added a check to make it less likely that Crawl will spin in a tight loop reading input from a closed tty. (Experimental) !a will override existing foe of friendlies in LOS. Blademasters no longer pick up stuff to throw (Erik). Zombies of swimming things are also swimming things. Currently applies only to zombies explicitly placed in .des files, since fish zombies cannot be generated otherwise (can of worms). Morgue is now saved before showing the inventory and other boring end-of-game stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3231 c06c8d41-db1a-0410-9941-cceddc491573