OSDN Git Service

(clone)フラグを拡張して、クローン地獄のユニーク達を全て(clone)にした。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 2 Feb 2002 18:13:34 +0000 (18:13 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 2 Feb 2002 18:13:34 +0000 (18:13 +0000)
クローンを倒してもオリジナルは生きている。
それから、ユニークのクローンはアイテムを落すが、死体は落さないようにした。
ガチャピン等がランダムクエストのユニークであっても先に倒してしまって
ランダムクエストが無くなる事を防げる。賞金首で余計に儲ける事もなくなる。
ただし、ゴルフィンブール等のクローン地獄以外のクエストには影響しない
のでこれについては直らない。

lib/edit/q0clone0_j.txt
src/init1.c
src/xtra2.c

index fc296df..62b9d75 100644 (file)
@@ -44,46 +44,46 @@ Q:33:T:
 
 # The Monsters
 # Fang, Farmer Maggot's dog (level:2, Speed:120, XP:30, #:6) *Monster food*
-F:c:1:8:55
+F:c:1:8:c55
 
 # Freesia (level:2, Speed:120, XP:33, #:6) *Monster food*
-F:f:1:8:57
+F:f:1:8:c57
 
 # It (level:24, Speed:110, XP:400, #:3)
-F:I:1:8:393
+F:I:1:8:c393
 
 # Barney the Dinosaur (level:29, Speed:120, XP:500, #:3) 
-F:R:1:8:441
+F:R:1:8:c441
 
 # The Ultimate Dungeon Cleaner (level:28, Speed:120, XP:555, #:6) 
-F:g:1:8:451
+F:g:1:8:c451
 
 # Bokrug (level:33, Speed:110 XP:1600, #:3)
-F:S:1:8:489
+F:S:1:8:c489
 
 # Grendel (level:27, Speed:120, XP:1500, #:5)                
-F:O:1:8:431
+F:O:1:8:c431
 
 # Tom the Stone Troll (level:33, Speed:110, XP:2000, #:5) 
-F:M:1:8:495
+F:M:1:8:c495
 
 # Fasolt the Giant (level:33, Speed:110, XP:2000, #:5) 
-F:P:1:8:506
+F:P:1:8:c506
 
 # Jurt the Living Trump (level:34, Speed:120, XP:1200, #:3)
-F:p:1:8:517
+F:p:1:8:c517
 
 # Little Boy (level:35, Speed:120, XP:200, #:4) 
-F:t:1:8:531
+F:t:1:8:c531
 
 # Rogrog the Black Troll (level:36, Speed:120, XP:5000, #:5)
-F:r:1:8:551
+F:r:1:8:c551
 
 # The Queen Ant (level:37, Speed:120, XP:1000, #:3)
-F:a:1:8:581
+F:a:1:8:c581
 
 # Father Dagon (level:38, Speed:120, XP:3250, #:3)
-F:u:1:8:595
+F:u:1:8:c595
 
 # Random monster 5 levels out of depth
 F:5:1:8:*5
index f159676..a47d8b8 100644 (file)
@@ -2989,6 +2989,10 @@ static errr parse_line_feature(char *buf)
                                                letter[index].monster = atoi(zz[3]);
                                        }
                                }
+                               else if (zz[3][0] == 'c')
+                               {
+                                       letter[index].monster = - atoi(zz[3]+1);
+                               }
                                else
                                {
                                        letter[index].monster = atoi(zz[3]);
@@ -3257,6 +3261,17 @@ static errr process_dungeon_file_aux(char *buf, int ymin, int xmin, int ymax, in
                        }
                        else if (monster_index)
                        {
+                               int old_cur_num, old_max_num;
+                               bool clone = FALSE;
+
+                               if (monster_index < 0)
+                               {
+                                       monster_index = -monster_index;
+                                       clone = TRUE;
+                                       old_cur_num = r_info[monster_index].cur_num;
+                                       old_max_num = r_info[monster_index].max_num;
+                               }
+
                                /* Make alive again */
                                if (r_info[monster_index].flags1 & RF1_UNIQUE)
                                {
@@ -3275,6 +3290,15 @@ 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);
+                               if (clone)
+                               {
+                                       /* clone */
+                                       m_list[hack_m_idx_ii].smart |= SM_CLONED;
+
+                                       /* Make alive again for real unique monster */
+                                       r_info[monster_index].cur_num = old_cur_num;
+                                       r_info[monster_index].max_num = old_max_num;
+                               }
                        }
 
                        /* Object (and possible trap) */
index c12b032..dc7627b 100644 (file)
@@ -813,8 +813,8 @@ msg_print("
        /* Drop a dead corpse? */
        if ((randint(r_ptr->flags1 & RF1_UNIQUE ? 1 : 4) == 1) &&
            ((r_ptr->flags9 & RF9_DROP_CORPSE) ||
-        (r_ptr->flags9 & RF9_DROP_SKELETON)) &&
-           !(p_ptr->inside_arena || p_ptr->inside_battle || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
+            (r_ptr->flags9 & RF9_DROP_SKELETON)) &&
+           !(p_ptr->inside_arena || p_ptr->inside_battle || (m_ptr->smart & SM_CLONED) || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
        {
                /* Assume skeleton */
                bool corpse = FALSE;
@@ -845,7 +845,7 @@ msg_print("
                /* Get local object */
                q_ptr = &forge;
 
-               /* Prepare to make a Blade of Chaos */
+               /* Prepare to make an object */
                object_prep(q_ptr, lookup_kind(TV_CORPSE, (corpse ? SV_CORPSE : SV_SKELETON)));
 
                apply_magic(q_ptr, object_level, FALSE, FALSE, FALSE, FALSE);
@@ -1383,8 +1383,11 @@ msg_print("
        if  (r_ptr->flags1 & RF1_DROP_3D2) number += damroll(3, 2);
        if  (r_ptr->flags1 & RF1_DROP_4D2) number += damroll(4, 2);
 
-       if (cloned) number = 0; /* Clones drop no stuff */
-       if (is_pet(m_ptr) || p_ptr->inside_battle || p_ptr->inside_arena) number = 0; /* Pets drop no stuff */
+       if (cloned && !(r_ptr->flags1 & RF1_UNIQUE))
+               number = 0; /* Clones drop no stuff unless Cloning Pits */
+
+       if (is_pet(m_ptr) || p_ptr->inside_battle || p_ptr->inside_arena)
+               number = 0; /* Pets drop no stuff */
        if (!drop_item && (r_ptr->d_char != '$')) number = 0;
 
        /* Hack -- handle creeping coins */
@@ -1943,7 +1946,7 @@ msg_format("%s
 #endif
 
                }
-               if (r_ptr->flags1 & RF1_UNIQUE)
+               if (r_ptr->flags1 & RF1_UNIQUE && !(m_ptr->smart & SM_CLONED))
                {
                        for (i = 0; i < MAX_KUBI; i++)
                        {
@@ -1976,7 +1979,8 @@ msg_format("%s
                }
 
                /* When the player kills a Unique, it stays dead */
-               if (r_ptr->flags1 & RF1_UNIQUE) r_ptr->max_num = 0;
+               if (r_ptr->flags1 & RF1_UNIQUE && !(m_ptr->smart & SM_CLONED))
+                       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--;