"remove_object: obj not on floor" panic on hero's next move
inventory cursing caused by "this water's no good" effect when drinking from
a fountain didn't update persistent inventory window
+fix priest created inside temple wall
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
E void FDECL(selection_floodfill, (struct selectionvar *, int, int,
BOOLEAN_P));
+E boolean FDECL(pm_good_location, (int, int, struct permonst *));
E void FDECL(get_location_coord, (schar *, schar *, int, struct mkroom *,
long));
E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P));
struct monst *priest;
struct obj *otmp;
int cnt;
+ int px, py, i, si = rn2(8);
+ struct permonst *prim = &mons[sanctum ? PM_HIGH_PRIEST : PM_ALIGNED_PRIEST];
- if (MON_AT(sx + 1, sy))
- (void) rloc(m_at(sx + 1, sy), FALSE); /* insurance */
+ for (i = 0; i < 8; i++) {
+ px = sx + xdir[(i+si) % 8];
+ py = sy + ydir[(i+si) % 8];
+ if (pm_good_location(px, py, prim))
+ break;
+ }
+ if (i == 8)
+ px = sx, py = sy;
+
+ if (MON_AT(px, py))
+ (void) rloc(m_at(px, py), FALSE); /* insurance */
- priest = makemon(&mons[sanctum ? PM_HIGH_PRIEST : PM_ALIGNED_PRIEST],
- sx + 1, sy, MM_EPRI);
+ priest = makemon(prim, px, py, MM_EPRI);
if (priest) {
EPRI(priest)->shroom = (schar) ((sroom - g.rooms) + ROOMOFFSET);
EPRI(priest)->shralign = Amask2align(levl[sx][sy].altarmask);
return FALSE;
}
+boolean
+pm_good_location(x, y, pm)
+int x, y;
+struct permonst *pm;
+{
+ return is_ok_location(x, y, pm_to_humidity(pm));
+}
+
static unpacked_coord
get_unpacked_coord(loc, defhumidity)
long loc;