OSDN Git Service

一般形のナズグルに与えられるフラグUNIQUE_7をNAZGULと置き換えた. この
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 17 Aug 2003 12:23:13 +0000 (12:23 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 17 Aug 2003 12:23:13 +0000 (12:23 +0000)
過程で, 以下の変更を含む.
* 一般形のナズグルのmax_numである5を記号定数化. その記号定数が使われ
  るのはユニークでない場合のみとした.

13 files changed:
lib/edit/r_info.txt
src/birth.c
src/bldg.c
src/defines.h
src/dungeon.c
src/floors.c
src/init1.c
src/load.c
src/melee2.c
src/monster2.c
src/object2.c
src/spells1.c
src/xtra2.c

index d2ee629..b539a61 100644 (file)
@@ -13041,7 +13041,7 @@ B:HIT:TERRIFY:10d6
 B:HIT:EXP_80:8d6
 B:HIT:EXP_80:8d6
 F:MALE | 
-F:FORCE_MAXHP | UNIQUE_7 |
+F:FORCE_MAXHP | NAZGUL |
 F:ONLY_ITEM | DROP_2D2 | DROP_GOOD | RES_TELE | RES_DARK |
 F:COLD_BLOOD | OPEN_DOOR | BASH_DOOR | MOVE_BODY | RES_NETH | SMART |
 F:EVIL | UNDEAD | IM_COLD | IM_POIS | HURT_LITE | NO_CONF | NO_SLEEP
index 915a59e..932b677 100644 (file)
@@ -3228,7 +3228,9 @@ static void player_wipe(void)
 
                /* Hack -- Reset the max counter */
                if (r_ptr->flags1 & RF1_UNIQUE) r_ptr->max_num = 1;
-               if (r_ptr->flags7 & RF7_UNIQUE_7) r_ptr->max_num = 5;
+
+               /* Hack -- Non-unique Nazguls are semi-unique */
+               else if (r_ptr->flags7 & RF7_NAZGUL) r_ptr->max_num = MAX_NAZGUL_NUM;
 
                /* Clear player kills */
                r_ptr->r_pkills = 0;
index 184c9ef..26b2ec3 100644 (file)
@@ -1676,7 +1676,7 @@ static bool vault_aux_battle(int r_idx)
 
        /* Decline unique monsters */
 /*     if (r_ptr->flags1 & (RF1_UNIQUE)) return (FALSE); */
-/*     if (r_ptr->flags7 & (RF7_UNIQUE_7)) return (FALSE); */
+/*     if (r_ptr->flags7 & (RF7_NAZGUL)) return (FALSE); */
 
        if (r_ptr->flags1 & (RF1_NEVER_MOVE)) return (FALSE);
        if (r_ptr->flags2 & (RF2_MULTIPLY)) return (FALSE);
index 6252dec..e194025 100644 (file)
 #define RF7_CAN_SWIM            0x00000002  /* Monster can swim */
 #define RF7_CAN_FLY             0x00000004  /* Monster can fly */
 #define RF7_FRIENDLY            0x00000008  /* Monster is friendly */
-#define RF7_UNIQUE_7            0x00000010  /* Is a "Nazgul" unique */
+#define RF7_NAZGUL              0x00000010  /* Is a "Nazgul" unique */
 #define RF7_UNIQUE2             0x00000020  /* Fake unique */
 #define RF7_RIDING              0x00000040  /* Good for riding */
 #define RF7_KAGE                0x00000080  /* Is kage */
@@ -4996,6 +4996,9 @@ extern int PlayerUID;
 #define MON_JIZOTAKO      1065
 #define MON_TANUKI        1067
 
+/* Maximum "Nazguls" number */
+#define MAX_NAZGUL_NUM 5
+
 #define MAX_AUTOPICK 1009
 #define DO_AUTOPICK       0x01
 #define DO_AUTODESTROY    0x02
index 3136af1..35bb9cf 100644 (file)
@@ -6603,7 +6603,7 @@ void determine_today_mon(bool conv_old)
                r_ptr = &r_info[today_mon];
 
                if (r_ptr->flags1 & RF1_UNIQUE) continue;
-               if (r_ptr->flags7 & (RF7_UNIQUE_7 | RF7_UNIQUE2)) continue;
+               if (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)) continue;
                if (r_ptr->flags2 & RF2_MULTIPLY) continue;
                if ((r_ptr->flags9 & (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) != (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) continue;
                if (r_ptr->level < MIN(max_dl / 2, 40)) continue;
index 26becc7..7221445 100644 (file)
@@ -562,7 +562,7 @@ static void update_unique_artifact(s16b cur_floor_id)
 
                /* Memorize location of the unique monster */
                if ((r_ptr->flags1 & RF1_UNIQUE) ||
-                   (r_ptr->flags7 & RF7_UNIQUE_7))
+                   (r_ptr->flags7 & RF7_NAZGUL))
                {
                        r_ptr->floor_id = cur_floor_id;
                }
@@ -712,7 +712,7 @@ void leave_floor(void)
 
                /* Ignore unique monsters */
                if ((r_ptr->flags1 & RF1_UNIQUE) ||
-                   (r_ptr->flags7 & RF7_UNIQUE_7)) continue;
+                   (r_ptr->flags7 & RF7_NAZGUL)) continue;
 
                /* Delete non-unique quest monsters */
                delete_monster_idx(i);
