summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply recent commits to 0.4, including Matthew's evil zoo fix.j-p-e-g2008-07-091-6/+4
| | | | | | | Now how do I change the properties to native again? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6465 c06c8d41-db1a-0410-9941-cceddc491573
* Apply tutorial fixes as well as the macro/wininit path to 0.4.j-p-e-g2008-07-081-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6448 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2012088: Monsters "following" you from the Abyss to the wrong level.j-p-e-g2008-07-071-4/+8
| | | | | | | A few fixes to starting equipment and skills. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6440 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vampires from draining summoned creatures to be consistent withj-p-e-g2008-07-041-1/+2
| | | | | | | | | | | | | summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
* For Tiles, use some of the other wall types in the Abyss as well to makej-p-e-g2008-07-011-2/+2
| | | | | | | it more interesting. The rest is mostly clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6307 c06c8d41-db1a-0410-9941-cceddc491573
* When creating the first dungeon level after starting in the Abyss, mark dolorous2008-07-011-0/+1
| | | | | | | | it as existing, so that it's properly saved when going to the second dungeon level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6277 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-07-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6275 c06c8d41-db1a-0410-9941-cceddc491573
* [2004538] Fixed Vestibule of Hell bugs where entering would place you ↵ennewalker2008-07-011-1/+1
| | | | | | randomly and would not set travel information correctly. Also, updated locations in the code where the old command Ctrl-G was mentioned. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6274 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2007064: Assertion error when changing religion as a Lugonu Chaosj-p-e-g2008-06-301-1/+1
| | | | | | | Knight while still in the Abyss (only possible in wizard mode) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6270 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fixes.dolorous2008-06-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6267 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more minor cosmetic fixes.dolorous2008-06-301-6/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6266 c06c8d41-db1a-0410-9941-cceddc491573
* Add miscellaneous minor fixes.dolorous2008-06-301-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6257 c06c8d41-db1a-0410-9941-cceddc491573
* Enable Chaos Knights of Lugonu starting out in the Abyss.j-p-e-g2008-06-301-2/+37
| | | | | | | | | | | | | | | | | | | I've marked these characters with GDT_GAME_START, so that * the player starts out on an altar to Lugonu * there's an exit back to the Dungeon near-by * returning into the Dungeon always places them into the entry vault on level 1 * no abyssal runes are ever generated * item generation matches that of level 1 * monster spawn rates are that of the orb run to enforce a quick return into the Dungeon Once the player returns to the Dungeon (via an exit or with Lugonu's first power) char_direction is properly set to GDT_DESCENDING and from then on the game continues as if they had started in the Dungeon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6245 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Create random blood spatter in the Abyss and Pandemonium (FR 1986241).j-p-e-g2008-06-071-2/+2
| | | | | | | | | | | | | How it works: * Pick 12 random grids on the map and make them bloody. * Recursively and with decreasing chances, allow their neighbours to get spattered as well. I think the effect is rather nice but the numbers might need to be tweaked anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5533 c06c8d41-db1a-0410-9941-cceddc491573
* I'm not sure I actually coded anything worthwhile, though I experimentedj-p-e-g2008-06-021-110/+112
| | | | | | | | | | | | | | | | a fair bit and as usually ended up doing lots of clean-up. Oh wait, I modified eat_from_floor prompts to only force a more if there was actually a message before trying the inventory (whoops), and also modified the corpses in pack hint to take into account that a saccing player won't be interested in butchering rotten corpses. Also implemented a modified FR 1981119: when Detect Creatures only detects plants already seen before, print a different message ("You detect no further creatures."). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5435 c06c8d41-db1a-0410-9941-cceddc491573
* Added "error" channel for runtime errors, and changed error messages thatzelgadis2008-05-271-1/+1
| | | | | | | | | 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
* Better support for settings files that include other files:dshaligram2008-05-261-9/+99
| | | | | | | | | | | | | | | | | | | | | | | - Files can be included as "include foo" in .crawlrc instead of using the Lua call: : crawl.read_options('foo'). include foo and the Lua crawl.read_options('foo') are not equivalent - Lua only runs after the start of a new game, which is too late for some option settings. - Crawl searches for included files in this sequence: - Absolute paths: use the path directly (but not if DATA_DIR_PATH is set, since we don't want Crawl to read arbitrary files on multiuser systems). - Search relative to the including file. - Search relative to any -rcdir(s) provided. - Search in the data file search path. - The data file search path now includes settings/ for when we move rc stuff to settings/ .gitignore: ignore saves and morgue dirs correctly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5256 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1965819: invisible monster given away when (un)wielding or wearingj-p-e-g2008-05-171-24/+17
| | | | | | | | stuff. Also clean up in a couple of files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5115 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fix.dolorous2008-05-071-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4897 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [1949495]: After applying an effect to all dungeons, such as holy dolorous2008-04-271-1/+1
| | | | | | | | | beings' getting their attitude change flag cleared upon gaining piety with a good god, player centering will occur even when e.g. Options.view_lock is false. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4695 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fix.dolorous2008-04-271-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4694 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fix.dolorous2008-04-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4637 c06c8d41-db1a-0410-9941-cceddc491573
* Remove bogus-looking, unused functionpauldubois2008-04-211-19/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4434 c06c8d41-db1a-0410-9941-cceddc491573
* A little bit of savegame code cleanup; and a small format change to makepauldubois2008-04-201-137/+67
| | | | | | | | | | | | | | | | | | | | | | | life easier (or rather, possible) for dump_savegame. Should not break saves (let me know if they do). - Fixed dump_savegame bug reading TAG_LEVEL. Handle lua map_markers (by skipping over them) -- requires format change and minor version bump. - Consolidated YOU_MINOR_VERSION, LEVEL_MINOR_VERSION, GHOST_MINOR_VERSION into a single TAG_MINOR_VERSION, because otherwise versions can't be passed into data structures being deserialized (because they may be contained in both you and ghost, for example). - Clean out old code that pretends to restore other major versions, and some duplicate code that pretends level loading and general tagged file loading are different. (Left ghosts alone because they really do do something different, slightly) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4420 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed save file listing not working with MSVC.dshaligram2008-04-191-1/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4392 c06c8d41-db1a-0410-9941-cceddc491573
* Refix build for Unix.dshaligram2008-04-191-7/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4391 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-8/+34
| | | | | | 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-5/+5
| | | | 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-57/+55
| | | | | | | | 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
* Quiver work:pauldubois2008-04-141-1/+2
| | | | | | | | | | | | | | + bug: if wield sling and no quiver, then pick up stones: should quiver + implement: save and load (does not break saves) + remove: fire_quiver_best + remove: you.quiver + bug: identifying items doesn't update quiver properly + rename: you.quiver_change -> you.redraw_quiver + test no item because of =f git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4227 c06c8d41-db1a-0410-9941-cceddc491573
* Yet Another Code Cleanup, this time concentrating on libx11.cc and j-p-e-g2008-04-011-1/+2
| | | | | | | 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
* The royal jelly's death triggers wall change even if it is off-level. Also ↵dshaligram2008-04-011-0/+3
| | | | | | fixed being able to lose the royal jelly when banishing it and crash when killing the royal jelly in the Abyss. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4030 c06c8d41-db1a-0410-9941-cceddc491573
* Slime:6 teleport control is enabled even if you kill the royal jelly ↵dshaligram2008-04-011-41/+73
| | | | | | off-level (sorear). TC is also enabled when banishing the royal jelly, which is a bit cheesy... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4026 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-3/+3
| | | | | | | | | | | | | | | | | around dungeon level 7. Rename ROCK_STAIRS to ESCAPE_HATCH, as well as the corresponding function, since I think that the escape hatches are such a cool concept that we won't be going back, and the current coding name is a bit confusing. Clean up dungeon.cc. I'll probably have to add stuff into our new conventions file as I've been making up a lot of new rules in trying to make the code more readable. (Rules concerning nested brackets, and function indentation, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3927 c06c8d41-db1a-0410-9941-cceddc491573
* This was originally going to be a small refactor of stash.cc beforepauldubois2008-03-231-103/+23
| | | | | | | | | | | | | | | | | getting into stash/item finding, but it ended up big. Removed the read/writeThing API in favor of the marshall/unmarshallThing API. It was slightly awkward in a couple spots where the format of writeThing and marshallThing differed slightly (strings, level_id, level_pos). Doesn't affect savegames. When it's is okay to break savegames (maybe just before releasing 0.4?) it would be nice to remove the few remaining redundancies listed above. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3828 c06c8d41-db1a-0410-9941-cceddc491573
* "stashes" was both a global variable and a member variable... confusing!pauldubois2008-03-231-2/+2
| | | | | | | Renamed both of them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3827 c06c8d41-db1a-0410-9941-cceddc491573
* Cleanup/refactoring of tags.cc. No functional changes. I've beenpauldubois2008-03-171-19/+10
| | | | | | | | | | | | | | | | | | | running with and without this patch applied for about a week, and none of my saves have broken, so I'm ready to commit it. - Tag system no longer uses one big (shared!) global buffer. This was the original impetus behind the change... - Change every use of tagHeader into reader or writer (touches a lot). - Split tagHeader into two classes: reader and writer. Turns out every place that used tagHeader only cared about reading or writing and not about tags at all. There was nothing left in tagHeader, so it disappeared along with a bunch of grotty special-case code. - Not done: merge the files.cc read/writeThing code with the tags.cc marshall/unmarshallThing code. This patch is big enough already. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3685 c06c8d41-db1a-0410-9941-cceddc491573
* Another batch of msvc compile fixes.pauldubois2008-03-101-2/+7
| | | | | | | | | | | | | | Added wrapper implementation for opendir/readdir Other functions left stubbed out. It's a shame that crawl's "direct.h" conflicts with <direct.h>. Fixed up use of AppHdr.h in a couple places (it must be included first); changed project to use precompiled headers. crawl now compiles cleanly but doesn't link. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3573 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-0/+2
| | | | | | | | | | | | | | | 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
* Apply 1895318, with some cleanup.pauldubois2008-03-091-1/+4
| | | | | | | | | | | | | | | | | | This patch implements dploog's suggestion of hysteresis on piety. gain/lose_piety() adjust you.piety_hysteresis first; you.piety is modified with the leftovers (if any) once the hysteresis reaches its limit. Players start out at the upper end of the hysteresis region, meaning there is no lag on piety increase, but a lag on piety decrease. Hysteresis value set by "#define PIETY_HYSTERESIS_LIMIT 1" Does not break old saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3562 c06c8d41-db1a-0410-9941-cceddc491573
* Added help for stash-search (dpeg).dshaligram2008-01-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3338 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Dungeon applicator functions will now return true if any of their callsharanp2008-01-201-1/+2
| | | | | | | returned true, not just the one on the current level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3306 c06c8d41-db1a-0410-9941-cceddc491573
* When causing dungeon-wide effects for Nemelex and Beogh abandonment, dolorous2008-01-201-2/+4
| | | | | | | | only display the associated messages if the effects actually changed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3305 c06c8d41-db1a-0410-9941-cceddc491573
* [1838120] Ghosts change icon when saving and restoring in tile versionennewalker2008-01-181-4/+0
| | | | | | [1843058] Player info too close to map in tile version git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3296 c06c8d41-db1a-0410-9941-cceddc491573
* Monsters get multilevel resists (incomplete). Monster data needs to bedshaligram2008-01-091-20/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Tiles!ennewalker2008-01-051-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* More tweaks of Zin:j-p-e-g2008-01-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 1. Let sanctuaries shrink during the last few turns rather than suddently disappear when it times out. 2. Introduce donations (and remove item sacrifice) I suppose abilities will now have to become more expensive pietywise. I raised the piety cost of the sanctuary from 10 to 15, but that probably won't be enough. For the piety gain I introduced a new duration, DUR_PIETY_POOL that is filled with gold/200 * log(gold) upon donation and then leaks with 5% chance per turn one piety point into the actual piety. All numbers are open for discussion and change. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3181 c06c8d41-db1a-0410-9941-cceddc491573
* A completely reworked version of Zin as per the lengthyj-p-e-g2007-12-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | discussion in October/November. Zin effects: - protection from harm (like all good gods) - feeding when starving (as before) - mutation resistance (chance of piety/200) Zin restrictions: - no cannibalism (like all good gods) - no attacking friends - no eating of intelligent beings' corpses - no deliberate mutating Zin invocations: - Smiting (general priestly ability?) - Revitalisation (Minor Healing + 5 mp) - Sanctuary (protection from attacks) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3164 c06c8d41-db1a-0410-9941-cceddc491573