summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge r7840: fix for bug 2430493: forget about interrupted butchering whenzelgadis2008-12-161-0/+6
| | | | | | | doing auto-explore or inter-level travel. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7841 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6814: Check both ends of interlevel travel to see if travel is ↵dshaligram2008-08-111-7/+13
| | | | | | going out of [src,dst] range (sorear). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6815 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk-0.4 r6764: Warn the player if interlevel travel is going to take them ↵dshaligram2008-08-041-0/+83
| | | | | | to a level outside the range [src,dest] (rax, doy). ^G => Esc in yesno prompts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6765 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2017893: long file names not working on DOS. Crawl now takes a j-p-e-g2008-07-171-3/+2
| | | | | | | | | | | | | shot at abbreviating them, and only fails if it can't find that file either. Handles all files included by default in /settings and /docs except changes.stone_soup which is not strictly necessary for the version information. Tested artificially by manually mutilating the file names; not actually tested on DOS. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6578 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6500 to 0.4.ennewalker2008-07-111-0/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6501 c06c8d41-db1a-0410-9941-cceddc491573
* Apply some more commits to bring 0.4 up to date.j-p-e-g2008-07-101-4/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6484 c06c8d41-db1a-0410-9941-cceddc491573
* Add DNGN_EXIT_HELL to is_travelable_stair(), since it already includes dolorous2008-06-291-1/+2
| | | | | | | DNGN_ENTER_HELL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6206 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-10/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* In is_stair(), include portal vault entrances and exits, since the dolorous2008-06-251-0/+2
| | | | | | | similar labyrinth entrances and exits are included. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6136 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few minor cleanups.dolorous2008-06-201-7/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6013 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-201-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6009 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-06-181-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5931 c06c8d41-db1a-0410-9941-cceddc491573
* Added several new tutorial triggers including information on being caughtj-p-e-g2008-06-131-10/+11
| | | | | | | | | | | | | | | | | | | | | 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
* Add explanatory comments to the pathfinding routines. I might have gonej-p-e-g2008-06-121-3/+22
| | | | | | | | overboard here :) - but I figured that it could be useful to occasionally explain *why* I implemented something a certain way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5767 c06c8d41-db1a-0410-9941-cceddc491573
* Allow travel excludes on unexplored territory. I hope this doesn'tharanp2008-06-111-3/+0
| | | | | | | introduce bugs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5732 c06c8d41-db1a-0410-9941-cceddc491573
* Yikes, so many files! And all I did was add more item evaluationj-p-e-g2008-06-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | functions for menu colouring and pickup... Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate. Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this. Removed the menu_colour_prefix_id option as I can't see any reason to turn it off. Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
* Moved some cloud related functions from misc.{cc,h} to cloud.{cc,h}zelgadis2008-06-091-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5636 c06c8d41-db1a-0410-9941-cceddc491573
* I'm not sure I actually coded anything worthwhile, though I experimentedj-p-e-g2008-06-021-2/+3
| | | | | | | | | | | | | | | | 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
* Fix wizard mode being unable to create monsters of nonfloor habitat.j-p-e-g2008-06-011-1/+2
| | | | | | | | | | | | | | | | Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed greedy mode explore_stop so that "items" stops when non-autopickupzelgadis2008-05-311-10/+34
| | | | | | | | | | | | items come into view and "greedy_items" stops when autopickup items come into view. Also added the new explore_stop conditions "glowing_items", "artefacts" and "runes", which stops greedy explore when non-autopickup items which are glowing/rune/etc, artefacts and runes (respectively) come into view. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5352 c06c8d41-db1a-0410-9941-cceddc491573
* Added two new options, rest_wait_both and chunks_autopickup, both defaultingzelgadis2008-05-301-19/+0
| | | | | | | | | | | | | | | | | to false. If rest_wait_both is true then resting will only stop when both HP and MP are both fully restored, not when only one or the other is restored. If chunks_autopickup is true then flesh chunks generated from butchering will automatically be picked up (respecting the other autopickup settings). My implementation of rest_wait_both has a few side effects. I got rid of check_hp() and check_mp() from the runrest class, since player AI interruption code seems to be able to take care of that. I also added a rather kuldgey block_interruptions() so that the activity interrupts code could use mpr() without going into infinite recursion because of AI_MESSAGE interrutps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5337 c06c8d41-db1a-0410-9941-cceddc491573
* Modify tutorial messages for the new triggers. Thanks again, Matthew! :)j-p-e-g2008-05-291-9/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5328 c06c8d41-db1a-0410-9941-cceddc491573
* Modify num_feats_between to return early if a feature has beenj-p-e-g2008-05-271-3/+3
| | | | | | | | encountered and we're only interested in whether the path is clear or not. Also, more whitespace/comment changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5298 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet another new channel MSGCH_FRIEND_ACTION thatj-p-e-g2008-05-271-165/+76
| | | | | | | | | | | | 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
* Fix aborting unchivalric attacks costing a turn.j-p-e-g2008-05-251-2/+2
| | | | | | | | | | | | | | | | | | Implement ordering your friends to stay where they are. To do this, I've added a new variable to the monster struct: patrol_point, that is set by the new t sub-command "Wait here!" Once this is set, monsters will spend their time wandering around within the LOS radius centred on the patrol point. If they are attacked, or the player or other friends are attacked, they'll stop wandering to fight, but once the foe is gone, they continue doing so. Currently, the only way to make them stop again is to issue another command, "Follow me!" that is basically the already existing "Come here!" command. I've also added a "Stop fighting!" command that for non-patrolling monsters has the same effect as "Follow me!" - patrolling monsters are supposed to take up their wanderings again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5247 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-05-241-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5211 c06c8d41-db1a-0410-9941-cceddc491573
* Fix travel not working. Whoops!j-p-e-g2008-05-201-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5151 c06c8d41-db1a-0410-9941-cceddc491573
* Rename static methods in travel.cc and terrain.cc.j-p-e-g2008-05-201-296/+296
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5146 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1858979: Monsters being capable to reach through wallsl.j-p-e-g2008-05-191-7/+12
| | | | | | | (And some cleanup.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5136 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1965819: invisible monster given away when (un)wielding or wearingj-p-e-g2008-05-171-13/+16
| | | | | | | | 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
* FR 1962016: Make hydra headedness more obvious.j-p-e-g2008-05-141-10/+13
| | | | | | | | | | | | | | You now get messages like "The seven-headed hydra bites." and "You slice the 12-headed hydra." FR 1963606: Take a note when you pick up a rune (or the Orb!) for the first time. There are a couple of other files I changed, but I can't remember any big stuff, so it was probably just cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5029 c06c8d41-db1a-0410-9941-cceddc491573
* Suppress --More-- when travel/explore makes a T&D trap save.dshaligram2008-05-041-0/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4864 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-1/+1
| | | | | | 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
* Disallow the Staff of Wucad Mu as a Trog gift.j-p-e-g2008-04-161-6/+9
| | | | | | | And another of those code cleanups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4259 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-110/+110
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Add yet more whitespace fixes.dolorous2008-04-091-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4163 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing tiles compilation error.ennewalker2008-04-031-5/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4053 c06c8d41-db1a-0410-9941-cceddc491573
* Fix tile compile on Windows.j-p-e-g2008-04-021-1/+1
| | | | | | | Fix crash when bottling !blood as a vampire. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4042 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
* Slime:6 teleport control is enabled even if you kill the royal jelly ↵dshaligram2008-04-011-0/+5
| | | | | | 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
* Give monsters better natural regeneration increasing with HD. Monsters will ↵dshaligram2008-03-311-1/+1
| | | | | | | | still never heal more than 1 hp per turn. Increase royal jelly movement speed, hp and attack damage. The royal jelly now spits out high-level jellies when it takes a high-damage hit of any kind. No experience for the expelled jellies, given that they're technically part of the royal jelly, and the royal jelly already gives a heap of xp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3985 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1921769: Exclusion squares on the tiles minimap sometimesj-p-e-g2008-03-301-2/+3
| | | | | | | | | | not being updated. Also add yet another minimap colour option for the centre of an exclusion (defaults to darkblue). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3958 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-12/+16
| | | | | | | | | | | | | | | | | 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
* Add fountains of blood (as suggested by Lemuel), and tidy up j-p-e-g2008-03-261-10/+6
| | | | | | | | | | | | | | | the existing fountains: change their order and remove all those superfluous dry fountain types. I couldn't find any place for random generation of fountains, so if that is possible it will have to be disabled for blood fountains outside the hells. I've added a shortcut (Y) for vault creation, though. :) Drinking from such a fountain has a 33% chance of leaving it dry. I think that's it... for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3886 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed tile compile. (I was being a bit overzealous in my cleanup.)j-p-e-g2008-03-251-1/+1
| | | | | | | | | | | Fix 1922815: blood potion assert. Implement 1828037: prompt before entering harmful clouds And tidy up fountain handling, dried non-magic fountains may now also start flowing again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3878 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles:j-p-e-g2008-03-251-4/+2
| | | | | | | | | | | | | | * Fix cursed wielded weapons being throwable. (Whoops!) * Improve logic for mouse-over information in inventory. Add Confusing Touch ("Touch") and Sure Blade ("Blade") to the status output. I've moved BWpn into line 3 to make space for the others. Still, the status can get positively cluttered. Apply coding convention to static methods in output.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3872 c06c8d41-db1a-0410-9941-cceddc491573
* Partially fixed [1921769] Minimap exclude region sometimes not shown.ennewalker2008-03-251-8/+12
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3866 c06c8d41-db1a-0410-9941-cceddc491573
* This was originally going to be a small refactor of stash.cc beforepauldubois2008-03-231-55/+58
| | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | Renamed both of them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3827 c06c8d41-db1a-0410-9941-cceddc491573
* Some yesno standardisation. Some yesno prompts had a trailing space, some ↵pauldubois2008-03-171-2/+2
| | | | | | | | | | | | didn't. Now all of them do (but it's applied in yesno(), so it's easy to get rid of). Also, "anyways" -> "anyway". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3682 c06c8d41-db1a-0410-9941-cceddc491573