@@ -1094,7 +1094,7 @@ void change_floor(void)
 
                                /* Ignore non-unique */
                                if (!(r_ptr->flags1 & RF1_UNIQUE) &&
-                                   !(r_ptr->flags7 & RF7_UNIQUE_7)) continue;
+                                   !(r_ptr->flags7 & RF7_NAZGUL)) continue;
 
                                /* Appear at a different floor? */
                                if (r_ptr->floor_id != new_floor_id)
index cef87a9..ca6abe9 100644 (file)
@@ -385,7 +385,7 @@ static cptr r_info_flags7[] =
        "CAN_SWIM",
        "CAN_FLY",
        "FRIENDLY",
-       "UNIQUE_7",
+       "NAZGUL",
        "UNIQUE2",
        "RIDING",
        "KAGE",
@@ -3367,7 +3367,8 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                                }
 
                                /* Make alive again */
-                               if (r_info[monster_index].flags7 & RF7_UNIQUE_7)
+                               /* Hack -- Non-unique Nazguls are semi-unique */
+                               else if (r_info[monster_index].flags7 & RF7_NAZGUL)
                                {
                                        if (r_info[monster_index].cur_num == r_info[monster_index].max_num)
                                        {
index 4128357..8e4daf6 100644 (file)
@@ -3115,8 +3115,11 @@ if (arg_fiddle) note("
 
                /* Hack -- Reset the death counter */
                r_ptr->max_num = 100;
+
                if (r_ptr->flags1 & RF1_UNIQUE) r_ptr->max_num = 1;
-               if (r_ptr->flags7 & RF7_UNIQUE_7) r_ptr->max_num = 7;
+
+               /* Hack -- Non-unique Nazguls are semi-unique */
+               else if (r_ptr->flags7 & RF7_NAZGUL) r_ptr->max_num = MAX_NAZGUL_NUM;
        }
 
        /* Monster Memory */
index 0b04b14..a9c36f1 100644 (file)
@@ -260,9 +260,8 @@ msg_format("%^s
        /* It is dead now... or is it? */
        if (m_ptr->hp < 0)
        {
-               if (((r_ptr->flags1 & RF1_UNIQUE) ||
-                       (r_ptr->flags7 & RF7_UNIQUE_7) ||
-                       (r_ptr->flags1 & RF1_QUESTOR)) &&
+               if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) ||
+                   (r_ptr->flags7 & RF7_NAZGUL)) &&
                    !p_ptr->inside_battle)
                {
                        m_ptr->hp = 1;
@@ -2376,7 +2375,7 @@ msg_print("
                mon_take_hit_mon(m_idx, 1, &fear, " explodes into tiny shreds.", m_idx);
 #endif
 
-       if ((is_pet(m_ptr) || is_friendly(m_ptr)) && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)) && !p_ptr->inside_battle)
+       if ((is_pet(m_ptr) || is_friendly(m_ptr)) && ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
        {
                static int riding_pinch = 0;
 
@@ -2515,7 +2514,7 @@ msg_print("
 
        /* Paranoia... no pet uniques outside wizard mode -- TY */
        if (is_pet(m_ptr) &&
-           ((((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7)) &&
+           ((((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) &&
              monster_has_hostile_align(NULL, 10, -10, r_ptr))
             || (r_ptr->flagsr & RFR_RES_ALL)))
        {
index 6b0fb5a..fbca473 100644 (file)
@@ -1333,7 +1333,7 @@ s16b get_mon_num(int level)
                {
                        /* 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;
@@ -2989,7 +2989,7 @@ bool place_monster_one(int who, int y, int x, int r_idx, u32b mode)
        {
                /* 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 */
@@ -3116,7 +3116,7 @@ msg_print("
 
        }
 
-       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)) is_kage = FALSE;
 
        /* Make a new monster */
        c_ptr->m_idx = m_pop();
@@ -3287,7 +3287,7 @@ msg_print("
         * 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" */
@@ -3955,10 +3955,10 @@ static bool summon_specific_okay(int r_idx)
        /* 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)) &&
+           ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL)) &&
            monster_has_hostile_align(NULL, 10, -10, r_ptr))
                return FALSE;
 
index 15a0b67..c907442 100644 (file)
@@ -3831,7 +3831,7 @@ static bool item_monster_okay(int r_idx)
        if (r_ptr->flags1 & RF1_UNIQUE) return (FALSE);
        if (r_ptr->flags7 & RF7_KAGE) return (FALSE);
        if (r_ptr->flagsr & RFR_RES_ALL) return (FALSE);
-       if (r_ptr->flags7 & RF7_UNIQUE_7) return (FALSE);
+       if (r_ptr->flags7 & RF7_NAZGUL) return (FALSE);
        if (r_ptr->flags1 & RF1_FORCE_DEPTH) return (FALSE);
        if (r_ptr->flags7 & RF7_UNIQUE2) return (FALSE);
 
index 2323bd1..52f218a 100644 (file)
@@ -3452,7 +3452,7 @@ note = "
                {
                        if (seen) obvious = TRUE;
 
-                       if (is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_UNIQUE_7 | RF7_UNIQUE2)))
+                       if (is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
                        {
 #ifdef JP
 note = "¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£";
@@ -3848,7 +3848,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -3935,7 +3935,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4010,7 +4010,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4086,7 +4086,7 @@ note = "
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -4182,7 +4182,7 @@ msg_format("%s
                                break;
                        }
 
-                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7))
+                       if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL))
                                dam = dam * 2 / 3;
 
                        /* Attempt a saving throw */
@@ -5385,7 +5385,7 @@ note = "
                {
                        int nokori_hp;
                        if ((p_ptr->inside_quest && (quest[p_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(m_ptr)) ||
-                           (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_UNIQUE_7)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR))
+                           (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_NAZGUL)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR))
                        {
 #ifdef JP
 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£",m_name);
@@ -5870,7 +5870,7 @@ note = "
        if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
 
        /* "Unique" and "quest" monsters can only be "killed" by the player. */
-       if (((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_UNIQUE_7) || (r_ptr->flags1 & RF1_QUESTOR)) && !p_ptr->inside_battle)
+       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
        {
                if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
        }
index af94651..3a6ed66 100644 (file)
@@ -1773,12 +1773,14 @@ bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note)
                        if (r_ptr->r_sights < MAX_SHORT) r_ptr->r_sights++;
                }
 
-               /* When the player kills a Unique, it stays dead */
-               if (r_ptr->flags1 & RF1_UNIQUE && !(m_ptr->smart & SM_CLONED))
-                       r_ptr->max_num = 0;
+               if (!(m_ptr->smart & SM_CLONED))
+               {
+                       /* When the player kills a Unique, it stays dead */
+                       if (r_ptr->flags1 & RF1_UNIQUE) r_ptr->max_num = 0;
 
-               /* When the player kills a Nazgul, it stays dead */
-               if (r_ptr->flags7 & RF7_UNIQUE_7) r_ptr->max_num--;
+                       /* When the player kills a Nazgul, it stays dead */
+                       else if (r_ptr->flags7 & RF7_NAZGUL) r_ptr->max_num--;
+               }
 
                /* Recall even invisible uniques or winners */
                if (m_ptr->ml || (r_ptr->flags1 & RF1_UNIQUE))