The previous change only affected mimics that started mimicing after the
level was created. This change tries to perform a similar behavior for
randomly placed mimics that are forced to mimic a boulder on special levels.
In this case, since the symbol is fixed and the location is "random", try
several times to find a non-trap location for such a mimic.
} else {
mtmp->m_ap_type = M_AP_OBJECT;
mtmp->mappearance = i;
+ /* try to avoid placing mimic boulder on a trap */
+ if (i == BOULDER && m->x < 0 && t_at(x, y)) {
+ int k;
+
+ for (k = 0; k < 10 && t_at(x, y); ++k) {
+ x = m->x;
+ y = m->y;
+ if (croom)
+ get_room_loc(&x, &y, croom);
+ else {
+ get_location(&x, &y, DRY);
+ }
+ if (MON_AT(x,y) && enexto(&cc, x, y, pm))
+ x = cc.x, y = cc.y;
+ }
+ place_monster(mtmp, x, y);
+ }
}
break;