summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace `mprf(ch, s)` with `mpr(s, ch)`Chris Oelmueller2013-11-281-5/+5
| | | | Scripted, then manually reviewed.
* Don't compute slime neighbours on levels with no slime.Adam Borowski2013-11-271-0/+6
| | | | | | | | | 2% of a qw profile was spent there. Might be better to optimize it for levels with actual slime on them as well: we call set_terrain_changed() which can update slime neighbour counts, removing the need to compute them repeatedly. Not doing this right now only because I'm not sure about all cases vault placement can alter the terrain.
* Shorten DNGN_ENTER_FOO/DNGN_RETURN_FROM_FOO enums.Adam Borowski2013-11-251-28/+28
|
* Remove "convenience" function connected_doors.blackcustard2013-11-221-15/+19
| | | | | | | | | | | | At one time, before runed doors were added, connected_doors was almost nice shorthand for find_connected_identical(position, DNGN_CLOSED_DOOR, all_door). Now its just a pointless and inconsistently applied layer of indirection. Also refactor find_connected_identical a bit. [Also updated the remaining f_c_i calls to the new parameter list, and made the _f_c_i helper static. -neil]
* Finish degateization of Depths stairs.Adam Borowski2013-11-221-4/+1
|
* Move the rune lock to Vaults rather than Depths.Adam Borowski2013-11-201-1/+1
| | | | | I can't quite fathom the reason to not moving it to /dev/null instead, but here you go.
* Make Depths exit a regular branch stair.Adam Borowski2013-11-161-3/+1
| | | | | | | | This might be a bit debatable, but to me having a portal both ways suggests you're magically transported somewhere. A mundane stair protected by a gate would have a gate on one side and a regular stairway on the other -- a pair of gates is possible but would be unnecessary expense on part of the dungeon's builders.
* 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-5/+18
| | | | | | | | | | | | 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.
* Move set_terrain_changed() away from map_knowledge.ccAdam Borowski2013-11-031-0/+23
| | | | It hardly deals with remembered map.
* Shorten branch enums.Adam Borowski2013-11-031-1/+1
| | | | | Seriously, even preparing this commit gave me a pain in the triangle between the thumb and index finger's bases and the wrist.
* Drop a lot of superfluous parentheses.Adam Borowski2013-10-241-64/+64
| | | | | These can be really confusing, especially if there are operators of different priorities, or multiple levels of parentheses, nearby.
* Get rid of grid_appearance().Adam Borowski2013-10-111-12/+0
|
* Reformat multi-line array literals.Adam Borowski2013-10-051-1/+2
|
* Disallow branch exit mimics.Adam Borowski2013-10-031-0/+7
| | | | | | | This turns out to be the cause of elusive "multiple exits" faults. The check could be amended to ignore mimics, but as the player already knows which exit is the real one (he entered through it!), such mimics have no chance to fool anyone.
* s/permadry_fountain/dry_fountain/gAdam Borowski2013-10-011-1/+1
| | | | No more restarting, let's have the name reflect it.
* Fix a couple of major save tag bump bugs.Adam Borowski2013-10-011-0/+2
|
* Fix reversed feature names for sealed stairs.Adam Borowski2013-10-011-1/+1
|
* Squash four types of dry fountains into one. Reflowing is gone...Adam Borowski2013-09-251-1/+1
|
* Rename "natural traps" to "shafts".Adam Borowski2013-09-251-2/+2
|
* Split the "magical" trap category, to allow recolouring.Adam Borowski2013-09-251-2/+8
|
* Disallow mimics to mess with runed doors.Adam Borowski2013-09-231-2/+3
|
* Don't close opened doors when reverting a door seal.Neil Moore2013-09-111-0/+4
| | | | There might be a monster underneath.
* Revert "Remove player clinging".Adam Borowski2013-08-121-3/+9
| | | | | | | | | | | | | | Minus gargoyle clinging, of course. With monster clinging back, it would be inconsistency for inconsistency sake. Player clinging: * is what people expect spiders to be able to do (if monsters can). Count on bug reports about this. * allows people to learn monster mechanics on their own * is useful in the early game, or later if you don't have that particular spell. People don't tend to lug heavy potions of Flight either. * is actually fun
* Revert "Bye bye clinging."Raphael Langella2013-08-121-0/+62
| | | | | | | | | | | | | Clinging might be a minor feature, but it's a distinguishing one, it's thematic and it's working quite well. Player/monster symmetry has never been a goal, so it seems dubious to invoke it as the reason to throw away all the work that has been put into clinging. We can always say that the player turns into a different kind of spider which is unable to cling for some reason. This reverts commit bdc56382eacf7af1b2330dc6444916d368741fec. This reverts commit d689486464fcaaac025a6f469ab69674a2f4d173. This reverts commit 1addaaf8ee92de5060fdb436f93251843abd2035.
* Refactor 'you.religion' checks.Brendan Hickey2013-07-281-1/+1
| | | | | Pull 'you.religion [!=]= FOO' checks into a function: you_worship(FOO). This change is part of a large plan to clean up religion.
* Fix lots of typosChris Oelmueller2013-07-231-1/+1
|
* Allow vault wardens to seal stairways in addition to doorsDracoOmega2013-07-141-0/+3
| | | | | | | | Among other things, this allows their ability to have some effect when encountered in Vaults:$. It currently works on all non-portal stairs and hatches (including branch entrances and exits)
* Remove the Dwarven Hall.Adam Borowski2013-07-101-2/+16
| | | | It's easy to re-add it if we'd have a better idea for it after all.
* Bye bye clinging.Adam Borowski2013-07-101-62/+0
| | | | | | | | | | | With player clinging removed, monster doesn't make much sense. Note that I personally somehow like clinging -- even if it's rarely useful except early on, it was quite harmless. However, I'm strongly against having players and monsters inconsistent when there's no very good reason. Thus, reverting this and MarvinPA's change is an option. Just please keep or revert them together.
* Remove player clingingChris Campbell2013-07-091-9/+3
| | | | | | | | | As a player mechanic, it's almost never relevant and in the few cases where it can be relevant it's quickly obsoleted by fairly common sources of flight, as well as being unnecessarily complicated (no diagonal clinging for some reason?). As a race-specific mechanic it also results in a lot of annoying message spam ("You open the door. You fall off the door.").
* Make the Lair plant placement connectivity checks public and relocateDracoOmega2013-06-241-0/+53
| | | | The next commit will be making use of them.
* New mcros ASSERT_IN_BOUNDS{,_OR_ORIGIN}().Neil Moore2013-06-091-2/+3
| | | | | These print the out-of-bounds coordinate as part of the assertion message.
* Actually remove sealed doors blown up by LRD or shatterDracoOmega2013-06-081-2/+12
| | | | | | | | Since the new temporary terrain change framework, nuking a transformed wall automatically reverts to its previous feature, but in this case we don't actually want that behavior (a shattered sealed door turning into a normal door). Now effects that nuke sealed doors should properly revert them to floor.
* Make a function static.Adam Borowski2013-05-291-3/+5
|
* Add missing newline at end of file.David Lawrence Ramsey2013-05-261-1/+1
|
* Make nuke_wall respect temporary terrain changes and restore old featuresDracoOmega2013-05-261-2/+2
|
* Add routines for temporary terrain manipulationDracoOmega2013-05-261-0/+111
| | | | | | | | | | | | | | | | Each terrain change specifies a desired feature, a duration (which may be INFINITE_DURATION), a terrain change type (used for reference and stacking at the moment), and optionally a source monster (if one is specified, the terrain change is undone upon the monster's death) A temporary terrain change will automatically revert to the original underlying feature when it times out, or the source monster is killed. There can only be one terrain change of a given type at a single location. A new change of the same type will overwrite the old one if it either changes the terrain to a different feature type than the old one, or has a greater duration than remains of the old one (this will change the associated source monster, if appropriate).
* Implement cloud alpha overlay tiles layerPete Hurst2013-05-251-0/+1
| | | | | | | | | | | This works very well for the most part with two small problems: - Webtiles will not support this yet (in probability, this will stop any clouds showing in webtiles) - Floor items interact strangely and will draw over the top of clouds instead of behind them
* Also reset feat_idx when resetting the feature tile.Florian Diebold2013-05-081-0/+1
| | | | Otherwise, the tile could come back when loading a save.
* Reset tile on dungeon_terrain_changedPete Hurst2013-05-081-0/+3
| | | | | | This fixes a number of issues where a layout/vault applies a tile to a feature and then subsequent vault/terrain placements incorrectly inherit that tile.
* Allow summoning/recalling fliers over deep waterDracoOmega2013-04-021-1/+1
| | | | | | | | | | | | | | | The routine which finds free space to place these monsters now uses monster_habitable_grid directly instead of its own logic (which ignored flying entirely). Spells which can summon both fliers and non-fliers (ie: call imp, summon greater demon, etc.) will make no attempt to respect the surrounding terrain when choosing a monster type (and so will sometimes attempt to summon a monster that cannot be placed at that terrain, and fail as previously), though it is arguably better if players cannot influence what things they summon by where they are standing. In either case, this is certainly much better than Haunt and Battlesphere failing when over deep water for no clear reason.
* Fix #ifdefs for next major version bump.David Lawrence Ramsey2013-03-221-3/+0
|
* Remove two now-useless checks.Adam Borowski2013-03-091-8/+0
|
* Put the enum for sealed doors where it belongs.Adam Borowski2013-03-091-8/+2
| | | | | | | | This may cause problems, but then, with #if TAG_MAJOR_VERSION, we'd have them without warning when the bump happens. There's quite a few functions that use enum ordering for passability/etc. At least this way fewer saves will be affected.
* Add Vault WardensDracoOmega2013-03-031-2/+15
| | | | | | | | | | | | | These are the watch captains of the vault, similar in stats to a greater vault guard, with more HD and slightly better equipment. They can evoke a rune of sealing which slams shut doors near the player and seals them closed. Sealed doors cannot be opened by the player by any means (though they can still be destroyed in the usual ways), although monsters can open them freely. The seals will expire after a number of turns, or instantly upon the death of the warden which sealed them.
* Add formatting fix.David Lawrence Ramsey2013-02-211-2/+2
|
* Refactor some direct uses of dungeon feature enum orderingDracoOmega2013-02-211-0/+5
| | | | | | Rather than relying on feat >= DNGN_FLOOR having the same semantics as 'open space', wrap this in boolean functions (which already largely exist). This is also more robust if the backend ever changes.
* Make iron grates ground electricity as metal walls do.David Lawrence Ramsey2013-02-191-0/+5
| | | | The previous inconsistency was mentioned in Mantis 6667.
* Simplify tree and mangrove handling by using feat_is_tree().David Lawrence Ramsey2013-02-191-5/+4
|