diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-04 22:25:25 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-04 22:25:25 +0000 |
commit | a7bf0d48fb863282d7d93209505b518fd507285b (patch) | |
tree | 4efe6cee2818f2a478b8c34bc217378483650383 /crawl-ref/source/dungeon.cc | |
parent | 7c805921b8b0847c39c20ed508c0d8e6b76ae55a (diff) | |
download | crawl-ref-a7bf0d48fb863282d7d93209505b518fd507285b.tar.gz crawl-ref-a7bf0d48fb863282d7d93209505b518fd507285b.zip |
Implement second part of labyrinth tweaks:
* allow mapping of labyrinths, but apply heavy map rot
* lab walls shift from time to time
* added a wizmode command (&k) to test the changes
My usual sequence goes something like &l, >, &{, #,
(copy map dump elsewhere), X, Ctrl-F, y, Esc, &k, &{, #.
I've tweaked my monster pathfinding A* algorithm to only work for
non-monsters, so I've been using that.
Because of the mapping, labyrinths are now actually easier to solve.
(It's a bit hard to tell, though, since I got *really* good at solving
labyrinths over the 40 something trial runs. :) )
At the same time they are now much more interesting and flavourful
because of the map rot, and the shifting provides some wonderful excitement.
So, whoever came up with that idea, thanks! :D
Still to do:
* Exceptions for vaults. (Distinction between vault/non-vault walls.)
* Better handling of walls. (They currently "teleport" to the chosen
floor grid, leading to unusual wall types appearing somewhere else.)
* Improve the feel of the shifted mazes. (They come really close to
the original now but still do not look exactly the same.)
The numbers may need tweaking. Currently, they are:
shift rate : 10% chance, every 20 turns
map rot rate: 45% of the map, every 20 turns
size of shifted area: 12x12 to 24x24
number of shifted walls per round: 12-45
Shifting will only ever take place between unexplored (or forgotten)
grids. Thus, the chance of changes taking place is greater in areas
away from the player.
I also increased the starting distance from the centre from 20*20 to 28*28.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7387 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 6f4f28af82..298e999613 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -896,8 +896,8 @@ static void _reset_level() { env.level_flags = LFLAG_NO_TELE_CONTROL | LFLAG_NO_MAGIC_MAP; - // Labyrinths are *only* mappable for minotaurs. - if (you.level_type != LEVEL_LABYRINTH || you.species != SP_MINOTAUR) + // Labyrinths are now mappable, but come with heavy map rot. (jpeg) + if (you.level_type == LEVEL_ABYSS) env.level_flags |= LFLAG_NOT_MAPPABLE; } else @@ -6738,13 +6738,13 @@ static bool _has_vault_in_radius(const coord_def &pos, int radius, } // Find an entry point that's: -// * At least 25 squares away from the exit. -// * At least 4 squares away from the nearest vault. +// * At least 28 squares away from the exit. +// * At least 6 squares away from the nearest vault. // * Floor (well, obviously). static coord_def _labyrinth_find_entry_point(const dgn_region ®, const coord_def &end) { - const int min_distance = 20 * 20; + const int min_distance = 28 * 28; // Try many times. for (int i = 0; i < 2000; ++i) { @@ -6755,7 +6755,7 @@ static coord_def _labyrinth_find_entry_point(const dgn_region ®, if ((place - end).abs() < min_distance) continue; - if (_has_vault_in_radius(place, 4, MMT_VAULT)) + if (_has_vault_in_radius(place, 6, MMT_VAULT)) continue; return (place); |