]> granicus.if.org Git - nethack/commitdiff
Fix prot from shape changers at level generation
authorPasi Kallinen <paxed@alt.org>
Sat, 26 Dec 2015 19:40:17 +0000 (21:40 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 26 Dec 2015 19:40:22 +0000 (21:40 +0200)
Mimics and other shape changers created at level generation
did not obey protection from shape changers.

src/makemon.c
src/sp_lev.c

index 55cf66fabbc4fda92f2953a1a1802f494c70a34d..422a446c2c51028aae1ef5877bcf68ed3fb56d35 100644 (file)
@@ -1988,7 +1988,7 @@ register struct monst *mtmp;
     struct obj *otmp;
     int mx, my;
 
-    if (!mtmp)
+    if (!mtmp || Protection_from_shape_changers)
         return;
     mx = mtmp->mx;
     my = mtmp->my;
index f65e3c270062dea26a89439c624a19cf255770f4..61740b436c89f6229f4b23fe93993c1772a90a9e 100644 (file)
@@ -1585,7 +1585,8 @@ struct mkroom *croom;
          * eventually be expanded.
          */
         if (m->appear_as.str
-            && ((mtmp->data->mlet == S_MIMIC) || mtmp->cham)) {
+            && ((mtmp->data->mlet == S_MIMIC) || mtmp->cham)
+            && !Protection_from_shape_changers) {
             int i;
 
             switch (m->appear) {