OSDN Git Service

性格いかさまでアイテムを拾った/装備したとき, 歌 "知識の歌" を使って範
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 4 Sep 2003 14:30:22 +0000 (14:30 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 4 Sep 2003 14:30:22 +0000 (14:30 +0000)
囲鑑定したとき, 店に複数アイテムの一部だけを売却したとき, 魔法アイテ
ム充填の前処理として鑑定したとき, そして全鑑定サービスといった状況で
はアイテムに自動銘刻みを用いるように変更. これらの状況では自動破壊は
行わない.

src/bldg.c
src/cmd1.c
src/cmd3.c
src/spells1.c
src/spells3.c
src/store.c

index a8163e4..129ce2e 100644 (file)
@@ -3840,6 +3840,8 @@ msg_format("%s 
                        msg_format("You have: %s.", tmp_str);
 #endif
 
+                       /* Auto-inscription */
+                       auto_inscribe_item(item, is_autopick(o_ptr));
 
                        /* Update the gold display */
                        building_prt_gold();
@@ -4130,12 +4132,18 @@ static void building_recharge_all(void)
        {
                o_ptr = &inventory[i];
                k_ptr = &k_info[o_ptr->k_idx];
-                               
+
                /* skip non magic device */
                if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
 
                /* Identify it */
-               if (!object_known_p(o_ptr)) identify_item(o_ptr);
+               if (!object_known_p(o_ptr))
+               {
+                       identify_item(o_ptr);
+
+                       /* Auto-inscription */
+                       auto_inscribe_item(i, is_autopick(o_ptr));
+               }
 
                /* Recharge */
                switch (o_ptr->tval)
index a7d7c5c..8c98373 100644 (file)
@@ -806,7 +806,13 @@ void py_pickup_aux(int o_idx)
        /* Delete the object */
        delete_object_idx(o_idx);
 
-       if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN) identify_item(o_ptr);
+       if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
+       {
+               identify_item(o_ptr);
+
+               /* Auto-inscription */
+               auto_inscribe_item(slot, is_autopick(o_ptr));
+       }
 
        /* Describe the object */
        object_desc(o_name, o_ptr, TRUE, 3);
index 7304366..b3d14a1 100644 (file)
@@ -443,7 +443,13 @@ msg_print("
                }
        }
 
-       if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN) identify_item(o_ptr);
+       if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
+       {
+               identify_item(o_ptr);
+
+               /* Auto-inscription */
+               auto_inscribe_item(item, is_autopick(o_ptr));
+       }
 
        /* Take a turn */
        energy_use = 100;
index b73235a..65b188e 100644 (file)
@@ -1541,6 +1541,9 @@ note_kill = "
                        case GF_IDENTIFY:
                        {
                                identify_item(o_ptr);
+
+                               /* Auto-inscription */
+                               auto_inscribe_item(-this_o_idx, is_autopick(o_ptr));
                                break;
                        }
 
index 10aae70..b54f24a 100644 (file)
@@ -2010,6 +2010,9 @@ void identify_pack(void)
 
                /* Identify it */
                identify_item(o_ptr);
+
+               /* Auto-inscription */
+               auto_inscribe_item(i, is_autopick(o_ptr));
        }
 }
 
index b799f74..8c671af 100644 (file)
@@ -3371,8 +3371,6 @@ msg_format("%s(%c)
                        /* Player can afford it */
                        if (p_ptr->au >= price)
                        {
-                               int idx;
-
                                /* Say "okay" */
                                say_comment_1();
 
@@ -3438,8 +3436,7 @@ msg_format("%s
 #endif
 
                                /* Auto-inscription */
-                               idx = is_autopick(&inventory[item_new]);
-                               auto_inscribe_item(item_new, idx);
+                               auto_inscribe_item(item_new, is_autopick(&inventory[item_new]));
 
                                /* Now, reduce the original stack's pval. */
                                if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
@@ -3873,6 +3870,10 @@ msg_format("%s
                        /* Take the item from the player, describe the result */
                        inven_item_increase(item, -amt);
                        inven_item_describe(item);
+
+                       /* If items remain, auto-inscribe before optimizing */
+                       if (o_ptr->number > 0) auto_inscribe_item(item, is_autopick(o_ptr));
+
                        inven_item_optimize(item);
 
                        /* Handle stuff */