OSDN Git Service

Add Soft-Armor Ego -- of Druid.
[hengband/hengband.git] / src / object2.c
index 2983420..a687b53 100644 (file)
@@ -1828,7 +1828,7 @@ void object_wipe(object_type *o_ptr)
 void object_copy(object_type *o_ptr, object_type *j_ptr)
 {
        /* Copy the structure */
-       COPY(o_ptr, j_ptr, object_type);
+       (void)COPY(o_ptr, j_ptr, object_type);
 }
 
 
@@ -2648,6 +2648,7 @@ static void a_m_aux_2(object_type *o_ptr, int level, int power)
                                                        add_flag(o_ptr->art_flags, TR_RES_POIS);
                                                break;
                                        case EGO_ELVENKIND:
+                                       case EGO_URUKISH:
                                                break;
                                        case EGO_DWARVEN:
                                                if (o_ptr->tval != TV_HARD_ARMOR)
@@ -2659,8 +2660,16 @@ static void a_m_aux_2(object_type *o_ptr, int level, int power)
                                                {
                                                        o_ptr->weight = (2 * k_info[o_ptr->k_idx].weight / 3);
                                                        o_ptr->ac = k_info[o_ptr->k_idx].ac + 5;
-                                                       if (one_in_(4))
-                                                               add_flag(o_ptr->art_flags, TR_CON);
+                                                       break;
+                                               }
+                                       case EGO_DRUID:
+                                               if (o_ptr->tval != TV_SOFT_ARMOR)
+                                               {
+                                                       okay_flag = FALSE;
+                                                       break;
+                                               }
+                                               else
+                                               {
                                                        break;
                                                }
                                        }
@@ -5215,10 +5224,10 @@ amuse_type amuse_info[] =
        { TV_BOTTLE, SV_ANY, 5, AMS_NOTHING },
        { TV_JUNK, SV_ANY, 3, AMS_MULTIPLE },
        { TV_SPIKE, SV_ANY, 10, AMS_PILE },
-       { TV_STATUE, SV_ANY, 20, AMS_NOTHING },
+       { TV_STATUE, SV_ANY, 15, AMS_NOTHING },
        { TV_CORPSE, SV_ANY, 15, AMS_NO_UNIQUE },
        { TV_SKELETON, SV_ANY, 10, AMS_NO_UNIQUE },
-       { TV_FIGURINE, SV_ANY, 5, AMS_NO_UNIQUE },
+       { TV_FIGURINE, SV_ANY, 10, AMS_NO_UNIQUE },
        { TV_PARCHMENT, SV_ANY, 1, AMS_NOTHING },
        { TV_POLEARM, SV_TSURIZAO, 3, AMS_NOTHING }, //Fishing Pole of Taikobo
        { TV_SWORD, SV_BROKEN_DAGGER, 3, AMS_FIXED_ART }, //Broken Dagger of Magician
@@ -5288,13 +5297,13 @@ void amusement(int y1, int x1, int num, bool known)
                if (a_idx) i_ptr->name1 = a_idx;
                apply_magic(i_ptr, 1, AM_NO_FIXED_ART);
 
-               if (amuse_info[r].flag & AMS_NO_UNIQUE)
+               if (amuse_info[i].flag & AMS_NO_UNIQUE)
                {
                        if (r_info[i_ptr->pval].flags1 & RF1_UNIQUE) continue;
                }
 
-               if (amuse_info[r].flag & AMS_MULTIPLE) i_ptr->number = randint1(3);
-               if (amuse_info[r].flag & AMS_PILE) i_ptr->number = randint1(99);
+               if (amuse_info[i].flag & AMS_MULTIPLE) i_ptr->number = randint1(3);
+               if (amuse_info[i].flag & AMS_PILE) i_ptr->number = randint1(99);
 
                if (known)
                {
@@ -6875,7 +6884,7 @@ bool process_warning(int xx, int yy)
                        else strcpy(o_name, "body"); /* Warning ability without item */
                        msg_format("Your %s pulsates sharply!", o_name);
 #endif
-                       disturb(0, 0);
+                       disturb(0, 1);
 #ifdef JP
                        return get_check("ËÜÅö¤Ë¤³¤Î¤Þ¤Þ¿Ê¤à¤«¡©");
 #else
@@ -6899,7 +6908,7 @@ bool process_warning(int xx, int yy)
                else strcpy(o_name, "body"); /* Warning ability without item */
                msg_format("Your %s pulsates!", o_name);
 #endif
-               disturb(0, 0);
+               disturb(0, 1);
 #ifdef JP
                return get_check("ËÜÅö¤Ë¤³¤Î¤Þ¤Þ¿Ê¤à¤«¡©");
 #else
@@ -7606,19 +7615,12 @@ static void drain_essence(void)
        }
        if (!observe)
        {
-#ifdef JP
-               msg_print("¥¨¥Ã¥»¥ó¥¹¤ÏÃê½Ð¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£");
-#else
-               msg_print("You were not able to extract any essence.");
-#endif
+               msg_print(_("¥¨¥Ã¥»¥ó¥¹¤ÏÃê½Ð¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£", "You were not able to extract any essence."));
        }
        else
        {
-#ifdef JP
-               msg_print("Ãê½Ð¤·¤¿¥¨¥Ã¥»¥ó¥¹:");
-#else
-               msg_print("Extracted essences:");
-#endif
+               msg_print(_("Ãê½Ð¤·¤¿¥¨¥Ã¥»¥ó¥¹:", "Extracted essences:"));
+
                for (i = 0; essence_name[i]; i++)
                {
                        if (!essence_name[i][0]) continue;
@@ -7627,10 +7629,13 @@ static void drain_essence(void)
                        p_ptr->magic_num1[i] += drain_value[i];
                        p_ptr->magic_num1[i] = MIN(20000, p_ptr->magic_num1[i]);
                        msg_print(NULL);
-                       msg_format("%s...%d", essence_name[i], drain_value[i]);
+                       msg_format("%s...%d%s", essence_name[i], drain_value[i], _("¡£", ". "));
                }
        }
 
+       /* Apply autodestroy/inscription to the drained item */
+       autopick_alter_item(item, TRUE);
+
        /* Combine the pack */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
@@ -8619,3 +8624,41 @@ void do_cmd_kaji(bool only_browse)
                case 5: add_essence(10);break;
        }
 }
+
+
+/*
+ * Torches have special abilities when they are flaming.
+ */
+void torch_flags(object_type *o_ptr, u32b *flgs)
+{
+       if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
+       {
+               if (o_ptr->xtra4 > 0)
+               {
+                       add_flag(flgs, TR_BRAND_FIRE);
+                       add_flag(flgs, TR_KILL_UNDEAD);
+                       add_flag(flgs, TR_THROW);
+               }
+       }
+}
+
+void torch_dice(object_type *o_ptr, int *dd, int *ds)
+{
+       if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
+       {
+               if (o_ptr->xtra4 > 0)
+               {
+                       (*dd) = 1;
+                       (*ds) = 6;
+               }
+       }
+}
+
+void torch_lost_fuel(object_type *o_ptr)
+{
+       if ((o_ptr->tval == TV_LITE) && (o_ptr->sval == SV_LITE_TORCH))
+       {
+               o_ptr->xtra4 -= (FUEL_TORCH / 25);
+               if (o_ptr->xtra4 < 0) o_ptr->xtra4 = 0;
+       }
+}