From e37087e99954e0750ceac9069eef7cf1581d75b9 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 14 Sep 2018 21:49:02 +0300 Subject: [PATCH] Handle monsters inside the invocation area --- doc/fixes36.2 | 1 + src/mklev.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 6887cd195..3c514a8a4 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -116,6 +116,7 @@ for hilite_status of string status fields (title, dungeon-level, alignment), value-changed if from config file and don't offer as choices with 'O' jumping into or over a Sokoban pit, or over a fire trap, triggers trap twice mimics created by #wizgenesis could block or not block vision incorrectly +handle monsters inside the invocation area Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/mklev.c b/src/mklev.c index 5ae75498d..f704db27d 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1733,6 +1733,7 @@ int dist; struct obj *otmp; boolean make_rocks; register struct rm *lev = &levl[x][y]; + struct monst *mon; /* clip at existing map borders if necessary */ if (!within_bounded_area(x, y, x_maze_min + 1, y_maze_min + 1, @@ -1759,7 +1760,6 @@ int dist; obfree(otmp, (struct obj *) 0); } } - unblock_point(x, y); /* make sure vision knows this location is open */ /* fake out saved state */ lev->seenv = 0; @@ -1796,6 +1796,20 @@ int dist; break; } + if ((mon = m_at(x, y)) != 0) { + /* wake up mimics, don't want to deal with them blocking vision */ + if (mon->m_ap_type) + seemimic(mon); + + if ((ttmp = t_at(x, y)) != 0) + (void) mintrap(mon); + else + (void) minliquid(mon); + } + + if (!does_block(x, y, lev)) + unblock_point(x, y); /* make sure vision knows this location is open */ + /* display new value of position; could have a monster/object on it */ newsym(x, y); } -- 2.40.0