summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow tiles to destroy only some items.Stefan O'Rear2009-12-301-3/+2
|
* Add feat_is_door.Jude Brown2009-12-191-0/+1
|
* Allow portal vaults to specify fill and border glyph.Jude Brown2009-11-141-0/+5
| | | | | | | | | | | | | Also move dungeon_feature_by_name into terrain.cc, as it does not make sense it being in l_dgngrd.cc. The Lua function "set_border_fill_type(feature)" will replace the default DNGN_ROCK_WALL fill of a portal vault with the specified feature. This could be abused, and should probably only be limited to floor, water and sea, different types of walls, trees and lava; there are no sanity checks for endless traps, statues, stairs, etc. Finally, apply this to the island Trove, giving endless water effect.
* Get rid of multiple-meaning "int object" in env.show.Robert Vollmert2009-11-041-1/+0
| | | | | | | | | | | | | 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.
* FR 2792379: stop auto-explore on marked statuesMatthew Cline2009-10-251-0/+1
| | | | | Markers can be placed on statues or orcish idols to cause auto-explore to stop when those statues/idols are first found.
* More renaming and reorganization of feature checks.Robert Vollmert2009-10-171-2/+10
| | | | | | | | | 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-25/+25
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Remove legacy losight() function.Robert Vollmert2009-10-081-1/+0
| | | | Also remove an obsoleted variant of grid_appearance.
* A rewrite of losight() to allow future generalization.Robert Vollmert2009-10-081-1/+1
| | | | | | | | | | | | | Parameters relevant to the LOS calculation are now passed as an object los_param that takes care of coordinate translation, bounds checking, opacity of cells and what is written to the output array. A check for in_bounds was changed to map_bounds for simlicity; this should not have any effect. Special casing for arena was removed from losight; instead calc_show_los now calls the new losight_permissive.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Detected secret doors are now treated as a distinct new door type, soj-p-e-g2009-07-111-0/+2
| | | | | | | | | | | | that stupid monsters will continue to ignore them as long as they've never been opened. Shifts wall and door types of existing save files. Also apply patch by one the "nobodies" to make bloody tiles show up again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10167 c06c8d41-db1a-0410-9941-cceddc491573
* More mgrd elimination and moving to coord_def().haranp2009-02-141-4/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9084 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify checks for grids containing water.dolorous2009-01-261-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8763 c06c8d41-db1a-0410-9941-cceddc491573
* Added "The Stairs" card (not yet in any deck), eventually to be the card whichzelgadis2008-12-191-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | re-arranges all stairs on the level, but now is just used to test the code used to move stairs in LOS away or towards the player. Added beam flavour BEAM_VISUAL for animating someting moving in a line which doesn't have any effects on its own, and removed BEAM_LINE_OF_SIGHT, which was no longer being used. Added bolt structure field "delay", which can be used to change the delay between animating each square in a beam from the default of 15 msec. For eventual use as a Xom effect added the stairs-are-avoiding-you durations DUR_REPEL_STAIRS_MOVE and DUR_REPEL_STAIRS_CLIMB. If DUR_REPEL_STAIRS_MOVE alone is set then stepping onto a stairs/portal/etc has a 50% chance of making it move away in a random direction. If DUR_REPEL_STAIRS_CLIMB alone is set then attempting to climb a stairs/etc has a 50% chance of making it move away before you can get through it (and ending your turn in the process). If both are set then moving onto it and attempting to climb each have a 29% chance of making it move, for a combined chance of 49.59% of a move-and-climb making the stairs move away. Once a stair is successfully taken there's a 50% chance of the stair on the other end moving away from the player, and then both durations are reset to 0. These can be tested by drawing The Stairs card ("&c stair"), which will set DUR_REPEL_STAIRS_CLIMB if you're on top of a stair or DUR_REPEL_STAIRS_MOVE if your'e not. Added a few wizard targetting command placeholders. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7865 c06c8d41-db1a-0410-9941-cceddc491573
* Generalize swapping two pieces of terrain in function swap_terrain().zelgadis2008-12-111-0/+3
| | | | | | | | | | | | Encapsulate filling out a corpse object for a particular monster in fill_out_corpse(). Started work on "swap chaos weapon with weapon of victim" chaos effect, but am putting that off until there's some actor class virtual methods for changing inventory and equipment. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7807 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2063470: =f inscription preventing wielding of stonesj-p-e-g2008-10-041-0/+1
| | | | | | | | | | | | | | | | 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
* Reworked traps: much much cleaner now. There might be bugs, though.haranp2008-10-011-1/+1
| | | | | | | | | | Traps now remember how much ammo they have. The ammo quantities (from David) are rather tentative. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7076 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
* [2021074] Tiles cursor improvements.ennewalker2008-07-261-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6691 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-2/+2
| | | | | | | | most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
* Add still another whitespace fix.dolorous2008-06-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6080 c06c8d41-db1a-0410-9941-cceddc491573
* Include secret doors in door-clustering (gates) when opening doors.zelgadis2008-06-121-0/+3
| | | | | | | | | In otherwords, if there's a line of secret doors with just one non-secret closed door among them and the non-secret door is opened, open up all the secret doors. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5744 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-1/+1
| | | | | | | | | | | | | | | | | 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
* Changed door-open failure message to match the door-close message.pauldubois2008-03-151-2/+2
| | | | | | | | | | | | | | | | | | Added special case messages for doors already open or closed. Maybe there should be flavor messages for # gateways? We use the same noun (gate/gateway) for # and +++. Remove leading underscore from find_connected_identical() now that it's public. Change large door descriptions slightly: - "open/closed large door" -> "large open/closed door" - "There's a creature in the large doorway!" -> "... in the doorway" - Other messages read a bit better without the adjective, but if it's removed then almost all the flavor is gone. So I left them alone. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3664 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1920778: mons_open_door() not respecting gatesj-p-e-g2008-03-101-0/+3
| | | | | | | | | | | | | | | | | Also fixed several cases where secret doors would be described as rock walls regardless of their actual type, and gates are now described correctly as well. This means that viewing them also prints, e.g. "An open gate." or "A closed large door." without further information since there are no database entries for these specific cases. (Not the entries for simple doors are any more exhaustive.) Fix 1910729: Yredelmnul's Drain Life not waking monsters, using ncampion's solution. Also default greedy_explore to true. (FR 1911112) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3584 c06c8d41-db1a-0410-9941-cceddc491573
* Batch of tiny changes for MSVC compiles.pauldubois2008-03-101-1/+1
| | | | | | | | | | | | | | | 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
* Actually use the new rock habitat properly (oops).dolorous2008-01-041-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3189 c06c8d41-db1a-0410-9941-cceddc491573
* "?/" can now be used to look up items. A side effect of this is thatzelgadis2007-12-061-0/+2
| | | | | | | | | | | | | 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
* Slight cleanup of randart autoinscription.haranp2007-12-051-0/+2
| | | | | | | | | | | Code cleanup with unrandarts and fixedarts. Bugfix for isomorphic-up-to-colour unrandarts being confused when lost in the Abyss. Trowel will not clobber critical features (stairs, portals, etc.) Nemelex is unhappy about Trowel failing. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3003 c06c8d41-db1a-0410-9941-cceddc491573
* M_AMPHIBIOUS now means both "land creature can swim through deep water"zelgadis2007-11-161-2/+3
| | | | | | | | | | | | *and* "deep water creature can walk on land". Most of the supporting features neccessary for the "earth worm" FR [1766532] have been implemented, except for "fleeing towards walls". However, no work has yet been done to update the monster AI to work well when a monster is fighting an earth worm. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2858 c06c8d41-db1a-0410-9941-cceddc491573
* Better secret door hiding (Darshan)haranp2007-11-081-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2817 c06c8d41-db1a-0410-9941-cceddc491573
* Didn't have svn autoprops set properly for the new files that I addedzelgadis2007-09-161-1/+1
| | | | | | | for my code refactoring. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2103 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+57
crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573