if (randint1(100)<target_ptr->current_floor_ptr->dun_level)
activate_hi_summon(target_ptr, target_ptr->y, target_ptr->x, FALSE);
else
- (void)summon_specific(0, y, x, mon_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
msg_print(_("宝を守るためにエレメンタルが現れた!", "Elemental beings appear to protect their treasures!"));
for (i = 0; i < randint1(3) + 5; i++)
{
- (void)summon_specific(0, y, x, mon_level, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
for (i = 0; i < randint1(5) + o_ptr->pval / 5; i++)
{
- (void)summon_specific(0, y, x, mon_level, SUMMON_BIRD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_BIRD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
for (i = 0; i < randint1(3) + 2; i++)
{
(void)fire_meteor(target_ptr, -1, GF_FIRE, y, x, 10, 5);
- (void)summon_specific(0, y, x, mon_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
msg_print(_("暗闇にドラゴンの影がぼんやりと現れた!", "Draconic forms loom out of the darkness!"));
for (i = 0; i < randint1(3) + 2; i++)
{
- (void)summon_specific(0, y, x, mon_level, SUMMON_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
msg_print(_("奇妙な姿の怪物が襲って来た!", "Creatures strange and twisted assault you!"));
for (i = 0; i < randint1(5) + 3; i++)
{
- (void)summon_specific(0, y, x, mon_level, SUMMON_HYBRID, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_HYBRID, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
msg_print(_("渦巻が合体し、破裂した!", "Vortices coalesce and wreak destruction!"));
for (i = 0; i < randint1(3) + 2; i++)
{
- (void)summon_specific(0, y, x, mon_level, SUMMON_VORTEX, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(target_ptr, 0, y, x, mon_level, SUMMON_VORTEX, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
}
}
if (!get_direction(user_ptr, &dir, FALSE, FALSE)) return;
if (monster_can_enter(user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
{
- if (place_monster_aux(0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
+ if (place_monster_aux(user_ptr, 0, user_ptr->y + ddy[dir], user_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
{
if (o_ptr->xtra3) user_ptr->current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
if (o_ptr->xtra5) user_ptr->current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
case ACT_SUMMON_ANIMAL:
{
- (void)summon_specific(-1, user_ptr->y, user_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET));
break;
}
case ACT_SUMMON_PHANTOM:
{
msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
- (void)summon_specific(-1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET));
break;
}
case ACT_SUMMON_DAWN:
{
msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
- (void)summon_specific(-1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_specific(user_ptr, -1, user_ptr->y, user_ptr->x, user_ptr->current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET));
break;
}
{
j = 100;
- if (!(summon_named_creature(0, y, x, q_ptr->pval, !(object_is_cursed(q_ptr)) ? PM_FORCE_PET : 0L)))
+ if (!(summon_named_creature(creature_ptr, 0, y, x, q_ptr->pval, !(object_is_cursed(q_ptr)) ? PM_FORCE_PET : 0L)))
msg_print(_("人形は捻じ曲がり砕け散ってしまった!", "The Figurine writhes and then shatters."));
else if (object_is_cursed(q_ptr))
msg_print(_("これはあまり良くない気がする。", "You have a bad feeling about this."));
msg_print(_("援軍を召喚した。", "You summon minions."));
for (k = 0;k < 4; k++)
{
- (void)summon_kin_player(plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
+ (void)summon_kin_player(caster_ptr, plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
}
break;
}
msg_print(_("サイバーデーモンを召喚した!", "You summon Cyberdemons!"));
if (max_cyber > 4) max_cyber = 4;
for (k = 0;k < max_cyber; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_CYBER, mode);
break;
}
case MS_S_MONSTER:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("仲間を召喚した。", "You summon help."));
for (k = 0;k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, 0, (mode | u_mode));
break;
}
case MS_S_MONSTERS:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("モンスターを召喚した!", "You summon monsters!"));
for (k = 0; k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, 0, (mode | u_mode));
break;
}
case MS_S_ANT:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("アリを召喚した。", "You summon ants."));
for (k = 0; k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_ANT, mode);
break;
}
case MS_S_SPIDER:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
for (k = 0; k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_SPIDER, mode);
break;
}
case MS_S_HOUND:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("ハウンドを召喚した。", "You summon hounds."));
for (k = 0; k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_HOUND, mode);
break;
}
case MS_S_HYDRA:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("ヒドラを召喚した。", "You summon hydras."));
for (k = 0; k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_HYDRA, mode);
break;
}
case MS_S_ANGEL:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("天使を召喚した!", "You summon angel!"));
for (k = 0; k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_ANGEL, mode);
break;
}
case MS_S_DEMON:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
for (k = 0; k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
break;
}
case MS_S_UNDEAD:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
for (k = 0; k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
break;
}
case MS_S_DRAGON:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("ドラゴンを召喚した!", "You summon dragon!"));
for (k = 0; k < 1; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
break;
}
case MS_S_HI_UNDEAD:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("強力なアンデッドを召喚した!", "You summon greater undead!"));
for (k = 0; k < 6; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
break;
}
case MS_S_HI_DRAGON:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("古代ドラゴンを召喚した!", "You summon ancient dragons!"));
for (k = 0; k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
break;
}
case MS_S_AMBERITE:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("アンバーの王族を召喚した!", "You summon Lords of Amber!"));
for (k = 0; k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
break;
}
case MS_S_UNIQUE:
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
msg_print(_("特別な強敵を召喚した!", "You summon special opponents!"));
for (k = 0;k < 4; k++)
- if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
+ if (summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
for (k = count;k < 4; k++)
- summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
+ summon_specific(caster_ptr, -1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
break;
}
default:
{
for (k = 0; k < randint1(3); k++)
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
{
for (k = 0; k < randint1(3); k++)
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
case SV_SCROLL_SUMMON_PET:
{
- if (summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+ if (summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_FORCE_PET)))
{
ident = TRUE;
}
case SV_SCROLL_SUMMON_KIN:
{
- if (summon_kin_player(creature_ptr->lev, creature_ptr->y, creature_ptr->x, (PM_FORCE_PET | PM_ALLOW_GROUP)))
+ if (summon_kin_player(creature_ptr, creature_ptr->lev, creature_ptr->y, creature_ptr->x, (PM_FORCE_PET | PM_ALLOW_GROUP)))
{
ident = TRUE;
}
const int times = randint1(powerful ? 8 : 4);
for (k = 0; k < times; k++)
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
ident = TRUE;
}
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, mode))
{
msg_print(_("あなたはデーモンを引き寄せた!", "You have attracted a demon!"));
disturb(creature_ptr, FALSE, TRUE);
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_ANIMAL, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_ANIMAL, mode))
{
msg_print(_("動物を引き寄せた!", "You have attracted an animal!"));
disturb(creature_ptr, FALSE, TRUE);
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DRAGON, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DRAGON, mode))
{
msg_print(_("ドラゴンを引き寄せた!", "You have attracted a dragon!"));
disturb(creature_ptr, FALSE, TRUE);
/* Call animal */
if ((creature_ptr->cursed & TRC_CALL_ANIMAL) && one_in_(2500))
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_ANIMAL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_ANIMAL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
GAME_TEXT o_name[MAX_NLEN];
/* Call demon */
if ((creature_ptr->cursed & TRC_CALL_DEMON) && one_in_(1111))
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
GAME_TEXT o_name[MAX_NLEN];
/* Call dragon */
if ((creature_ptr->cursed & TRC_CALL_DRAGON) && one_in_(800))
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DRAGON,
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DRAGON,
(PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
GAME_TEXT o_name[MAX_NLEN];
/* Call undead */
if ((creature_ptr->cursed & TRC_CALL_UNDEAD) && one_in_(1111))
{
- if (summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD,
+ if (summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD,
(PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET)))
{
GAME_TEXT o_name[MAX_NLEN];
!floor_ptr->inside_arena && !floor_ptr->inside_quest && !player_ptr->phase_out)
{
/* Make a new monster */
- (void)alloc_monster(MAX_SIGHT + 5, 0);
+ (void)alloc_monster(player_ptr, MAX_SIGHT + 5, 0);
}
/* Hack -- Check for creature regeneration */
POSITION y, x;
y = creature_ptr->y + ddy[creature_ptr->fishing_dir];
x = creature_ptr->x + ddx[creature_ptr->fishing_dir];
- if (place_monster_aux(0, y, x, r_idx, PM_NO_KAGE))
+ if (place_monster_aux(creature_ptr, 0, y, x, r_idx, PM_NO_KAGE))
{
GAME_TEXT m_name[MAX_NLEN];
monster_desc(m_name, &creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx], 0);
monster_type *m_ptr;
MONRACE_IDX pet_r_idx = ((player_ptr->pclass == CLASS_CAVALRY) ? MON_HORSE : MON_YASE_HORSE);
monster_race *r_ptr = &r_info[pet_r_idx];
- place_monster_aux(0, player_ptr->y, player_ptr->x - 1, pet_r_idx,
+ place_monster_aux(player_ptr, 0, player_ptr->y, player_ptr->x - 1, pet_r_idx,
(PM_FORCE_PET | PM_NO_KAGE));
m_ptr = &floor_ptr->m_list[hack_m_idx_ii];
m_ptr->mspeed = r_ptr->speed;
{
floor_ptr->monster_level = floor_ptr->base_level + monster_index;
- place_monster(*y, *x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, *y, *x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
}
/* Place it */
- place_monster_aux(0, *y, *x, monster_index, (PM_ALLOW_SLEEP | PM_NO_KAGE));
+ place_monster_aux(player_ptr, 0, *y, *x, monster_index, (PM_ALLOW_SLEEP | PM_NO_KAGE));
if (clone)
{
/* clone */
if (!l) return FALSE;
/* Try to place the monster */
- if (place_monster_aux(0, y, x, quest[i].r_idx, mode))
+ if (place_monster_aux(creature_ptr, 0, y, x, quest[i].r_idx, mode))
{
/* Success */
break;
/* Put some monsters in the dungeon */
for (i = i + k; i > 0; i--)
{
- (void)alloc_monster(0, PM_ALLOW_SLEEP);
+ (void)alloc_monster(player_ptr, 0, PM_ALLOW_SLEEP);
}
/* Place some traps in the dungeon */
floor_ptr->object_level = floor_ptr->base_level;
/* Put the Guardian */
- if (!alloc_guardian(TRUE)) return FALSE;
+ if (!alloc_guardian(player_ptr, TRUE)) return FALSE;
bool is_empty_or_dark = dun->empty_level;
is_empty_or_dark &= !one_in_(DARK_EMPTY) || (randint1(100) > floor_ptr->dun_level);
build_arena(floor_ptr, &y, &x);
player_place(challanger_ptr, y, x);
- if(!place_monster_aux(0, challanger_ptr->y + 5, challanger_ptr->x, arena_info[challanger_ptr->arena_number].r_idx, (PM_NO_KAGE | PM_NO_PET)))
+ if(!place_monster_aux(challanger_ptr, 0, challanger_ptr->y + 5, challanger_ptr->x, arena_info[challanger_ptr->arena_number].r_idx, (PM_NO_KAGE | PM_NO_PET)))
{
challanger_ptr->exit_bldg = TRUE;
challanger_ptr->arena_number++;
msg_print(_("相手は欠場した。あなたの不戦勝だ。", "The enemy is unable appear. You won by default."));
}
-
}
+
/*!
* @brief モンスター闘技場のフロア生成 / Builds the arena after it is entered -KMW-
* @return なし
for(i = 0; i < 4; i++)
{
- place_monster_aux(0, creature_ptr->y + 8 + (i/2)*4, creature_ptr->x - 2 + (i%2)*4, battle_mon[i], (PM_NO_KAGE | PM_NO_PET));
+ place_monster_aux(creature_ptr, 0, creature_ptr->y + 8 + (i/2)*4, creature_ptr->x - 2 + (i%2)*4, battle_mon[i], (PM_NO_KAGE | PM_NO_PET));
set_friendly(&floor_ptr->m_list[floor_ptr->grid_array[creature_ptr->y+8+(i/2)*4][creature_ptr->x-2+(i%2)*4].m_idx]);
}
for(i = 1; i < floor_ptr->m_max; i++)
for (i = 0; i < alloc_times; i++)
{
/* Make a (group of) new monster */
- (void)alloc_monster(0, 0);
+ (void)alloc_monster(creature_ptr, 0, 0);
}
}
/* Place the monster (allow groups) */
floor_ptr->monster_level = floor_ptr->base_level + 2;
- (void)place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ (void)place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
}
bool success = FALSE;
for (i = 0; i < 1 + boost/100; i++)
- if (summon_specific(-1, caster_ptr->y, caster_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET))
+ if (summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, plev, SUMMON_PHANTOM, PM_FORCE_PET))
success = TRUE;
if (success)
{
if ((k < 4) && (!k || !randint0(k * MON_MULT_ADJ)))
{
/* Try to multiply */
- if (multiply_monster(m_idx, FALSE, (is_pet(m_ptr) ? PM_FORCE_PET : 0)))
+ if (multiply_monster(target_ptr, m_idx, FALSE, (is_pet(m_ptr) ? PM_FORCE_PET : 0)))
{
/* Take note if visible */
if (target_ptr->current_floor_ptr->m_list[hack_m_idx_ii].ml && is_original_ap_and_seen(m_ptr))
for (k = 0; k < A_MAX; k++)
{
- if (summon_specific(m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_MOLD, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific(target_ptr, m_idx, m_ptr->fy, m_ptr->fx, rlev, SUMMON_MOLD, (PM_ALLOW_GROUP | p_mode)))
{
if (target_ptr->current_floor_ptr->m_list[hack_m_idx_ii].ml) count++;
}
BIT_FLAGS mode = 0L;
if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
delete_monster_idx(m_idx);
- if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, mode))
+ if (summon_named_creature(target_ptr, 0, dummy_y, dummy_x, MON_BIKETAL, mode))
{
msg_print(_("「ハァッハッハッハ!!私がバイケタルだ!!」", "Uwa-hahaha! *I* am Biketal!"));
}
#define PM_KAGE 0x00000200 /*!< モンスター生成フラグ: 必ずあやしい影として生成する */
#define PM_MULTIPLY 0x00000400 /*!< モンスター生成フラグ: 増殖処理時として生成する */
-extern bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
-extern bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode);
-extern bool alloc_horde(POSITION y, POSITION x);
-extern bool alloc_guardian(bool def_val);
-extern bool alloc_monster(POSITION dis, BIT_FLAGS mode);
+extern bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
+extern bool place_monster(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
+extern bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x);
+extern bool alloc_guardian(player_type *player_ptr, bool def_val);
+extern bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode);
extern void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode);
/* Bit flags for monster_desc() */
extern monsterrace_hook_type get_monster_hook(player_type *player_ptr);
extern monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x);
extern void set_friendly(monster_type *m_ptr);
-extern void set_pet(monster_type *m_ptr);
+extern void set_pet(player_type *player_ptr, monster_type *m_ptr);
extern void set_hostile(monster_type *m_ptr);
extern void anger_monster(player_type *player_ptr, monster_type *m_ptr);
extern void lore_treasure(MONSTER_IDX m_idx, ITEM_NUMBER num_item, ITEM_NUMBER num_gold);
extern void update_monster(player_type *subject_ptr, MONSTER_IDX m_idx, bool full);
extern void update_monsters(bool full);
-extern bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
-
+extern bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
+extern bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
+extern bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
/*
* Some things which induce learning
/*!
* @brief モンスターをペットにする
+ * @param player_type プレーヤーへの参照ポインタ
* @param m_ptr モンスター情報構造体の参照ポインタ
* @return なし
*/
-void set_pet(monster_type *m_ptr)
+void set_pet(player_type *player_ptr, monster_type *m_ptr)
{
- check_quest_completion(p_ptr, m_ptr);
+ check_quest_completion(player_ptr, m_ptr);
m_ptr->smart |= SM_PET;
if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
if (pet) mode |= PM_FORCE_PET;
- if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
+ if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
{
if (player_can_see_bold(player_ptr, wy, wx)) notice = TRUE;
}
BIT_FLAGS mode = 0L;
if (pet) mode |= PM_FORCE_PET;
- if (summon_specific((pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
+ if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
{
if (player_can_see_bold(player_ptr, wy, wx))
msg_print(_("新たな戦士が現れた!", "A new warrior steps forth!"));
/*!
* @brief モンスターを一体生成する / Attempt to place a monster of the given race at the given location.
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param who 召喚を行ったモンスターID
* @param y 生成位置y座標
* @param x 生成位置x座標
* This is the only function which may place a monster in the dungeon,
* except for the savefile loading code.
*/
-static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+static bool place_monster_one(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
- floor_type *floor_ptr = p_ptr->current_floor_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
monster_type *m_ptr;
monster_race *r_ptr = &r_info[r_idx];
int cmi;
/* DO NOT PLACE A MONSTER IN THE SMALL SCALE WILDERNESS !!! */
- if (p_ptr->wild_mode) return FALSE;
+ if (player_ptr->wild_mode) return FALSE;
if (!in_bounds(floor_ptr, y, x)) return FALSE;
if (!r_idx) return FALSE;
if (!monster_can_enter(y, x, r_ptr, 0)) return FALSE;
}
- if (!p_ptr->phase_out)
+ if (!player_ptr->phase_out)
{
/* Hack -- "unique" monsters must be "unique" */
if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
}
}
- if (quest_number(p_ptr, floor_ptr->dun_level))
+ if (quest_number(player_ptr, floor_ptr->dun_level))
{
- int hoge = quest_number(p_ptr, floor_ptr->dun_level);
+ int hoge = quest_number(player_ptr, floor_ptr->dun_level);
if ((quest[hoge].type == QUEST_TYPE_KILL_LEVEL) || (quest[hoge].type == QUEST_TYPE_RANDOM))
{
if (r_idx == quest[hoge].r_idx)
/* Pet? */
if (mode & PM_FORCE_PET)
{
- set_pet(m_ptr);
+ set_pet(player_ptr, m_ptr);
}
/* Friendly? */
else if ((r_ptr->flags7 & RF7_FRIENDLY) ||
if ((mode & PM_ALLOW_SLEEP) && r_ptr->sleep && !ironman_nightmare)
{
int val = r_ptr->sleep;
- (void)set_monster_csleep(p_ptr, g_ptr->m_idx, (val * 2) + randint1(val * 10));
+ (void)set_monster_csleep(player_ptr, g_ptr->m_idx, (val * 2) + randint1(val * 10));
}
/* Assign maximal hitpoints */
/* Extract the monster base speed */
m_ptr->mspeed = get_mspeed(r_ptr);
- if (mode & PM_HASTE) (void)set_monster_fast(p_ptr, g_ptr->m_idx, 100);
+ if (mode & PM_HASTE) (void)set_monster_fast(player_ptr, g_ptr->m_idx, 100);
/* Give a random starting energy */
if (!ironman_nightmare)
if (r_ptr->flags7 & RF7_SELF_LD_MASK)
- p_ptr->update |= (PU_MON_LITE);
+ player_ptr->update |= (PU_MON_LITE);
else if ((r_ptr->flags7 & RF7_HAS_LD_MASK) && !MON_CSLEEP(m_ptr))
- p_ptr->update |= (PU_MON_LITE);
- update_monster(p_ptr, g_ptr->m_idx, TRUE);
+ player_ptr->update |= (PU_MON_LITE);
+ update_monster(player_ptr, g_ptr->m_idx, TRUE);
/* Count the monsters on the level */
*/
if (current_world_ptr->character_dungeon &&
((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)))
- real_r_ptr(m_ptr)->floor_id = p_ptr->floor_id;
+ real_r_ptr(m_ptr)->floor_id = player_ptr->floor_id;
/* Hack -- Count the number of "reproducers" */
if (r_ptr->flags2 & RF2_MULTIPLY) floor_ptr->num_repro++;
- if (p_ptr->warning && current_world_ptr->character_dungeon)
+ if (player_ptr->warning && current_world_ptr->character_dungeon)
{
if (r_ptr->flags1 & RF1_UNIQUE)
{
object_type *o_ptr;
GAME_TEXT o_name[MAX_NLEN];
- if (r_ptr->level > p_ptr->lev + 30)
+ if (r_ptr->level > player_ptr->lev + 30)
color = _("黒く", "black");
- else if (r_ptr->level > p_ptr->lev + 15)
+ else if (r_ptr->level > player_ptr->lev + 15)
color = _("紫色に", "purple");
- else if (r_ptr->level > p_ptr->lev + 5)
+ else if (r_ptr->level > player_ptr->lev + 5)
color = _("ルビー色に", "deep red");
- else if (r_ptr->level > p_ptr->lev - 5)
+ else if (r_ptr->level > player_ptr->lev - 5)
color = _("赤く", "red");
- else if (r_ptr->level > p_ptr->lev - 15)
+ else if (r_ptr->level > player_ptr->lev - 15)
color = _("ピンク色に", "pink");
else
color = _("白く", "white");
- o_ptr = choose_warning_item(p_ptr);
+ o_ptr = choose_warning_item(player_ptr);
if (o_ptr)
{
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
if (g_ptr->info & CAVE_MARK)
{
msg_print(_("ルーンが爆発した!", "The rune explodes!"));
- project(p_ptr, 0, 2, y, x, 2 * (p_ptr->lev + damroll(7, 7)), GF_MANA, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+ project(player_ptr, 0, 2, y, x, 2 * (player_ptr->lev + damroll(7, 7)), GF_MANA, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
}
else
* @param mode 生成オプション
* @return 成功したらtrue
*/
-static bool place_monster_group(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+static bool place_monster_group(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
monster_race *r_ptr = &r_info[r_idx];
if (!cave_empty_bold2(floor_ptr, my, mx)) continue;
/* Attempt to place another monster */
- if (place_monster_one(who, my, mx, r_idx, mode))
+ if (place_monster_one(player_ptr, who, my, mx, r_idx, mode))
{
/* Add it to the "hack" set */
hack_y[hack_n] = my;
/*!
* @brief 一般的なモンスター生成処理のサブルーチン / Attempt to place a monster of the given race at the given location
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param who 召喚主のモンスター情報ID
* @param y 生成地点y座標
* @param x 生成地点x座標
* Note the use of the new "monster allocation table" code to restrict
* the "get_mon_num()" function to "legal" escort types.
*/
-bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
int i, j, n;
monster_race *r_ptr = &r_info[r_idx];
mode |= PM_KAGE;
/* Place one monster, or fail */
- if (!place_monster_one(who, y, x, r_idx, mode)) return FALSE;
+ if (!place_monster_one(player_ptr, who, y, x, r_idx, mode)) return FALSE;
/* Require the "group" flag */
if (!(mode & PM_ALLOW_GROUP)) return TRUE;
{
POSITION nx, ny, d = 7;
scatter(p_ptr, &ny, &nx, y, x, d, 0);
- (void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
+ (void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
}
}
if (r_ptr->flags1 & (RF1_FRIENDS))
{
/* Attempt to place a group */
- (void)place_monster_group(who, y, x, r_idx, mode);
+ (void)place_monster_group(player_ptr, who, y, x, r_idx, mode);
}
/* Escorts for certain monsters */
if (!z) break;
/* Place a single escort */
- (void)place_monster_one(place_monster_m_idx, ny, nx, z, mode);
+ (void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, z, mode);
/* Place a "group" of escorts if needed */
if ((r_info[z].flags1 & RF1_FRIENDS) ||
(r_ptr->flags1 & RF1_ESCORTS))
{
/* Place a group of monsters */
- (void)place_monster_group(place_monster_m_idx, ny, nx, z, mode);
+ (void)place_monster_group(player_ptr, place_monster_m_idx, ny, nx, z, mode);
}
}
}
/*!
* @brief 一般的なモンスター生成処理のメインルーチン / Attempt to place a monster of the given race at the given location
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param y 生成地点y座標
* @param x 生成地点x座標
* @param mode 生成オプション
* @return 生成に成功したらtrue
*/
-bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode)
+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));
if (!r_idx) return FALSE;
/* Attempt to place the monster */
- if (place_monster_aux(0, y, x, r_idx, mode)) return TRUE;
+ if (place_monster_aux(player_ptr, 0, y, x, r_idx, mode)) return TRUE;
return FALSE;
}
/*!
* @brief 指定地点に1種類のモンスター種族による群れを生成する
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param y 生成地点y座標
* @param x 生成地点x座標
* @return 生成に成功したらtrue
*/
-bool alloc_horde(POSITION y, POSITION x)
+bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x)
{
monster_race *r_ptr = NULL;
MONRACE_IDX r_idx = 0;
while (--attempts)
{
/* Attempt to place the monster */
- if (place_monster_aux(0, y, x, r_idx, 0L)) break;
+ if (place_monster_aux(player_ptr, 0, y, x, r_idx, 0L)) break;
}
if (attempts < 1) return FALSE;
{
scatter(p_ptr, &cy, &cx, y, x, 5, 0);
- (void)summon_specific(m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
+ (void)summon_specific(player_ptr, m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
y = cy;
x = cx;
/*!
* @brief ダンジョンの主生成を試みる / Put the Guardian
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param def_val 現在の主の生成状態
* @return 生成に成功したらtrue
*/
-bool alloc_guardian(bool def_val)
+bool alloc_guardian(player_type *player_ptr, bool def_val)
{
MONRACE_IDX guardian = d_info[p_ptr->dungeon_idx].final_guardian;
if (cave_empty_bold2(floor_ptr, oy, ox) && monster_can_cross_terrain(floor_ptr->grid_array[oy][ox].feat, &r_info[guardian], 0))
{
/* Place the guardian */
- if (place_monster_aux(0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) return TRUE;
+ if (place_monster_aux(player_ptr, 0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) return TRUE;
}
/* One less try count */
* Use "slp" to choose the initial "sleep" status
* Use "floor_ptr->monster_level" for the monster level
*/
-bool alloc_monster(POSITION dis, BIT_FLAGS mode)
+bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode)
{
POSITION y = 0, x = 0;
int attempts_left = 10000;
/* Put the Guardian */
- if (alloc_guardian(FALSE)) return TRUE;
+ if (alloc_guardian(player_ptr, FALSE)) return TRUE;
/* Find a legal, distant, unoccupied, space */
floor_type *floor_ptr = p_ptr->current_floor_ptr;
if (randint1(5000) <= floor_ptr->dun_level)
{
- if (alloc_horde(y, x))
+ if (alloc_horde(player_ptr, y, x))
{
return TRUE;
}
else
{
/* Attempt to place the monster, allow groups */
- if (place_monster(y, x, (mode | PM_ALLOW_GROUP))) return TRUE;
+ if (place_monster(player_ptr, y, x, (mode | PM_ALLOW_GROUP))) return TRUE;
}
return FALSE;
/*!
* @brief モンスターを召喚により配置する / Place a monster (of the specified "type") near the given location. Return TRUE if a monster was actually summoned.
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param who 召喚主のモンスター情報ID
* @param y1 目標地点y座標
* @param x1 目標地点x座標
*
* Note that this function may not succeed, though this is very rare.
*/
-bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode)
+bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode)
{
POSITION x, y;
MONRACE_IDX r_idx;
if ((type == SUMMON_BLUE_HORROR) || (type == SUMMON_DAWN)) mode |= PM_NO_KAGE;
/* Attempt to place the monster (awake, allow groups) */
- if (!place_monster_aux(who, y, x, r_idx, mode))
+ if (!place_monster_aux(player_ptr, who, y, x, r_idx, mode))
{
summon_specific_type = 0;
return FALSE;
/*!
* @brief 特定モンスター種族を召喚により生成する / A "dangerous" function, creates a pet of the specified type
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param who 召喚主のモンスター情報ID
* @param oy 目標地点y座標
* @param ox 目標地点x座標
* @param mode 生成オプション
* @return 召喚できたらtrueを返す
*/
-bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
POSITION x, y;
/* if (!r_idx) return; */
if (!mon_scatter(r_idx, &y, &x, oy, ox, 2)) return FALSE;
/* Place it (allow groups) */
- return place_monster_aux(who, y, x, r_idx, (mode | PM_NO_KAGE));
+ return place_monster_aux(player_ptr, who, y, x, r_idx, (mode | PM_NO_KAGE));
}
/*!
* @brief モンスターを増殖生成する / Let the given monster attempt to reproduce.
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param m_idx 増殖するモンスター情報ID
* @param clone クローン・モンスター処理ならばtrue
* @param mode 生成オプション
* @details
* Note that "reproduction" REQUIRES empty space.
*/
-bool multiply_monster(MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode)
+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;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
if (m_ptr->mflag2 & MFLAG2_NOPET) mode |= PM_NO_PET;
/* Create a new monster (awake, no groups) */
- if (!place_monster_aux(m_idx, y, x, m_ptr->r_idx, (mode | PM_NO_KAGE | PM_MULTIPLY)))
+ if (!place_monster_aux(player_ptr, m_idx, y, x, m_ptr->r_idx, (mode | PM_NO_KAGE | PM_MULTIPLY)))
return FALSE;
/* Hack -- Transfer "clone" flag */
}
-
/*!
* @brief ダメージを受けたモンスターの様子を記述する / Dump a message describing a monster's reaction to damage
* @param m_idx モンスター情報ID
msg_print(_("援軍を召喚した。", "You summon minions."));
for (int k = 0;k < 1; k++)
{
- if (summon_kin_player(summon_lev, caster_ptr->y, caster_ptr->x, (pet ? PM_FORCE_PET : 0L)))
+ if (summon_kin_player(caster_ptr, summon_lev, caster_ptr->y, caster_ptr->x, (pet ? PM_FORCE_PET : 0L)))
{
if (!pet) msg_print(_("召喚された仲間は怒っている!", "Summoned fellows are angry!"));
}
msg_print(_("サイバーデーモンを召喚した!", "You summon a Cyberdemon!"));
for (int k = 0; k < 1; k++)
{
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_CYBER, p_mode))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_CYBER, p_mode))
{
if (!pet)
msg_print(_("召喚されたサイバーデーモンは怒っている!", "The summoned Cyberdemon are angry!"));
msg_print(_("仲間を召喚した。", "You summon help."));
for (int k = 0; k < 1; k++)
{
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, 0, p_mode))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, 0, p_mode))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monster is angry!"));
msg_print(_("モンスターを召喚した!", "You summon monsters!"));
for (int k = 0; k < plev / 15 + 2; k++)
{
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, 0, (p_mode | u_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, 0, (p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚されたモンスターは怒っている!", "The summoned monsters are angry!"));
case MS_S_ANT:
{
msg_print(_("アリを召喚した。", "You summon ants."));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚されたアリは怒っている!", "The summoned ants are angry!"));
case MS_S_SPIDER:
{
msg_print(_("蜘蛛を召喚した。", "You summon spiders."));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚された蜘蛛は怒っている!", "Summoned spiders are angry!"));
case MS_S_HOUND:
{
msg_print(_("ハウンドを召喚した。", "You summon hounds."));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
{
if (!pet)
msg_print(_("召喚されたハウンドは怒っている!", "Summoned hounds are angry!"));
case MS_S_HYDRA:
{
msg_print(_("ヒドラを召喚した。", "You summon a hydras."));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたヒドラは怒っている!", "Summoned hydras are angry!"));
case MS_S_ANGEL:
{
msg_print(_("天使を召喚した!", "You summon an angel!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚された天使は怒っている!", "Summoned angels are angry!"));
case MS_S_DEMON:
{
msg_print(_("混沌の宮廷から悪魔を召喚した!", "You summon a demon from the Courts of Chaos!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたデーモンは怒っている!", "Summoned demons are angry!"));
case MS_S_UNDEAD:
{
msg_print(_("アンデッドの強敵を召喚した!", "You summon an undead adversary!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたアンデッドは怒っている!", "Summoned undeads are angry!"));
case MS_S_DRAGON:
{
msg_print(_("ドラゴンを召喚した!", "You summon a dragon!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
{
if (!pet)
msg_print(_("召喚されたドラゴンは怒っている!", "Summoned dragons are angry!"));
case MS_S_HI_UNDEAD:
{
msg_print(_("強力なアンデッドを召喚した!", "You summon a greater undead!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚された上級アンデッドは怒っている!", "Summoned greater undeads are angry!"));
case MS_S_HI_DRAGON:
{
msg_print(_("古代ドラゴンを召喚した!", "You summon an ancient dragon!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚された古代ドラゴンは怒っている!", "Summoned ancient dragons are angry!"));
case MS_S_AMBERITE:
{
msg_print(_("アンバーの王族を召喚した!", "You summon a Lord of Amber!"));
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
{
if (!pet)
msg_print(_("召喚されたアンバーの王族は怒っている!", "Summoned Lords of Amber are angry!"));
msg_print(_("特別な強敵を召喚した!", "You summon a special opponent!"));
for (k = 0; k < 1; k++)
{
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
{
count++;
if (!pet)
for (k = count; k < 1; k++)
{
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
{
count++;
if (!pet)
return -1;
delete_monster_idx(floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].m_idx);
- summon_named_creature(0, dummy_y, dummy_x, MON_BANOR, mode);
+ summon_named_creature(target_ptr, 0, dummy_y, dummy_x, MON_BANOR, mode);
floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
- summon_named_creature(0, dummy_y, dummy_x, MON_LUPART, mode);
+ summon_named_creature(target_ptr, 0, dummy_y, dummy_x, MON_LUPART, mode);
floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
delete_monster_idx(k);
}
}
- summon_named_creature(0, dummy_y, dummy_x, MON_BANORLUPART, mode);
+ summon_named_creature(target_ptr, 0, dummy_y, dummy_x, MON_BANORLUPART, mode);
floor_ptr->m_list[hack_m_idx_ii].hp = dummy_hp;
floor_ptr->m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
for (k = 0; k < num; k++)
{
- count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, mode);
+ count += summon_named_creature(target_ptr, m_idx, y, x, MON_SHURYUUDAN, mode);
}
if (target_ptr->blind && count)
/*!
* @brief 鷹召喚の処理。 /
+* @param target_ptr プレーヤーへの参照ポインタ
* @param y 対象の地点のy座標
* @param x 対象の地点のx座標
* @param rlev 呪文を唱えるモンスターのレベル
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_EAGLE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_EAGLE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 4 + randint1(3);
for (int k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
return count;
/*!
* @brief インターネット・エクスプローダー召喚の処理。 /
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param y 対象の地点のy座標
* @param x 対象の地点のx座標
* @param rlev 呪文を唱えるモンスターのレベル
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_IE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_IE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
BIT_FLAGS mode = 0L;
int count = 0;
int num = 2 + randint1(1 + rlev / 20);
for (int k = 0; k < num; k++)
{
- count += summon_named_creature(m_idx, y, x, MON_IE, mode);
+ count += summon_named_creature(target_ptr, m_idx, y, x, MON_IE, mode);
}
return count;
int count = 0;
for (int k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
return count;
/*!
* @brief ロックのクローン召喚の処理。 /
+* @param target_ptr プレーヤーへの参照ポインタ
* @param y 対象の地点のy座標
* @param x 対象の地点のx座標
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_LOCKE_CLONE(POSITION y, POSITION x, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_LOCKE_CLONE(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx)
{
BIT_FLAGS mode = 0L;
int count = 0;
int num = randint1(3);
for (int k = 0; k < num; k++)
{
- count += summon_named_creature(m_idx, y, x, MON_LOCKE_CLONE, mode);
+ count += summon_named_creature(target_ptr, m_idx, y, x, MON_LOCKE_CLONE, mode);
}
return count;
/*!
* @brief シラミ召喚の処理。 /
+* @param target_ptr プレーヤーへの参照ポインタ
* @param y 対象の地点のy座標
* @param x 対象の地点のx座標
* @param rlev 呪文を唱えるモンスターのレベル
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_LOUSE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_LOUSE(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
int num = 2 + randint1(3);
for (int k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP);
}
return count;
/*!
* @brief 救援召喚の通常処理。同シンボルのモンスターを召喚する。 /
+* @param target_ptr プレーヤーへの参照ポインタ
* @param y 対象の地点のy座標
* @param x 対象の地点のx座標
* @param rlev 呪文を唱えるモンスターのレベル
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-MONSTER_NUMBER summon_Kin(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
+MONSTER_NUMBER summon_Kin(player_type *target_ptr, POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
{
int count = 0;
for (int k = 0; k < 4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP);
}
return count;
case MON_MENELDOR:
case MON_GWAIHIR:
case MON_THORONDOR:
- count += summon_EAGLE(y, x, rlev, m_idx);
+ count += summon_EAGLE(target_ptr, y, x, rlev, m_idx);
break;
case MON_BULLGATES:
- count += summon_IE(y, x, rlev, m_idx);
+ count += summon_IE(target_ptr, y, x, rlev, m_idx);
break;
case MON_SERPENT:
break;
case MON_CALDARM:
- count += summon_LOCKE_CLONE(y, x, m_idx);
+ count += summon_LOCKE_CLONE(target_ptr, y, x, m_idx);
break;
case MON_LOUSY:
- count += summon_LOUSE(y, x, rlev, m_idx);
+ count += summon_LOUSE(target_ptr, y, x, rlev, m_idx);
break;
default:
- count += summon_Kin(y, x, rlev, m_idx);
+ count += summon_Kin(target_ptr, y, x, rlev, m_idx);
break;
}
if (is_friendly(m_ptr) && mon_to_mon)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
}
else
{
- count += summon_cyber(floor_ptr, m_idx, y, x);
+ count += summon_cyber(target_ptr, m_idx, y, x);
}
if (target_ptr->blind && count && mon_to_player)
floor_ptr->monster_noise = TRUE;
}
+
/*!
* @brief RF6_S_MONSTERの処理。モンスター一体召喚。 /
* @param target_ptr プレーヤーへの参照ポインタ
for (int k = 0; k < 1; k++)
{
if (mon_to_player)
- count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
if (mon_to_mon)
- count += summon_specific(m_idx, y, x, rlev, 0, (monster_u_mode(floor_ptr, m_idx)));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, 0, (monster_u_mode(floor_ptr, m_idx)));
}
if (target_ptr->blind && count && mon_to_player)
for (int k = 0; k < S_NUM_6; k++)
{
if (mon_to_player)
- count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
if (mon_to_mon)
- count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
}
if (target_ptr->blind && count && mon_to_player)
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count && mon_to_player)
DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
for (int k = 0; k < S_NUM_6; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count && mon_to_player)
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count && mon_to_player)
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count && mon_to_player)
int count = 0;
for (int k = 0; k < num; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP);
}
if (count < 2)
int count = 0;
for (int k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count)
int count = 0;
for (int k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count)
int count = 0;
for (int k = 0; k < 1; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP);
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP);
}
if (target_ptr->blind && count)
if (!cave_empty_bold(floor_ptr, cy, cx)) continue;
- if (!summon_named_creature(m_idx, cy, cx, MON_NAZGUL, mode)) continue;
+ if (!summon_named_creature(target_ptr, m_idx, cy, cx, MON_NAZGUL, mode)) continue;
y = cy;
x = cx;
for (int k = 0; k < S_NUM_6; k++)
{
if (mon_to_player)
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
if (mon_to_mon)
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
}
}
for (int k = 0; k < S_NUM_4; k++)
{
if (mon_to_player)
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
if (mon_to_mon)
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | monster_u_mode(floor_ptr, m_idx)));
}
if (target_ptr->blind && count && mon_to_player)
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (target_ptr->blind && count && mon_to_player)
int count = 0;
for (int k = 0; k < S_NUM_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (count) uniques_are_summoned = TRUE;
for (int k = count; k < S_NUM_4; k++)
{
- count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ count += summon_specific(target_ptr, m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
if (target_ptr->blind && count && mon_to_player)
DIRECTION i;
for (i = 0; i < 8; i++)
{
- summon_specific(-1, creature_ptr->y, creature_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET);
+ summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET);
}
}
break;
for (dummy = 0; dummy < randint1(5) + 1; dummy++)
{
- (void)summon_specific(0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(creature_ptr, 0, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
reward = _("モンスターを召喚された。", "summoning hostile monsters");
break;
msg_format(_("%sは褒美として悪魔の使いをよこした!", "%s rewards you with a demonic servant!"), chaos_patrons[creature_ptr->chaos_patron]);
- if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, PM_FORCE_PET))
+ if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_DEMON, PM_FORCE_PET))
msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
else
reward = _("悪魔がペットになった。", "a demonic servant");
case REW_SER_MONS:
msg_format(_("%sは褒美として使いをよこした!", "%s rewards you with a servant!"), chaos_patrons[creature_ptr->chaos_patron]);
- if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, PM_FORCE_PET))
+ if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, 0, PM_FORCE_PET))
msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
else
reward = _("モンスターがペットになった。", "a servant");
case REW_SER_UNDE:
msg_format(_("%sは褒美としてアンデッドの使いをよこした。", "%s rewards you with an undead servant!"), chaos_patrons[creature_ptr->chaos_patron]);
- if (!summon_specific(-1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, PM_FORCE_PET))
+ if (!summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, creature_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, PM_FORCE_PET))
msg_print(_("何も現れなかった...", "Nobody ever turns up..."));
else
reward = _("アンデッドがペットになった。", "an undead servant");
{
if (cast)
{
- if (!summon_specific(-1, caster_ptr->y, caster_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+ if (!summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, plev, SUMMON_ELEMENTAL, (PM_ALLOW_GROUP | PM_FORCE_PET)))
{
msg_print(_("エレメンタルは現れなかった。", "No Elementals arrive."));
}
{
if (cast)
{
- if (summon_specific(-1, caster_ptr->y, caster_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))
+ if (summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, plev, SUMMON_GOLEM, PM_FORCE_PET))
{
msg_print(_("ゴーレムを作った。", "You make a golem."));
}
else flg |= PM_NO_PET;
if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
- if (summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
+ if (summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
{
if (pet)
{
if (cave_empty_bold2(caster_ptr->current_floor_ptr, my, mx)) break;
}
if (attempt < 0) continue;
- summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
+ summon_specific(caster_ptr, -1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
}
set_hero(caster_ptr, randint1(base) + base, FALSE);
set_blessed(caster_ptr, randint1(base) + base, FALSE);
{
if (cast)
{
- if (!summon_specific(-1, caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+ if (!summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, (plev * 3) / 2, SUMMON_MANES, (PM_ALLOW_GROUP | PM_FORCE_PET)))
{
msg_print(_("古代の死霊は現れなかった。", "No Manes arrive."));
}
{
if (cast)
{
- if (!(summon_specific(-1, caster_ptr->y, caster_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET))))
+ if (!(summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET))))
{
msg_print(_("動物は現れなかった。", "No animals arrive."));
}
r_idx = nest_mon_info[i].r_idx;
/* Place that "random" monster (no groups) */
- (void)place_monster_aux(0, y, x, r_idx, 0L);
+ (void)place_monster_aux(player_ptr, 0, y, x, r_idx, 0L);
nest_mon_info[i].used = TRUE;
}
/* Top and bottom rows */
for (x = xval - 9; x <= xval + 9; x++)
{
- place_monster_aux(0, yval - 2, x, what[0], PM_NO_KAGE);
- place_monster_aux(0, yval + 2, x, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval - 2, x, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval + 2, x, what[0], PM_NO_KAGE);
}
/* Middle columns */
for (y = yval - 1; y <= yval + 1; y++)
{
- place_monster_aux(0, y, xval - 9, what[0], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 9, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 9, what[0], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 9, what[0], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 8, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 8, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 8, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 8, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 7, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 7, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 7, what[1], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 7, what[1], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 6, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 6, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 6, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 6, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 5, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 5, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 5, what[2], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 5, what[2], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 4, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 4, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 4, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 4, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 3, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 3, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 3, what[3], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 3, what[3], PM_NO_KAGE);
- place_monster_aux(0, y, xval - 2, what[4], PM_NO_KAGE);
- place_monster_aux(0, y, xval + 2, what[4], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval - 2, what[4], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, xval + 2, what[4], PM_NO_KAGE);
}
/* Above/Below the center monster */
for (x = xval - 1; x <= xval + 1; x++)
{
- place_monster_aux(0, yval + 1, x, what[5], PM_NO_KAGE);
- place_monster_aux(0, yval - 1, x, what[5], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval + 1, x, what[5], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval - 1, x, what[5], PM_NO_KAGE);
}
/* Next to the center monster */
- place_monster_aux(0, yval, xval + 1, what[6], PM_NO_KAGE);
- place_monster_aux(0, yval, xval - 1, what[6], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval + 1, what[6], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval - 1, what[6], PM_NO_KAGE);
/* Center monster */
- place_monster_aux(0, yval, xval, what[7], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, yval, xval, what[7], PM_NO_KAGE);
return TRUE;
}
*\n
* Note that "monster pits" will never contain "unique" monsters.\n
*/
-bool build_type13(floor_type *floor_ptr)
+bool build_type13(player_type *player_ptr)
{
static int placing[][3] = {
{ -2, -9, 0 },{ -2, -8, 0 },{ -3, -7, 0 },{ -3, -6, 0 },
grid_type *g_ptr;
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
int cur_pit_type = pick_vault_type(floor_ptr, pit_types, d_info[floor_ptr->dungeon_idx].pit);
vault_aux_type *n_ptr;
{
y = yval + placing[i][0];
x = xval + placing[i][1];
- place_monster_aux(0, y, x, what[placing[i][2]], PM_NO_KAGE);
+ place_monster_aux(player_ptr, 0, y, x, what[placing[i][2]], PM_NO_KAGE);
}
return TRUE;
extern bool build_type5(player_type *player_ptr);
extern bool build_type6(player_type *player_ptr);
-extern bool build_type13(floor_type *floor_ptr);
+extern bool build_type13(player_type *player_ptr);
y = yval + 2 * ddy_ddd[dir1];
x = xval + 2 * ddx_ddd[dir1];
- if (r_idx) place_monster_aux(0, y, x, r_idx, PM_ALLOW_SLEEP);
+ if (r_idx) place_monster_aux(player_ptr, 0, y, x, r_idx, PM_ALLOW_SLEEP);
/* Walls around the breather */
for (dir2 = 0; dir2 < 8; dir2++)
get_mon_num_prep(vault_aux_lite, NULL);
r_idx = get_mon_num(floor_ptr->dun_level);
- if (r_idx) place_monster_aux(0, yval, xval, r_idx, 0L);
+ if (r_idx) place_monster_aux(player_ptr, 0, yval, xval, r_idx, 0L);
/* Walls around the breather */
for (dir1 = 0; dir1 < 8; dir1++)
y = yval + ddy_ddd[dir1];
x = xval + ddx_ddd[dir1];
- if (r_idx) place_monster_aux(0, y, x, r_idx, 0L);
+ if (r_idx) place_monster_aux(player_ptr, 0, y, x, r_idx, 0L);
}
/* Place two potions */
case '&':
{
floor_ptr->monster_level = floor_ptr->base_level + 5;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
break;
}
case '@':
{
floor_ptr->monster_level = floor_ptr->base_level + 11;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
break;
}
case '9':
{
floor_ptr->monster_level = floor_ptr->base_level + 9;
- place_monster(y, x, PM_ALLOW_SLEEP);
+ place_monster(player_ptr, y, x, PM_ALLOW_SLEEP);
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 7;
place_object(player_ptr, y, x, AM_GOOD);
case '8':
{
floor_ptr->monster_level = floor_ptr->base_level + 40;
- place_monster(y, x, PM_ALLOW_SLEEP);
+ place_monster(player_ptr, y, x, PM_ALLOW_SLEEP);
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 20;
place_object(player_ptr, y, x, AM_GOOD | AM_GREAT);
if (randint0(100) < 50)
{
floor_ptr->monster_level = floor_ptr->base_level + 3;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
if (randint0(100) < 50)
{
/* Meanest monster + treasure */
floor_ptr->monster_level = floor_ptr->base_level + 40;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 20;
place_object(player_ptr, y, x, AM_GOOD);
{
/* Mean monster +treasure */
floor_ptr->monster_level = floor_ptr->base_level + 20;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
floor_ptr->object_level = floor_ptr->base_level + 10;
place_object(player_ptr, y, x, AM_GOOD);
else if (value < 10)
{
floor_ptr->monster_level = floor_ptr->base_level + 9;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
else if (value < 17)
{
/* Monster and trap */
floor_ptr->monster_level = floor_ptr->base_level + 5;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
place_trap(player_ptr, y, x);
}
if (randint0(100) < 50)
{
floor_ptr->monster_level = floor_ptr->base_level + 3;
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
floor_ptr->monster_level = floor_ptr->base_level;
}
if (randint0(100) < 50)
/* 20% monster, 40% trap, 20% object, 20% blank space */
if (randint0(100) < 20)
{
- place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ place_monster(player_ptr, y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
}
else if (randint0(100) < 50)
{
case ROOM_T_RANDOM_VAULT: return build_type10(player_ptr);
case ROOM_T_OVAL: return build_type11(floor_ptr);
case ROOM_T_CRYPT: return build_type12(player_ptr);
- case ROOM_T_TRAP_PIT: return build_type13(floor_ptr);
+ case ROOM_T_TRAP_PIT: return build_type13(player_ptr);
case ROOM_T_TRAP: return build_type14(floor_ptr);
case ROOM_T_GLASS: return build_type15(player_ptr);
case ROOM_T_ARCADE: return build_type16(player_ptr);
bool success = FALSE;
for (int i = 0; i < num; i++)
{
- if (summon_specific(who, y, x, lev, type, mode))
+ if (summon_specific(caster_ptr, who, y, x, lev, type, mode))
success = TRUE;
}
else flg |= PM_NO_PET;
if (!(pet && (caster_ptr->lev < 50))) flg |= PM_ALLOW_GROUP;
- if (!summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, power, SUMMON_DEMON, flg))
+ if (!summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, power, SUMMON_DEMON, flg))
return TRUE;
msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, type, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, type, mode))
{
msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
"Cold winds begin to blow around you, carrying with them the stench of decay..."));
if (pet) mode |= PM_FORCE_PET;
else mode |= PM_NO_PET;
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, SUMMON_HOUND, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, SUMMON_HOUND, mode))
{
if (pet)
msg_print(_("ハウンドがあなたの下僕として出現した。", "A group of hounds appear as your servant."));
if (pet) mode |= PM_FORCE_PET;
else mode |= PM_NO_PET;
- if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, SUMMON_ELEMENTAL, mode))
+ if (summon_specific(creature_ptr, (pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, SUMMON_ELEMENTAL, mode))
{
msg_print(_("エレメンタルが現れた...", "An elemental materializes..."));
if (pet)
BIT_FLAGS mode = PM_ALLOW_GROUP;
bool pet = !one_in_(5);
if (pet) mode |= PM_FORCE_PET;
- if (summon_named_creature(0, creature_ptr->y, creature_ptr->x, MON_JIZOTAKO, mode))
+ if (summon_named_creature(creature_ptr, 0, creature_ptr->y, creature_ptr->x, MON_JIZOTAKO, mode))
{
if (pet)
msg_print(_("蛸があなたの下僕として出現した。", "A group of octopuses appear as your servant."));
PLAYER_LEVEL plev = caster_ptr->lev;
int summon_lev = plev * 2 / 3 + r_info[o_ptr->pval].level;
- if (summon_specific(-1, caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_DEMON, (PM_ALLOW_GROUP | PM_FORCE_PET)))
+ if (summon_specific(caster_ptr, -1, caster_ptr->y, caster_ptr->x, summon_lev, SUMMON_HI_DEMON, (PM_ALLOW_GROUP | PM_FORCE_PET)))
{
msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
/*!
* @brief 同族召喚(援軍)処理
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param level 召喚基準レベル
* @param y 召喚先Y座標
* @param x 召喚先X座標
* @param mode 召喚オプション
* @return ターンを消費した場合TRUEを返す
*/
-bool summon_kin_player(DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode)
+bool summon_kin_player(player_type *creature_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode)
{
bool pet = (bool)(mode & PM_FORCE_PET);
if (!pet) mode |= PM_NO_PET;
- return summon_specific((pet ? -1 : 0), y, x, level, SUMMON_KIN, mode);
+ return summon_specific(creature_ptr, (pet ? -1 : 0), y, x, level, SUMMON_KIN, mode);
}
/*!
* @brief サイバーデーモンの召喚
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param who 召喚主のモンスターID(0ならばプレイヤー)
* @param y 召喚位置Y座標
* @param x 召喚位置X座標
* @return 作用が実際にあった場合TRUEを返す
*/
-int summon_cyber(floor_type *floor_ptr, MONSTER_IDX who, POSITION y, POSITION x)
+int summon_cyber(player_type *creature_ptr, MONSTER_IDX who, POSITION y, POSITION x)
{
/* Summoned by a monster */
BIT_FLAGS mode = PM_ALLOW_GROUP;
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
if (who > 0)
{
monster_type *m_ptr = &floor_ptr->m_list[who];
int count = 0;
for (int i = 0; i < max_cyber; i++)
{
- count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
+ count += summon_specific(creature_ptr, who, y, x, 100, SUMMON_CYBER, mode);
}
return count;
{
int count = 0;
concptr sukekakusan = "";
- if (summon_named_creature(0, kohmon_ptr->y, kohmon_ptr->x, MON_SUKE, PM_FORCE_PET))
+ if (summon_named_creature(kohmon_ptr, 0, kohmon_ptr->y, kohmon_ptr->x, MON_SUKE, PM_FORCE_PET))
{
msg_print(_("『助さん』が現れた。", "Suke-san apperars."));
sukekakusan = "Suke-san";
count++;
}
- if (summon_named_creature(0, kohmon_ptr->y, kohmon_ptr->x, MON_KAKU, PM_FORCE_PET))
+ if (summon_named_creature(kohmon_ptr, 0, kohmon_ptr->y, kohmon_ptr->x, MON_KAKU, PM_FORCE_PET))
{
msg_print(_("『格さん』が現れた。", "Kaku-san appears."));
sukekakusan = "Kaku-san";
#define SUMMON_ARMAGE_GOOD 66 /*!< 召喚タイプ: ハルマゲドン・トラップ用天使陣営 */
#define SUMMON_ARMAGE_EVIL 67 /*!< 召喚タイプ: ハルマゲドン・トラップ用悪魔陣営 */
-extern bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
-extern bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
-
extern bool trump_summoning(player_type *caster_ptr, int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);
extern bool cast_summon_demon(player_type *creature_ptr, int power);
extern bool cast_summon_undead(player_type *creature_ptr, int power);
extern bool cast_summon_octopus(player_type *creature_ptr);
extern bool item_tester_offer(object_type *o_ptr);
extern bool cast_summon_greater_demon(player_type *caster_ptr);
-extern bool summon_kin_player(DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode);
-extern int summon_cyber(floor_type *floor_ptr, MONSTER_IDX who, POSITION y, POSITION x);
+extern bool summon_kin_player(player_type *creature_ptr, DEPTH level, POSITION y, POSITION x, BIT_FLAGS mode);
+extern int summon_cyber(player_type *creature_ptr, MONSTER_IDX who, POSITION y, POSITION x);
extern void mitokohmon(player_type *kohmon_ptr);
}
continue;
}
- else if (summon_named_creature(who, y, x, o_ptr->pval, mode))
+ else if (summon_named_creature(caster_ptr, who, y, x, o_ptr->pval, mode))
{
note_kill = _("生き返った。", " revived.");
}
if (!common_saving_throw_charm(caster_ptr, dam, m_ptr))
{
note = _("があなたに隷属した。", " is in your thrall!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
}
else
{
m_ptr->hp = m_ptr->maxhp;
/* Attempt to clone. */
- if (multiply_monster(g_ptr->m_idx, TRUE, 0L))
+ if (multiply_monster(caster_ptr, g_ptr->m_idx, TRUE, 0L))
{
note = _("が分裂した!", " spawns!");
}
else
{
note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
chg_virtue(caster_ptr, V_INDIVIDUALISM, -1);
if (r_ptr->flags3 & RF3_ANIMAL)
else
{
note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
}
/* No "real" damage */
else
{
note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
}
/* No "real" damage */
else
{
note = _("はなついた。", " is tamed!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
if (r_ptr->flags3 & RF3_ANIMAL)
chg_virtue(caster_ptr, V_NATURE, 1);
}
else
{
note = _("を支配した。", " is tamed!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
if (r_ptr->flags3 & RF3_ANIMAL)
chg_virtue(caster_ptr, V_NATURE, 1);
}
else
{
note = _("を支配した。", " is tamed!");
- set_pet(m_ptr);
+ set_pet(caster_ptr, m_ptr);
(void)set_monster_fast(caster_ptr, g_ptr->m_idx, MON_FAST(m_ptr) + 100);
/* Learn about type */
(*count) += activate_hi_summon(target_ptr, target_ptr->y, target_ptr->x, FALSE);
if (!one_in_(6)) break;
case 7: case 8: case 9: case 18:
- (*count) += summon_specific(0, target_ptr->y, target_ptr->x, floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (*count) += summon_specific(target_ptr, 0, target_ptr->y, target_ptr->x, floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
if (!one_in_(6)) break;
case 10: case 11: case 12:
msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
case 25:
if ((floor_ptr->dun_level > 65) && !stop_ty)
{
- (*count) += summon_cyber(floor_ptr, -1, target_ptr->y, target_ptr->x);
+ (*count) += summon_cyber(target_ptr, -1, target_ptr->y, target_ptr->x);
stop_ty = TRUE;
break;
}
switch (randint1(25) + (dungeon_level / 20))
{
case 1: case 2:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
break;
case 3: case 4:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
break;
case 5: case 6:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
break;
case 7: case 8:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
break;
case 9: case 10:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
break;
case 11: case 12:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
break;
case 13: case 14:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
break;
case 15: case 16:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
break;
case 17:
if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
break;
case 18: case 19:
if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
break;
case 20: case 21:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
break;
case 22: case 23:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
break;
case 24:
- count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
break;
default:
if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), y, x, pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
}
}
case 35:
for (int counter = 0; counter < 8; counter++)
{
- (void)summon_specific(0, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
+ (void)summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, (floor_ptr->dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
}
break;
activate_hi_summon(caster_ptr, caster_ptr->y, caster_ptr->x, FALSE);
break;
case 38:
- (void)summon_cyber(floor_ptr, -1, caster_ptr->y, caster_ptr->x);
+ (void)summon_cyber(caster_ptr, -1, caster_ptr->y, caster_ptr->x);
break;
default:
{
msg_print(_("なんてこった!あなたの周りの地面から朽ちた人影が立ち上がってきた!",
"Oh no! Mouldering forms rise from the earth around you!"));
- (void)summon_specific(0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
chg_virtue(caster_ptr, V_UNLIFE, 1);
}
else if (die < 14)
if (die < 14)
{
msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
- summon_specific(0, caster_ptr->y, caster_ptr->x, floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, floor_ptr->dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
return;
}
&& (rlev < creature_ptr->lev * 3 / 2 + randint0(creature_ptr->lev / 5)))
{
msg_format(_("%sを手なずけた。", "You tame %s."), m_name);
- set_pet(m_ptr);
+ set_pet(creature_ptr, m_ptr);
}
else
{
/* Create a new monster (no groups) */
bool polymorphed = FALSE;
- if (place_monster_aux(0, y, x, new_r_idx, mode))
+ if (place_monster_aux(caster_ptr, 0, y, x, new_r_idx, mode))
{
floor_ptr->m_list[hack_m_idx_ii].nickname = back_m.nickname;
floor_ptr->m_list[hack_m_idx_ii].parent_m_idx = back_m.parent_m_idx;
else
{
/* Placing the new monster failed */
- if (place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
+ if (place_monster_aux(caster_ptr, 0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
{
floor_ptr->m_list[hack_m_idx_ii] = back_m;
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
- count += summon_specific((pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (pet ? caster_ptr->lev * 2 / 3 + randint1(caster_ptr->lev / 2) : caster_ptr->current_floor_ptr->dun_level), 0, mode);
+ count += summon_specific(caster_ptr, (pet ? -1 : 0), caster_ptr->y, caster_ptr->x, (pet ? caster_ptr->lev * 2 / 3 + randint1(caster_ptr->lev / 2) : caster_ptr->current_floor_ptr->dun_level), 0, mode);
if (!one_in_(6)) break;
}
case 23: case 24: case 25:
num = 2 + randint1(3);
for (i = 0; i < num; i++)
{
- (void)summon_specific(0, y, x, trapped_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ (void)summon_specific(trapped_ptr, 0, y, x, trapped_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
}
if (trapped_ptr->current_floor_ptr->dun_level > randint1(100)) /* No nasty effect for low levels */
/* Require line of projection */
if (!projectable(trapped_ptr, trapped_ptr->y, trapped_ptr->x, y1, x1)) continue;
- if (summon_specific(0, y1, x1, lev, SUMMON_ARMAGE_EVIL, (PM_NO_PET)))
+ if (summon_specific(trapped_ptr, 0, y1, x1, lev, SUMMON_ARMAGE_EVIL, (PM_NO_PET)))
evil_idx = hack_m_idx_ii;
- if (summon_specific(0, y1, x1, lev, SUMMON_ARMAGE_GOOD, (PM_NO_PET)))
+ if (summon_specific(trapped_ptr, 0, y1, x1, lev, SUMMON_ARMAGE_GOOD, (PM_NO_PET)))
{
good_idx = hack_m_idx_ii;
}
num = 1 + trapped_ptr->current_floor_ptr->dun_level / 20;
for (i = 0; i < num; i++)
{
- (void)summon_specific(0, y, x, trapped_ptr->current_floor_ptr->dun_level, SUMMON_PIRANHAS, (PM_ALLOW_GROUP | PM_NO_PET));
+ (void)summon_specific(trapped_ptr, 0, y, x, trapped_ptr->current_floor_ptr->dun_level, SUMMON_PIRANHAS, (PM_ALLOW_GROUP | PM_NO_PET));
}
break;
}
mode |= PM_ALLOW_SLEEP;
/* Make a resident */
- (void)alloc_monster(generate_encounter ? 0 : 3, mode);
+ (void)alloc_monster(creature_ptr, generate_encounter ? 0 : 3, mode);
}
if(generate_encounter) creature_ptr->ambush_flag = TRUE;
if (cave_empty_bold(caster_ptr->current_floor_ptr, wy, wx)) break;
}
- (void)alloc_horde(wy, wx);
+ (void)alloc_horde(caster_ptr, wy, wx);
}
/*!
{
for (int i = 0; i < num; i++)
{
- (void)summon_specific(0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+ (void)summon_specific(caster_ptr, 0, caster_ptr->y, caster_ptr->x, caster_ptr->current_floor_ptr->dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
}
*/
static void do_cmd_wiz_named(player_type *summoner_ptr, MONRACE_IDX r_idx)
{
- (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+ (void)summon_named_creature(summoner_ptr, 0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
}
*/
static void do_cmd_wiz_named_friendly(player_type *summoner_ptr, MONRACE_IDX r_idx)
{
- (void)summon_named_creature(0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
+ (void)summon_named_creature(summoner_ptr, 0, summoner_ptr->y, summoner_ptr->x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
}