summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/database.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add formatting fixes.David Lawrence Ramsey2009-11-211-2/+2
| | | | This mostly puts && and || on the proper lines, per the style guide.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* platform detection: clean up abuse of '_MSC_VER' macroSteven Noonan2009-10-131-1/+1
| | | | | | | Use TARGET_COMPILER_VC instead, unless you need to find the Visual C++ version information. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-3/+0
|
* Add spelling fixes.David Lawrence Ramsey2009-09-231-2/+2
|
* Remove references to unimplemented branches (Caverns, Pit, Inferno).j-p-e-g2009-03-141-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9474 c06c8d41-db1a-0410-9941-cceddc491573
* * Move randart book names into a new file, randbook.txt. j-p-e-g2009-01-251-0/+1
| | | | | | | | | * Remove quotes from book names (use the props vector instead for book_has_title()), and occasionally allow random owner names for Sif's gifts (25% chance), as per FR 2532818. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8741 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Fix "suicidal travelling" towards monsters you can see through glass.j-p-e-g2008-12-261-2/+0
| | | | | | | Fix =sustenance not being treated as useless for Mummies. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7982 c06c8d41-db1a-0410-9941-cceddc491573
* Add a FAQ part to the database, which can be accessed from the helpj-p-e-g2008-12-261-0/+31
| | | | | | | | | | | | | screen. This is intended as a pointer for general questions, not for complicated information about rare, specific occurences. Feel free to change stuff, or add more. The Q:keyword/A:keyword solution is pretty rough, but I couldn't get the database not to turn the questions into all lowercase otherwise. If someone knows of a better method, I'm all ears! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7981 c06c8d41-db1a-0410-9941-cceddc491573
* First draft of the spell noisyness system: spells cast by the player and byzelgadis2008-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | wizard/priest monsters now make noise, with the loudness depending upon level and spell disciplines: conjuration spells have a loudness equal to their level, spells containing only air and/or poison equal to 50% of their level (rounded up), and everything else to 75% of the level (rounded up). This undoudedtly needs rebalancing, and a better level+disciplines -> loudness formula. Also, each spell can have it's loudness tweaked from the default via the noise_mod field of the spell_desc field in spl-data.h, for those spells whose desired loudness don't quite fit into whatever formula is used. The messages used to announce a spell have been moved out to source/dat/database/monspell.txt, which uses the same format and conventions as monspeak.txt. So far this has just been used to make invisible wizard/priest monsters give a message to the player if the player can hear them cast, and also to make curse skulls and Murray not "gesture wildly". However, it could be used to give a greater variety of spell announcement messages based upon the spell used or the monster's type/species/genus, and/or to give multi-part messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7820 c06c8d41-db1a-0410-9941-cceddc491573
* * Move all quotes into quotes.txt and a database of their own.j-p-e-g2008-08-041-12/+19
| | | | | | | | | | * Adapt Matthew's code to use quotes if there's enough space left. * Skip the general description of player ghosts that only repeats the specific description but with less information. * Don't refer to ghosts as "xyz's ghost the player ghost" git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6766 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-5/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Add spelling fix.dolorous2008-06-261-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6143 c06c8d41-db1a-0410-9941-cceddc491573
* Swap '.' and '!' in the targetting interface.j-p-e-g2008-06-221-3/+3
| | | | | | | | | | 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 ?immolation not being autoID'd upon reading.j-p-e-g2008-06-221-2/+2
| | | | | | | Fix ?uselessness not using the misc. descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6051 c06c8d41-db1a-0410-9941-cceddc491573
* Add the framework for descriptions for abilities to be read from thej-p-e-g2008-06-181-5/+6
| | | | | | | | | | | | | | ability menu (a!) Currently only contains descriptions for Zin, TSO and "Renounce Religion". Also, now I'm worried that players might accidentally press '?' instead of '!' and then apply an ability when they only wanted to read its description. (Of course, with some of them you can opt out, e.g. because they need targeting, but for others it's a real problem.) There must be a good solution around somewhere. Abilities are not (yet) searchable in the database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5958 c06c8d41-db1a-0410-9941-cceddc491573
* Outsource the tutorial descriptions of skills, and make them searchablej-p-e-g2008-06-181-2/+3
| | | | | | | | | | | | in the database. Apply Zaba's patch to view skills from the skill menu ('m'). The melee, ranged and magic skills currently only have really generic descriptions shamelessly copied from the tutorial. There's a front end function get_skill_description that appends extra information like what types of unarmed attacks the current character is capable of (kicking, clawing, punching, ...) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5955 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Lowercase the last of the the miscellaneous names text, and move it out dolorous2008-06-011-2/+20
| | | | | | | of the randart name database into its own database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5385 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-05-271-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5280 c06c8d41-db1a-0410-9941-cceddc491573
* Outsource more miscellaneous names besides colors (glowing color types, dolorous2008-05-261-0/+2
| | | | | | | | | writing types for Tomes of Destruction), and move them into their own file. Also, tweak the message for glowing colors used by scrolls of random uselessness so that they no longer have to start with consonants. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5269 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fixes.dolorous2008-05-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5268 c06c8d41-db1a-0410-9941-cceddc491573
* Change friendly pickup from a toggle to a more userfriendly, easilyj-p-e-g2008-04-261-0/+2
| | | | | | | abortable prompt, and move orc names into a file of their own. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4670 c06c8d41-db1a-0410-9941-cceddc491573
* Replace the dire lajatang with the cloak of Starlight (rElec, rC+, EV+4,j-p-e-g2008-04-231-3/+6
| | | | | | | | | Stlth-). I already added a new tile, which looks rather atrocious, I think. The dire lajatang tile is now used for any branded lajatang. Also renamed a few tile files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4527 c06c8d41-db1a-0410-9941-cceddc491573
* Modify descriptions of artefact-capable items to allow for unquoted j-p-e-g2008-04-221-1/+7
| | | | | | | | descriptions for artefacts, so as not to drown the actually important information in flavour quotes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4483 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-2/+2
| | | | | | to avoid conflict with VC++ direct.h header. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-27/+27
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Fix database lookup for features, and add fountain of blood, as well as pj-p-e-g2008-03-271-1/+1
| | | | | | | | | | | | | | | | | | otion of coagulated blood to items. Also copy the more interesting branch stair descriptions into branches.txt. Most of them still have the generic "Describe branch here", and I lack the imagination to change that. Ideally, the branch entries should get distinct descriptions closer to describing the atmosphere, e.g. "Putrid smell fills your nostrils." (Tomb), "A moss-covered staircase. From below you can hear squeaking noises, and odd deep croaks." (Lair), or "The sound of clanging weapons reaches your ears." (Blades), with the branch descriptions pulled up after that when describing the staircases in-game. (Or maybe vice versa.) Hmm, did I say I was lacking imagination? :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3897 c06c8d41-db1a-0410-9941-cceddc491573
* Modify database lookup to allow for lookup of the nth entry for a j-p-e-g2008-03-231-47/+86
| | | | | | | | | | | | | | | | | given keyword. Used for more varied recite speech, so that the same prechosen synonym can be used for all of start/continue/stop/finish reciting. The number of the entry is calculated in an embarassingly hacky way: (recite power + hp at beginning of recite + x_pos + y_pos) modulo total weight of the keyword. This makes sure that different synonyms get used, though always the same one (plus its shorter variant) during one round of recite, but it's not as random as I'd like. It works well enough for now, though, and adds some much needed flavour to Zin. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3818 c06c8d41-db1a-0410-9941-cceddc491573
* Fix probable 64-bit portability problem.pauldubois2008-03-201-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3742 c06c8d41-db1a-0410-9941-cceddc491573
* Outsourcing Xom speech.j-p-e-g2008-03-191-6/+18
| | | | | | | | "You hear the rejoicing of dolorous and dpeg!" Xom is fascinated! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3723 c06c8d41-db1a-0410-9941-cceddc491573
* Morphed SingleFileDB into TextDB, a class that accepts any number ofpauldubois2008-03-171-285/+133
| | | | | | | | | | | | | | | | input files. Use it for all the databases, at least all the ones managed by database.cc. Gets rid of 150 lines of code :) Also, fix 1910634 by adding insult.txt to the shout db. It results in some duplication in the dbs on disk, but it's an OK fix for now, I think. The DBs are now in the subdirectory saves/db/ ; is this a problem for distribution? I poke around in that directory occasionally and it's convenient to have the DBs out of the way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3680 c06c8d41-db1a-0410-9941-cceddc491573
* Make global variables follow conventions.pauldubois2008-03-161-27/+29
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3677 c06c8d41-db1a-0410-9941-cceddc491573
* Another of those commits on monster speech, hopefully the last one forj-p-e-g2008-03-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | some time, though. I added a new prefix "related" if the player character has the same genus as the monster. My new prefix additions (hostile, related and religion) can now be skipped in the speech lookup, which fixes a couple of problems where several monsters were forced silent because of lookup problems. Also clean up the lookup process for silence, allow charmed monsters to sometimes speak (if rarely) and added several debugging statements that are also mentioned in monster_speech.txt that is now clearer than ever before (I hope). Fixed a couple of bugs in the monster shape calculation where the old glyphs were still being used. Also, a Draconian character eating any type of Draconian will now count as cannibalism. Also: FR 1894060: Level annotations now prompt for confirmation if they contain an exclamation mark (rather than "WARN"). Fix 1859443: Arriving on a square via staircase now calls request_autopickup and will describe items on the square. Oh, and fix init.txt to really allow reading in macros from external files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3604 c06c8d41-db1a-0410-9941-cceddc491573
* Rename speak.txt to monspeak.txt, and noise.xt to wpnnoise.txtj-p-e-g2008-03-101-3/+3
| | | | | | | | as I keep thinking noise should refer to dungeon noises. Also, fix a wrong variable name for orc speech. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3585 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-1/+3
| | | | | | | | | | | | | | | Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-1/+2
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Paul's patch 1901892: reorganize/rewrite docs/monster_speech.txtj-p-e-g2008-02-261-3/+69
| | | | | | | | | | | And, while on the topic, of monster speech: * move weapon noises to a file of its own: noise.txt * finally outsource imp/demon insults (making insult.cc/h superfluous) This also activates the hitherto commented-out special racial insults pertaining to player species. As usual, more input welcome. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3465 c06c8d41-db1a-0410-9941-cceddc491573
* Outsource randart names.j-p-e-g2008-02-241-4/+92
| | | | | | | | | | | Also: - Move database text files into subfolder "database", yay! - Don't print "uncursed" for identified randart weapons/jewellery as the status should be obvious once the name is known. - A bit of code cleanup (change in enum.h breaks saves!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3460 c06c8d41-db1a-0410-9941-cceddc491573
* Added help for stash-search (dpeg).dshaligram2008-01-261-23/+34
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3338 c06c8d41-db1a-0410-9941-cceddc491573
* Database entries fetched with getLongDescription() can contain embededzelgadis2007-12-061-1/+42
| | | | | | | | | Lua code. The code will be replaced with its return value before being displayed to the user. The Lua code has no access to the thing being described, and so can only rely on global data. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3011 c06c8d41-db1a-0410-9941-cceddc491573
* "?/" can now be used to look up items. A side effect of this is thatzelgadis2007-12-061-0/+1
| | | | | | | | | | | | | item descriptions have been moved to dat/descript/items.txt and dat/descript/unident.txt. STL maps are now used to look up exact matches for the names of monsters, features and spells, so that looking them up with "?/" won't get too slow if there's a large descriptions DB and each key has to be tested if its a monster/spell/etc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3009 c06c8d41-db1a-0410-9941-cceddc491573
* Added gods and branches to the "?/" describe command; branch descriptionszelgadis2007-12-051-0/+2
| | | | | | | | | | need to be filled out. List of monsters described by "?/" now starts out sorted by toughness, rather than alphabetically. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3002 c06c8d41-db1a-0410-9941-cceddc491573
* ?/ now asks if you want to describe a monster, spell, or feature, andzelgadis2007-09-241-19/+19
| | | | | | | | | | | | | | | | | | | filters out matches if they aren't of the desired type. If there's more than one match, after selecting a match to look at, exiting from the description will return you to the menu, rather than to the dungeon. If you've asked for monsters, you can toggle sorting of the menu between alphabetical and by aproximated monster toughness (this probably still needs some work, since it seems to say that ordinary worms are tougher than brain worms). Only the monster symbol is coloured when showing a menu of monsters to describe. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2185 c06c8d41-db1a-0410-9941-cceddc491573
* If there are multiple matches to the "?/" describe command, thenzelgadis2007-09-221-1/+49
| | | | | | | | | | | | | | | | | | | | they will be displayed in a menu, which the user can select from. Menu entries for monsters will be given the same color as the monster, with the monster's symbol added to the end of the string. Entering a single character as input to the "?/" describe command lists all monsters with that display symbol. Monsters sharing the same display symbol can now have the same string appended or prepended to their description (implemented to make the "?/" command have to deal with less special cases). Currently only used by nagas with __N_suffix. Has the side-effect advantage that the naga subspicies description and the "attractive/repulsive" description goes before the big block of quoted text, rather than after it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2177 c06c8d41-db1a-0410-9941-cceddc491573
* Can now search the description database by name (keyword) with '?/'.zelgadis2007-09-211-0/+33
| | | | | | | Not adding to 0.3-branch yet in case it needs some tweaks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2170 c06c8d41-db1a-0410-9941-cceddc491573
* Applying Enne's database.cc cleanup patch (1792896).j-p-e-g2007-09-121-61/+59
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2077 c06c8d41-db1a-0410-9941-cceddc491573
* Implementing patch 1775415 (outsourcing monster speech) byj-p-e-g2007-09-041-60/+297
| | | | | | | | | | | zelgadis. Currently, shout.txt and speak.txt share in with the .des files in /dat. That should be changed, but I've no idea how to do this. Also implementing a bug fix by ennewalker (1787428). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2052 c06c8d41-db1a-0410-9941-cceddc491573