#ifndef lint
static char *RCSid = "$Header: /users/empire/EMP/empmain/SUBS/RCS/bsanct.c,v 1.1 89/05/17 20:51:54 mr-frog Exp $";
#endif

/*
 * bsanct.c
 *
 * from PSL Empire, 1985
 */

#include "misc.h"
#include "var.h"
#include "xy.h"
#include "sect.h"
#include "nsc.h"
#include "nat.h"
#include "news.h"
#include "path.h"
#include "file.h"

bsanct(x, y)
	int	x;
	int	y;
{
	register int i;
	register int count;
	struct	sctstr s;
	int	dx;
	int	dy;
	struct  nstr_sect nstr;

	count = 0;
	/*
	 * start at diroff[0] in order to include
	 * the starting x,y as well as surrounding ones.
	 */
	snxtsct(&nstr, "*");
	while (nxtsct(&nstr, &s)) {
		if (!owner)
			continue;
		if (s.sct_type != SCT_SANCT)
			continue;
		pr(fmt("%s is no longer a sanctuary.\n",
			xyas(s.sct_x, s.sct_y, cnum)));
		s.sct_type = SCT_CAPIT;
		s.sct_newtype = SCT_CAPIT;
		(void) putsect(&s);
		count++;
	}
	if (count > 0)
		nreport(cnum, N_BROKE_SANCT, 0, 1);
}
