summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* * Add stair repelling as a bad Xom effect.j-p-e-g2009-04-131-4/+4
| | | | | | | * Experimentally make tension increase the odds for good effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9600 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix compilation.j-p-e-g2009-04-121-22/+36
| | | | | | | | | | | | | * Fix wording of stair slide chaos effect. * Add new stimulation triggers for Xom (monsters being polymorphed, accidentally hasted/healed, or going berserk) which has the side effect of keeping Xom's interest up if you actually use the chaos branded weapon he gifted you. * Greatly reduce stimulation possible from deliberately quaffing bad potions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9596 c06c8d41-db1a-0410-9941-cceddc491573
* Remove references to unimplemented branches (Caverns, Pit, Inferno).j-p-e-g2009-03-141-6/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9474 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing compilation problem with std::min.ennewalker2009-02-171-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9107 c06c8d41-db1a-0410-9941-cceddc491573
* Lots more cleanups. haranp2009-02-151-2/+2
| | | | | | | | | Remove the sound-strength #defines because they're not used anymore (except for SL_SPLASH, which has been replaced by its value.) Change some #defines to const variables. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9087 c06c8d41-db1a-0410-9941-cceddc491573
* Various cleanups, mostly having to do with coord_def().haranp2009-02-151-20/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9086 c06c8d41-db1a-0410-9941-cceddc491573
* More mgrd elimination and moving to coord_def().haranp2009-02-141-16/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9084 c06c8d41-db1a-0410-9941-cceddc491573
* Call mons_clear_trapping_net() in monsters::moveto(), so it shouldn'tharanp2009-02-121-19/+18
| | | | | | | be needed in other places. Should fix [2456879]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9051 c06c8d41-db1a-0410-9941-cceddc491573
* Fix level map, and travel, knowing too much about the level. Hopefullyharanp2009-02-091-2/+2
| | | | | | | | this didn't break anything which travel depends on. Fixes [2051248]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9012 c06c8d41-db1a-0410-9941-cceddc491573
* Allow monsters that can't swim or drown (e.g. the Royal Jelly) whichharanp2009-02-081-3/+2
| | | | | | | | have been dumped into deep water (e.g. by the Water card) to move along the bottom in order to get out. Fixes [2519093]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8985 c06c8d41-db1a-0410-9941-cceddc491573
* Since DNGN_WATER_STUCK appears to only be used as a placeholder when dolorous2009-01-261-1/+3
| | | | | | | | generating the Shoals, rename it DNGN_WATER_RESERVED, and make grid_is_water() take it into account just in case. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8767 c06c8d41-db1a-0410-9941-cceddc491573
* Really fix compilation.dolorous2009-01-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8765 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify checks for grids containing water.dolorous2009-01-261-11/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8763 c06c8d41-db1a-0410-9941-cceddc491573
* Upcasting doesn't require a dynamic_cast<> (or in fact any cast.)haranp2009-01-211-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8649 c06c8d41-db1a-0410-9941-cceddc491573
* [2495836] Show names for friendly uniques during arena mode. Also, add a ↵ennewalker2009-01-101-1/+1
| | | | | | tile_tag_pref option. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8383 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Added "The Stairs" card (not yet in any deck), eventually to be the card whichzelgadis2008-12-191-35/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16/+160
| | | | | | | | | | | | 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
* So many files? That's probably some debugging messages included,j-p-e-g2008-11-091-1/+1
| | | | | | | | | | | | | | | | | | again... Anyway, I added a check to make sure that monsters that somehow end up in deep water (confusion!) can get out of it again if not aquatic. Monsters that can drown, will still do so, of course. I also removed the drowning conditional for zombies and skeletons. They'll now slog invisibly underwater and eventually reappear in shallow water or dry land. I think this is more interesting than making them drown. That, and they've seen a lot of nerfs lately. Oh, right, and I replaced some ENCH_SUBMERGED with mons_is_submerged(), that might explain the number of modified files... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7427 c06c8d41-db1a-0410-9941-cceddc491573
* Change floor_property (blood, sanctuary) to flags, and add two newj-p-e-g2008-11-071-3/+4
| | | | | | | | | | | | | | | settings: vault and highlight. Vault means a grid is part of a vault (set in dungeon.cc), and currently used to exempt vault grids when shifting labyrinths. Highlight is a meta flag currently only used to highlight labyrinth changes on the 'X' map in wizard mode, but I can think of a couple of other uses, mostly for debugging purposes. Also replace a few for loops in the lab shift function with rectangle_iterators. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7414 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2063470: =f inscription preventing wielding of stonesj-p-e-g2008-10-041-1/+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
* Reworked traps: much much cleaner now. There might be bugs, though.haranp2008-10-011-2/+3
| | | | | | | | | | 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
* In ouch(), use NON_MONSTER instead of 0 as the index for non-monster dolorous2008-09-251-4/+4
| | | | | | | attacks, so as to avoid overlap with the first monster on the level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6985 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
* Massive overhaul to move towards coord_def().haranp2008-07-301-23/+8
| | | | | | | | | | 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
* [2021074] Tiles cursor improvements.ennewalker2008-07-261-1/+21
| | | | 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-12/+12
| | | | | | | | 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
* If a map marker has the property "connected_exclude" then it will bezelgadis2008-07-081-0/+26
| | | | | | | | | | excluded from find_connected_xyz() unless it's the starting square. Used in the "Evil zoo" mini-vault (minivault_9) so that each door opens and closes separately rather than all of them forming a huge gate which opens all at once. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6461 c06c8d41-db1a-0410-9941-cceddc491573
* Improve performance by only checking whether there are lava or deepj-p-e-g2008-06-121-2/+2
| | | | | | | | | | | | | water grids nearby if the player recently moved (or restarted a game) and if a non-adjacent monster tries to reach the player. Remove now unneeded lua code (was used for the old pickup.lua) and make monsters switch away from ranged weapons when engaging you in melee. If a monster will still insist on hitting you with a sling it's a sure sign said sling is cursed (doesn't autoID, though). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5755 c06c8d41-db1a-0410-9941-cceddc491573
* Include secret doors in door-clustering (gates) when opening doors.zelgadis2008-06-121-0/+15
| | | | | | | | | 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
* Bug 1990763: if a monster tries to unsubmerge while under the player,zelgadis2008-06-121-2/+11
| | | | | | | | | | attempt to move it to an adjacent square before doing so. If there are no appropriate adjacent squares then try to make it stay submerged. If it can't stay submerged because the terrain changed then teleport it away. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5738 c06c8d41-db1a-0410-9941-cceddc491573
* Changed dungeon_terrain_changed() so that it removes bloodstains whenzelgadis2008-06-051-2/+45
| | | | | | | | | | | | appropriate, and so it unsubmerges monsters if they can't stay submerged in the new terrain. Also, changed the Water card to use dungeon_terrain_changed() in order to simplify the code a bit, to clean up bloodstains, and to fire off DET_FEAT_CHANGE dungeon events. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5479 c06c8d41-db1a-0410-9941-cceddc491573
* Rename static methods in travel.cc and terrain.cc.j-p-e-g2008-05-201-31/+28
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5146 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-2/+2
| | | | | | 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
* Apply Horst von Brand's (first) patch 1887488: gcc-4.3 compile failures.j-p-e-g2008-04-141-1/+2
| | | | | | | I'm not sure what to do about the rest of that tracker item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4233 c06c8d41-db1a-0410-9941-cceddc491573
* A number of whitespace changes. Linux makes this soooo easy. :Pj-p-e-g2008-04-111-11/+12
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4196 c06c8d41-db1a-0410-9941-cceddc491573
* Prevent shafts from being created in corridors, at least untilj-p-e-g2008-03-291-12/+5
| | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | 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
* Changed door-open failure message to match the door-close message.pauldubois2008-03-151-14/+17
| | | | | | | | | | | | | | | | | | 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/+26
| | | | | | | | | | | | | | | | | 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
* Actually use the new rock habitat properly (oops).dolorous2008-01-041-1/+6
| | | | 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/+31
| | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | 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-0/+9
| | | | | | | | | | | | *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-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2817 c06c8d41-db1a-0410-9941-cceddc491573
* [1821098] Fixed bat transform not conferring flight. Fixed ↵dshaligram2007-10-271-1/+1
| | | | | | player_is_levitating and renamed it to player_is_airborne to describe the function better. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2613 c06c8d41-db1a-0410-9941-cceddc491573
* [1808631] PCs in statue-form should not be able to scramble out of deep water.dshaligram2007-10-071-1/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2357 c06c8d41-db1a-0410-9941-cceddc491573
* Corrected grammar on a couple of Singing Sword messages, fixed crash when ↵dshaligram2007-10-051-1/+1
| | | | | | placing vaults with &L (bobbens). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2332 c06c8d41-db1a-0410-9941-cceddc491573
* Shaft traps (trap doors) [1792195] and level annotation [1769009]zelgadis2007-10-051-1/+1
| | | | | | | | | | added, with the shaft traps changed as per comments on SF; shafts aren't randomly generated yet, so this doesn't change gameplay. Changed DNGN_TRAP_III to DNGN_TRAP_NATURAL, of which trap type the shaft traps are the only current member. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2328 c06c8d41-db1a-0410-9941-cceddc491573
* Another cleanup of dungeon features. Adding general markersj-p-e-g2007-10-041-4/+4
| | | | | | | | for first branch/last branch and first altar/last altar that should hopefully make adding new ones easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2324 c06c8d41-db1a-0410-9941-cceddc491573