*/
bool place_monster_aux(int who, int y, int x, int r_idx, u32b mode)
{
- int i;
+ int i, j, n;
monster_race *r_ptr = &r_info[r_idx];
if (!(mode & PM_NO_KAGE) && one_in_(333))
/* Place one monster, or fail */
if (!place_monster_one(who, y, x, r_idx, mode)) return (FALSE);
-
/* Require the "group" flag */
if (!(mode & PM_ALLOW_GROUP)) return (TRUE);
place_monster_m_idx = hack_m_idx_ii;
+ /* Reinforcement */
+ for(i = 0; i < 6; i++)
+ {
+ if(!r_ptr->reinforce_id[i]) break;
+ n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
+ for(j = 0; j < n; j++)
+ {
+ int nx, ny, z, d = 7;
+ scatter(&ny, &nx, y, x, d, 0);
+ (void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
+ }
+ }
+
/* Friends for certain monsters */
if (r_ptr->flags1 & (RF1_FRIENDS))
{
(void)place_monster_group(who, y, x, r_idx, mode);
}
-
/* Escorts for certain monsters */
if (r_ptr->flags1 & (RF1_ESCORT))
{
{
int oy;
int ox;
- int try = 4000;
+ int try_count = 4000;
/* Find a good position */
- while (try)
+ while (try_count)
{
/* Get a random spot */
oy = randint1(cur_hgt - 4) + 2;
if (place_monster_aux(0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) return TRUE;
}
- /* One less try */
- try--;
+ /* One less try count */
+ try_count--;
}
return FALSE;