From 033b2f5904e3a87e5ce2605b2779be860bf46682 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 1 Jun 2008 12:27:44 +0000 Subject: Fix 1937489: Remove map markers overwritten by lakes or rivers, as was already done for vaults. Modify monster speech to make the beast only use some selected shouts (i.e. not "You hear an irritating whine") and NEVER do the demon taunts since it cannot speak. Demon lords can use almost the whole array of speaking verbs except for "buzz" and "whine". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5400 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dungeon.cc | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/dungeon.cc') diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 7855e3db40..5ab12f34b2 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4102,7 +4102,7 @@ bool dgn_place_map(int map, bool generating_level, bool clobber, const map_def *mdef = map_by_index(map); bool did_map = false; - bool fixup = false; + bool fixup = false; if (mdef->orient == MAP_ENCOMPASS && !generating_level) { @@ -4119,6 +4119,7 @@ bool dgn_place_map(int map, bool generating_level, bool clobber, mprf(MSGCH_DIAGNOSTICS, "Cannot generate encompass map '%s' without clobber=true", mdef->name.c_str()); + return (false); } } @@ -4538,7 +4539,7 @@ bool dgn_place_monster(mons_spec &mspec, { if (mspec.mid != -1) { - const int mid = mspec.mid; + const int mid = mspec.mid; const bool m_generate_awake = (generate_awake || mspec.generate_awake); const bool m_patrolling = (patrolling || mspec.patrolling); @@ -4555,10 +4556,15 @@ bool dgn_place_monster(mons_spec &mspec, if (mid != RANDOM_MONSTER && mid < NUM_MONSTERS) { + // Don't place a unique monster a second time. + // (Boris is handled specially.) if (mons_is_unique(mid) && you.unique_creatures[mid]) return (false); - const habitat_type habitat = mons_habitat_by_type(mid); + const int type = mons_class_is_zombified(mid) ? mspec.monbase + : mid; + + const habitat_type habitat = mons_habitat_by_type(type); if (habitat != HT_LAND) grd[vx][vy] = habitat2grid(habitat); } @@ -7286,6 +7292,9 @@ static void _build_river( dungeon_feature_type river_type ) //mv } else grd[i][j] = river_type; + + // Override existing markers. + env.markers.remove_markers_at(coord_def(i, j), MAT_ANY); } } } @@ -7306,7 +7315,6 @@ static void _build_lake(dungeon_feature_type lake_type) //mv y1 = 5 + random2(GYM - 30); x2 = x1 + 4 + random2(16); y2 = y1 + 8 + random2(12); - // mpr("lake"); for (j = y1; j < y2; j++) { @@ -7337,7 +7345,12 @@ static void _build_lake(dungeon_feature_type lake_type) //mv // So we'll avoid the silliness of monsters and items // on lava and deep water grids. -- bwr if (!one_chance_in(200) && _may_overwrite_pos(i,j)) + { grd[i][j] = lake_type; + + // Override markers. (No underwater portals, please.) + env.markers.remove_markers_at(coord_def(i, j), MAT_ANY); + } } } } -- cgit v1.2.3-54-g00ecf