summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-06 16:25:01 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-06 16:25:01 +0000
commit50c3e7b2427a5f93e0bcc763beb3130e4d2bc265 (patch)
tree9d377b96c3075ef68d118b141c843ee5cf34bf4f
parent8d44ee97df27c920b7b457a2a1e15f1b6fc28acd (diff)
downloadcrawl-ref-50c3e7b2427a5f93e0bcc763beb3130e4d2bc265.tar.gz
crawl-ref-50c3e7b2427a5f93e0bcc763beb3130e4d2bc265.zip
Shoals bottom now has 4-6 huts, each of which has a 50%
chance of containing the Rune, instead of the previous setup. Moved most feature descriptions to descript.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1775 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/dat/descript.txt229
-rw-r--r--crawl-ref/source/dat/mini.des34
-rw-r--r--crawl-ref/source/describe.cc50
-rw-r--r--crawl-ref/source/dungeon.cc75
4 files changed, 315 insertions, 73 deletions
diff --git a/crawl-ref/source/dat/descript.txt b/crawl-ref/source/dat/descript.txt
index 243bba0da6..44dd75aca2 100644
--- a/crawl-ref/source/dat/descript.txt
+++ b/crawl-ref/source/dat/descript.txt
@@ -2044,3 +2044,232 @@ Portaled Projectile
This spell teleports a missile directly to its target, greatly increasing its accuracy (but not damage.)
%%%%
+A stone wall
+
+A harder obstacle than rock walls. Only the mightiest magic can shatter stone walls.
+%%%%
+A wall of the weird stuff which makes up Pandemonium
+
+%%%%
+A rock wall
+
+The typical dungeon barrier. Though it is impenetrable at first sight, there are several ways to get through or around it.
+%%%%
+An unnaturally hard rock wall
+
+%%%%
+A metal wall
+
+An impenetrable barrier. As every dungeon electrician knows, it grounds all forms of electricity.
+%%%%
+A wall of green crystal
+
+For some reason, some dungeon walls, like this one, have been made of this polished crystal, imbued with arcane magics. They prevent its destruction, and make it reflect heat and cold.
+%%%%
+An orcish idol
+
+An idol of Beogh
+
+%%%%
+A wall of solid wax
+
+These walls are built by bees. Occasionally a dungeon architect will manipulate bees into building wax walls for esthetic reasons. (Theirs, not the bees'.) They are susceptible to heat and can easily melt.
+%%%%
+A granite statue
+
+%%%%
+Some lava
+
+Lava, like the smoke that billows from it, sure looks pretty from above! But walking on lava will burn everything but lava creatures to a crisp. If the lava creatures themselves haven't already done that job at range, that is.
+%%%%
+Some deep water
+
+%%%%
+Some shallow water
+
+This waist-deep, misty water makes movement and combat cumbersome for landlubbers -- sometimes dangerous, but never directly fatal.
+%%%%
+Floor
+
+%%%%
+An open door
+
+A plain door. You can close it by standing next to it and pressing 'c'.
+%%%%
+A closed door
+
+A plain door. To open it, try simply walking into it, or press 'o'.
+%%%%
+A rock staircase leading down
+
+%%%%
+A stone staircase leading down
+
+%%%%
+A rock staircase leading up
+
+%%%%
+A stone staircase leading up
+
+%%%%
+A gateway to Hell
+
+%%%%
+A mechanical trap
+
+%%%%
+A magical trap
+
+%%%%
+A trap
+
+%%%%
+A shop
+
+%%%%
+A labyrinth entrance
+
+%%%%
+A gateway to the Iron City of Dis
+
+%%%%
+A gateway to Gehenna
+
+%%%%
+A gateway to the freezing wastes of Cocytus
+
+%%%%
+A gateway to the decaying netherworld of Tartarus
+
+%%%%
+A one-way gate to the infinite horrors of the Abyss
+
+%%%%
+A gateway leading out of the Abyss
+
+%%%%
+An empty arch of ancient stone
+
+%%%%
+A gate leading to the halls of Pandemonium
+
+%%%%
+A gate leading out of Pandemonium
+
+%%%%
+A gate leading to another region of Pandemonium
+
+%%%%
+A staircase to the Orcish Mines
+
+%%%%
+A staircase to the Hive
+
+%%%%
+A staircase to the Lair
+
+%%%%
+A staircase to the Slime Pits
+
+%%%%
+A staircase to the Vaults
+
+%%%%
+A staircase to the Crypt
+
+%%%%
+A staircase to the Hall of Blades
+
+%%%%
+A gate to the Realm of Zot
+
+%%%%
+A staircase to the Ecumenical Temple
+
+%%%%
+A staircase to the Snake Pit
+
+%%%%
+A staircase to the Elven Halls
+
+%%%%
+A staircase to the Tomb
+
+%%%%
+A staircase to the Swamp
+
+%%%%
+A staircase to the Shoals
+
+%%%%
+A staircase back to the Dungeon
+
+%%%%
+A staircase back to the Lair
+
+%%%%
+A staircase back to the Vaults
+
+%%%%
+A staircase back to the Mines
+
+%%%%
+A staircase back to the Crypt
+
+%%%%
+A gate leading back out of this place
+
+%%%%
+A glowing white marble altar of Zin
+
+%%%%
+A glowing golden altar of the Shining One
+
+%%%%
+An ancient bone altar of Kikubaaqudgha
+
+%%%%
+A basalt altar of Yredelemnul
+
+%%%%
+A shimmering altar of Xom
+
+%%%%
+A shining altar of Vehumet
+
+%%%%
+An iron altar of Okawaru
+
+%%%%
+A burning altar of Makhleb
+
+%%%%
+A deep blue altar of Sif Muna
+
+%%%%
+A bloodstained altar of Trog
+
+%%%%
+A sparkling altar of Nemelex Xobeh
+
+%%%%
+A silver altar of Elyvilon
+
+%%%%
+A corrupted altar of Lugonu
+
+%%%%
+A roughly hewn altar of Beogh
+
+%%%%
+A fountain of clear blue water
+
+'q'uaff to drink from this fountain. But it's far more pretty than useful, unless you're trying to fetch the Orb without eating, I guess.
+%%%%
+A fountain of sparkling water
+
+'q'uaff to drink from this magic fountain. Expect magical effects, as long as it's still magic.
+%%%%
+A dry fountain
+
+%%%%
diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des
index 38268904e5..45cf2bd33b 100644
--- a/crawl-ref/source/dat/mini.des
+++ b/crawl-ref/source/dat/mini.des
@@ -1214,3 +1214,37 @@ MAP
.xxxx.
......
ENDMAP
+
+##############################
+# Shoal hut with rune inside
+#
+# Shoal:$ is hand-hacked to force lots of minivaults.
+NAME: shoalhut_rune
+PLACE: Shoal:5
+TAGS: water_ok
+MONS: cyclops
+CHANCE: 1000
+MAP
+.x+x.
+xx1xx
+=1O1x
+xx1xx
+.xxx.
+ENDMAP
+
+##############################
+# Shoal hut with no rune inside
+#
+# Shoal:$ is hand-hacked to force lots of minivaults.
+NAME: shoalhut_norune
+PLACE: Shoal:5
+TAGS: water_ok allow_dup
+MONS: cyclops
+CHANCE: 1000
+MAP
+.x+x.
+xx.xx
+=.*1x
+xx1xx
+.xxx.
+ENDMAP
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 5fff7420c0..945a7a3e72 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3285,31 +3285,6 @@ static std::string get_feature_description_wide(int feat)
{
switch ( feat )
{
- case DNGN_ROCK_WALL:
- case DNGN_SECRET_DOOR: // to prevent detection with 'x'
- return "The typical dungeon barrier. Though it is impenetrable at "
- "first sight, there are several ways to get through "
- "or around it.";
- case DNGN_STONE_WALL:
- return "A harder obstacle than rock walls. Only the mightiest "
- "magic can shatter stone walls.";
- case DNGN_GREEN_CRYSTAL_WALL:
- return "For some reason, some dungeon walls, like this one, "
- "have been made of this polished crystal, imbued with arcane "
- "magics. They prevent its destruction, and make it reflect heat "
- "and cold.";
- case DNGN_METAL_WALL:
- return "An impenetrable barrier. As every dungeon electrician "
- "knows, it grounds all forms of electricity.";
- case DNGN_WAX_WALL:
- return "These walls are built by bees. Occasionally a dungeon "
- "architect will manipulate bees into building wax walls for "
- "esthetic reasons. (Theirs, not the bees'.) They are susceptible "
- "to heat and can easily melt.";
- case DNGN_SHALLOW_WATER:
- return "This waist-deep, misty water makes movement and combat "
- "cumbersome for landlubbers -- sometimes dangerous, but never "
- "directly fatal.";
case DNGN_DEEP_WATER:
if (you.species != SP_MERFOLK)
return "This deep, misty water will drown any who set foot in it, "
@@ -3318,18 +3293,6 @@ static std::string get_feature_description_wide(int feat)
"thinking twice. Except when they're really confused...";
else
return "This is the deep, misty water which you call home.";
- case DNGN_LAVA:
- return "Lava, like the smoke that billows from it, sure looks "
- "pretty from above! But walking on lava will burn everything "
- "but lava creatures to a crisp. If the lava creatures themselves "
- "haven't already done that job at range, that is.";
- case DNGN_SPARKLING_FOUNTAIN:
- return "'q'uaff to drink from this magic fountain. Expect magical "
- "effects, as long as it's still magic.";
- case DNGN_BLUE_FOUNTAIN:
- return "'q'uaff to drink from this fountain. But it's far more "
- "pretty than useful, unless you're trying to fetch the Orb "
- "without eating, I guess.";
case DNGN_FLOOR:
switch (random2(6))
{
@@ -3350,12 +3313,6 @@ static std::string get_feature_description_wide(int feat)
"but then, the dungeon is no playground for the "
"superstitious.";
}
- case DNGN_OPEN_DOOR:
- return "A plain door. "
- "You can close it by standing next to it and pressing 'c'.";
- case DNGN_CLOSED_DOOR:
- return "A plain door. "
- "To open it, try simply walking into it, or press 'o'.";
case DNGN_ENTER_SHOP:
return "A shop! Here, of all places! Some souls question the "
"wisdom of the dungeon's shopkeepers, who import wares to "
@@ -3371,6 +3328,11 @@ void describe_feature_wide(int x, int y)
{
std::string desc = feature_description(x, y);
desc += "$$";
+
+ // Get rid of trailing .$$ before lookup
+ desc += getLongDescription(desc.substr(0, desc.length() - 3));
+
+ // For things which require logic
desc += get_feature_description_wide(grd[x][y]);
clrscr();
@@ -3383,7 +3345,7 @@ static void show_item_description(const item_def &item)
{
clrscr();
- std::string description = get_item_description( item, 1 );
+ const std::string description = get_item_description( item, 1 );
print_description(description);
if (item.has_spells())
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index d133f8609c..eaf07faed6 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -507,7 +507,8 @@ static void build_dungeon_level(int level_number, int level_type)
// Try to place minivaults that really badly want to be placed. Still
// no guarantees, seeing this is a minivault.
- place_special_minivaults(level_number, level_type);
+ if (!player_in_branch(BRANCH_SHOALS))
+ place_special_minivaults(level_number, level_type);
// hook up the special room (if there is one, and it hasn't
// been hooked up already in roguey_level())
@@ -522,7 +523,10 @@ static void build_dungeon_level(int level_number, int level_type)
if (player_in_branch( BRANCH_SWAMP ))
prepare_swamp();
else if (player_in_branch(BRANCH_SHOALS))
+ {
prepare_shoals();
+ place_special_minivaults(level_number, level_type);
+ }
place_branch_entrances( level_number, level_type );
@@ -845,33 +849,8 @@ static void prepare_shoals()
grd[centres[0].x][centres[0].y] = DNGN_STONE_STAIRS_UP_I;
grd[centres[0].x+1][centres[0].y] = DNGN_STONE_STAIRS_UP_II;
grd[centres[0].x+2][centres[0].y] = DNGN_STONE_STAIRS_UP_III;
-
- // turn all island centres into floor
- for ( int i = 1; i < num_islands; ++i )
- grd[centres[i].x][centres[i].y] = DNGN_FLOOR;
-
- // Put a rune in the centre of another island
- {
- int item_made = items( 1, OBJ_MISCELLANY, MISC_RUNE_OF_ZOT, true,
- 0, RUNE_SHOALS );
- if (item_made != NON_ITEM && item_made != -1)
- {
- mitm[item_made].x = centres[1].x;
- mitm[item_made].y = centres[1].y;
- }
- }
- // Put good items in the other islands
- for ( int i = 2; i < num_islands; ++i )
- {
- int item_made = items( 1, OBJ_RANDOM, OBJ_RANDOM, true,
- MAKE_GOOD_ITEM, MAKE_ITEM_RANDOM_RACE );
- if (item_made != NON_ITEM && item_made != -1)
- {
- mitm[item_made].x = centres[i].x;
- mitm[item_made].y = centres[i].y;
- }
- }
+ // Minivault creation will place the rune (96.4% of the time)
}
else
{
@@ -1194,6 +1173,36 @@ static void place_special_minivaults(int level_number, int level_type)
}
}
+ // FIXME hand-hackery for placing minivaults at the bottom of the Shoals.
+ if ( (level_id::current().branch == BRANCH_SHOALS) &&
+ (level_id::current().depth = branches[BRANCH_SHOALS].depth) )
+ {
+ int tries = 40;
+ int num_to_place = random2(3) + 4;
+ for ( int i = 0; i < num_to_place && tries > 0; ++i, --tries )
+ {
+ const int vault = random_map_for_dlevel(level_number, true);
+
+ if (vault == -1)
+ {
+ --i;
+ continue;
+ }
+
+ // If we've already used this minivault and it doesn't
+ // want duplicates, do another iteration.
+ if (used.find(vault) != used.end()
+ && !map_by_index(vault)->has_tag("allow_dup"))
+ {
+ --i;
+ continue;
+ }
+
+ build_minivaults(level_number, vault);
+ used.insert(vault);
+ }
+ }
+
int chance = level_number == 0? 50 : 100;
while (chance && random2(100) < chance)
{
@@ -2546,6 +2555,7 @@ static bool safe_minivault_place(int v1x, int v1y,
dgn_region reg(v1x, v1y, place.width, place.height);
if (reg.overlaps_any(vault_zones))
return (false);
+ const bool water_ok = place.map.has_tag("water_ok");
for (int vx = v1x; vx < v1x + place.width; vx++)
{
for (int vy = v1y; vy < v1y + place.height; vy++)
@@ -2553,7 +2563,10 @@ static bool safe_minivault_place(int v1x, int v1y,
if ((grd[vx][vy] != DNGN_FLOOR
&& grd[vx][vy] != DNGN_ROCK_WALL
&& grd[vx][vy] != DNGN_CLOSED_DOOR
- && grd[vx][vy] != DNGN_SECRET_DOOR)
+ && grd[vx][vy] != DNGN_SECRET_DOOR
+ && (!water_ok ||
+ (grd[vx][vy] != DNGN_DEEP_WATER
+ && grd[vx][vy] != DNGN_SHALLOW_WATER)))
|| igrd[vx][vy] != NON_ITEM
|| mgrd[vx][vy] != NON_MONSTER)
{
@@ -2568,6 +2581,7 @@ static bool connected_minivault_place(int v1x, int v1y,
const vault_placement &place)
{
/* must not be completely isolated: */
+ const bool water_ok = place.map.has_tag("water_ok");
for (int vx = v1x; vx < v1x + place.width; vx++)
{
// if (vx != v1x && vx != v1x + 12) continue;
@@ -2575,7 +2589,10 @@ static bool connected_minivault_place(int v1x, int v1y,
{
if (grd[vx][vy] == DNGN_FLOOR
|| grd[vx][vy] == DNGN_CLOSED_DOOR
- || grd[vx][vy] == DNGN_SECRET_DOOR)
+ || grd[vx][vy] == DNGN_SECRET_DOOR
+ || (water_ok
+ && (grd[vx][vy] == DNGN_SHALLOW_WATER ||
+ grd[vx][vy] == DNGN_DEEP_WATER)))
return (true);
}
}