diff options
-rw-r--r-- | crawl-ref/source/acr.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/chardump.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 29 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 11 |
5 files changed, 44 insertions, 11 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index c20ec8bf9f..279af960c0 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3689,10 +3689,6 @@ static void _open_door(int move_x, int move_y, bool check_confused) } } -/* - * Similar to open_door. Can you spot the difference? - * FIX ME: closing a gate should update all tiles involved! - */ static void _close_door(int door_x, int door_y) { struct dist door_move; @@ -3787,7 +3783,8 @@ static void _close_door(int door_x, int door_y) } else { - const char* verb = player_is_airborne() ? "reach down and close" : "close"; + const char* verb = player_is_airborne() ? "reach down and close" + : "close"; mprf( "You %s the %s%s.", verb, adj, noun ); } diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index 65ec415c04..8e26e59668 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -576,9 +576,11 @@ static void sdump_notes(dump_params &par) static void sdump_location(dump_params &par) { if (you.your_level == -1 - && you.where_are_you == BRANCH_MAIN_DUNGEON - && you.level_type == LEVEL_DUNGEON) + && you.where_are_you == BRANCH_MAIN_DUNGEON + && you.level_type == LEVEL_DUNGEON) + { par.text += "You escaped"; + } else if (par.se) par.text += "You were " + prep_branch_level_name(); else diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index f49b9b619e..3e7668874f 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -65,6 +65,7 @@ #include "stuff.h" #include "tags.h" #include "terrain.h" +#include "tiles.h" #include "traps.h" #include "travel.h" #include "view.h" @@ -120,7 +121,7 @@ static bool _make_box(int room_x1, int room_y1, int room_x2, int room_y2, static void _replace_area(int sx, int sy, int ex, int ey, dungeon_feature_type replace, dungeon_feature_type feature, - unsigned mmask = 0); + unsigned mmask = 0, bool needs_update = false); static builder_rc_type _builder_by_type(int level_number, char level_type); static builder_rc_type _builder_by_branch(int level_number); static builder_rc_type _builder_normal(int level_number, char level_type, @@ -1490,7 +1491,7 @@ static void _prepare_shoals(int level_number) if ( at_bottom ) { // Put all the stairs on one island - grd[centres[0].x][centres[0].y] = DNGN_STONE_STAIRS_UP_I; + 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-1][centres[0].y] = DNGN_STONE_STAIRS_UP_III; @@ -4675,7 +4676,7 @@ static int _vault_grid( vault_placement &place, } which_class = OBJ_MISCELLANY; - which_type = MISC_RUNE_OF_ZOT; + which_type = MISC_RUNE_OF_ZOT; num_runes++; if (you.level_type == LEVEL_PANDEMONIUM) @@ -4756,16 +4757,36 @@ static int _vault_grid( vault_placement &place, return (altar_count); } // end vault_grid() +// Currently only used for Slime: branch end +// where it will turn the stone walls into clear rock walls +// once the royal jelly has been killed. +void replace_area_wrapper(dungeon_feature_type old_feat, + dungeon_feature_type new_feat) +{ + ASSERT(old_feat != new_feat); + _replace_area(0, 0, GXM-1, GYM-1, old_feat, new_feat, 0, true); +} + static void _replace_area( int sx, int sy, int ex, int ey, dungeon_feature_type replace, - dungeon_feature_type feature, unsigned mapmask) + dungeon_feature_type feature, unsigned mapmask, + bool needs_update) { int x,y; for (x = sx; x <= ex; x++) for (y = sy; y <= ey; y++) { if (grd[x][y] == replace && unforbidden(coord_def(x, y), mapmask)) + { grd[x][y] = feature; + if ( needs_update && is_terrain_seen(coord_def(x,y)) ) + { + set_envmap_obj(x, y, feature); +#ifdef USE_TILE + tile_place_tile_bk(x, y, feature); +#endif + } + } } } diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index a43734bda4..0ed5275ecc 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -316,6 +316,8 @@ bool is_wall(int feature); bool place_specific_trap(int spec_x, int spec_y, trap_type spec_type); void place_spec_shop(int level_number, int shop_x, int shop_y, int force_s_type, bool representative = false); +void replace_area_wrapper(dungeon_feature_type old_feat, + dungeon_feature_type new_feat); bool unforbidden(const coord_def &c, unsigned mask); coord_def dgn_find_nearby_stair(dungeon_feature_type stair_to_find, coord_def base_pos, bool find_closest); diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 107951b5b2..53f81ca337 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1206,6 +1206,17 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) dgn_event(DET_MONSTER_DIED, monster->pos(), 0, monster_index(monster), killer)); + // This is assuming the royal jelly is a unique monster. Is it? + // FIXME: Needs check for being at bottom level of the branch. + if (monster->type == MONS_ROYAL_JELLY + && player_in_branch( BRANCH_SLIME_PITS )) + { + mpr("Suddenly, all colour oozes out of the surrounding stone!", + MSGCH_MONSTER_ENCHANT); + + replace_area_wrapper(DNGN_STONE_WALL, DNGN_CLEAR_ROCK_WALL); + } + const coord_def mwhere = monster->pos(); if (drop_items) _monster_drop_ething(monster, YOU_KILL(killer) || pet_kill); |