/* Scan the allocation table */
for (i = 0; i < alloc_race_size; i++)
{
- monster_race *r_ptr;
+ monster_race *r_ptr;
/* Get the entry */
alloc_entry *entry = &alloc_race_table[i];
place_monster_m_idx = hack_m_idx_ii;
/* Reinforcement */
- for(i = 0; i < 6; i++)
+ for(i = 0; i < A_MAX; i++)
{
if(!r_ptr->reinforce_id[i]) break;
n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
m_idx = cave[y][x].m_idx;
if (m_list[m_idx].mflag2 & MFLAG2_CHAMELEON) r_ptr = &r_info[m_list[m_idx].r_idx];
- summon_kin_type = r_ptr->d_char;
for (attempts = randint1(10) + 5; attempts; attempts--)
{
scatter(&cy, &cx, y, x, 5, 0);
- (void)summon_specific(m_idx, cy, cx, dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP, '\0');
+ (void)summon_specific(m_idx, cy, cx, dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP, r_ptr->d_char);
y = cy;
x = cx;
}
+ if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), r_ptr->d_char);
return TRUE;
}
{
if (alloc_horde(y, x))
{
- if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), summon_kin_type);
return (TRUE);
}
}
/* Save the "summon" type */
summon_specific_type = type;
+ summon_kin_type = symbol;
+
summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
/* Prepare allocation table */
* @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(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
POSITION x, y;
*/
void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
{
- long oldhp, newhp, tmp;
- int percentage;
+ HIT_POINT oldhp, newhp;
+ HIT_POINT tmp;
+ PERCENTAGE percentage;
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
GAME_TEXT m_name[MAX_NLEN];
- /* Get the monster name */
monster_desc(m_name, m_ptr, 0);
if(dam == 0) // Notice non-damage
}
/* Note -- subtle fix -CFT */
- newhp = (long)(m_ptr->hp);
- oldhp = newhp + (long)(dam);
+ newhp = m_ptr->hp;
+ oldhp = newhp + dam;
tmp = (newhp * 100L) / oldhp;
- percentage = (int)(tmp);
+ percentage = tmp;
if(my_strchr(",ejmvwQ", r_ptr->d_char)) // Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs
{
void update_smart_learn(MONSTER_IDX m_idx, int what)
{
monster_type *m_ptr = &m_list[m_idx];
-
monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
/* Not allowed to learn */
if (!smart_learn) return;
/* Not intelligent, only learn sometimes */
if (!(r_ptr->flags2 & (RF2_SMART)) && (randint0(100) < 50)) return;
-
-
/* Analyze the knowledge */
switch (what)
{