OSDN Git Service

branch-_nothere-subalign、゙。シ・ク.
author_nothere <_nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 30 Apr 2002 14:55:14 +0000 (14:55 +0000)
committer_nothere <_nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 30 Apr 2002 14:55:14 +0000 (14:55 +0000)
24 files changed:
lib/edit/k_info_j.txt
lib/file/news.txt
lib/file/news_j.txt
src/cmd2.c
src/cmd6.c
src/defines.h
src/dungeon.c
src/externs.h
src/generate.c
src/init1.c
src/load.c
src/monster1.c
src/monster2.c
src/mspells1.c
src/mspells2.c
src/rooms.c
src/save.c
src/spells1.c
src/spells2.c
src/spells3.c
src/spellstips.h
src/types.h
src/wizard2.c
src/xtra2.c

index 4874ee8..21bd426 100644 (file)
@@ -3148,9 +3148,9 @@ I:55:23:9
 W:30:0:50:2000
 A:30/1
 P:0:1d2:0:0:0
-D:$It probes all monsters' HP, AC, speed, current experience and true 
-D:$character in sight when you use it.
-D:¤½¤ì¤Ï»È¤¦¤È»ë³¦Æâ¤Î¥â¥ó¥¹¥¿¡¼¤ÎHP¡¦AC¡¦¥¹¥Ô¡¼¥É¡¦¸½ºß¤Î·Ð¸³ÃÍ¡¦ÀµÂΤò
+D:$It probes all monsters' alignment, HP, AC, speed, current experience and 
+D:$true character in sight when you use it.
+D:¤½¤ì¤Ï»È¤¦¤È»ë³¦Æâ¤Î¥â¥ó¥¹¥¿¡¼¤Î°À­¡¦HP¡¦AC¡¦¥¹¥Ô¡¼¥É¡¦¸½ºß¤Î·Ð¸³ÃÍ¡¦ÀµÂΤò
 D:ɽ¼¨¤¹¤ë¡£
 
 N:322:°Å°Ç
@@ -3463,9 +3463,9 @@ I:66:7:50
 W:40:0:15:4000
 A:20/16:40/4
 P:0:1d1:0:0:0
-D:$It probes all monsters' HP, AC, speed, current experience and true 
-D:$character in sight when you zap it.
-D:¤½¤ì¤Ï¿¶¤ë¤È»ë³¦Æâ¤Î¥â¥ó¥¹¥¿¡¼¤ÎHP¡¦AC¡¦¥¹¥Ô¡¼¥É¡¦¸½ºß¤Î·Ð¸³ÃÍ¡¦ÀµÂΤò
+D:$It probes all monsters' alignment, HP, AC, speed, current experience and 
+D:$true character in sight when you zap it.
+D:¤½¤ì¤Ï¿¶¤ë¤È»ë³¦Æâ¤Î¥â¥ó¥¹¥¿¡¼¤Î°À­¡¦HP¡¦AC¡¦¥¹¥Ô¡¼¥É¡¦¸½ºß¤Î·Ð¸³ÃÍ¡¦ÀµÂΤò
 D:ɽ¼¨¤¹¤ë¡£
 
 N:354:µ¢´Ô
index c64f2de..7fe82a8 100644 (file)
@@ -1,6 +1,6 @@
 
                   ***************************************
-                  **  Hengband 1.0.12 English version  **
+                  **  Hengband 1.0.14 English version  **
                   ***************************************
 
           Based on Moria:    Copyright (c) 1985 Robert Alan Koeneke
index 72e06fb..436f37c 100644 (file)
@@ -1,6 +1,6 @@
 
                   ***************************************
-                  **          ÊѶòÈÚÅÜ  1.0.13         **
+                  **          ÊѶòÈÚÅÜ  1.0.14         **
                   ***************************************
 
           Based on Moria:    Copyright (c) 1985 Robert Alan Koeneke
