#define HORDE_NOGOOD 0x01
#define HORDE_NOEVIL 0x02
-bool is_kage = FALSE;
-
cptr horror_desc[MAX_SAN_HORROR] =
{
#ifdef JP
/* Hack -- count the number of "reproducers" */
if (r_ptr->flags2 & (RF2_MULTIPLY)) num_repro--;
+ if (MON_CSLEEP(m_ptr)) (void)set_monster_csleep(i, 0);
+ if (MON_FAST(m_ptr)) (void)set_monster_fast(i, 0);
+ if (MON_SLOW(m_ptr)) (void)set_monster_slow(i, 0);
+ if (MON_STUNNED(m_ptr)) (void)set_monster_stunned(i, 0);
+ if (MON_CONFUSED(m_ptr)) (void)set_monster_confused(i, 0);
+ if (MON_MONFEAR(m_ptr)) (void)set_monster_monfear(i, 0);
+ if (MON_INVULNER(m_ptr)) (void)set_monster_invulner(i, 0, FALSE);
+
/* Hack -- remove target monster */
if (i == target_who) target_who = 0;
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Hack -- efficiency */
- o_ptr->held_m_idx = 0;
+ /*
+ * o_ptr->held_m_idx is needed in delete_object_idx()
+ * to prevent calling lite_spot()
+ */
/* Delete the object */
delete_object_idx(this_o_idx);
}
+ if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
+
/* Wipe the Monster */
(void)WIPE(m_ptr, monster_type);
lite_spot(y, x);
/* Update some things */
- p_ptr->update |= (PU_MON_LITE);
+ if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
+ p_ptr->update |= (PU_MON_LITE);
}
*/
static void compact_monsters_aux(int i1, int i2)
{
- int y, x;
+ int y, x, i;
cave_type *c_ptr;
/* Hack -- Update the health bar */
if (p_ptr->health_who == i1) health_track(i2);
+ /* Hack -- Update parent index */
+ if (is_pet(m_ptr))
+ {
+ for (i = 1; i < m_max; i++)
+ {
+ monster_type *m2_ptr = &m_list[i];
+
+ if (m2_ptr->parent_m_idx == i1)
+ m2_ptr->parent_m_idx = i2;
+ }
+ }
+
/* Structure copy */
- COPY(&m_list[i2], &m_list[i1], monster_type);
+ (void)COPY(&m_list[i2], &m_list[i1], monster_type);
/* Wipe the hole */
(void)WIPE(&m_list[i1], monster_type);
+ for (i = 0; i < MAX_MTIMED; i++)
+ {
+ int mproc_idx = get_mproc_idx(i1, i);
+ if (mproc_idx >= 0) mproc_list[i][mproc_idx] = i2;
+ }
}
/* All monsters get a saving throw */
if (randint0(100) < chance) continue;
+ if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
+ {
+ char m_name[80];
+
+ monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_COMPACT, m_name);
+ }
+
/* Delete the monster */
delete_monster_idx(i);
{
r_info[MON_BANOR].max_num = 0;
r_info[MON_BANOR].r_pkills++;
+ r_info[MON_BANOR].r_akills++;
if (r_info[MON_BANOR].r_tkills < MAX_SHORT) r_info[MON_BANOR].r_tkills++;
}
if (r_info[MON_LUPART].max_num)
{
r_info[MON_LUPART].max_num = 0;
r_info[MON_LUPART].r_pkills++;
+ r_info[MON_LUPART].r_akills++;
if (r_info[MON_LUPART].r_tkills < MAX_SHORT) r_info[MON_LUPART].r_tkills++;
}
}
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
- /* Hack -- Reduce the racial counter */
- real_r_ptr(m_ptr)->cur_num = 0;
-
/* Monster is gone */
cave[m_ptr->fy][m_ptr->fx].m_idx = 0;
}
+ /*
+ * Wiping racial counters of all monsters and incrementing of racial
+ * counters of monsters in party_mon[] are required to prevent multiple
+ * generation of unique monster who is the minion of player.
+ */
+
+ /* Hack -- Wipe the racial counter of all monster races */
+ for (i = 1; i < max_r_idx; i++) r_info[i].cur_num = 0;
+
/* Reset "m_max" */
m_max = 1;
/* Reset "m_cnt" */
m_cnt = 0;
+ /* Reset "mproc_max[]" */
+ for (i = 0; i < MAX_MTIMED; i++) mproc_max[i] = 0;
+
/* Hack -- reset "reproducer" count */
num_repro = 0;
static int summon_specific_who = -1;
-/*
- * Hack -- the hostility of the summoned monster
- */
-static bool summon_specific_hostile = TRUE;
-
static bool summon_unique_okay = FALSE;
case SUMMON_ANIMAL_RANGER:
{
okay = ((r_ptr->flags3 & (RF3_ANIMAL)) &&
- (strchr("abcflqrwBCHIJKMRS", r_ptr->d_char)) &&
+ (my_strchr("abcflqrwBCHIJKMRS", r_ptr->d_char)) &&
!(r_ptr->flags3 & (RF3_DRAGON)) &&
!(r_ptr->flags3 & (RF3_EVIL)) &&
!(r_ptr->flags3 & (RF3_UNDEAD)) &&
case SUMMON_HI_DRAGON_LIVING:
{
- okay = ((r_ptr->d_char == 'D') &&
- !(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)));
+ okay = ((r_ptr->d_char == 'D') && monster_living(r_ptr));
break;
}
case SUMMON_LIVING:
{
- okay = (!(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)));
+ okay = monster_living(r_ptr);
break;
}
for (i = 0; i < 4; i++)
if (r_ptr->blow[i].method == RBM_EXPLODE) okay = TRUE;
- okay = (okay && (!(r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING))));
+ okay = (okay && monster_living(r_ptr));
break;
}
return FALSE;
}
- if (d_ptr->special_div == 64) return TRUE;
+ if (d_ptr->special_div >= 64) return TRUE;
if (summon_specific_type && !(d_ptr->flags1 & DF1_CHAMELEON)) return TRUE;
- if(d_ptr->mode == DUNGEON_MODE_AND)
+ switch (d_ptr->mode)
{
+ case DUNGEON_MODE_AND:
if (d_ptr->mflags1)
{
- if((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
+ if ((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
return FALSE;
}
if (d_ptr->mflags2)
{
- if((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
+ if ((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
return FALSE;
}
if (d_ptr->mflags3)
{
- if((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
+ if ((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
return FALSE;
}
if (d_ptr->mflags4)
{
- if((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
+ if ((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
return FALSE;
}
if (d_ptr->mflags5)
{
- if((d_ptr->mflags5 & r_ptr->flags5) != d_ptr->mflags5)
+ if ((d_ptr->mflags5 & r_ptr->flags5) != d_ptr->mflags5)
return FALSE;
}
if (d_ptr->mflags6)
{
- if((d_ptr->mflags6 & r_ptr->flags6) != d_ptr->mflags6)
+ if ((d_ptr->mflags6 & r_ptr->flags6) != d_ptr->mflags6)
return FALSE;
}
if (d_ptr->mflags7)
{
- if((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
+ if ((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
return FALSE;
}
if (d_ptr->mflags8)
{
- if((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
+ if ((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
return FALSE;
}
if (d_ptr->mflags9)
{
- if((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
+ if ((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
return FALSE;
}
- for(a = 0; a < 5; a++)
- if(d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return FALSE;
- }
- else if(d_ptr->mode == DUNGEON_MODE_NAND)
- {
- byte ok[9 + 5], i = 0, j = 0;
+ if (d_ptr->mflagsr)
+ {
+ if ((d_ptr->mflagsr & r_ptr->flagsr) != d_ptr->mflagsr)
+ return FALSE;
+ }
+ for (a = 0; a < 5; a++)
+ if (d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return FALSE;
+ return TRUE;
+
+ case DUNGEON_MODE_NAND:
if (d_ptr->mflags1)
{
- i++;
- if(d_ptr->mflags1 & r_ptr->flags1)
- ok[0] = 1;
+ if ((d_ptr->mflags1 & r_ptr->flags1) != d_ptr->mflags1)
+ return TRUE;
}
if (d_ptr->mflags2)
{
- i++;
- if(d_ptr->mflags2 & r_ptr->flags2)
- ok[1] = 1;
+ if ((d_ptr->mflags2 & r_ptr->flags2) != d_ptr->mflags2)
+ return TRUE;
}
if (d_ptr->mflags3)
{
- i++;
- if(d_ptr->mflags3 & r_ptr->flags3)
- ok[2] = 1;
+ if ((d_ptr->mflags3 & r_ptr->flags3) != d_ptr->mflags3)
+ return TRUE;
}
if (d_ptr->mflags4)
{
- i++;
- if(d_ptr->mflags4 & r_ptr->flags4)
- ok[3] = 1;
+ if ((d_ptr->mflags4 & r_ptr->flags4) != d_ptr->mflags4)
+ return TRUE;
}
if (d_ptr->mflags5)
{
- i++;
- if(d_ptr->mflags5 & r_ptr->flags5)
- ok[4] = 1;
+ if ((d_ptr->mflags5 & r_ptr->flags5) != d_ptr->mflags5)
+ return TRUE;
}
if (d_ptr->mflags6)
{
- i++;
- if(d_ptr->mflags6 & r_ptr->flags6)
- ok[5] = 1;
+ if ((d_ptr->mflags6 & r_ptr->flags6) != d_ptr->mflags6)
+ return TRUE;
}
if (d_ptr->mflags7)
{
- i++;
- if(d_ptr->mflags7 & r_ptr->flags7)
- ok[6] = 1;
+ if ((d_ptr->mflags7 & r_ptr->flags7) != d_ptr->mflags7)
+ return TRUE;
}
if (d_ptr->mflags8)
{
- i++;
- if(d_ptr->mflags8 & r_ptr->flags8)
- ok[7] = 1;
+ if ((d_ptr->mflags8 & r_ptr->flags8) != d_ptr->mflags8)
+ return TRUE;
}
if (d_ptr->mflags9)
{
- i++;
- if(d_ptr->mflags9 & r_ptr->flags9)
- ok[8] = 1;
- }
-
- for(a = 0; a < 5; a++)
- {
- if(d_ptr->r_char[a])
- {
- i++;
- if (d_ptr->r_char[a] != r_ptr->d_char) ok[9 + a] = 1;
- }
+ if ((d_ptr->mflags9 & r_ptr->flags9) != d_ptr->mflags9)
+ return TRUE;
}
-
- j = ok[0] + ok[1] + ok[2] + ok[3] + ok[4] + ok[5] + ok[6] + ok[7] + ok[8] + ok[9] + ok[10] + ok[11] + ok[12] + ok[13];
-
- if(i == j) return FALSE;
- }
- else if(d_ptr->mode == DUNGEON_MODE_OR)
- {
- byte ok = FALSE, i;
- s32b flag;
-
- for(i = 0; i < 32; i++)
+ if (d_ptr->mflagsr)
{
- flag = d_ptr->mflags1 & (1 << i);
- if(r_ptr->flags1 & flag) ok = TRUE;
-
- flag = d_ptr->mflags2 & (1 << i);
- if(r_ptr->flags2 & flag) ok = TRUE;
-
- flag = d_ptr->mflags3 & (1 << i);
- if(r_ptr->flags3 & flag) ok = TRUE;
-
- flag = d_ptr->mflags4 & (1 << i);
- if(r_ptr->flags4 & flag) ok = TRUE;
-
- flag = d_ptr->mflags5 & (1 << i);
- if(r_ptr->flags5 & flag) ok = TRUE;
-
- flag = d_ptr->mflags6 & (1 << i);
- if(r_ptr->flags6 & flag) ok = TRUE;
-
- flag = d_ptr->mflags7 & (1 << i);
- if(r_ptr->flags7 & flag) ok = TRUE;
-
- flag = d_ptr->mflags8 & (1 << i);
- if(r_ptr->flags8 & flag) ok = TRUE;
-
- flag = d_ptr->mflags9 & (1 << i);
- if(r_ptr->flags9 & flag) ok = TRUE;
+ if ((d_ptr->mflagsr & r_ptr->flagsr) != d_ptr->mflagsr)
+ return TRUE;
}
- for(a = 0; a < 5; a++)
- if(d_ptr->r_char[a] == r_ptr->d_char) ok = TRUE;
-
- return ok;
- }
- else if(d_ptr->mode == DUNGEON_MODE_NOR)
- {
- byte ok = TRUE, i;
- s32b flag;
-
- for(i = 0; i < 32; i++)
- {
- flag = d_ptr->mflags1 & (1 << i);
- if(r_ptr->flags1 & flag) ok = FALSE;
+ for (a = 0; a < 5; a++)
+ if (d_ptr->r_char[a] && (d_ptr->r_char[a] != r_ptr->d_char)) return TRUE;
- flag = d_ptr->mflags2 & (1 << i);
- if(r_ptr->flags2 & flag) ok = FALSE;
-
- flag = d_ptr->mflags3 & (1 << i);
- if(r_ptr->flags3 & flag) ok = FALSE;
-
- flag = d_ptr->mflags4 & (1 << i);
- if(r_ptr->flags4 & flag) ok = FALSE;
-
- flag = d_ptr->mflags5 & (1 << i);
- if(r_ptr->flags5 & flag) ok = FALSE;
+ return FALSE;
- flag = d_ptr->mflags6 & (1 << i);
- if(r_ptr->flags6 & flag) ok = FALSE;
+ case DUNGEON_MODE_OR:
+ if (r_ptr->flags1 & d_ptr->mflags1) return TRUE;
+ if (r_ptr->flags2 & d_ptr->mflags2) return TRUE;
+ if (r_ptr->flags3 & d_ptr->mflags3) return TRUE;
+ if (r_ptr->flags4 & d_ptr->mflags4) return TRUE;
+ if (r_ptr->flags5 & d_ptr->mflags5) return TRUE;
+ if (r_ptr->flags6 & d_ptr->mflags6) return TRUE;
+ if (r_ptr->flags7 & d_ptr->mflags7) return TRUE;
+ if (r_ptr->flags8 & d_ptr->mflags8) return TRUE;
+ if (r_ptr->flags9 & d_ptr->mflags9) return TRUE;
+ if (r_ptr->flagsr & d_ptr->mflagsr) return TRUE;
+ for (a = 0; a < 5; a++)
+ if (d_ptr->r_char[a] == r_ptr->d_char) return TRUE;
- flag = d_ptr->mflags7 & (1 << i);
- if(r_ptr->flags7 & flag) ok = FALSE;
+ return FALSE;
- flag = d_ptr->mflags8 & (1 << i);
- if(r_ptr->flags8 & flag) ok = FALSE;
+ case DUNGEON_MODE_NOR:
+ if (r_ptr->flags1 & d_ptr->mflags1) return FALSE;
+ if (r_ptr->flags2 & d_ptr->mflags2) return FALSE;
+ if (r_ptr->flags3 & d_ptr->mflags3) return FALSE;
+ if (r_ptr->flags4 & d_ptr->mflags4) return FALSE;
+ if (r_ptr->flags5 & d_ptr->mflags5) return FALSE;
+ if (r_ptr->flags6 & d_ptr->mflags6) return FALSE;
+ if (r_ptr->flags7 & d_ptr->mflags7) return FALSE;
+ if (r_ptr->flags8 & d_ptr->mflags8) return FALSE;
+ if (r_ptr->flags9 & d_ptr->mflags9) return FALSE;
+ if (r_ptr->flagsr & d_ptr->mflagsr) return FALSE;
+ for (a = 0; a < 5; a++)
+ if (d_ptr->r_char[a] == r_ptr->d_char) return FALSE;
- flag = d_ptr->mflags9 & (1 << i);
- if(r_ptr->flags9 & flag) ok = FALSE;
- }
- for(a = 0; a < 5; a++)
- if(d_ptr->r_char[a] == r_ptr->d_char) ok = FALSE;
- return ok;
+ return TRUE;
}
return TRUE;
if (r_ptr->flags7 & RF7_GUARDIAN)
continue;
-
+
/* Depth Monsters never appear out of depth */
if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) &&
(r_ptr->level > dun_level))
/* Accept this monster */
entry->prob2 = entry->prob1;
- if (dun_level && (!p_ptr->inside_quest || p_ptr->inside_quest < MIN_RANDOM_QUEST) && !restrict_monster_to_dungeon(entry->index) && !p_ptr->inside_battle)
+ if (dun_level && (!p_ptr->inside_quest || is_fixed_quest_idx(p_ptr->inside_quest)) && !restrict_monster_to_dungeon(entry->index) && !p_ptr->inside_battle)
{
int hoge = entry->prob2 * d_info[dungeon_type].special_div;
entry->prob2 = hoge / 64;
s16b get_mon_num(int level)
{
int i, j, p;
-
int r_idx;
-
long value, total;
-
monster_race *r_ptr;
-
alloc_entry *table = alloc_race_table;
int pls_kakuritu, pls_level;
- int hoge=mysqrt(level*10000L);
+ int hoge = mysqrt(level*10000L);
if (level > MAX_DEPTH - 1) level = MAX_DEPTH - 1;
- if ((dungeon_turn > hoge*(TURNS_PER_TICK*500L)) && !level)
- {
- pls_kakuritu = MAX(2, NASTY_MON-((dungeon_turn/(TURNS_PER_TICK*2500L)-hoge/10)));
- pls_level = MIN(8,3 + dungeon_turn/(TURNS_PER_TICK*20000L)-hoge/40);
- }
- else
- {
- pls_kakuritu = NASTY_MON;
- pls_level = 2;
- }
+ pls_kakuritu = MAX(NASTY_MON_MAX, NASTY_MON_BASE - ((dungeon_turn / (TURNS_PER_TICK * 2500L) - hoge / 10)));
+ pls_level = MIN(NASTY_MON_PLUS_MAX, 3 + dungeon_turn / (TURNS_PER_TICK * 20000L) - hoge / 40 + MIN(5, level / 10)) ;
if (d_info[dungeon_type].flags1 & DF1_MAZE)
{
- pls_kakuritu = MIN(pls_kakuritu/2, pls_kakuritu-10);
+ pls_kakuritu = MIN(pls_kakuritu / 2, pls_kakuritu - 10);
if (pls_kakuritu < 2) pls_kakuritu = 2;
pls_level += 2;
level += 3;
}
/* Boost the level */
- if ((level > 0) && !p_ptr->inside_battle && !(d_info[dungeon_type].flags1 & DF1_BEGINNER))
+ if (!p_ptr->inside_battle && !(d_info[dungeon_type].flags1 & DF1_BEGINNER))
{
/* Nightmare mode allows more out-of depth monsters */
if (ironman_nightmare && !randint0(pls_kakuritu))
if (!randint0(pls_kakuritu))
{
/* Pick a level bonus */
- int d = MIN(5, level/10) + pls_level;
-
- /* Boost the level */
- level += d;
- }
-
- /* Occasional "nasty" monster */
- if (!randint0(pls_kakuritu))
- {
- /* Pick a level bonus */
- int d = MIN(5, level/10) + pls_level;
-
- /* Boost the level */
- level += d;
+ level += pls_level;
}
}
}
-
/* Reset total */
total = 0L;
{
/* Hack -- "unique" monsters must be "unique" */
if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags7 & (RF7_UNIQUE_7))) &&
+ (r_ptr->flags7 & (RF7_NAZGUL))) &&
(r_ptr->cur_num >= r_ptr->max_num))
{
continue;
/* No legal monsters */
if (total <= 0) return (0);
-
/* Pick a monster */
value = randint0(total);
value = value - table[i].prob3;
}
-
/* Power boost */
p = randint0(100);
* so that "char desc[80];" is sufficiently large for any result.
*
* Mode Flags:
- * 0x01 --> Objective (or Reflexive)
- * 0x02 --> Possessive (or Reflexive)
- * 0x04 --> Use indefinites for hidden monsters ("something")
- * 0x08 --> Use indefinites for visible monsters ("a kobold")
- * 0x10 --> Pronominalize hidden monsters
- * 0x20 --> Pronominalize visible monsters
- * 0x40 --> Assume the monster is hidden
- * 0x80 --> Assume the monster is visible
- * 0x100 --> Chameleon's true name
- * 0x200 --> Ignore hallucination, and penetrate shape change
+ * MD_OBJECTIVE --> Objective (or Reflexive)
+ * MD_POSSESSIVE --> Possessive (or Reflexive)
+ * MD_INDEF_HIDDEN --> Use indefinites for hidden monsters ("something")
+ * MD_INDEF_VISIBLE --> Use indefinites for visible monsters ("a kobold")
+ * MD_PRON_HIDDEN --> Pronominalize hidden monsters
+ * MD_PRON_VISIBLE --> Pronominalize visible monsters
+ * MD_ASSUME_HIDDEN --> Assume the monster is hidden
+ * MD_ASSUME_VISIBLE --> Assume the monster is visible
+ * MD_TRUE_NAME --> Chameleon's true name
+ * MD_IGNORE_HALLU --> Ignore hallucination, and penetrate shape change
*
* Useful Modes:
- * 0x00 --> Full nominative name ("the kobold") or "it"
- * 0x04 --> Full nominative name ("the kobold") or "something"
- * 0x80 --> Genocide resistance name ("the kobold")
- * 0x88 --> Killing name ("a kobold")
- * 0x22 --> Possessive, genderized if visable ("his") or "its"
- * 0x23 --> Reflexive, genderized if visable ("himself") or "itself"
+ * 0x00 --> Full nominative name ("the kobold") or "it"
+ * MD_INDEF_HIDDEN --> Full nominative name ("the kobold") or "something"
+ * MD_ASSUME_VISIBLE --> Genocide resistance name ("the kobold")
+ * MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE --> Killing name ("a kobold")
+ * MD_PRON_VISIBLE | MD_POSSESSIVE
+ * --> Possessive, genderized if visable ("his") or "its"
+ * MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE
+ * --> Reflexive, genderized if visable ("himself") or "itself"
*/
void monster_desc(char *desc, monster_type *m_ptr, int mode)
{
r_ptr = &r_info[m_ptr->ap_r_idx];
- /* Mode of 0x100 will reveal Chameleon's true name */
- if (mode & 0x100) name = (r_name + real_r_ptr(m_ptr)->name);
+ /* Mode of MD_TRUE_NAME will reveal Chameleon's true name */
+ if (mode & MD_TRUE_NAME) name = (r_name + real_r_ptr(m_ptr)->name);
else name = (r_name + r_ptr->name);
/* Are we hallucinating? (Idea from Nethack...) */
- if (p_ptr->image && !(mode & 0x200))
+ if (p_ptr->image && !(mode & MD_IGNORE_HALLU))
{
if (one_in_(2))
{
#ifdef JP
-if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
+ if (!get_rnd_line("silly_j.txt", m_ptr->r_idx, silly_name))
#else
if (!get_rnd_line("silly.txt", m_ptr->r_idx, silly_name))
#endif
{
hallu_race = &r_info[randint1(max_r_idx - 1)];
}
- while (hallu_race->flags1 & RF1_UNIQUE);
+ while (!hallu_race->name || (hallu_race->flags1 & RF1_UNIQUE));
strcpy(silly_name, (r_name + hallu_race->name));
}
}
/* Can we "see" it (exists + forced, or visible + not unforced) */
- seen = (m_ptr && ((mode & 0x80) || (!(mode & 0x40) && m_ptr->ml)));
+ seen = (m_ptr && ((mode & MD_ASSUME_VISIBLE) || (!(mode & MD_ASSUME_HIDDEN) && m_ptr->ml)));
/* Sexed Pronouns (seen and allowed, or unseen and allowed) */
- pron = (m_ptr && ((seen && (mode & 0x20)) || (!seen && (mode & 0x10))));
+ pron = (m_ptr && ((seen && (mode & MD_PRON_VISIBLE)) || (!seen && (mode & MD_PRON_HIDDEN))));
/* First, try using pronouns, or describing hidden monsters */
/* Brute force: split on the possibilities */
- switch (kind + (mode & 0x07))
+ switch (kind + (mode & (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE)))
{
/* Neuter, or unknown */
#ifdef JP
- case 0x00: res = "²¿¤«"; break;
- case 0x01: res = "²¿¤«"; break;
- case 0x02: res = "²¿¤«¤Î"; break;
- case 0x03: res = "²¿¤«¼«¿È"; break;
- case 0x04: res = "²¿¤«"; break;
- case 0x05: res = "²¿¤«"; break;
- case 0x06: res = "²¿¤«"; break;
- case 0x07: res = "¤½¤ì¼«¿È"; break;
+ case 0x00: res = "²¿¤«"; break;
+ case 0x00 + (MD_OBJECTIVE): res = "²¿¤«"; break;
+ case 0x00 + (MD_POSSESSIVE): res = "²¿¤«¤Î"; break;
+ case 0x00 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "²¿¤«¼«¿È"; break;
+ case 0x00 + (MD_INDEF_HIDDEN): res = "²¿¤«"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "²¿¤«"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "²¿¤«"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "¤½¤ì¼«¿È"; break;
#else
- case 0x00: res = "it"; break;
- case 0x01: res = "it"; break;
- case 0x02: res = "its"; break;
- case 0x03: res = "itself"; break;
- case 0x04: res = "something"; break;
- case 0x05: res = "something"; break;
- case 0x06: res = "something's"; break;
- case 0x07: res = "itself"; break;
+ case 0x00: res = "it"; break;
+ case 0x00 + (MD_OBJECTIVE): res = "it"; break;
+ case 0x00 + (MD_POSSESSIVE): res = "its"; break;
+ case 0x00 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "itself"; break;
+ case 0x00 + (MD_INDEF_HIDDEN): res = "something"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "something"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "something's"; break;
+ case 0x00 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "itself"; break;
#endif
/* Male (assume human if vague) */
#ifdef JP
- case 0x10: res = "Èà"; break;
- case 0x11: res = "Èà"; break;
- case 0x12: res = "Èà¤Î"; break;
- case 0x13: res = "È༫¿È"; break;
- case 0x14: res = "狼"; break;
- case 0x15: res = "狼"; break;
- case 0x16: res = "狼¤Î"; break;
- case 0x17: res = "È༫¿È"; break;
+ case 0x10: res = "Èà"; break;
+ case 0x10 + (MD_OBJECTIVE): res = "Èà"; break;
+ case 0x10 + (MD_POSSESSIVE): res = "Èà¤Î"; break;
+ case 0x10 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "È༫¿È"; break;
+ case 0x10 + (MD_INDEF_HIDDEN): res = "狼"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "狼"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "狼¤Î"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "È༫¿È"; break;
#else
- case 0x10: res = "he"; break;
- case 0x11: res = "him"; break;
- case 0x12: res = "his"; break;
- case 0x13: res = "himself"; break;
- case 0x14: res = "someone"; break;
- case 0x15: res = "someone"; break;
- case 0x16: res = "someone's"; break;
- case 0x17: res = "himself"; break;
+ case 0x10: res = "he"; break;
+ case 0x10 + (MD_OBJECTIVE): res = "him"; break;
+ case 0x10 + (MD_POSSESSIVE): res = "his"; break;
+ case 0x10 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "himself"; break;
+ case 0x10 + (MD_INDEF_HIDDEN): res = "someone"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "someone"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "someone's"; break;
+ case 0x10 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "himself"; break;
#endif
/* Female (assume human if vague) */
#ifdef JP
- case 0x20: res = "Èà½÷"; break;
- case 0x21: res = "Èà½÷"; break;
- case 0x22: res = "Èà½÷¤Î"; break;
- case 0x23: res = "Èà½÷¼«¿È"; break;
- case 0x24: res = "狼"; break;
- case 0x25: res = "狼"; break;
- case 0x26: res = "狼¤Î"; break;
- case 0x27: res = "Èà½÷¼«¿È"; break;
+ case 0x20: res = "Èà½÷"; break;
+ case 0x20 + (MD_OBJECTIVE): res = "Èà½÷"; break;
+ case 0x20 + (MD_POSSESSIVE): res = "Èà½÷¤Î"; break;
+ case 0x20 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "Èà½÷¼«¿È"; break;
+ case 0x20 + (MD_INDEF_HIDDEN): res = "狼"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "狼"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "狼¤Î"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "Èà½÷¼«¿È"; break;
#else
- case 0x20: res = "she"; break;
- case 0x21: res = "her"; break;
- case 0x22: res = "her"; break;
- case 0x23: res = "herself"; break;
- case 0x24: res = "someone"; break;
- case 0x25: res = "someone"; break;
- case 0x26: res = "someone's"; break;
- case 0x27: res = "herself"; break;
+ case 0x20: res = "she"; break;
+ case 0x20 + (MD_OBJECTIVE): res = "her"; break;
+ case 0x20 + (MD_POSSESSIVE): res = "her"; break;
+ case 0x20 + (MD_POSSESSIVE | MD_OBJECTIVE): res = "herself"; break;
+ case 0x20 + (MD_INDEF_HIDDEN): res = "someone"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_OBJECTIVE): res = "someone"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE): res = "someone's"; break;
+ case 0x20 + (MD_INDEF_HIDDEN | MD_POSSESSIVE | MD_OBJECTIVE): res = "herself"; break;
#endif
-
}
/* Copy the result */
/* Handle visible monsters, "reflexive" request */
- else if ((mode & 0x02) && (mode & 0x01))
+ else if ((mode & (MD_POSSESSIVE | MD_OBJECTIVE)) == (MD_POSSESSIVE | MD_OBJECTIVE))
{
/* The monster is visible, so use its gender */
#ifdef JP
else if (r_ptr->flags1 & RF1_MALE) strcpy(desc, "himself");
else strcpy(desc, "itself");
#endif
-
}
else
{
/* Tanuki? */
- if (is_pet(m_ptr) && m_ptr->ap_r_idx != m_ptr->r_idx)
+ if (is_pet(m_ptr) && !is_original_ap(m_ptr))
{
#ifdef JP
- char *t;
- strcpy(buf, name);
- t = buf;
- while(strncmp(t, "¡Ù", 2) && *t) t++;
- if (*t)
- {
- *t = '\0';
- (void)sprintf(desc, "%s¡©¡Ù", buf);
- }
- else
- (void)sprintf(desc, "%s¡©", name);
+ char *t;
+ strcpy(buf, name);
+ t = buf;
+ while(strncmp(t, "¡Ù", 2) && *t) t++;
+ if (*t)
+ {
+ *t = '\0';
+ (void)sprintf(desc, "%s¡©¡Ù", buf);
+ }
+ else
+ (void)sprintf(desc, "%s¡©", name);
#else
- (void)sprintf(desc, "%s?", name);
+ (void)sprintf(desc, "%s?", name);
#endif
}
else
/* It could be a Unique */
- if ((r_ptr->flags1 & RF1_UNIQUE) && !(p_ptr->image && !(mode & 0x200)))
+ if ((r_ptr->flags1 & RF1_UNIQUE) && !(p_ptr->image && !(mode & MD_IGNORE_HALLU)))
{
/* Start with the name (thus nominative and objective) */
- if ((m_ptr->mflag2 & MFLAG2_CHAMELEON) && !(mode & 0x100))
+ if ((m_ptr->mflag2 & MFLAG2_CHAMELEON) && !(mode & MD_TRUE_NAME))
{
#ifdef JP
char *t;
strcpy(buf, name);
t = buf;
- while(strncmp(t, "¡Ù", 2) && *t) t++;
+ while (strncmp(t, "¡Ù", 2) && *t) t++;
if (*t)
{
*t = '\0';
(void)sprintf(desc, "%s?", name);
#endif
}
- else if ((cave[m_ptr->fy][m_ptr->fx].m_idx == p_ptr->riding) || !p_ptr->inside_battle)
- (void)strcpy(desc, name);
- else
+
+ /* Inside monster arena, and it is not your mount */
+ else if (p_ptr->inside_battle &&
+ !(p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr)))
+ {
+ /* It is a fake unique monster */
#ifdef JP
(void)sprintf(desc, "%s¤â¤É¤", name);
#else
(void)sprintf(desc, "fake %s", name);
#endif
+ }
+
+ else
+ {
+ (void)strcpy(desc, name);
+ }
}
/* It could be an indefinite monster */
- else if (mode & 0x08)
+ else if (mode & MD_INDEF_VISIBLE)
{
/* XXX Check plurality for "some" */
strcat(desc,buf);
}
- if ((m_ptr->fy == py) && (m_ptr->fx == px))
+ if (p_ptr->riding && (&m_list[p_ptr->riding] == m_ptr))
{
#ifdef JP
strcat(desc,"(¾èÇÏÃæ)");
#endif
}
- if ((mode & 0x200) && (m_ptr->mflag2 & MFLAG2_CHAMELEON))
+ if ((mode & MD_IGNORE_HALLU) && (m_ptr->mflag2 & MFLAG2_CHAMELEON))
{
if (r_ptr->flags1 & RF1_UNIQUE)
{
}
}
- if ((mode & 0x200) && m_ptr->ap_r_idx != m_ptr->r_idx)
+ if ((mode & MD_IGNORE_HALLU) && !is_original_ap(m_ptr))
{
strcat(desc, format("(%s)", r_name + r_info[m_ptr->r_idx].name));
}
/* Handle the Possessive as a special afterthought */
- if (mode & 0x02)
+ if (mode & MD_POSSESSIVE)
{
/* XXX Check for trailing "s" */
#else
(void)strcat(desc, "'s");
#endif
-
}
}
}
if (r_ptr->r_wake != MAX_UCHAR) n++;
if (r_ptr->r_ignore != MAX_UCHAR) n++;
r_ptr->r_wake = r_ptr->r_ignore = MAX_UCHAR;
-
+
/* Observe "maximal" attacks */
for (i = 0; i < 4; i++)
{
r_ptr->r_blows[i] = MAX_UCHAR;
}
}
-
+
/* Maximal drops */
- tmp_byte =
+ tmp_byte =
(((r_ptr->flags1 & RF1_DROP_4D2) ? 8 : 0) +
((r_ptr->flags1 & RF1_DROP_3D2) ? 6 : 0) +
((r_ptr->flags1 & RF1_DROP_2D2) ? 4 : 0) +
if (r_ptr->r_drop_gold != tmp_byte) n++;
r_ptr->r_drop_gold = tmp_byte;
}
-
+
/* Observe many spells */
if (r_ptr->r_cast_spell != MAX_UCHAR) n++;
r_ptr->r_cast_spell = MAX_UCHAR;
-
+
/* Count unknown flags */
for (i = 0; i < 32; i++)
{
(r_ptr->flags5 & (1L << i))) n++;
if (!(r_ptr->r_flags6 & (1L << i)) &&
(r_ptr->flags6 & (1L << i))) n++;
+ if (!(r_ptr->r_flagsr & (1L << i)) &&
+ (r_ptr->flagsr & (1L << i))) n++;
/* r_flags7 is actually unused */
#if 0
r_ptr->r_flags4 = r_ptr->flags4;
r_ptr->r_flags5 = r_ptr->flags5;
r_ptr->r_flags6 = r_ptr->flags6;
+ r_ptr->r_flagsr = r_ptr->flagsr;
/* r_flags7 is actually unused */
/* r_ptr->r_flags7 = r_ptr->flags7; */
monster_race *r_ptr = &r_info[m_ptr->r_idx];
+ /* If the monster doesn't have original appearance, don't note */
+ if (!is_original_ap(m_ptr)) return;
+
/* Note the number of things dropped */
if (num_item > r_ptr->r_drop_item) r_ptr->r_drop_item = num_item;
if (num_gold > r_ptr->r_drop_gold) r_ptr->r_drop_gold = num_gold;
if (!necro)
{
char m_name[80];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
+ monster_race *r_ptr = &r_info[m_ptr->ap_r_idx];
power = r_ptr->level / 2;
/* Seen by vision */
bool easy = FALSE;
+ /* Non-Ninja player in the darkness */
+ bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && !p_ptr->see_nocto;
+
/* Do disturb? */
if (disturb_high)
{
/* Nearby */
- if (d <= ((d_info[dungeon_type].flags1 & DF1_DARKNESS) ? MAX_SIGHT / 2 : MAX_SIGHT))
+ if (d <= (in_darkness ? MAX_SIGHT / 2 : MAX_SIGHT))
{
- if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS) || (d <= MAX_SIGHT / 4))
+ if (!in_darkness || (d <= MAX_SIGHT / 4))
{
if (p_ptr->special_defense & KATA_MUSOU)
{
/* Detectable */
flag = TRUE;
- /* Hack -- Memorize mental flags */
- if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ if (is_original_ap(m_ptr) && !p_ptr->image)
+ {
+ /* Hack -- Memorize mental flags */
+ if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ }
}
/* Basic telepathy */
+ /* Snipers get telepathy when they concentrate deeper */
else if (p_ptr->telepathy)
{
/* Empty mind, no telepathy */
if (r_ptr->flags2 & (RF2_EMPTY_MIND))
{
/* Memorize flags */
- r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
}
/* Weird mind, occasional telepathy */
/* Detectable */
flag = TRUE;
- /* Memorize flags */
- r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+ if (is_original_ap(m_ptr) && !p_ptr->image)
+ {
+ /* Memorize flags */
+ r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
- /* Hack -- Memorize mental flags */
- if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ /* Hack -- Memorize mental flags */
+ if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ }
}
}
/* Detectable */
flag = TRUE;
- /* Hack -- Memorize mental flags */
- if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
- if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ if (is_original_ap(m_ptr) && !p_ptr->image)
+ {
+ /* Hack -- Memorize mental flags */
+ if (r_ptr->flags2 & (RF2_SMART)) r_ptr->r_flags2 |= (RF2_SMART);
+ if (r_ptr->flags2 & (RF2_STUPID)) r_ptr->r_flags2 |= (RF2_STUPID);
+ }
}
}
if ((p_ptr->esp_animal) && (r_ptr->flags3 & (RF3_ANIMAL)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_ANIMAL);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_ANIMAL);
}
/* Magical sensing */
if ((p_ptr->esp_undead) && (r_ptr->flags3 & (RF3_UNDEAD)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_UNDEAD);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_UNDEAD);
}
/* Magical sensing */
if ((p_ptr->esp_demon) && (r_ptr->flags3 & (RF3_DEMON)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_DEMON);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_DEMON);
}
/* Magical sensing */
if ((p_ptr->esp_orc) && (r_ptr->flags3 & (RF3_ORC)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_ORC);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_ORC);
}
/* Magical sensing */
if ((p_ptr->esp_troll) && (r_ptr->flags3 & (RF3_TROLL)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_TROLL);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_TROLL);
}
/* Magical sensing */
if ((p_ptr->esp_giant) && (r_ptr->flags3 & (RF3_GIANT)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_GIANT);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_GIANT);
}
/* Magical sensing */
if ((p_ptr->esp_dragon) && (r_ptr->flags3 & (RF3_DRAGON)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_DRAGON);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_DRAGON);
}
/* Magical sensing */
if ((p_ptr->esp_human) && (r_ptr->flags2 & (RF2_HUMAN)))
{
flag = TRUE;
- r_ptr->r_flags2 |= (RF2_HUMAN);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags2 |= (RF2_HUMAN);
}
/* Magical sensing */
if ((p_ptr->esp_evil) && (r_ptr->flags3 & (RF3_EVIL)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_EVIL);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_EVIL);
}
/* Magical sensing */
if ((p_ptr->esp_good) && (r_ptr->flags3 & (RF3_GOOD)))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_GOOD);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_GOOD);
}
/* Magical sensing */
- if ((p_ptr->esp_nonliving) &&
- (r_ptr->flags3 & (RF3_NONLIVING)) &&
- !(r_ptr->flags3 & (RF3_DEMON)) &&
- !(r_ptr->flags3 & (RF3_UNDEAD)))
+ if ((p_ptr->esp_nonliving) &&
+ ((r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING)) == RF3_NONLIVING))
{
flag = TRUE;
- r_ptr->r_flags3 |= (RF3_NONLIVING);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags3 |= (RF3_NONLIVING);
}
/* Magical sensing */
if ((p_ptr->esp_unique) && (r_ptr->flags1 & (RF1_UNIQUE)))
{
flag = TRUE;
- r_ptr->r_flags1 |= (RF1_UNIQUE);
-
+ if (is_original_ap(m_ptr) && !p_ptr->image) r_ptr->r_flags1 |= (RF1_UNIQUE);
}
}
bool do_invisible = FALSE;
bool do_cold_blood = FALSE;
+ /* Snipers can see targets in darkness when they concentrate deeper */
+ if (p_ptr->concent >= CONCENT_RADAR_THRESHOLD)
+ {
+ /* Easy to see */
+ easy = flag = TRUE;
+ }
+
/* Use "infravision" */
if (d <= p_ptr->see_infra)
{
/* Handle "cold blooded" monsters */
- if (r_ptr->flags2 & (RF2_COLD_BLOOD))
+ if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD)
{
/* Take note */
do_cold_blood = TRUE;
/* Visible */
if (flag)
{
- /* Memorize flags */
- if (do_invisible) r_ptr->r_flags2 |= (RF2_INVISIBLE);
- if (do_cold_blood) r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
+ if (is_original_ap(m_ptr) && !p_ptr->image)
+ {
+ /* Memorize flags */
+ if (do_invisible) r_ptr->r_flags2 |= (RF2_INVISIBLE);
+ if (do_cold_blood) r_ptr->r_flags2 |= (RF2_COLD_BLOOD);
+ }
}
}
}
if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
/* Hack -- Count "fresh" sightings */
- if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
- r_info[MON_KAGE].r_sights++;
- else if (m_ptr->ap_r_idx == m_ptr->r_idx &&
- r_ptr->r_sights < MAX_SHORT) r_ptr->r_sights++;
+ if (!p_ptr->image)
+ {
+ if ((m_ptr->ap_r_idx == MON_KAGE) && (r_info[MON_KAGE].r_sights < MAX_SHORT))
+ r_info[MON_KAGE].r_sights++;
+ else if (is_original_ap(m_ptr) && (r_ptr->r_sights < MAX_SHORT))
+ r_ptr->r_sights++;
+ }
/* Eldritch Horror */
- if (r_ptr->flags2 & RF2_ELDRITCH_HORROR)
+ if (r_info[m_ptr->ap_r_idx].flags2 & RF2_ELDRITCH_HORROR)
{
sanity_blast(m_ptr, FALSE);
}
if (disturb_near && (projectable(m_ptr->fy, m_ptr->fx, py, px) && projectable(py, px, m_ptr->fy, m_ptr->fx)))
{
if (disturb_pets || is_hostile(m_ptr))
- disturb(1, 0);
+ disturb(1, 1);
}
}
}
if (do_disturb)
{
if (disturb_pets || is_hostile(m_ptr))
- disturb(1, 0);
+ disturb(1, 1);
}
}
}
if (do_disturb)
{
if (disturb_pets || is_hostile(m_ptr))
- disturb(1, 0);
+ disturb(1, 1);
}
}
}
if (do_disturb)
{
if (disturb_pets || is_hostile(m_ptr))
- disturb(1, 0);
+ disturb(1, 1);
}
}
}
if ((r_ptr->blow[0].method == RBM_EXPLODE) || (r_ptr->blow[1].method == RBM_EXPLODE) || (r_ptr->blow[2].method == RBM_EXPLODE) || (r_ptr->blow[3].method == RBM_EXPLODE))
return FALSE;
- if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr)) return FALSE;
+ if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) return FALSE;
/* Not born */
if (!(old_r_ptr->flags7 & RF7_CHAMELEON))
{
- if ((m_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
- if ((m_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+ if (monster_has_hostile_align(m_ptr, 0, 0, r_ptr)) return FALSE;
}
/* Born now */
else if (summon_specific_who > 0)
{
- monster_type *sm_ptr = &m_list[summon_specific_who];
-
- if ((sm_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
- if ((sm_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+ if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
}
return TRUE;
if ((r_ptr->blow[0].method == RBM_EXPLODE) || (r_ptr->blow[1].method == RBM_EXPLODE) || (r_ptr->blow[2].method == RBM_EXPLODE) || (r_ptr->blow[3].method == RBM_EXPLODE))
return FALSE;
- if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr)) return FALSE;
+ if (!monster_can_cross_terrain(cave[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) return FALSE;
/* Not born */
if (!(old_r_ptr->flags7 & RF7_CHAMELEON))
/* Born now */
else if (summon_specific_who > 0)
{
- monster_type *sm_ptr = &m_list[summon_specific_who];
-
- if ((sm_ptr->sub_align & SUB_ALIGN_EVIL) && (r_ptr->flags3 & RF3_GOOD)) return FALSE;
- if ((sm_ptr->sub_align & SUB_ALIGN_GOOD) && (r_ptr->flags3 & RF3_EVIL)) return FALSE;
+ if (monster_has_hostile_align(&m_list[summon_specific_who], 0, 0, r_ptr)) return FALSE;
}
return (*(get_monster_hook()))(r_idx);
void choose_new_monster(int m_idx, bool born, int r_idx)
{
- int oldmaxhp, i;
+ int oldmaxhp;
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr;
char old_m_name[80];
bool old_unique = FALSE;
+ int old_r_idx = m_ptr->r_idx;
if (r_info[m_ptr->r_idx].flags1 & RF1_UNIQUE)
old_unique = TRUE;
if (!r_idx) return;
}
+ if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
m_ptr->r_idx = r_idx;
m_ptr->ap_r_idx = r_idx;
update_mon(m_idx, FALSE);
lite_spot(m_ptr->fy, m_ptr->fx);
+
+ if ((r_info[old_r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)) ||
+ (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)))
+ p_ptr->update |= (PU_MON_LITE);
+
+ if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
+
if (born)
{
/* Sub-alignment of a chameleon */
}
/* Extract the monster base speed */
- m_ptr->mspeed = r_ptr->speed;
- /* Hack -- small racial variety */
- /* Allow some small variation per monster */
- if(one_in_(4)){
- i = extract_energy[r_ptr->speed] / 3;
- if (i) m_ptr->mspeed += rand_spread(0, i);
- }
- else{
- i = extract_energy[r_ptr->speed] / 10;
- if (i) m_ptr->mspeed += rand_spread(0, i);
- }
+ m_ptr->mspeed = get_mspeed(r_ptr);
oldmaxhp = m_ptr->max_maxhp;
/* Assign maximal hitpoints */
{
m_ptr->max_maxhp = damroll(r_ptr->hdice, r_ptr->hside);
}
+
+ /* Monsters have double hitpoints in Nightmare mode */
+ if (ironman_nightmare)
+ {
+ u32b hp = m_ptr->max_maxhp * 2L;
+ m_ptr->max_maxhp = (s16b)MIN(30000, hp);
+ }
+
m_ptr->maxhp = (long)(m_ptr->maxhp * m_ptr->max_maxhp) / oldmaxhp;
+ if (m_ptr->maxhp < 1) m_ptr->maxhp = 1;
m_ptr->hp = (long)(m_ptr->hp * m_ptr->max_maxhp) / oldmaxhp;
+
+ /* reset dealt_damage */
+ m_ptr->dealt_damage = 0;
}
/*
+ * Get initial monster speed
+ */
+byte get_mspeed(monster_race *r_ptr)
+{
+ /* Extract the monster base speed */
+ int mspeed = r_ptr->speed;
+
+ /* Hack -- small racial variety */
+ if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->inside_arena)
+ {
+ /* Allow some small variation per monster */
+ int i = SPEED_TO_ENERGY(r_ptr->speed) / (one_in_(4) ? 3 : 10);
+ if (i) mspeed += rand_spread(0, i);
+ }
+
+ if (mspeed > 199) mspeed = 199;
+
+ return (byte)mspeed;
+}
+
+
+/*
* Attempt to place a monster of the given race at the given location.
*
* To give the player a sporting chance, any monster that appears in
* This is the only function which may place a monster in the dungeon,
* except for the savefile loading code.
*/
-bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
+static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
{
- int i;
-
- cave_type *c_ptr;
+ /* Access the location */
+ cave_type *c_ptr = &cave[y][x];
monster_type *m_ptr;
cptr name = (r_name + r_ptr->name);
+ int cmi;
+
/* DO NOT PLACE A MONSTER IN THE SMALL SCALE WILDERNESS !!! */
- if(p_ptr->wild_mode) return FALSE;
+ if (p_ptr->wild_mode) return FALSE;
/* Verify location */
if (!in_bounds(y, x)) return (FALSE);
- /* Require empty space (if not ghostly) */
- if (!(!dun_level && (cave[y][x].feat == FEAT_MOUNTAIN) && ((r_ptr->flags8 & RF8_WILD_MOUNTAIN) || (r_ptr->flags7 & RF7_CAN_FLY))) &&
- !(cave_empty_bold2(y, x) || (mode & PM_IGNORE_TERRAIN)) &&
- !((r_ptr->flags2 & RF2_PASS_WALL) &&
- !(cave_perma_bold(y, x) || cave[y][x].m_idx ||
- ((y == py) && (x == px))))) return (FALSE);
-
/* Paranoia */
if (!r_idx) return (FALSE);
/* Paranoia */
if (!r_ptr->name) return (FALSE);
- /* Nor on the Pattern */
- if ((cave[y][x].feat >= FEAT_PATTERN_START)
- && (cave[y][x].feat <= FEAT_PATTERN_XTRA2))
- return (FALSE);
-
- if (!(mode & PM_IGNORE_TERRAIN) &&
- !monster_can_cross_terrain(cave[y][x].feat, r_ptr))
+ if (!(mode & PM_IGNORE_TERRAIN))
{
- return FALSE;
+ /* Not on the Pattern */
+ if (pattern_tile(y, x)) return FALSE;
+
+ /* Require empty space (if not ghostly) */
+ if (!monster_can_enter(y, x, r_ptr, 0)) return FALSE;
}
if (!p_ptr->inside_battle)
{
/* Hack -- "unique" monsters must be "unique" */
if (((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags7 & (RF7_UNIQUE_7))) &&
+ (r_ptr->flags7 & (RF7_NAZGUL))) &&
(r_ptr->cur_num >= r_ptr->max_num))
{
/* Cannot create */
return (FALSE);
}
-
+
if ((r_ptr->flags7 & (RF7_UNIQUE2)) &&
(r_ptr->cur_num >= 1))
{
if (r_info[MON_BANOR].cur_num > 0) return FALSE;
if (r_info[MON_LUPART].cur_num > 0) return FALSE;
}
-
+
/* Depth monsters may NOT be created out of depth, unless in Nightmare mode */
if ((r_ptr->flags1 & (RF1_FORCE_DEPTH)) && (dun_level < r_ptr->level) &&
(!ironman_nightmare || (r_ptr->flags1 & (RF1_QUESTOR))))
}
}
- if(quest_number(dun_level))
+ if (quest_number(dun_level))
{
int hoge = quest_number(dun_level);
- if((quest[hoge].type == QUEST_TYPE_KILL_LEVEL) || (quest[hoge].type == QUEST_TYPE_RANDOM))
+ if ((quest[hoge].type == QUEST_TYPE_KILL_LEVEL) || (quest[hoge].type == QUEST_TYPE_RANDOM))
{
if(r_idx == quest[hoge].r_idx)
{
}
}
- /* Access the location */
- c_ptr = &cave[y][x];
-
if (is_glyph_grid(c_ptr))
{
if (randint1(BREAK_GLYPH) < (r_ptr->level+20))
#else
if (cheat_hear) msg_format("Deep Unique (%s).", name);
#endif
-
-
- /* Boost rating by twice delta-depth */
- rating += (r_ptr->level - dun_level) * 2;
}
/* Normal monsters */
#else
if (cheat_hear) msg_format("Deep Monster (%s).", name);
#endif
-
-
- /* Boost rating by delta-depth */
- rating += (r_ptr->level - dun_level);
}
}
}
- if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7) || (r_ptr->level < 10)) is_kage = FALSE;
+ if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL) || (r_ptr->level < 10)) mode &= ~PM_KAGE;
/* Make a new monster */
c_ptr->m_idx = m_pop();
m_ptr->r_idx = r_idx;
m_ptr->ap_r_idx = initial_r_appearance(r_idx);
+ /* No flags */
+ m_ptr->mflag = 0;
+ m_ptr->mflag2 = 0;
+
+ /* Hack -- Appearance transfer */
+ if ((mode & PM_MULTIPLY) && (who > 0) && !is_original_ap(&m_list[who]))
+ {
+ m_ptr->ap_r_idx = m_list[who].ap_r_idx;
+
+ /* Hack -- Shadower spawns Shadower */
+ if (m_list[who].mflag2 & MFLAG2_KAGE) m_ptr->mflag2 |= MFLAG2_KAGE;
+ }
+
/* Sub-alignment of a monster */
if ((who > 0) && !(r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)))
m_ptr->sub_align = m_list[who].sub_align;
m_ptr->fx = x;
- /* No "damage" yet */
- m_ptr->stunned = 0;
- m_ptr->confused = 0;
- m_ptr->monfear = 0;
+ /* No "timed status" yet */
+ for (cmi = 0; cmi < MAX_MTIMED; cmi++) m_ptr->mtimed[cmi] = 0;
/* Unknown distance */
m_ptr->cdis = 0;
m_ptr->exp = 0;
- /* No flags */
- m_ptr->mflag = 0;
- m_ptr->mflag2 = 0;
+
+ /* Your pet summons its pet. */
+ if (who > 0 && is_pet(&m_list[who]))
+ {
+ mode |= PM_FORCE_PET;
+ m_ptr->parent_m_idx = who;
+ }
+ else
+ {
+ m_ptr->parent_m_idx = 0;
+ }
if (r_ptr->flags7 & RF7_CHAMELEON)
{
choose_new_monster(c_ptr->m_idx, TRUE, 0);
r_ptr = &r_info[m_ptr->r_idx];
m_ptr->mflag2 |= MFLAG2_CHAMELEON;
- rating++;
/* Hack - Set sub_align to neutral when the Chameleon Lord is generated as "GUARDIAN" */
if ((r_ptr->flags1 & RF1_UNIQUE) && (who <= 0))
m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
}
- else if (is_kage)
+ else if ((mode & PM_KAGE) && !(mode & PM_FORCE_PET))
{
m_ptr->ap_r_idx = MON_KAGE;
m_ptr->mflag2 |= MFLAG2_KAGE;
else if ((r_ptr->flags7 & RF7_FRIENDLY) ||
(mode & PM_FORCE_FRIENDLY) || is_friendly_idx(who))
{
- if (!(p_ptr->align >= 0 && (r_ptr->flags3 & RF3_EVIL)) &&
- !(p_ptr->align < 0 && (r_ptr->flags3 & RF3_GOOD)))
- {
- set_friendly(m_ptr);
- }
+ if (!monster_has_hostile_align(NULL, 0, -1, r_ptr)) set_friendly(m_ptr);
}
/* Assume no sleeping */
- m_ptr->csleep = 0;
+ m_ptr->mtimed[MTIMED_CSLEEP] = 0;
/* Enforce sleeping if needed */
if ((mode & PM_ALLOW_SLEEP) && r_ptr->sleep && !ironman_nightmare)
{
int val = r_ptr->sleep;
- m_ptr->csleep = ((val * 2) + randint1(val * 10));
+ (void)set_monster_csleep(c_ptr->m_idx, (val * 2) + randint1(val * 10));
}
/* Assign maximal hitpoints */
if (m_ptr->r_idx == MON_WOUNDED_BEAR)
m_ptr->hp = m_ptr->maxhp / 2;
else m_ptr->hp = m_ptr->maxhp;
+
+
+ /* dealt damage is 0 at initial*/
+ m_ptr->dealt_damage = 0;
/* Extract the monster base speed */
- m_ptr->mspeed = r_ptr->speed;
-
- /* Hack -- small racial variety */
- if (!(r_ptr->flags1 & RF1_UNIQUE) && !p_ptr->inside_arena)
- {
- /* Allow some small variation per monster */
- if(one_in_(4)){
- i = extract_energy[r_ptr->speed] / 3;
- if (i) m_ptr->mspeed += rand_spread(0, i);
- }
- else{
- i = extract_energy[r_ptr->speed] / 10;
- if (i) m_ptr->mspeed += rand_spread(0, i);
- }
- }
+ m_ptr->mspeed = get_mspeed(r_ptr);
- if (mode & PM_HASTE) m_ptr->fast = 100;
-
- if (m_ptr->mspeed > 199) m_ptr->mspeed = 199;
+ if (mode & PM_HASTE) (void)set_monster_fast(c_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);
+ else if ((r_ptr->flags7 & RF7_HAS_LD_MASK) && !MON_CSLEEP(m_ptr))
+ p_ptr->update |= (PU_MON_LITE);
+
/* Update the monster */
update_mon(c_ptr->m_idx, TRUE);
* A unique monster move from old saved floor.
*/
if (character_dungeon &&
- ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)))
+ ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)))
real_r_ptr(m_ptr)->floor_id = p_ptr->floor_id;
/* Hack -- Count the number of "reproducers" */
if (r_ptr->flags2 & RF2_MULTIPLY) num_repro++;
-
/* Hack -- Notice new multi-hued monsters */
- if (r_ptr->flags1 & RF1_ATTR_MULTI) shimmer_monsters = TRUE;
+ {
+ monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
+ if (ap_r_ptr->flags1 & (RF1_ATTR_MULTI | RF1_SHAPECHANGER))
+ shimmer_monsters = TRUE;
+ }
if (p_ptr->warning && character_dungeon)
{
#endif
o_ptr = choose_warning_item();
- object_desc(o_name, o_ptr, FALSE, 0);
+ if (o_ptr)
+ {
+ object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+#ifdef JP
+ msg_format("%s¤Ï%s¸÷¤Ã¤¿¡£", o_name, color);
+#else
+ msg_format("%s glows %s.", o_name, color);
+#endif
+ }
+ else
+ {
#ifdef JP
- msg_format("%s¤Ï%s¸÷¤Ã¤¿¡£",o_name, color);
+ msg_format("%s¸÷¤ëʪ¤¬Æ¬¤ËÉ⤫¤ó¤À¡£", color);
#else
- msg_format("%s glows %s.",o_name, color);
+ msg_format("An %s image forms in your mind.");
#endif
+ }
}
}
#define MON_SCAT_MAXD 10
-static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
+static bool mon_scatter(int r_idx, int *yp, int *xp, int y, int x, int max_dist)
{
int place_x[MON_SCAT_MAXD];
int place_y[MON_SCAT_MAXD];
num[i] = 0;
for (nx = x - max_dist; nx <= x + max_dist; nx++)
+ {
for (ny = y - max_dist; ny <= y + max_dist; ny++)
{
/* Ignore annoying locations */
if (!in_bounds(ny, nx)) continue;
-
- /* Require "line of sight" */
- if (!los(y, x, ny, nx)) continue;
-
- /* Walls and Monsters block flow */
- if (!cave_empty_bold2(ny, nx)) continue;
- if (cave[ny][nx].m_idx) continue;
- if ((ny == py) && (nx == px)) continue;
-
- /* ... nor on the Pattern */
- if ((cave[ny][nx].feat >= FEAT_PATTERN_START) &&
- (cave[ny][nx].feat <= FEAT_PATTERN_XTRA2))
- continue;
-
- i = distance(y, x, ny, nx);
- if (i > max_dist)
- continue;
-
+ /* Require "line of projection" */
+ if (!projectable(y, x, ny, nx)) continue;
+
+ if (r_idx > 0)
+ {
+ monster_race *r_ptr = &r_info[r_idx];
+
+ /* Require empty space (if not ghostly) */
+ if (!monster_can_enter(ny, nx, r_ptr, 0))
+ continue;
+ }
+ else
+ {
+ /* Walls and Monsters block flow */
+ if (!cave_empty_bold2(ny, nx)) continue;
+
+ /* ... nor on the Pattern */
+ if (pattern_tile(ny, nx)) continue;
+ }
+
+ i = distance(y, x, ny, nx);
+
+ if (i > max_dist)
+ continue;
+
num[i]++;
/* random swap */
- if(one_in_(num[i]))
+ if (one_in_(num[i]))
{
place_x[i] = nx;
place_y[i] = ny;
}
-
}
+ }
i = 0;
while (i < MON_SCAT_MAXD && 0 == num[i])
{
monster_race *r_ptr = &r_info[r_idx];
- int old, n, i;
+ int n, i;
int total = 0, extra = 0;
int hack_n = 0;
if (total > GROUP_MAX) total = GROUP_MAX;
- /* Save the rating */
- old = rating;
-
/* Start on the monster */
hack_n = 1;
hack_x[0] = x;
}
}
- /* Hack -- restore the rating */
- rating = old;
-
/* Success */
return (TRUE);
monster_race *z_ptr = &r_info[r_idx];
/* Hack - Escorts have to have the same dungeon flag */
- if (monster_dungeon(place_monster_idx) != monster_dungeon(r_idx)) return (FALSE);
+ if (mon_hook_dungeon(place_monster_idx) != mon_hook_dungeon(r_idx)) return (FALSE);
/* Require similar "race" */
if (z_ptr->d_char != r_ptr->d_char) return (FALSE);
if (place_monster_idx == r_idx) return (FALSE);
/* Skip different alignment */
- if (((m_ptr->sub_align & SUB_ALIGN_EVIL) && (z_ptr->flags3 & RF3_GOOD)) ||
- ((m_ptr->sub_align & SUB_ALIGN_GOOD) && (z_ptr->flags3 & RF3_EVIL)))
- return FALSE;
+ if (monster_has_hostile_align(m_ptr, 0, 0, z_ptr)) return FALSE;
if (r_ptr->flags7 & RF7_FRIENDLY)
{
- if (((p_ptr->align < 0) && (z_ptr->flags3 & RF3_GOOD)) ||
- ((p_ptr->align > 0) && (z_ptr->flags3 & RF3_EVIL)))
- return FALSE;
+ if (monster_has_hostile_align(NULL, 1, -1, z_ptr)) return FALSE;
}
if ((r_ptr->flags7 & RF7_CHAMELEON) && !(z_ptr->flags7 & RF7_CHAMELEON))
*/
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 (one_in_(333) && !(mode & PM_NO_KAGE) && !(mode & PM_FORCE_PET))
- is_kage = TRUE;
- else
- is_kage = FALSE;
+ if (!(mode & PM_NO_KAGE) && one_in_(333))
+ mode |= PM_KAGE;
/* 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))
{
#endif /* MONSTER_HORDES */
-
/*
- * Attempt to allocate a random monster in the dungeon.
- *
- * Place the monster at least "dis" distance from the player.
- *
- * Use "slp" to choose the initial "sleep" status
- *
- * Use "monster_level" for the monster level
+ * Put the Guardian
*/
-bool alloc_monster(int dis, u32b mode)
+bool alloc_guardian(bool def_val)
{
- int y = 0, x = 0;
- int attempts_left = 10000;
int guardian = d_info[dungeon_type].final_guardian;
- /* Put an Guardian */
- if(guardian && d_info[dungeon_type].maxdepth == dun_level && r_info[guardian].cur_num < r_info[guardian].max_num )
+ if (guardian && (d_info[dungeon_type].maxdepth == dun_level) && (r_info[guardian].cur_num < r_info[guardian].max_num))
{
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;
ox = randint1(cur_wid - 4) + 2;
/* Is it a good spot ? */
- if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[oy][ox].feat, &r_info[guardian]))
+ if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[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))) break;
+ 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;
}
+ return def_val;
+}
+
+
+/*
+ * Attempt to allocate a random monster in the dungeon.
+ *
+ * Place the monster at least "dis" distance from the player.
+ *
+ * Use "slp" to choose the initial "sleep" status
+ *
+ * Use "monster_level" for the monster level
+ */
+bool alloc_monster(int dis, u32b mode)
+{
+ int y = 0, x = 0;
+ int attempts_left = 10000;
+
+ /* Put the Guardian */
+ if (alloc_guardian(FALSE)) return TRUE;
/* Find a legal, distant, unoccupied, space */
while (attempts_left--)
x = randint0(cur_wid);
/* Require empty floor grid (was "naked") */
- if (dun_level || (wilderness[p_ptr->wilderness_y][p_ptr->wilderness_x].terrain != TERRAIN_MOUNTAIN))
+ if (dun_level)
{
if (!cave_empty_bold2(y, x)) continue;
}
else
{
- if (!cave_empty_bold2(y, x) && (cave[y][x].feat != FEAT_MOUNTAIN)) continue;
+ if (!cave_empty_bold(y, x)) continue;
}
/* Accept far away grids */
if (alloc_horde(y, x))
{
#ifdef JP
-if (cheat_hear) msg_print("¥â¥ó¥¹¥¿¡¼¤ÎÂç·²");
+ if (cheat_hear) msg_format("¥â¥ó¥¹¥¿¡¼¤ÎÂç·²(%c)", summon_kin_type);
#else
- if (cheat_hear) msg_print("Monster horde.");
+ if (cheat_hear) msg_format("Monster horde (%c).", summon_kin_type);
#endif
return (TRUE);
monster_race *r_ptr = &r_info[r_idx];
/* Hack - Only summon dungeon monsters */
- if (!monster_dungeon(r_idx)) return (FALSE);
+ if (!mon_hook_dungeon(r_idx)) return (FALSE);
/* Hack -- identify the summoning monster */
if (summon_specific_who > 0)
/* Do not summon enemies */
/* Friendly vs. opposite aligned normal or pet */
- if (((r_ptr->flags3 & RF3_EVIL) &&
- (m_ptr->sub_align & SUB_ALIGN_GOOD)) ||
- ((r_ptr->flags3 & RF3_GOOD) &&
- (m_ptr->sub_align & SUB_ALIGN_EVIL)))
- {
- return FALSE;
- }
-
- /* Hostile vs. non-hostile */
- if (is_hostile(m_ptr) != summon_specific_hostile)
- {
- return FALSE;
- }
+ if (monster_has_hostile_align(m_ptr, 0, 0, r_ptr)) return FALSE;
}
/* Use the player's alignment */
else if (summon_specific_who < 0)
{
/* Do not summon enemies of the pets */
- if ((p_ptr->align < -9) && (r_ptr->flags3 & RF3_GOOD))
+ if (monster_has_hostile_align(NULL, 10, -10, r_ptr))
{
- if (!one_in_((0-p_ptr->align)/2+1)) return FALSE;
- }
- else if ((p_ptr->align > 9) && (r_ptr->flags3 & RF3_EVIL))
- {
- if (!one_in_(p_ptr->align/2+1)) return FALSE;
+ if (!one_in_(ABS(p_ptr->align) / 2 + 1)) return FALSE;
}
}
/* Hack -- no specific type specified */
if (!summon_specific_type) return (TRUE);
- if (!summon_unique_okay && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))) return FALSE;
+ if (!summon_unique_okay && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))) return FALSE;
if ((summon_specific_who < 0) &&
- ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)) &&
- (((p_ptr->align > 9) && (r_ptr->flags3 & RF3_EVIL)) ||
- ((p_ptr->align < -9) && (r_ptr->flags3 & RF3_GOOD))))
+ ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) &&
+ monster_has_hostile_align(NULL, 10, -10, r_ptr))
return FALSE;
if ((r_ptr->flags7 & RF7_CHAMELEON) && (d_info[dungeon_type].flags1 & DF1_CHAMELEON)) return TRUE;
if (p_ptr->inside_arena) return (FALSE);
- if (!mon_scatter(&y, &x, y1, x1, 2)) return FALSE;
+ if (!mon_scatter(0, &y, &x, y1, x1, 2)) return FALSE;
/* Save the summoner */
summon_specific_who = who;
summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
- /* Save the hostility */
- summon_specific_hostile = (!(mode & PM_FORCE_FRIENDLY) && !(is_friendly_idx(who)) && !(mode & PM_FORCE_PET));
-
/* Prepare allocation table */
get_mon_num_prep(summon_specific_okay, get_monster_hook2(y, x));
if (p_ptr->inside_arena) return FALSE;
- if (!mon_scatter(&y, &x, oy, ox, 2)) return FALSE;
+ 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));
int y, x;
- if (!mon_scatter(&y, &x, m_ptr->fy, m_ptr->fx, 1))
+ if (!mon_scatter(m_ptr->r_idx, &y, &x, m_ptr->fy, m_ptr->fx, 1))
return FALSE;
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)))
+ if (!place_monster_aux(m_idx, y, x, m_ptr->r_idx, (mode | PM_NO_KAGE | PM_MULTIPLY)))
return FALSE;
- if (clone)
+ /* Hack -- Transfer "clone" flag */
+ if (clone || (m_ptr->smart & SM_CLONED))
{
m_list[hack_m_idx_ii].smart |= SM_CLONED;
m_list[hack_m_idx_ii].mflag2 |= MFLAG2_NOPET;
char m_name[80];
-
/* Get the monster name */
monster_desc(m_name, m_ptr, 0);
- /* Notice non-damage */
- if (dam == 0)
+ if(dam == 0) // Notice non-damage
{
#ifdef JP
msg_format("%^s¤Ï¥À¥á¡¼¥¸¤ò¼õ¤±¤Æ¤¤¤Ê¤¤¡£", m_name);
#else
msg_format("%^s is unharmed.", m_name);
#endif
-
return;
}
tmp = (newhp * 100L) / oldhp;
percentage = (int)(tmp);
-
- /* Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs */
- if (strchr(",ejmvwQ", r_ptr->d_char))
+ if(my_strchr(",ejmvwQ", r_ptr->d_char)) // Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs
{
#ifdef JP
- if (percentage > 95)
- msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
- else if (percentage > 75)
- msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
- else if (percentage > 50)
- msg_format("%^s¤Ï½Ì¤³¤Þ¤Ã¤¿¡£", m_name);
- else if (percentage > 35)
- msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
- else if (percentage > 20)
- msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
- else if (percentage > 10)
- msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
- else
- msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ï½Ì¤³¤Þ¤Ã¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
#else
- if (percentage > 95)
- msg_format("%^s barely notices.", m_name);
- else if (percentage > 75)
- msg_format("%^s flinches.", m_name);
- else if (percentage > 50)
- msg_format("%^s squelches.", m_name);
- else if (percentage > 35)
- msg_format("%^s quivers in pain.", m_name);
- else if (percentage > 20)
- msg_format("%^s writhes about.", m_name);
- else if (percentage > 10)
- msg_format("%^s writhes in agony.", m_name);
- else
- msg_format("%^s jerks limply.", m_name);
+ if(percentage > 95) msg_format("%^s barely notices.", m_name);
+ else if(percentage > 75) msg_format("%^s flinches.", m_name);
+ else if(percentage > 50) msg_format("%^s squelches.", m_name);
+ else if(percentage > 35) msg_format("%^s quivers in pain.", m_name);
+ else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s jerks limply.", m_name);
#endif
-
}
-
- /* Fish */
- else if (strchr("l", r_ptr->d_char))
+ else if(my_strchr("l", r_ptr->d_char)) // Fish
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s barely notices.", m_name);
-#endif
- else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
-#else
- msg_format("%^s flinches.", m_name);
-#endif
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
- msg_format("%^s hesitates.", m_name);
-#endif
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
-#else
- msg_format("%^s quivers in pain.", m_name);
-#endif
- else if (percentage > 20)
#ifdef JP
-msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤ˿̤¨¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
#else
- msg_format("%^s writhes about.", m_name);
-#endif
- else if (percentage > 10)
+ if(percentage > 95) msg_format("%^s barely notices.", m_name);
+ else if(percentage > 75) msg_format("%^s flinches.", m_name);
+ else if(percentage > 50) msg_format("%^s hesitates.", m_name);
+ else if(percentage > 35) msg_format("%^s quivers in pain.", m_name);
+ else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s jerks limply.", m_name);
+#endif
+ }
+
+ else if(my_strchr("g#+<>", r_ptr->d_char)) // Golems, Walls, Doors, Stairs
+ {
#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÍëÌĤΤ褦¤ËËʤ¨¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤Ï¶ì¤·¤²¤ËËʤ¨¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤¯¤·¤ã¤¯¤·¤ã¤Ë¤Ê¤Ã¤¿¡£", m_name);
#else
- msg_format("%^s writhes in agony.", m_name);
-#endif
- else
-#ifdef JP
-msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
-#else
- msg_format("%^s jerks limply.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 50) msg_format("%^s roars thunderously.", m_name);
+ else if(percentage > 35) msg_format("%^s rumbles.", m_name);
+ else if(percentage > 20) msg_format("%^s grunts.", m_name);
+ else if(percentage > 10) msg_format("%^s hesitates.", m_name);
+ else msg_format("%^s crumples.", m_name);
#endif
}
-
- /* Golems, Walls, Doors, Stairs */
- else if (strchr("g#+<>", r_ptr->d_char))
+ else if(my_strchr("JMR", r_ptr->d_char) || !isalpha(r_ptr->d_char)) // Snakes, Hydrae, Reptiles, Mimics
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
- else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
- msg_format("%^s shrugs off the attack.", m_name);
-#endif
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÍëÌĤΤ褦¤ËËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s roars thunderously.", m_name);
-#endif
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤²¤ËËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s rumbles.", m_name);
-#endif
- else if (percentage > 20)
#ifdef JP
-msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¥·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÅܤäÆƬ¤ò¾å¤²¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÌÔÁ³¤È°Ò³Å¤·¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
#else
- msg_format("%^s grunts.", m_name);
-#endif
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
- msg_format("%^s hesitates.", m_name);
-#endif
- else
-#ifdef JP
-msg_format("%^s¤Ï¤¯¤·¤ã¤¯¤·¤ã¤Ë¤Ê¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s crumples.", m_name);
+ if(percentage > 95) msg_format("%^s barely notices.", m_name);
+ else if(percentage > 75) msg_format("%^s hisses.", m_name);
+ else if(percentage > 50) msg_format("%^s rears up in anger.", m_name);
+ else if(percentage > 35) msg_format("%^s hisses furiously.", m_name);
+ else if(percentage > 20) msg_format("%^s writhes about.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s jerks limply.", m_name);
#endif
}
-
- /* Snakes, Hydrae, Reptiles, Mimics */
- else if (strchr("JMR", r_ptr->d_char) || !isalpha(r_ptr->d_char))
+ else if(my_strchr("f", r_ptr->d_char))
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%^s¤Ï¤Û¤È¤ó¤Éµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s barely notices.", m_name);
-#endif
- else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¥·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s hisses.", m_name);
-#endif
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÅܤäÆƬ¤ò¾å¤²¤¿¡£", m_name);
-#else
- msg_format("%^s rears up in anger.", m_name);
-#endif
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÌÔÁ³¤È°Ò³Å¤·¤¿¡£", m_name);
-#else
- msg_format("%^s hisses furiously.", m_name);
-#endif
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¿È¤â¤À¤¨¤·¤¿¡£", m_name);
-#else
- msg_format("%^s writhes about.", m_name);
-#endif
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǿȤâ¤À¤¨¤·¤¿¡£", m_name);
-#else
- msg_format("%^s writhes in agony.", m_name);
-#endif
- else
#ifdef JP
-msg_format("%^s¤Ï¤°¤Ë¤ã¤°¤Ë¤ã¤ÈáÛÚ»¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÅܤäÆËʤ¨¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤ÏÄˤߤǼ塹¤·¤¯ÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤˤ¦¤á¤¤¤¿¡£", m_name);
+ else msg_format("%s¤Ï°¥¤ì¤ÊÌĤÀ¼¤ò½Ð¤·¤¿¡£", m_name);
#else
- msg_format("%^s jerks limply.", m_name);
+ if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s roars.", m_name);
+ else if(percentage > 50) msg_format("%^s growls angrily.", m_name);
+ else if(percentage > 35) msg_format("%^s hisses with pain.", m_name);
+ else if(percentage > 20) msg_format("%^s mewls in pain.", m_name);
+ else if(percentage > 10) msg_format("%^s hisses in agony.", m_name);
+ else msg_format("%^s mewls pitifully.", m_name);
#endif
}
-
- /* Felines */
- else if (strchr("f", r_ptr->d_char))
+ else if(my_strchr("acFIKS", r_ptr->d_char)) // Ants, Centipedes, Flies, Insects, Beetles, Spiders
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
- msg_format("%^s shrugs off the attack.", m_name);
-#endif
- else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s roars.", m_name);
-#endif
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÅܤäÆËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s growls angrily.", m_name);
-#endif
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s hisses with pain.", m_name);
-#endif
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǼ塹¤·¤¯ÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s mewls in pain.", m_name);
-#endif
- else if (percentage > 10)
#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤˤ¦¤á¤¤¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¥¡¼¥¡¼ÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ï¥è¥í¥è¥íƨ¤²²ó¤Ã¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤Ï¤¦¤ë¤µ¤¯ÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤ÏÄˤߤËáÛÚ»¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤÇáÛÚ»¤·¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¥Ô¥¯¥Ô¥¯¤Ò¤¤Ä¤Ã¤¿¡£", m_name);
#else
- msg_format("%^s hisses in agony.", m_name);
-#endif
- else
-#ifdef JP
-msg_format("%s¤Ï°¥¤ì¤ÊÌĤÀ¼¤ò½Ð¤·¤¿¡£", m_name);
-#else
- msg_format("%^s mewls pitifully.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s chitters.", m_name);
+ else if(percentage > 50) msg_format("%^s scuttles about.", m_name);
+ else if(percentage > 35) msg_format("%^s twitters.", m_name);
+ else if(percentage > 20) msg_format("%^s jerks in pain.", m_name);
+ else if(percentage > 10) msg_format("%^s jerks in agony.", m_name);
+ else msg_format("%^s twitches.", m_name);
#endif
}
-
- /* Ants, Centipedes, Flies, Insects, Beetles, Spiders */
- else if (strchr("acFIKS", r_ptr->d_char))
- {
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
- else if (percentage > 75)
-#ifdef JP
-msg_format("%^s¤Ï¥¡¼¥¡¼ÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s chitters.", m_name);
-#endif
-
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥è¥í¥è¥íƨ¤²²ó¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s scuttles about.", m_name);
-#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤ë¤µ¤¯ÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s twitters.", m_name);
-#endif
-
- else if (percentage > 20)
+ else if(my_strchr("B", r_ptr->d_char)) // Birds
+ {
#ifdef JP
-msg_format("%^s¤ÏÄˤߤËáÛÚ»¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¤µ¤¨¤º¤Ã¤¿¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¥Ô¡¼¥Ô¡¼ÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ¤ï¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¶ì¤·¤ó¤À¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¤Î¤¿¤¦¤Á²ó¤Ã¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¥¡¼¥¡¼¤ÈÌĤ¶«¤ó¤À¡£", m_name);
#else
- msg_format("%^s jerks in pain.", m_name);
+ if(percentage > 95) msg_format("%^s chirps.", m_name);
+ else if(percentage > 75) msg_format("%^s twitters.", m_name);
+ else if(percentage > 50) msg_format("%^s squawks.", m_name);
+ else if(percentage > 35) msg_format("%^s chatters.", m_name);
+ else if(percentage > 20) msg_format("%^s jeers.", m_name);
+ else if(percentage > 10) msg_format("%^s flutters about.", m_name);
+ else msg_format("%^s squeaks.", m_name);
#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤÇáÛÚ»¤·¤¿¡£", m_name);
-#else
- msg_format("%^s jerks in agony.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¥Ô¥¯¥Ô¥¯¤Ò¤¤Ä¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s twitches.", m_name);
-#endif
-
}
-
- /* Birds */
- else if (strchr("B", r_ptr->d_char))
- {
- if (percentage > 95)
-#ifdef JP
-msg_format("%^s¤Ï¤µ¤¨¤º¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s chirps.", m_name);
-#endif
-
- else if (percentage > 75)
+ else if(my_strchr("duDLUW", r_ptr->d_char)) // Dragons, Demons, High Undead
+ {
#ifdef JP
-msg_format("%^s¤Ï¥Ô¡¼¥Ô¡¼ÌĤ¤¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤ÏÄˤߤËËʤ¨¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ì¤·¤²¤Ë¶«¤ó¤À¡£", m_name);
+ else msg_format("%^s¤Ï¼å¡¹¤·¤¯¤¦¤Ê¤Ã¤¿¡£", m_name);
#else
- msg_format("%^s twitters.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s flinches.", m_name);
+ else if(percentage > 50) msg_format("%^s hisses in pain.", m_name);
+ else if(percentage > 35) msg_format("%^s snarls with pain.", m_name);
+ else if(percentage > 20) msg_format("%^s roars with pain.", m_name);
+ else if(percentage > 10) msg_format("%^s gasps.", m_name);
+ else msg_format("%^s snarls feebly.", m_name);
#endif
-
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s squawks.", m_name);
-#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¥®¥ã¡¼¥®¥ã¡¼ÌĤ¤ï¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s chatters.", m_name);
-#endif
-
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤ó¤À¡£", m_name);
-#else
- msg_format("%^s jeers.", m_name);
-#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤Î¤¿¤¦¤Á²ó¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s flutters about.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¥¡¼¥¡¼¤ÈÌĤ¶«¤ó¤À¡£", m_name);
-#else
- msg_format("%^s squeaks.", m_name);
-#endif
-
}
-
- /* Dragons, Demons, High Undead */
- else if (strchr("duDLUW", r_ptr->d_char))
+ else if(my_strchr("s", r_ptr->d_char)) // Skeletons
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
-
- else if (percentage > 75)
#ifdef JP
-msg_format("%^s¤Ï¤·¤ê¹þ¤ß¤·¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ï¥«¥¿¥«¥¿¤È¾Ð¤Ã¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¥«¥¿¥«¥¿¸À¤Ã¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¥¬¥¿¥¬¥¿¸À¤Ã¤¿¡£", m_name);
#else
- msg_format("%^s flinches.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 50) msg_format("%^s rattles.", m_name);
+ else if(percentage > 35) msg_format("%^s stumbles.", m_name);
+ else if(percentage > 20) msg_format("%^s rattles.", m_name);
+ else if(percentage > 10) msg_format("%^s staggers.", m_name);
+ else msg_format("%^s clatters.", m_name);
#endif
-
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǥ·¡¼¥Ã¤ÈÌĤ¤¤¿¡£", m_name);
-#else
- msg_format("%^s hisses in pain.", m_name);
-#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s snarls with pain.", m_name);
-#endif
-
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏÄˤߤËËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s roars with pain.", m_name);
-#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¶ì¤·¤²¤Ë¶«¤ó¤À¡£", m_name);
-#else
- msg_format("%^s gasps.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¼å¡¹¤·¤¯¤¦¤Ê¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s snarls feebly.", m_name);
-#endif
-
}
-
- /* Skeletons */
- else if (strchr("s", r_ptr->d_char))
- {
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
-
- else if (percentage > 75)
+ else if(my_strchr("z", r_ptr->d_char)) // Zombies
+ {
#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%s¤Ï¶ì¤·¤²¤Ë¤¦¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¤¦¤Ê¤Ã¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
#else
- msg_format("%^s shrugs off the attack.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 50) msg_format("%^s groans.", m_name);
+ else if(percentage > 35) msg_format("%^s moans.", m_name);
+ else if(percentage > 20) msg_format("%^s hesitates.", m_name);
+ else if(percentage > 10) msg_format("%^s grunts.", m_name);
+ else msg_format("%^s staggers.", m_name);
#endif
-
- else if (percentage > 50)
-#ifdef JP
-msg_format("%^s¤Ï¥«¥¿¥«¥¿¤È¾Ð¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s rattles.", m_name);
-#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s stumbles.", m_name);
-#endif
-
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ï¥«¥¿¥«¥¿¸À¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s rattles.", m_name);
-#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s staggers.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¥¬¥¿¥¬¥¿¸À¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s clatters.", m_name);
-#endif
-
}
-
- /* Zombies */
- else if (strchr("z", r_ptr->d_char))
+ else if(my_strchr("G", r_ptr->d_char)) // Ghosts
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
-
- else if (percentage > 75)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
-#else
- msg_format("%^s shrugs off the attack.", m_name);
-#endif
-
- else if (percentage > 50)
#ifdef JP
-msg_format("%^s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤Ïµã¤¤ï¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%s¤Ï¼å¡¹¤·¤¯¤¦¤á¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤Ï¤«¤¹¤«¤Ë¤¦¤á¤¤¤¿¡£", m_name);
#else
- msg_format("%^s groans.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 50) msg_format("%^s moans.", m_name);
+ else if(percentage > 35) msg_format("%^s wails.", m_name);
+ else if(percentage > 20) msg_format("%^s howls.", m_name);
+ else if(percentage > 10) msg_format("%^s moans softly.", m_name);
+ else msg_format("%^s sighs.", m_name);
#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%s¤Ï¶ì¤·¤²¤Ë¤¦¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s moans.", m_name);
-#endif
-
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤Ïí´í°¤·¤¿¡£", m_name);
-#else
- msg_format("%^s hesitates.", m_name);
-#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%^s¤Ï¤¦¤Ê¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s grunts.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¤è¤í¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s staggers.", m_name);
-#endif
-
}
-
- /* Ghosts */
- else if (strchr("G", r_ptr->d_char))
-
+ else if(my_strchr("CZ", r_ptr->d_char)) // Dogs and Hounds
{
- if (percentage > 95)
-#ifdef JP
-msg_format("%s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s ignores the attack.", m_name);
-#endif
-
- else if (percentage > 75)
#ifdef JP
-msg_format("%s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÄˤߤǥ¥ã¥ó¥¥ã¥óËʤ¨¤¿¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤÇÌĤ¤ï¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÌĤ¤ï¤á¤¤¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
+ else msg_format("%^s¤Ï¼å¡¹¤·¤¯Ëʤ¨¤¿¡£", m_name);
#else
- msg_format("%^s shrugs off the attack.", m_name);
+ if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s snarls with pain.", m_name);
+ else if(percentage > 50) msg_format("%^s yelps in pain.", m_name);
+ else if(percentage > 35) msg_format("%^s howls in pain.", m_name);
+ else if(percentage > 20) msg_format("%^s howls in agony.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s yelps feebly.", m_name);
#endif
-
- else if (percentage > 50)
-#ifdef JP
-msg_format("%s¤Ï¤¦¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s moans.", m_name);
-#endif
-
- else if (percentage > 35)
-#ifdef JP
-msg_format("%^s¤Ïµã¤¤ï¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s wails.", m_name);
-#endif
-
- else if (percentage > 20)
-#ifdef JP
-msg_format("%^s¤ÏËʤ¨¤¿¡£", m_name);
-#else
- msg_format("%^s howls.", m_name);
-#endif
-
- else if (percentage > 10)
-#ifdef JP
-msg_format("%s¤Ï¼å¡¹¤·¤¯¤¦¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s moans softly.", m_name);
-#endif
-
- else
-#ifdef JP
-msg_format("%^s¤Ï¤«¤¹¤«¤Ë¤¦¤á¤¤¤¿¡£", m_name);
-#else
- msg_format("%^s sighs.", m_name);
-#endif
-
}
-
- /* Dogs and Hounds */
- else if (strchr("CZ", r_ptr->d_char))
+ else if(my_strchr("Xbilqrt", r_ptr->d_char)) // One type of creatures (ignore,squeal,shriek)
{
#ifdef JP
- if (percentage > 95)
- msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
- else if (percentage > 75)
- msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
- else if (percentage > 50)
- msg_format("%^s¤ÏÄˤߤǥ¥ã¥ó¥¥ã¥óËʤ¨¤¿¡£", m_name);
- else if (percentage > 35)
- msg_format("%^s¤ÏÄˤߤÇÌĤ¤ï¤á¤¤¤¿¡£", m_name);
- else if (percentage > 20)
- msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÌĤ¤ï¤á¤¤¤¿¡£", m_name);
- else if (percentage > 10)
- msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
- else
- msg_format("%^s¤Ï¼å¡¹¤·¤¯Ëʤ¨¤¿¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
+ else msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
#else
- if (percentage > 95)
- msg_format("%^s shrugs off the attack.", m_name);
- else if (percentage > 75)
- msg_format("%^s snarls with pain.", m_name);
- else if (percentage > 50)
- msg_format("%^s yelps in pain.", m_name);
- else if (percentage > 35)
- msg_format("%^s howls in pain.", m_name);
- else if (percentage > 20)
- msg_format("%^s howls in agony.", m_name);
- else if (percentage > 10)
- msg_format("%^s writhes in agony.", m_name);
- else
- msg_format("%^s yelps feebly.", m_name);
+ if(percentage > 95) msg_format("%^s ignores the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s grunts with pain.", m_name);
+ else if(percentage > 50) msg_format("%^s squeals in pain.", m_name);
+ else if(percentage > 35) msg_format("%^s shrieks in pain.", m_name);
+ else if(percentage > 20) msg_format("%^s shrieks in agony.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s cries out feebly.", m_name);
#endif
-
}
- /* One type of monsters (ignore,squeal,shriek) */
- else if (strchr("Xbilqrt", r_ptr->d_char))
+ else // Another type of creatures (shrug,cry,scream)
{
#ifdef JP
- if (percentage > 95)
- msg_format("%^s¤Ï¹¶·â¤òµ¤¤Ë¤È¤á¤Æ¤¤¤Ê¤¤¡£", m_name);
- else if (percentage > 75)
- msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
- else if (percentage > 50)
- msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
- else if (percentage > 35)
- msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
- else if (percentage > 20)
- msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
- else if (percentage > 10)
- msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
- else
- msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
+ if(percentage > 95) msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
+ else if(percentage > 75) msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
+ else if(percentage > 50) msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
+ else if(percentage > 35) msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
+ else if(percentage > 20) msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
+ else if(percentage > 10) msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
+ else msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
#else
- if (percentage > 95)
- msg_format("%^s ignores the attack.", m_name);
- else if (percentage > 75)
- msg_format("%^s grunts with pain.", m_name);
- else if (percentage > 50)
- msg_format("%^s squeals in pain.", m_name);
- else if (percentage > 35)
- msg_format("%^s shrieks in pain.", m_name);
- else if (percentage > 20)
- msg_format("%^s shrieks in agony.", m_name);
- else if (percentage > 10)
- msg_format("%^s writhes in agony.", m_name);
- else
- msg_format("%^s cries out feebly.", m_name);
+ if(percentage > 95) msg_format("%^s shrugs off the attack.", m_name);
+ else if(percentage > 75) msg_format("%^s grunts with pain.", m_name);
+ else if(percentage > 50) msg_format("%^s cries out in pain.", m_name);
+ else if(percentage > 35) msg_format("%^s screams in pain.", m_name);
+ else if(percentage > 20) msg_format("%^s screams in agony.", m_name);
+ else if(percentage > 10) msg_format("%^s writhes in agony.", m_name);
+ else msg_format("%^s cries out feebly.", m_name);
#endif
-
}
+}
- /* Another type of monsters (shrug,cry,scream) */
- else
- {
-#ifdef JP
- if (percentage > 95)
- msg_format("%^s¤Ï¹¶·â¤Ë¸ª¤ò¤¹¤¯¤á¤¿¡£", m_name);
- else if (percentage > 75)
- msg_format("%^s¤ÏÄˤߤǤ¦¤Ê¤Ã¤¿¡£", m_name);
- else if (percentage > 50)
- msg_format("%^s¤ÏÄˤߤǶ«¤ó¤À¡£", m_name);
- else if (percentage > 35)
- msg_format("%^s¤ÏÄˤߤÇÀ䶫¤·¤¿¡£", m_name);
- else if (percentage > 20)
- msg_format("%^s¤Ï¶ìÄˤΤ¢¤Þ¤êÀ䶫¤·¤¿¡£", m_name);
- else if (percentage > 10)
- msg_format("%^s¤Ï¶ìÄˤǤâ¤À¤¨¶ì¤·¤ó¤À¡£", m_name);
- else
- msg_format("%^s¤Ï¼å¡¹¤·¤¯¶«¤ó¤À¡£", m_name);
-#else
- if (percentage > 95)
- msg_format("%^s shrugs off the attack.", m_name);
- else if (percentage > 75)
- msg_format("%^s grunts with pain.", m_name);
- else if (percentage > 50)
- msg_format("%^s cries out in pain.", m_name);
- else if (percentage > 35)
- msg_format("%^s screams in pain.", m_name);
- else if (percentage > 20)
- msg_format("%^s screams in agony.", m_name);
- else if (percentage > 10)
- msg_format("%^s writhes in agony.", m_name);
- else
- msg_format("%^s cries out feebly.", m_name);
-#endif
- }
-}
/*
*/
void update_smart_learn(int m_idx, int what)
{
-#ifdef DRS_SMART_OPTIONS
-
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
if (p_ptr->reflect) m_ptr-> smart |= (SM_IMM_REFLECT);
break;
}
-
-#endif /* DRS_SMART_OPTIONS */
-
}
/* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
- /* Paranoia */
- o_ptr->held_m_idx = 0;
-
/* Get local object */
q_ptr = &forge;
/* Copy the object */
object_copy(q_ptr, o_ptr);
+ /* Forget monster */
+ q_ptr->held_m_idx = 0;
+
/* Delete the object */
delete_object_idx(this_o_idx);