Beispiel #1
0
/* Summon a horde of monsters */
static void do_cmd_summon_horde(void)
{
	int px = p_ptr->px;
	int py = p_ptr->py;

	int wy = py, wx = px;
	int attempts = 1000;
	cave_type *c_ptr;


	while (--attempts)
	{
		scatter(&wy, &wx, py, px, 3);

		/* paranoia */
		if (!in_bounds2(wy, wx)) continue;

		c_ptr = area(wy, wx);
		if (cave_naked_grid(c_ptr)) break;

		/* Not under the player */
		if ((wy == py) && (wx == px)) break;
	}

	(void)alloc_horde(wy, wx);
}
Beispiel #2
0
/*!
 * @brief ウィザードモード用モンスターの群れ生成 / Summon a horde of monsters
 * @return なし
 */
static void do_cmd_summon_horde(void)
{
	int wy = p_ptr->y, wx = p_ptr->x;
	int attempts = 1000;

	while (--attempts)
	{
		scatter(&wy, &wx, p_ptr->y, p_ptr->x, 3, 0);
		if (cave_empty_bold(wy, wx)) break;
	}

	(void)alloc_horde(wy, wx);
}