index 047a47d..e35be6f 100644 (file)
@@ -4486,7 +4486,7 @@ note_dies = "
        {
                j = 100;
 
-               if (!(summon_named_creature(y, x, q_ptr->pval, FALSE, FALSE, FALSE,
+               if (!(summon_named_creature(0, y, x, q_ptr->pval, FALSE, FALSE, FALSE,
                      (bool)!(cursed_p(q_ptr)))))
 #ifdef JP
 msg_print("¿Í·Á¤ÏDZ¤¸¶Ê¤¬¤êºÕ¤±»¶¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
index cc6749e..2c1ce38 100644 (file)
@@ -5367,7 +5367,7 @@ msg_print("
                                cptr kakusan = "";
 #endif
 
-                               if (summon_named_creature(py, px, MON_SUKE, FALSE, FALSE, TRUE, TRUE))
+                               if (summon_named_creature(0, py, px, MON_SUKE, FALSE, FALSE, TRUE, TRUE))
                                {
 #ifdef JP
                                        msg_print("¡Ø½õ¤µ¤ó¡Ù¤¬¸½¤ì¤¿¡£");
@@ -5377,7 +5377,7 @@ msg_print("
 #endif
                                        count++;
                                }
-                               if (summon_named_creature(py, px, MON_KAKU, FALSE, FALSE, TRUE, TRUE))
+                               if (summon_named_creature(0, py, px, MON_KAKU, FALSE, FALSE, TRUE, TRUE))
                                {
 #ifdef JP
                                        msg_print("¡Ø³Ê¤µ¤ó¡Ù¤¬¸½¤ì¤¿¡£");
@@ -5553,7 +5553,7 @@ msg_print("
                        {
                                bool pet = !one_in_(5);
 
-                               if (summon_named_creature(py, px, MON_JIZOTAKO, FALSE, TRUE, FALSE, pet))
+                               if (summon_named_creature(0, py, px, MON_JIZOTAKO, FALSE, TRUE, FALSE, pet))
                                {
                                        if (pet)
 #ifdef JP
@@ -6271,7 +6271,7 @@ msg_print("
                        if (!get_rep_dir2(&dir)) return;
                        if (cave_floor_bold(py+ddy[dir],px+ddx[dir]))
                        {
-                               if (place_monster_aux(py + ddy[dir], px + ddx[dir], o_ptr->pval, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE))
+                               if (place_monster_aux(0, py + ddy[dir], px + ddx[dir], o_ptr->pval, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE))
                                {
                                        if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
                                        if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
index 7535619..5f4d800 100644 (file)
@@ -51,7 +51,7 @@
 #define FAKE_VERSION   0
 #define FAKE_VER_MAJOR 11
 #define FAKE_VER_MINOR 0
-#define FAKE_VER_PATCH 13
+#define FAKE_VER_PATCH 14
 
 #define ANGBAND_2_8_1
 #define ZANGBAND
@@ -4888,6 +4888,10 @@ extern int PlayerUID;
 
 #define prace_is_(A) (!p_ptr->mimic_form && (p_ptr->prace == A))
 
+/* Sub-alignment flags for neutral monsters */
+#define SUB_ALIGN_NEUTRAL 0x0000
+#define SUB_ALIGN_EVIL    0x0001
+#define SUB_ALIGN_GOOD    0x0002
 
 /*
  * World Score -- internet resource value
index bd7c9a6..96637e5 100644 (file)
@@ -5015,7 +5015,7 @@ msg_print("
                                int y, x;
                                y = py+ddy[tsuri_dir];
                                x = px+ddx[tsuri_dir];
-                               if (place_monster_aux(y, x, r_idx, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE))
+                               if (place_monster_aux(0, y, x, r_idx, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE))
                                {
                                        char m_name[80];
                                        monster_desc(m_name, &m_list[cave[y][x].m_idx], 0);
@@ -6570,7 +6570,7 @@ if (init_v_info()) quit("
                monster_type *m_ptr;
                int pet_r_idx = ((p_ptr->pclass == CLASS_CAVALRY) ? MON_HORSE : MON_YASE_HORSE);
                monster_race *r_ptr = &r_info[pet_r_idx];
-               place_monster_aux(py, px - 1, pet_r_idx,
+               place_monster_aux(0, py, px - 1, pet_r_idx,
                                  FALSE, FALSE, TRUE, TRUE, TRUE, FALSE);
                m_ptr = &m_list[hack_m_idx_ii];
                m_ptr->mspeed = r_ptr->speed;
index 39d5f39..ae5d694 100644 (file)
@@ -826,16 +826,16 @@ extern void lore_do_probe(int m_idx);
 extern void lore_treasure(int m_idx, int num_item, int num_gold);
 extern void update_mon(int m_idx, bool full);
 extern void update_monsters(bool full);
-extern bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, bool friendly, bool pet, bool no_kage, bool no_pet);
+extern bool place_monster_aux(int who, int y, int x, int r_idx, bool slp, bool grp, bool friendly, bool pet, bool no_kage, bool no_pet);
 extern bool place_monster(int y, int x, bool slp, bool grp);
 extern bool alloc_horde(int y, int x);
 extern bool alloc_monster(int dis, bool slp);
 extern bool summon_specific(int who, int y1, int x1, int lev, int type, bool group, bool friendly, bool pet, bool unique_okay, bool no_pet);
-extern bool summon_named_creature(int oy, int ox, int r_idx, bool slp, bool group_ok, bool friendly, bool pet);
+extern bool summon_named_creature(int who, int oy, int ox, int r_idx, bool slp, bool group_ok, bool friendly, bool pet);
 extern bool multiply_monster(int m_idx, bool clone, bool friendly, bool pet);
 extern void update_smart_learn(int m_idx, int what);
 extern void choose_new_monster(int m_idx, bool born, int r_idx);
-extern bool place_monster_one(int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet);
+extern bool place_monster_one(int who, int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet);
 extern bool player_place(int y, int x);
 extern void monster_drop_carried_objects(monster_type *m_ptr);
 
index bac91d7..22f6c0d 100644 (file)
@@ -985,7 +985,7 @@ if (cheat_room) msg_print("
                                                        group = TRUE;
 
                                                /* Try to place the monster */
-                                               if (place_monster_aux(y, x, quest[i].r_idx, FALSE, group, FALSE, FALSE, TRUE, TRUE))
+                                               if (place_monster_aux(0, y, x, quest[i].r_idx, FALSE, group, FALSE, FALSE, TRUE, TRUE))
                                                {
                                                        /* Success */
                                                        break;
@@ -1070,7 +1070,7 @@ msg_format("
                         if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[oy][ox].feat, &r_info[d_info[dungeon_type].final_guardian]))
                        {
                                /* Place the guardian */
-                               if (place_monster_aux(oy, ox, d_info[dungeon_type].final_guardian, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE)) break;
+                               if (place_monster_aux(0, oy, ox, d_info[dungeon_type].final_guardian, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE)) break;
                        }
                         /* One less try */
                         try--;
@@ -1192,7 +1192,7 @@ static void arena_gen(void)
 
        build_arena();
 
-       place_monster_aux(py + 5, px, arena_monsters[p_ptr->arena_number],
+       place_monster_aux(0, py + 5, px, arena_monsters[p_ptr->arena_number],
            FALSE, FALSE, FALSE, FALSE, TRUE, TRUE);
 }
 
@@ -1291,7 +1291,7 @@ static void battle_gen(void)
 
        for(i=0;i<4;i++)
        {
-               place_monster_aux(py + 5 + (i/2)*4, px - 2 + (i%2)*4, battle_mon[i],
+               place_monster_aux(0, py + 5 + (i/2)*4, px - 2 + (i%2)*4, battle_mon[i],
                                  FALSE, FALSE, FALSE, FALSE, TRUE, TRUE);
                set_friendly(&m_list[cave[py+5+(i/2)*4][px-2+(i%2)*4].m_idx]);
        }
index 72132f4..e460840 100644 (file)
@@ -3357,7 +3357,7 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                                }
 
                                /* Place it */
-                               place_monster_aux(*y, *x, monster_index, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE);
+                               place_monster_aux(0, *y, *x, monster_index, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE);
                                if (clone)
                                {
                                        /* clone */
index 34d023a..7404015 100644 (file)
@@ -522,6 +522,17 @@ static void rd_monster(monster_type *m_ptr)
        else
                rd_s16b(&m_ptr->ap_r_idx);
 
+       if (z_older_than(11, 0, 14))
+       {
+               monster_race *r_ptr = &r_info[m_ptr->r_idx];
+
+               m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
+               if (r_ptr->flags3 & RF3_EVIL) m_ptr->sub_align |= SUB_ALIGN_EVIL;
+               if (r_ptr->flags3 & RF3_GOOD) m_ptr->sub_align |= SUB_ALIGN_GOOD;
+       }
+       else
+               rd_byte(&m_ptr->sub_align);
+
        /* Read the other information */
        rd_byte(&m_ptr->fy);
        rd_byte(&m_ptr->fx);
index 3761220..604f24d 100644 (file)
@@ -3415,6 +3415,8 @@ void set_pet(monster_type *m_ptr)
        check_quest_completion(m_ptr);
 
        m_ptr->smart |= SM_PET;
+       if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
+               m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
 }
 
 /*
@@ -3523,12 +3525,15 @@ bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
        }
 
        /* Friendly vs. opposite aligned normal or pet */
-       if (((r_ptr->flags3 & RF3_EVIL) &&
-                 (s_ptr->flags3 & RF3_GOOD)) ||
-                ((r_ptr->flags3 & RF3_GOOD) &&
-                 (s_ptr->flags3 & RF3_EVIL)))
+       if (m_ptr->sub_align != n_ptr->sub_align)
        {
-               if (!(m_ptr->mflag2 & MFLAG_CHAMELEON) || !(n_ptr->mflag2 & MFLAG_CHAMELEON)) return TRUE;
+               if (((m_ptr->sub_align & SUB_ALIGN_EVIL) &&
+                         (n_ptr->sub_align & SUB_ALIGN_GOOD)) ||
+                        ((m_ptr->sub_align & SUB_ALIGN_GOOD) &&
+                         (n_ptr->sub_align & SUB_ALIGN_EVIL)))
+               {
+                       if (!(m_ptr->mflag2 & MFLAG_CHAMELEON) || !(n_ptr->mflag2 & MFLAG_CHAMELEON)) return TRUE;
+               }
        }
 
        /* Hostile vs. non-hostile */
index 8fb066a..1e749d7 100644 (file)
@@ -2649,7 +2649,7 @@ static int initial_r_appearance(int r_idx)
  * This is the only function which may place a monster in the dungeon,
  * except for the savefile loading code.
  */
-bool place_monster_one(int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
+bool place_monster_one(int who, int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
 {
        int                     i;
        int rune_dam = 0;
@@ -2848,6 +2848,16 @@ msg_print("
        m_ptr->r_idx = r_idx;
        m_ptr->ap_r_idx = initial_r_appearance(r_idx);
 
+       /* Sub-alignment of a monster */
+       if ((who > 0) && !(r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)))
+               m_ptr->sub_align = m_list[who].sub_align;
+       else
+       {
+               m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
+               if (r_ptr->flags3 & RF3_EVIL) m_ptr->sub_align |= SUB_ALIGN_EVIL;
+               if (r_ptr->flags3 & RF3_GOOD) m_ptr->sub_align |= SUB_ALIGN_GOOD;
+       }
+
        /* Place the monster at the location */
        m_ptr->fy = y;
        m_ptr->fx = x;
@@ -3184,7 +3194,7 @@ static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist)
 /*
  * Attempt to place a "group" of monsters around the given location
  */
-static bool place_monster_group(int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
+static bool place_monster_group(int who, int y, int x, int r_idx, bool slp, bool friendly, bool pet, bool no_pet)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -3253,7 +3263,7 @@ static bool place_monster_group(int y, int x, int r_idx, bool slp, bool friendly
                        if (!cave_empty_bold2(my, mx)) continue;
 
                        /* Attempt to place another monster */
-                       if (place_monster_one(my, mx, r_idx, slp, friendly, pet, no_pet))
+                       if (place_monster_one(who, my, mx, r_idx, slp, friendly, pet, no_pet))
                        {
                                /* Add it to the "hack" set */
                                hack_y[hack_n] = my;
@@ -3276,6 +3286,7 @@ static bool place_monster_group(int y, int x, int r_idx, bool slp, bool friendly
  * Hack -- help pick an escort type
  */
 static int place_monster_idx = 0;
+static int place_monster_m_idx = 0;
 
 /*
  * Hack -- help pick an escort type
@@ -3283,6 +3294,7 @@ static int place_monster_idx = 0;
 static bool place_monster_okay(int r_idx)
 {
        monster_race *r_ptr = &r_info[place_monster_idx];
+       monster_type *m_ptr = &m_list[place_monster_m_idx];
 
        monster_race *z_ptr = &r_info[r_idx];
 
@@ -3302,8 +3314,8 @@ static bool place_monster_okay(int r_idx)
        if (place_monster_idx == r_idx) return (FALSE);
 
        /* Skip different alignment */
-       if (((r_ptr->flags3 & RF3_EVIL) && (z_ptr->flags3 & RF3_GOOD)) ||
-           ((r_ptr->flags3 & RF3_GOOD) && (z_ptr->flags3 & RF3_EVIL)))
+       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 (r_ptr->flags7 & RF7_FRIENDLY)
@@ -3339,7 +3351,7 @@ static bool place_monster_okay(int r_idx)
  * 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(int y, int x, int r_idx, bool slp, bool grp, bool friendly, bool pet, bool no_kage, bool no_pet)
+bool place_monster_aux(int who, int y, int x, int r_idx, bool slp, bool grp, bool friendly, bool pet, bool no_kage, bool no_pet)
 {
        int             i;
        monster_race    *r_ptr = &r_info[r_idx];
@@ -3348,18 +3360,19 @@ bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, bool friendl
        else is_kage = FALSE;
 
        /* Place one monster, or fail */
-       if (!place_monster_one(y, x, r_idx, slp, friendly, pet, no_pet)) return (FALSE);
+       if (!place_monster_one(who, y, x, r_idx, slp, friendly, pet, no_pet)) return (FALSE);
 
 
        /* Require the "group" flag */
        if (!grp) return (TRUE);
+       place_monster_m_idx = hack_m_idx_ii;
 
 
        /* Friends for certain monsters */
        if (r_ptr->flags1 & (RF1_FRIENDS))
        {
                /* Attempt to place a group */
-               (void)place_monster_group(y, x, r_idx, slp, friendly, pet, no_pet);
+               (void)place_monster_group(who, y, x, r_idx, slp, friendly, pet, no_pet);
        }
 
 
@@ -3390,14 +3403,14 @@ bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp, bool friendl
                        if (!z) break;
 
                        /* Place a single escort */
-                       (void)place_monster_one(ny, nx, z, slp, friendly, pet, no_pet);
+                       (void)place_monster_one(place_monster_m_idx, ny, nx, z, slp, friendly, pet, no_pet);
 
                        /* 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(ny, nx, z, slp, friendly, pet, no_pet);
+                               (void)place_monster_group(place_monster_m_idx, ny, nx, z, slp, friendly, pet, no_pet);
                        }
                }
        }
@@ -3426,7 +3439,7 @@ bool place_monster(int y, int x, bool slp, bool grp)
        if (!r_idx) return (FALSE);
 
        /* Attempt to place the monster */
-       if (place_monster_aux(y, x, r_idx, slp, grp, FALSE, FALSE, FALSE, FALSE)) return (TRUE);
+       if (place_monster_aux(0, y, x, r_idx, slp, grp, FALSE, FALSE, FALSE, FALSE)) return (TRUE);
 
        /* Oops */
        return (FALSE);
@@ -3472,7 +3485,7 @@ bool alloc_horde(int y, int x)
        while (--attempts)
        {
                /* Attempt to place the monster */
-               if (place_monster_aux(y, x, r_idx, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)) break;
+               if (place_monster_aux(0, y, x, r_idx, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)) break;
        }
 
        if (attempts < 1) {horde_align = 0;return FALSE;}
@@ -3533,7 +3546,7 @@ bool alloc_monster(int dis, bool slp)
                         if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(cave[oy][ox].feat, &r_info[guardian]))
                        {
                                /* Place the guardian */
-                               if (place_monster_aux(oy, ox, guardian, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE)) break;
+                               if (place_monster_aux(0, oy, ox, guardian, FALSE, TRUE, FALSE, FALSE, TRUE, TRUE)) break;
                        }
                         /* One less try */
                         try--;
@@ -3624,15 +3637,14 @@ static bool summon_specific_okay(int r_idx)
        if (summon_specific_who > 0)
        {
                monster_type *m_ptr = &m_list[summon_specific_who];
-               monster_race *s_ptr = &r_info[m_ptr->r_idx];
 
                /* Do not summon enemies */
 
                /* Friendly vs. opposite aligned normal or pet */
                if (((r_ptr->flags3 & RF3_EVIL) &&
-                         (s_ptr->flags3 & RF3_GOOD)) ||
+                         (m_ptr->sub_align & SUB_ALIGN_GOOD)) ||
                         ((r_ptr->flags3 & RF3_GOOD) &&
-                         (s_ptr->flags3 & RF3_EVIL)))
+                         (m_ptr->sub_align & SUB_ALIGN_EVIL)))
                {
                        return FALSE;
                }
@@ -3738,7 +3750,7 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, bool group, boo
        if ((type == SUMMON_BLUE_HORROR) || (type == SUMMON_DAWN)) no_kage = TRUE;
 
        /* Attempt to place the monster (awake, allow groups) */
-       if (!place_monster_aux(y, x, r_idx, FALSE, group, friendly, pet, no_kage, no_pet))
+       if (!place_monster_aux(who, y, x, r_idx, FALSE, group, friendly, pet, no_kage, no_pet))
        {
                summon_specific_type = 0;
                return (FALSE);
@@ -3750,7 +3762,7 @@ bool summon_specific(int who, int y1, int x1, int lev, int type, bool group, boo
 }
 
 /* A "dangerous" function, creates a pet of the specified type */
-bool summon_named_creature (int oy, int ox, int r_idx, bool slp, bool group_ok, bool friendly, bool pet)
+bool summon_named_creature (int who, int oy, int ox, int r_idx, bool slp, bool group_ok, bool friendly, bool pet)
 {
        int x, y;
 
@@ -3765,7 +3777,7 @@ bool summon_named_creature (int oy, int ox, int r_idx, bool slp, bool group_ok,
        if (!mon_scatter(&y, &x, oy, ox, 2)) return FALSE;
 
        /* Place it (allow groups) */
-       return place_monster_aux(y, x, r_idx, slp, group_ok, friendly, pet, TRUE, FALSE);
+       return place_monster_aux(who, y, x, r_idx, slp, group_ok, friendly, pet, TRUE, FALSE);
 }
 
 
@@ -3784,7 +3796,7 @@ bool multiply_monster(int m_idx, bool clone, bool friendly, bool pet)
                return FALSE;
 
        /* Create a new monster (awake, no groups) */
-       if (!place_monster_aux(y, x, m_ptr->r_idx, FALSE, FALSE, friendly, pet, TRUE, (bool)(m_ptr->mflag2 & MFLAG_NOPET)))
+       if (!place_monster_aux(m_idx, y, x, m_ptr->r_idx, FALSE, FALSE, friendly, pet, TRUE, (bool)(m_ptr->mflag2 & MFLAG_NOPET)))
                return FALSE;
 
        if (clone)
index 928060d..e02f243 100644 (file)
@@ -3663,10 +3663,10 @@ msg_format("%^s
 
                                        if (p_ptr->inside_arena || p_ptr->inside_battle || !summon_possible(m_ptr->fy, m_ptr->fx)) return FALSE;
                                        delete_monster_idx(cave[m_ptr->fy][m_ptr->fx].m_idx);
-                                       summon_named_creature(dummy_y, dummy_x, MON_BANOR, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+                                       summon_named_creature(0, dummy_y, dummy_x, MON_BANOR, FALSE, FALSE, is_friendly(m_ptr), FALSE);
                                        m_list[hack_m_idx_ii].hp = dummy_hp;
                                        m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
-                                       summon_named_creature(dummy_y, dummy_x, MON_LUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+                                       summon_named_creature(0, dummy_y, dummy_x, MON_LUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
                                        m_list[hack_m_idx_ii].hp = dummy_hp;
                                        m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
 
@@ -3701,7 +3701,7 @@ msg_format("%^s
                                                        delete_monster_idx(k);
                                                }
                                        }
-                                       summon_named_creature(dummy_y, dummy_x, MON_BANORLUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+                                       summon_named_creature(0, dummy_y, dummy_x, MON_BANORLUPART, FALSE, FALSE, is_friendly(m_ptr), FALSE);
                                        m_list[hack_m_idx_ii].hp = dummy_hp;
                                        m_list[hack_m_idx_ii].maxhp = dummy_maxhp;
 
@@ -3984,7 +3984,7 @@ else msg_format("%^s
                                int num = 1 + randint1(3);
                                for (k = 0; k < num; k++)
                                {
-                                       count += summon_named_creature(y, x, MON_SHURYUUDAN, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+                                       count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
                                }
                        }
                        else if(m_ptr->r_idx == MON_LOUSY)
@@ -4000,7 +4000,7 @@ else msg_format("%^s
                                int num = 2 + randint1(3);
                                for (k = 0; k < num; k++)
                                {
-                                       count += summon_named_creature(y, x, 921, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+                                       count += summon_named_creature(m_idx, y, x, 921, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
                                }
                        }
                        else if (m_ptr->r_idx == MON_CALDARM)
@@ -4008,7 +4008,7 @@ else msg_format("%^s
                                int num = randint1(3);
                                for (k = 0; k < num; k++)
                                {
-                                       count += summon_named_creature(y, x, 930, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
+                                       count += summon_named_creature(m_idx, y, x, 930, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr));
                                }
                        }
                        else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
@@ -4422,7 +4422,7 @@ else msg_format("%^s
                                        }
                                        if (!cave_floor_bold(cy, cx)) continue;
 
-                                       if (summon_named_creature(cy, cx, MON_NAZGUL, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr)))
+                                       if (summon_named_creature(m_idx, cy, cx, MON_NAZGUL, FALSE, FALSE, is_friendly(m_ptr), is_pet(m_ptr)))
                                        {
                                                y = cy;
                                                x = cx;
index 2a139be..f5b1912 100644 (file)
@@ -3577,7 +3577,7 @@ msg_format("%s
                                        int num = 1 + randint1(3);
                                        for (k = 0; k < num; k++)
                                        {
-                                               count += summon_named_creature(y, x, MON_SHURYUUDAN, FALSE, FALSE, is_friendly(m_ptr), pet);
+                                               count += summon_named_creature(m_idx, y, x, MON_SHURYUUDAN, FALSE, FALSE, is_friendly(m_ptr), pet);
                                        }
                                }
                                else if(m_ptr->r_idx == MON_LOUSY)
@@ -3593,7 +3593,7 @@ msg_format("%s
                                        int num = 2 + randint1(3);
                                        for (k = 0; k < num; k++)
                                        {
-                                               count += summon_named_creature(y, x, 921, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+                                               count += summon_named_creature(m_idx, y, x, 921, FALSE, FALSE, is_friendly(m_ptr), FALSE);
                                        }
                                }
                                else if (m_ptr->r_idx == MON_CALDARM)
@@ -3601,7 +3601,7 @@ msg_format("%s
                                        int num = randint1(3);
                                        for (k = 0; k < num; k++)
                                        {
-                                               count += summon_named_creature(y, x, 930, FALSE, FALSE, is_friendly(m_ptr), FALSE);
+                                               count += summon_named_creature(m_idx, y, x, 930, FALSE, FALSE, is_friendly(m_ptr), FALSE);
                                        }
                                }
                                else if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
index 91e1a12..8c3096e 100644 (file)
@@ -1873,7 +1873,7 @@ msg_format("
                        int r_idx = what[randint0(64)];
 
                        /* Place that "random" monster (no groups) */
-                       (void)place_monster_aux(y, x, r_idx, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
+                       (void)place_monster_aux(0, y, x, r_idx, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
                }
        }
 }
@@ -2133,51 +2133,51 @@ msg_format("%s
        /* Top and bottom rows */
        for (x = xval - 9; x <= xval + 9; x++)
        {
-               place_monster_aux(yval - 2, x, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(yval + 2, x, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, yval - 2, x, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, yval + 2, x, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
        }
 
        /* Middle columns */
        for (y = yval - 1; y <= yval + 1; y++)
        {
-               place_monster_aux(y, xval - 9, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 9, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 9, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 9, what[0], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 8, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 8, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 8, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 8, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 7, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 7, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 7, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 7, what[1], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 6, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 6, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 6, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 6, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 5, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 5, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 5, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 5, what[2], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 4, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 4, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 4, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 4, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 3, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 3, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 3, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 3, what[3], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
-               place_monster_aux(y, xval - 2, what[4], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(y, xval + 2, what[4], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval - 2, what[4], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, y, xval + 2, what[4], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
        }
 
        /* Above/Below the center monster */
        for (x = xval - 1; x <= xval + 1; x++)
        {
-               place_monster_aux(yval + 1, x, what[5], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-               place_monster_aux(yval - 1, x, what[5], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, yval + 1, x, what[5], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+               place_monster_aux(0, yval - 1, x, what[5], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
        }
 
        /* Next to the center monster */
-       place_monster_aux(yval, xval + 1, what[6], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
-       place_monster_aux(yval, xval - 1, what[6], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+       place_monster_aux(0, yval, xval + 1, what[6], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+       place_monster_aux(0, yval, xval - 1, what[6], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 
        /* Center monster */
-       place_monster_aux(yval, xval, what[7], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
+       place_monster_aux(0, yval, xval, what[7], FALSE, FALSE, FALSE, FALSE, TRUE, FALSE);
 }
 
 
index 37e63e8..01d2b2c 100644 (file)
@@ -615,6 +615,7 @@ static void wr_monster(monster_type *m_ptr)
 {
        wr_s16b(m_ptr->r_idx);
        wr_s16b(m_ptr->ap_r_idx);
+       wr_byte(m_ptr->sub_align);
        wr_byte(m_ptr->fy);
        wr_byte(m_ptr->fx);
        wr_s16b(m_ptr->hp);
index 4cb6fb7..213eef6 100644 (file)
@@ -1591,7 +1591,7 @@ note_kill = "
                                                        }
                                                        continue;
                                                }
-                                               else if (summon_named_creature(y, x, o_ptr->pval, FALSE, FALSE, friendly, pet))
+                                               else if (summon_named_creature(who, y, x, o_ptr->pval, FALSE, FALSE, friendly, pet))
                                                {
 #ifdef JP
 note_kill = "À¸¤­Ê֤ä¿¡£";
index 60dd7a4..7be92e6 100644 (file)
@@ -4938,6 +4938,7 @@ bool probing(void)
        int cu, cv;
        bool    probe = FALSE;
        char buf[256];
+       char *align;
 
        cu = Term->scr->cu;
        cv = Term->scr->cv;
@@ -4982,11 +4983,31 @@ bool probing(void)
                        speed = m_ptr->mspeed - 110;
                        if(m_ptr->fast) speed += 10;
                        if(m_ptr->slow) speed -= 10;
+
+                       /* Get the monster's alignment */
+#ifdef JP
+                       if ((r_ptr->flags3 & RF3_EVIL) && (r_ptr->flags3 & RF3_GOOD)) align = "Á±°­";
+                       else if (r_ptr->flags3 & RF3_EVIL) align = "¼Ù°­";
+                       else if (r_ptr->flags3 & RF3_GOOD) align = "Á±ÎÉ";
+                       else if ((m_ptr->sub_align & SUB_ALIGN_EVIL) && (m_ptr->sub_align & SUB_ALIGN_GOOD)) align = "ÃæΩ(Á±°­)";
+                       else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "ÃæΩ(¼Ù°­)";
+                       else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "ÃæΩ(Á±ÎÉ)";
+                       else align = "ÃæΩ";
+#else
+                       if ((r_ptr->flags3 & RF3_EVIL) && (r_ptr->flags3 & RF3_GOOD)) align = "good and evil";
+                       else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
+                       else if (r_ptr->flags3 & RF3_GOOD) align = "good";
+                       else if ((m_ptr->sub_align & SUB_ALIGN_EVIL) && (m_ptr->sub_align & SUB_ALIGN_GOOD)) align = "neutral(good and evil)";
+                       else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "neutral(evil)";
+                       else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "neutral(good)";
+                       else align = "neutral";
+#endif
+
                        /* Describe the monster */
 #ifdef JP
-sprintf(buf,"%s ... HP:%d/%d AC:%d Â®ÅÙ:%s%d ·Ð¸³:", m_name, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
+sprintf(buf,"%s ... Â°À­:%s HP:%d/%d AC:%d Â®ÅÙ:%s%d ·Ð¸³:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
 #else
-sprintf(buf, "%s ... HP:%d/%d AC:%d speed:%s%d exp:", m_name, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
+sprintf(buf, "%s ... alignment:%s HP:%d/%d AC:%d speed:%s%d exp:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
 #endif
                        if (r_ptr->next_r_idx)
                        {
index 866192a..fda8b9a 100644 (file)
@@ -5513,7 +5513,7 @@ bool polymorph_monster(int y, int x)
                delete_monster_idx(c_ptr->m_idx);
 
                /* Create a new monster (no groups) */
-               if (place_monster_aux(y, x, new_r_idx, FALSE, FALSE, friendly, pet, FALSE, (bool)(m_ptr->mflag2 & MFLAG_NOPET)))
+               if (place_monster_aux(0, y, x, new_r_idx, FALSE, FALSE, friendly, pet, FALSE, (bool)(m_ptr->mflag2 & MFLAG_NOPET)))
                {
                        /* Success */
                        polymorphed = TRUE;
@@ -5523,7 +5523,7 @@ bool polymorph_monster(int y, int x)
                        monster_terrain_sensitive = FALSE;
 
                        /* Placing the new monster failed */
-                       place_monster_aux(y, x, old_r_idx, FALSE, FALSE, friendly, pet, TRUE, (bool)(m_ptr->mflag2 & MFLAG_NOPET));
+                       place_monster_aux(0, y, x, old_r_idx, FALSE, FALSE, friendly, pet, TRUE, (bool)(m_ptr->mflag2 & MFLAG_NOPET));
                        m_list[hack_m_idx_ii] = back_m;
 
                        monster_terrain_sensitive = TRUE;
index bc73bdd..fd89705 100644 (file)
@@ -67,7 +67,7 @@ static char *spell_tips[VALID_REALM][32] =
                "ÃϾå¤Ë¤¤¤ë¤È¤­¤Ï¥À¥ó¥¸¥ç¥ó¤ÎºÇ¿¼³¬¤Ø¡¢¥À¥ó¥¸¥ç¥ó¤Ë¤¤¤ë¤È¤­¤ÏÃϾå¤Ø¤È°ÜÆ°¤¹¤ë¡£",
                "ûµ÷Î¥Æâ¤Î»ØÄꤷ¤¿¾ì½ê¤Ë¥Æ¥ì¥Ý¡¼¥È¤¹¤ë¡£",
 
-               "¥â¥ó¥¹¥¿¡¼¤Î»Ä¤êÂÎÎÏ¡¢ºÇÂçÂÎÎÏ¡¢¥¹¥Ô¡¼¥É¡¢ÀµÂΤòÃΤ롣",
+               "¥â¥ó¥¹¥¿¡¼¤Î°À­¡¢»Ä¤êÂÎÎÏ¡¢ºÇÂçÂÎÎÏ¡¢¥¹¥Ô¡¼¥É¡¢ÀµÂΤòÃΤ롣",
                "¼«Ê¬¤Î¤¤¤ë¾²¤Î¾å¤Ë¡¢¥â¥ó¥¹¥¿¡¼¤¬Ä̤ë¤ÈÇúȯ¤·¤Æ¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¥ë¡¼¥ó¤òÉÁ¤¯¡£",
                "¥¢¥¤¥Æ¥à¤ò¼«Ê¬¤Î­¸µ¤Ø°ÜÆ°¤µ¤»¤ë¡£",
                "¤½¤Î³¬Á´ÂΤò±Êµ×¤Ë¾È¤é¤·¡¢¥À¥ó¥¸¥ç¥óÆ⤹¤Ù¤Æ¤Î¥¢¥¤¥Æ¥à¤ò´¶ÃΤ¹¤ë¡£¤µ¤é¤Ë¡¢°ìÄê»þ´Ö¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤòÆÀ¤ë¡£",
@@ -487,7 +487,7 @@ static char *spell_tips[VALID_REALM][32] =
                "teleport to up or down stairs in a moment.",
                "recalls player from dungeon to town, or from town to the deepest level of dungeon.",
                "teleport to given location.",
-               "proves all monsters' HP, speed and their true character.",
+               "proves all monsters' alignment, HP, speed and their true character.",
                "sets a glyph under you. The glyph will explode when a monster moves on it.",
                "pulls a distant item close to you.",
                "maps and lights whole dungeon level. knows all objects location. and gives telepathy for a while.",
index f42e8d7..415d09e 100644 (file)
@@ -571,6 +571,7 @@ struct monster_type
 {
        s16b r_idx;             /* Monster race index */
        s16b ap_r_idx;          /* Monster race appearance index */
+       byte sub_align;         /* Sub-alignment for a neutral monster */
 
        byte fy;                /* Y location on map */
        byte fx;                /* X location on map */
index 833056d..5a17ced 100644 (file)
@@ -1564,7 +1564,7 @@ static void do_cmd_wiz_named(int r_idx, bool slp)
                if (!cave_empty_bold(y, x)) continue;
 
                /* Place it (allow groups) */
-               if (place_monster_aux(y, x, r_idx, slp, TRUE, FALSE, FALSE, FALSE, FALSE)) break;
+               if (place_monster_aux(0, y, x, r_idx, slp, TRUE, FALSE, FALSE, FALSE, FALSE)) break;
        }
 }
 
@@ -1576,7 +1576,7 @@ static void do_cmd_wiz_named(int r_idx, bool slp)
  */
 static void do_cmd_wiz_named_friendly(int r_idx, bool slp)
 {
-       (void) summon_named_creature(py, px, r_idx, slp, TRUE, TRUE, TRUE);
+       (void) summon_named_creature(0, py, px, r_idx, slp, TRUE, TRUE, TRUE);
 }
 
 
index 3c20956..88066d7 100644 (file)
@@ -2036,7 +2036,7 @@ msg_format("%s
                        /* Delete the monster */
                        delete_monster_idx(m_idx);
 
-                       if (summon_named_creature(dummy_y, dummy_x, MON_BIKETAL, FALSE, FALSE, friend, pet))
+                       if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, FALSE, FALSE, friend, pet))
                        {
 #ifdef JP
                                msg_print("¡Ö¥Ï¥¡¥Ã¥Ï¥Ã¥Ï¥Ã¥Ï¡ª¡ª»ä¤¬¥Ð¥¤¥±¥¿¥ë¤À¡ª¡ª¡×");