summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2009-12-30 08:24:00 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2009-12-30 08:24:00 +0530
commit6f40e4499e2e8057d7ff2476faec45d186daadfe (patch)
tree181a109b00ab67af0829666247683956fa5b6c90
parent82c047ea3c235d96a008e5730eabcb12f31a7aec (diff)
downloadcrawl-ref-6f40e4499e2e8057d7ff2476faec45d186daadfe.tar.gz
crawl-ref-6f40e4499e2e8057d7ff2476faec45d186daadfe.zip
Remove shoal decoy huts. The rune huts are now also used as decoys, with the rune replaced by |
-rw-r--r--crawl-ref/source/dat/shoals.des28
-rw-r--r--crawl-ref/source/dgn-shoals.cc12
-rw-r--r--crawl-ref/source/dungeon.cc15
-rw-r--r--crawl-ref/source/dungeon.h3
4 files changed, 27 insertions, 31 deletions
diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des
index 49b17a232b..f74c690a93 100644
--- a/crawl-ref/source/dat/shoals.des
+++ b/crawl-ref/source/dat/shoals.des
@@ -234,11 +234,13 @@ wwwwwwwww
ENDMAP
################################################################################
-# Shoal hut with rune inside
+# Shoal hut with rune inside.
+#
+# This hut is also used for the decoy huts, with the rune replaced with a good
+# item.
#
-# Shoal:$ is hand-hacked to force lots of minivaults.
NAME: shoalhut_rune
-TAGS: shoal_rune water_ok no_dump
+TAGS: shoal_rune water_ok no_dump allow_dup
SHUFFLE: ABCD
SUBST: A:x, B:x, C:x=, D=+
LROCKTILE: wall_vines
@@ -253,25 +255,6 @@ xx.1.xx
ENDMAP
################################################################################
-# Shoal hut with no rune inside
-#
-# Shoal:$ is hand-hacked to force lots of minivaults.
-NAME: shoalhut_norune
-DEPTH: Shoal:$
-TAGS: allow_dup water_ok shoal no_dump
-SHUFFLE: ABCD
-SUBST: A:x, B:x, C:x=, D=+
-MAP
- xxCxx
-xx.1.xx
-x.1.1.x
-B1.|.1D
-x.1.1.x
-xx.1.xx
- xxAxx
-ENDMAP
-
-################################################################################
# Shoal hangout of Ilsuiw. Using PLACE: makes this quite likely to turn up.
# The hut itself may be empty if Ilsuiw had other engagements.
@@ -281,6 +264,7 @@ TAGS: water_ok
KMONS: 1 = Ilsuiw band, siren
KMONS: 2 = merfolk impaler / merfolk javelineer
KFEAT: 12 = w
+LROCKTILE: wall_vines
MAP
xxxxx
xxw2wxx
diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc
index f48a146266..367ca497d4 100644
--- a/crawl-ref/source/dgn-shoals.cc
+++ b/crawl-ref/source/dgn-shoals.cc
@@ -407,11 +407,15 @@ static void _shoals_furniture(int margin)
const int nhuts = std::min(8, int(_shoals_islands.size()));
for (int i = 2; i < nhuts; ++i)
{
- // Place (non-rune) minivaults on the other islands
+ // Place (non-rune) minivaults on the other islands. We
+ // reuse the shoal rune huts, but do not place the rune
+ // again.
+ int tries = 5;
do
- vault = random_map_for_tag("shoal");
- while (!vault);
- dgn_place_map(vault, false, true, _pick_shoals_island());
+ vault = random_map_for_tag("shoal_rune");
+ while (!vault && --tries > 0);
+ if (vault)
+ dgn_place_map(vault, false, true, _pick_shoals_island(), 0);
}
}
else
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 93e5086ef6..5cae7491fe 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4085,8 +4085,11 @@ void _fixup_after_vault()
// clobber: If true, assumes the newly placed vault can clobber existing
// items and monsters (items may be destroyed, monsters may be
// teleported).
-bool dgn_place_map(const map_def *mdef, bool clobber, bool make_no_exits,
- const coord_def &where)
+bool dgn_place_map(const map_def *mdef,
+ bool clobber,
+ bool make_no_exits,
+ const coord_def &where,
+ int rune_subst)
{
const dgn_colour_override_manager colour_man;
@@ -4114,8 +4117,7 @@ bool dgn_place_map(const map_def *mdef, bool clobber, bool make_no_exits,
}
}
- int rune_subst = -1;
- if (mdef->has_tag_suffix("_entry"))
+ if (rune_subst == -1 && mdef->has_tag_suffix("_entry"))
rune_subst = _dgn_find_rune_subst_tags(mdef->tags);
did_map = _build_secondary_vault(you.your_level, mdef, rune_subst,
clobber, make_no_exits, where);
@@ -4938,6 +4940,11 @@ static void _vault_grid(vault_placement &place,
int which_depth;
int spec = 250;
+ // If rune_subst is set to 0, the rune was already placed,
+ // take appropriate steps.
+ if (place.rune_subst == 0 && vgrid == 'O')
+ place.num_runes++;
+
if (vgrid == '$')
{
which_class = OBJ_GOLD;
diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h
index ded9cea53a..38a9aef6d9 100644
--- a/crawl-ref/source/dungeon.h
+++ b/crawl-ref/source/dungeon.h
@@ -193,7 +193,8 @@ void dgn_set_colours_from_monsters();
void dgn_set_grid_colour_at(const coord_def &c, int colour);
bool dgn_place_map(const map_def *map, bool clobber, bool make_no_exits,
- const coord_def &pos = coord_def(-1, -1));
+ const coord_def &pos = coord_def(-1, -1),
+ int rune_subst = -1);
void level_clear_vault_memory();
void level_welcome_messages();