total = randint1(10);
/* Hard monsters, small groups */
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (r_ptr->level > floor_ptr->dun_level)
{
extra = r_ptr->level - floor_ptr->dun_level;
{
POSITION mx, my;
- scatter(p_ptr, &my, &mx, hy, hx, 4, 0);
+ scatter(player_ptr, &my, &mx, hy, hx, 4, 0);
/* Walls and Monsters block flow */
if (!cave_empty_bold2(floor_ptr, my, mx)) continue;
for (j = 0; j < n; j++)
{
POSITION nx, ny, d = 7;
- scatter(p_ptr, &ny, &nx, y, x, d, 0);
+ scatter(player_ptr, &ny, &nx, y, x, d, 0);
(void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
}
}
MONRACE_IDX z;
/* Pick a location */
- scatter(p_ptr, &ny, &nx, y, x, d, 0);
+ scatter(player_ptr, &ny, &nx, y, x, d, 0);
/* Require empty grids */
- if (!cave_empty_bold2(p_ptr->current_floor_ptr, ny, nx)) continue;
- get_mon_num_prep(place_monster_can_escort, get_monster_hook2(p_ptr, ny, nx));
+ if (!cave_empty_bold2(player_ptr->current_floor_ptr, ny, nx)) continue;
+ get_mon_num_prep(place_monster_can_escort, get_monster_hook2(player_ptr, ny, nx));
/* Pick a random race */
z = get_mon_num(r_ptr->level);
bool place_monster(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode)
{
MONRACE_IDX r_idx;
- get_mon_num_prep(get_monster_hook(p_ptr), get_monster_hook2(p_ptr, y, x));
+ get_mon_num_prep(get_monster_hook(player_ptr), get_monster_hook2(player_ptr, y, x));
/* Pick a monster */
- r_idx = get_mon_num(p_ptr->current_floor_ptr->monster_level);
+ r_idx = get_mon_num(player_ptr->current_floor_ptr->monster_level);
/* Handle failure */
if (!r_idx) return FALSE;
int attempts = 1000;
POSITION cy = y;
POSITION cx = x;
- get_mon_num_prep(get_monster_hook(p_ptr), get_monster_hook2(p_ptr, y, x));
+ get_mon_num_prep(get_monster_hook(player_ptr), get_monster_hook2(player_ptr, y, x));
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (--attempts)
{
/* Pick a monster */
for (attempts = randint1(10) + 5; attempts; attempts--)
{
- scatter(p_ptr, &cy, &cx, y, x, 5, 0);
+ scatter(player_ptr, &cy, &cx, y, x, 5, 0);
(void)summon_specific(player_ptr, m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
*/
bool alloc_guardian(player_type *player_ptr, bool def_val)
{
- MONRACE_IDX guardian = d_info[p_ptr->dungeon_idx].final_guardian;
+ MONRACE_IDX guardian = d_info[player_ptr->dungeon_idx].final_guardian;
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
- if (guardian && (d_info[p_ptr->dungeon_idx].maxdepth == floor_ptr->dun_level) && (r_info[guardian].cur_num < r_info[guardian].max_num))
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
+ if (guardian && (d_info[player_ptr->dungeon_idx].maxdepth == floor_ptr->dun_level) && (r_info[guardian].cur_num < r_info[guardian].max_num))
{
POSITION oy;
POSITION ox;
if (alloc_guardian(player_ptr, FALSE)) return TRUE;
/* Find a legal, distant, unoccupied, space */
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (attempts_left--)
{
/* Pick a location */
}
/* Accept far away grids */
- if (distance(y, x, p_ptr->y, p_ptr->x) > dis) break;
+ if (distance(y, x, player_ptr->y, player_ptr->x) > dis) break;
}
if (!attempts_left)
POSITION x, y;
MONRACE_IDX r_idx;
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->inside_arena) return FALSE;
if (!mon_scatter(0, &y, &x, y1, x1, 2)) return FALSE;
summon_specific_type = type;
summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
- get_mon_num_prep(summon_specific_okay, get_monster_hook2(p_ptr, y, x));
+ get_mon_num_prep(summon_specific_okay, get_monster_hook2(player_ptr, y, x));
/* Pick a monster, using the level calculation */
r_idx = get_mon_num((floor_ptr->dun_level + lev) / 2 + 5);
/* Prevent illegal monsters */
if (r_idx >= max_r_idx) return FALSE;
- if (p_ptr->current_floor_ptr->inside_arena) return FALSE;
+ if (player_ptr->current_floor_ptr->inside_arena) return FALSE;
if (!mon_scatter(r_idx, &y, &x, oy, ox, 2)) return FALSE;
*/
bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
{
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
POSITION y, x;