summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
Commit message (Collapse)AuthorAgeFilesLines
* allow 'p' on the prompt for sacrificable itemsJesse Luehrs2014-08-151-11/+28
|
* Allow autosacrifice on altars and when silenced (minmay)Neil Moore2014-08-031-12/+4
| | | | In the former case, without displaying the normal altar prompts.
* allow iterating over branches in a non-enum order (8742)Jesse Luehrs2014-08-021-6/+6
| | | | | | | | | | | | This allows us to have a consistent and logical ordering of branches without requiring the branch enum itself to be reordered (which could have save compatibility implications). The new ordering of branches just moves Depths to the place in the ordering that it already is planned to go on the next major save compat bump, but other changes are possible, if desired. All places in the code that iterate over branches have been updated to use the new iterator except for code dealing with save files, which still uses enum order, so that we can change the display ordering without affecting saves.
* Remove stuffNicholas Feinberg2014-07-291-1/+2
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Move redraw functions from stuff.cc -> output.ccNicholas Feinberg2014-07-281-0/+1
|
* Create prompt.ccNicholas Feinberg2014-07-271-0/+1
|
* Revert "Don't autotravel through monsters caught in nets"Neil Moore2014-07-111-8/+1
| | | | | | | | 0.15-a0-2006-g1cf06be handles this in a better way, with a better message: "Your orc is caught in a web!", rather than "Partly explored, can't reach some items and places". This reverts commit 4e06f6f60faef46939f77dc610dad1874e619572.
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-7/+7
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-0/+1
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Chance function(void) to function()reaverb2014-05-241-2/+2
|
* Replace Q cloud displacement with cloud immunity (Bloax, elliptic).Steve Melenchuk2014-05-071-6/+5
| | | | | | | Because getting trampled into your own clouds is terrible. Also disables this when under penance, which was an oversight for the former.
* Allow running (shift-moving) through Qazlal clouds (MarvinPA).Steve Melenchuk2014-05-071-1/+6
|
* Allow Qazlalites to displace their own clouds.Steve Melenchuk2014-05-071-2/+7
| | | | Should address some of the residual autoexplore issues.
* Remove the unused jelly formChris Campbell2014-04-101-1/+1
|
* Remove mangroves, make single trees block LOS.wheals2014-03-291-1/+1
| | | | | | | | | | | Trees are in some ways yet another type of transparent wall, and, as MarvinPA has said, "in general having areas full of trees where you can see lots of enemies but not target them just plays badly." There were two differences between trees and mangroves, besides LOS: the latter didn't start forest fires and left shallow water when destroyed. That behaviour is kept, instead checking whether the tree (technically, the player) is in Swamp.
* Improve view.find_deepest_explored().elliptic2014-03-281-2/+2
| | | | It now returns 0 rather than 1 if the player hasn't seen the branch yet.
* Don't show Ziggurats on the travel menu (#8322)Chris Campbell2014-03-271-0/+4
|
* Make autosacrifice work with Fedhas.Sage2014-02-261-0/+24
| | | | | Whenever the player autoexplores with Fedhas and autoexplore_sacrifice is on, all corpses in sight are sacrificed.
* Don't prevent autoexplore to stop at altars in the temple.Raphael Langella2014-02-021-3/+1
|
* Drop some useless parentheses around comparisons.Adam Borowski2014-01-101-1/+1
|
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Schedule DNGN_ENTER_PORTAL_VAULT for removal; other related fixes.Adam Borowski2013-12-191-4/+5
|
* Don't get stuck in autoexplore (#7855)Neil Moore2013-12-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | If the player is standing on an autopickup item and greedy explore is on, the following situation (where ? is unexplored) reliably causes autopickup to report "Can't reach some places". #### ##.# #@#? .### We decide in the pathfinding code that NE (being adjacent to an unexplored square) is a reasonable exploration destination, so return true from path_examine_point for that square. This happens before we explore back to our starting square, even though greedy_place is already set to that location (by point_traverse_delay?!). Since the greedy square is closer, explore_target() and thus pathfind() returns that square (the player's location). But then _explore_find_target_square rejects the square because it wasn't actually visited by pathfind and thus appears to be unreachable. Avoid this situation by special-casing the player's location in _explore_find_target_square, so that it isn't considered unreachable. That might not be the ultimately best approach, but it seems the safest for now because it doesn't risk subtly breaking other uses of pathfind.
* Alter string punctuationChris Oelmueller2013-12-091-1/+1
| | | | This version is already present elsewhere, so reduced translation burden.
* Simplify butchery handlingChris Campbell2013-12-061-6/+0
| | | | | | Butchery is always allowed except in a few forms (bat, wisp, fungus). Removes a lot of unnecessary/unused code for swapping weapons and removing equipment when butchering.
* Drop map_shadow, use a bitmap and update it incrementally.Adam Borowski2013-12-041-6/+11
| | | | | | | | | | | | | | | | | Copying the whole map_knowledge every turn was really costly. We don't care about any fields of the map other than the "seen" flag, too. Thus, we can move it into a bitmap and update only changes rather than everything. This means we need to update the entire bitmap once exploration starts, but that's a small fraction of the cost: qw profiles: before: 9.55% check_for_interesting_features() 0.18% start_explore(bool) after: 0.29% start_explore(bool) 0.10% check_for_interesting_features()
* Special handling for WebTiles travel depth promptPekka Lampila2013-12-031-1/+1
| | | | | | Allows using <, >, $ etc. Dead keys aren't handled properly (at least not in Firefox on Linux).
* Remove mpr_nocap().Adam Borowski2013-11-291-1/+1
| | | | | No particular reason, other than consistency. And all but two used wasteful double-conversion, so this is not a speed regression.
* Reverse the order of arguments in mpr_nojoin().Adam Borowski2013-11-291-1/+1
| | | | | | | The old one was quite bizarre, inconsistent with mprf(). Only two cases used the default channel (mpr_nojoin() is quite special...), so I did not add an overload with the default.
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-2/+1
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* Revert "Replace `mprf(ch, s)` with `mpr(s, ch)`"Adam Borowski2013-11-291-1/+1
| | | | | | | | It trades readability and consistency for an utterly negligible bit of speed. With the amount of further processing mpr() does, a single sprintf is nothing. This reverts commit d9dfa8fc9755fb0a4e8954c7eb94f32fe97b82e0.
* Rename mprnojoin to mpr_nojoinChris Oelmueller2013-11-281-1/+1
| | | | For consistency with mpr_nocap, mpr_comma_separated_list and friends.
* Replace `mprf(ch, s)` with `mpr(s, ch)`Chris Oelmueller2013-11-281-1/+1
| | | | Scripted, then manually reviewed.
* Give a number of yesno() prompts default answers for HUP.Adam Borowski2013-11-251-1/+1
|
* More formatting fixes for return (...);Neil Moore2013-11-151-39/+39
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-18/+18
|
* Don't allocate pointless iterators.Adam Borowski2013-11-151-1/+1
| | | | | map or set.count() can test the presence of a given key and return 0 or 1 outright.
* Transform the lower half of D into a new branch: the Depths.Steve Melenchuk2013-11-121-4/+4
| | | | | | | | | | | | D is now 16 levels (the unsealed part was 14 levels previously), and the Depths are six levels. Vaults is enterable from Depths:2-5; Abyss, Hell, and Pan portals are available for the entire length of the branch. Right now the monster set is identical to Vaults except for the absence of Vaults-specific humans. D's monster set has also been truncated, mainly on the out-of-depth front. It's my intent that this serve as a starting point for figuring out what monsters we want to split between the two branches.
* Fix a crash on interlevel travel (#7705).Neil Moore2013-11-061-2/+3
| | | | | | | | | | | We were deferencing a past-the-end iterator when stair_level[br] was empty. Unfortunately, this happened whenever specifying a branch whose parent was unvisited, even D. That resulted in an uninitialised value for depth, causing _get_nearest_level_depth to iterate up to NUM_BRANCHES and then crash. This happened to not occur on the servers, but my 32-bit NO_OPTIMIZE build crashed every time on GD or &~<any letter>.
* Remove radius_iterator(los_base).Adam Borowski2013-11-051-6/+2
|
* Get rid of all external uses of get_los().Adam Borowski2013-11-051-1/+1
| | | | | This also fixes a bunch of "act through glass" or "doesn't obey nightstalker/ lantern of shadows" bugs.
* Shorten branch enums.Adam Borowski2013-11-031-22/+22
| | | | | Seriously, even preparing this commit gave me a pain in the triangle between the thumb and index finger's bases and the wrist.
* Whitespace and brace fixes.Adam Borowski2013-11-021-1/+2
|
* Store the entry level for every branch (rather than just depth).Adam Borowski2013-11-021-17/+6
| | | | | | | | This allows moving branches around without breaking save compat or at least serious hacks. The portal stack can be probably dropped now: two copies of the same level can't exist anyway.
* Dj: turn hover into regular permaflight.Adam Borowski2013-11-011-1/+1
|
* Reformat multi-line array literals.Adam Borowski2013-10-051-5/+9
|
* Ignore most traps in connectivity checks.Neil Moore2013-10-021-1/+5
| | | | | Only teleport and shaft traps break connectivity. Also, don't ignore zot and alarm traps for running/travel checks.
* Use RMODE_CONNECTIVITY for monster placement.Neil Moore2013-10-021-5/+11
|
* Rename "natural traps" to "shafts".Adam Borowski2013-09-251-1/+1
|
* Move mons_is_stationary() to struct actor.Adam Borowski2013-09-131-1/+1
| | | | Simplifies code in a number of places, and also fixes a few tree-moving bugs.