summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
Commit message (Collapse)AuthorAgeFilesLines
* Reduce dependency on travel.hMatthew Cline2009-11-291-64/+3
| | | | | | | | Removed inclusion of travel.h from most .h files to reduce the number of .cc files dependant on it. This involved moving the level_pos declaration to externs.h, moving the flood_find template to it's own header file, and moving two typedefs from travel.h to travel_defs.h because typedefs can't be forward declared (argh).
* Don't use is_travelsafe_square for dungeon generation.Robert Vollmert2009-11-251-2/+1
| | | | This hopefully fixes recent disconnected level problems.
* Sort out translevel travel initialization.Robert Vollmert2009-11-251-3/+1
| | | | | | | | | | All translevel travel now goes through start_translevel_travel(pos), which in particular makes sure destination stair distances are determined, fixing travel failure to waypoints. This was not failing earlier because prompt_translevel_target used to call start_translevel_travel(pos) through the now-unused TravelCache::travel_to_waypoint.
* explore_stop: new condition greedy_pickup_thrownMatthew Cline2009-11-221-13/+15
| | | | | | | explore_stop condition greedy_pickup_smart no longer stops for items which were thrown by the player. The new condition greedy_pickup_thrown can be used by those who wish to stop auto-explore when thrown items are auto-pickup'd.
* Make emphasise() and is_unknown_stair() refer to map_knowledge.Robert Vollmert2009-11-201-2/+1
| | | | They are no longer passed a "remembered feature" as parameter.
* explore_stop: greedy_pickup_smart, pickup_ignoreMatthew Cline2009-11-191-12/+13
| | | | | | | | | | | | | | | | | | | * Added the explore_stop option "greedy_pickup_smart", which is like greedy_pickup, but only stops for thrown items and items different than any in your inventory (and for fruit if you worship Fedhas). * Added the option explore_stop_pickup_ignore. Any items matching any of the regexes in the list will *not* cause "explore_stop = greedy_pickup" (or greedy_pickup_smart) to stop auto-explore. * "explore_stop = greedy_pickup" no longer stops when picking up gold. * "explore_stop = greedy_pickup" (or greedy_pickup_smart) now stops auto-explore after auto-pickup has happened, rather than right before it happens. * Removed obsolete ES_PICKUP.
* Flatten header dependencies a bit.Robert Vollmert2009-11-171-1/+0
| | | | | | This removes a couple of unnecessary includes from header files. I may have missed adding some tiles includes.
* Travel exclude speedupMatthew Cline2009-11-151-2/+2
| | | | | | | | | | Speed up is_excluded() by making the class exclude_set, which caches the set of excluded points, calculating the set only when exclusions are added or removed (or when an old level is loaded). NOTE: This recomputes the set of excluded points once upon entering level-map mode and once upon exiting it. If this takes to long on slow machines, this can be improved.
* Make find_deepest_explored public.Robert Vollmert2009-11-141-0/+1
|
* Allow auto-travel/explore to kill toadstoolsCharles Otto2009-11-131-0/+2
|
* [ and ] respect dungeon topology (by)Stefan O'Rear2009-11-041-0/+3
|
* Get rid of multiple-meaning "int object" in env.show.Robert Vollmert2009-11-041-1/+1
| | | | | | | | | | | | | env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-8/+2
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Use G in the overmap to directly change levelsStefan O'Rear2009-11-021-1/+2
|
* Implement map viewing for other levelsStefan O'Rear2009-11-021-0/+3
| | | | | | | There are three new commands described on the X? screen. Interlevel travel works. Other levels are not currently highlighted by reachability; let me know if you want this. Interface stolen from TAEB :). dpeg's stair view is not yet in.
* level_pos: add methods current() and is_on()Matthew Cline2009-10-291-0/+8
| | | | | | Added to level_pos the static method current(), similar to level_id::current(), and is_on(level_id lev), which returns true if the level_pos is on the given level_id.
* Move most exclusion code from travel.cc to exclude.cc.Robert Vollmert2009-10-271-32/+1
|
* Convert some ints to monster_type.Robert Vollmert2009-10-271-1/+1
| | | | | | | | | There's a whole lot of places that pass monster_type as int, often with varying meanings for the value -1. This moves some of these to monster_type, introducing MONS_NO_MONSTER and MONS_PLAYER as new invalid special values. Also improve on the autoexclude descriptions.
* Consistenly regard travel_exclud::mon as monster_type.Robert Vollmert2009-10-261-2/+2
| | | | | Should fix the segmentation fault reported by steve in monsters.push_back(get_monster_data(curr_excludes[i].mon)->name);
* Member renaming in travel_exclude.Robert Vollmert2009-10-261-4/+4
|
* Rewrite los_def to handle function parameters sensibly.Robert Vollmert2009-10-261-15/+15
| | | | | | | | | | | | | Previously, it was holding on to pointers to objects it didn't own, causing various bugs. los_def now copies the opacity_func and bounds_func parameters. Making them copyable required introducing opacity_func::clone(). Also implement los_def copy constructor and copy assignment operator. Finally, update travel exclusions and monster patrolling to these changes.
* Revert "Convert exclusions to los_def."Robert Vollmert2009-10-251-11/+8
| | | | | | | This reverts commit 7afa089db8b01b1810c5903309f7302545638550. los_def is currently buggy, leading to weird behaviour when deleting exclusions.
* FR 2792379: stop auto-explore on marked statuesMatthew Cline2009-10-251-0/+3
| | | | | Markers can be placed on statues or orcish idols to cause auto-explore to stop when those statues/idols are first found.
* Make FPROP_FORCE_EXCLUDE set an actual travel exclusion.Jude Brown2009-10-241-9/+11
| | | | | | | | | FPROP_FORCE_EXCLUDE now sets an actual travel exclusion rather than bypassing the travel exclusion system. Exclusions are single squares. Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net> Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Convert exclusions to los_def.Robert Vollmert2009-10-221-4/+7
|
* Unify check for unknown staircases in is_unknown_staircase.Robert Vollmert2009-10-171-1/+4
|
* More renaming and reorganization of feature checks.Robert Vollmert2009-10-171-6/+1
| | | | | | | | | There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever.
* Naming consistency.Robert Vollmert2009-10-171-8/+8
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Rewrite part of the exclusion code.Robert Vollmert2009-10-151-9/+5
| | | | | | | | | | | | * Exclusion radius 0 no longer encodes "no exclusion". * toggle_exclusion split into set_exclusion and del_exclusion: It was never used as a toggle. * Exclusion updates for changed cells unified in void update_exclusion_los(std::vector coord_def changed). Now doesn't leave invalidly non-uptodate exclusions laying around. Still need to find out why off-level exclusions aren't updated after restore.
* Fix questionable implementation of travel_exclude::radius_sq.Robert Vollmert2009-10-151-1/+1
|
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Smarter exclusions, yay!j-p-e-g2009-09-151-10/+16
| | | | | | | | | | | | | | | | | | * Exclusions are now treated similarly to annotations and automatically added to the overmap (with the monster name if centered on a monster). * Exclusions remember whether they were placed automatically and if so, what monster triggered it. * If a grid that was previously autoexcluded comes back into sight and no longer contains the monster that triggered the autoexclusion (dead, moved away or invisible), the autoexclusion is removed again. I updated the tags, so it should be save compatible but I'm not making any promises. Also fix the Wild magic card not being documented correctly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10679 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2824313]: Fix messages when pacified monsters take escape shafts.dolorous2009-07-201-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10353 c06c8d41-db1a-0410-9941-cceddc491573
* * Merfolk may wear heavy armour while swimming, though their armourj-p-e-g2009-03-291-1/+0
| | | | | | | | | | | | penalty is doubled in deep water. * Change "zombified ally" -> "mindless thrall" (and only count friendly monsters). * Call trackers_init_new_level() earlier, in load(), so that TileNewLevel() can use the correct travel information when drawing exclusions on the minimap. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9566 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles again:j-p-e-g2009-03-061-0/+1
| | | | | | | | | | | * Store index of last cell clicked on in inventory and suppress item description if you just clicked on it, so you can see the messages describing whatever you just did (should fix 2660578). * Allow right-click as a synonym for '!' when toggling ^, A, m. * Let shift left-click on avatar standing on altar = prayer. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9343 c06c8d41-db1a-0410-9941-cceddc491573
* More mgrd elimination and moving to coord_def().haranp2009-02-141-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9084 c06c8d41-db1a-0410-9941-cceddc491573
* Allow ziggurats placed in Pandemonium to return to the same Pan level when ↵dshaligram2008-11-251-101/+0
| | | | | | | | | | | | | | the player leaves the ziggurat. Breaks saves. Cleaned up up_stairs() and down_stairs() to remove spurious depth changes when changing you.level_type - depth (you.your_level) now changes only for stairs with both ends in LEVEL_DUNGEON. All levels are now saved on exit, including non LEVEL_DUNGEON levels. Re-entering non-dungeon levels from down_stairs will still delete the old level. Re-entering non-dungeon levels from up_stairs (i.e. returning to a non-dungeon level from some other place, like a ziggurat) will reload the old level. Fixed bogus marker trashing when player attempts to use a Zot entrance with insufficient runes. Delete .msg files when game ends. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7598 c06c8d41-db1a-0410-9941-cceddc491573
* Allow Lua to place vaults with dgn.place_map().dshaligram2008-11-231-1/+11
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7564 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Use the correct portal description in explore stop messages.dshaligram2008-11-181-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7475 c06c8d41-db1a-0410-9941-cceddc491573
* Minor changes.haranp2008-10-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7223 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2063470: =f inscription preventing wielding of stonesj-p-e-g2008-10-041-4/+6
| | | | | | | | | | | | | | | | Improve exclusion los behaviour. * now takes into account what the player knows of the map * don't autoremove exclusions if you don't know the monster died * the los gets updated as the player explores the area For some reason this doesn't work when you dig into an excluded area. FR 2006559: Sort monsters in description menu (?\) using the same measure as the monster list does. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7132 c06c8d41-db1a-0410-9941-cceddc491573
* Implement 1853872: Limit travel exclusions to LOS.j-p-e-g2008-10-041-0/+7
| | | | | | | | | | This was done by adding env_show_grid as a property to all exclusions. losight() is currently called if an exclusion is set, when changing levels/restarting the game and at a vitrification event (in all of the latter cases for all exclusions on the level). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7121 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+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
* Warn the player if interlevel travel is going to take them to a level ↵dshaligram2008-08-041-0/+8
| | | | | | | | | outside the range [src,dest] (rax, doy). Add ^G as an alias for Escape in yesno and yesnoquit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6764 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-4/+5
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* [2013519] Fixing auto-travel problems. There were two issues here. One was ↵ennewalker2008-07-111-0/+3
| | | | | | that going up stairs wasn't updating the correct stair on the previous level. Secondly, sync_branch_stairs was destroying that update anyway. Added a "clear_branch_stairs" function to clear stair info when leaving the vestibule. I am nearly sure this should fix all of the hellish travel issues, but it probably deserves some testing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6500 c06c8d41-db1a-0410-9941-cceddc491573
* Let a level_id be directly compared to a branch type with == and != tozelgadis2008-06-221-0/+11
| | | | | | | | determine if a level_id is (not) in BRANCH_FOO; takes care of comparing level_type to LEVEL_DUNGEON. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6034 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few minor cleanups.dolorous2008-06-201-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6013 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed greedy mode explore_stop so that "items" stops when non-autopickupzelgadis2008-05-311-9/+12
| | | | | | | | | | | | 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