OSDN Git Service

[Refactor] #37353 dungeon~spell2間整理。 / Refactor between dungeon and spell2.
[hengband/hengband.git] / src / dungeon.c
index 9b6718c..28a77d2 100644 (file)
@@ -30,7 +30,7 @@ static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カ
  * @param o_ptr 擬似鑑定を行うオブジェクトの参照ポインタ。
  * @return 擬似鑑定結果のIDを返す。
  */
-static byte value_check_aux1(object_type *o_ptr)
+byte value_check_aux1(object_type *o_ptr)
 {
        /* Artifacts */
        if (object_is_artifact(o_ptr))
@@ -75,7 +75,7 @@ static byte value_check_aux1(object_type *o_ptr)
  * @param o_ptr 擬似鑑定を行うオブジェクトの参照ポインタ。
  * @return 擬似鑑定結果のIDを返す。
  */
-static byte value_check_aux2(object_type *o_ptr)
+byte value_check_aux2(object_type *o_ptr)
 {
        /* Cursed items (all of them) */
        if (object_is_cursed(o_ptr)) return FEEL_CURSED;
@@ -1209,127 +1209,6 @@ void leave_tower_check(void)
        }
 }
 
-/*!
- * @brief 超能力者のサイコメトリー処理/ Forcibly pseudo-identify an object in the inventory (or on the floor)
- * @return なし
- * @todo mind.cにこの関数を移動させるべき。
- * @note
- * currently this function allows pseudo-id of any object,
- * including silly ones like potions & scrolls, which always
- * get '{average}'. This should be changed, either to stop such
- * items from being pseudo-id'd, or to allow psychometry to
- * detect whether the unidentified potion/scroll/etc is
- * good (Cure Light Wounds, Restore Strength, etc) or
- * bad (Poison, Weakness etc) or 'useless' (Slime Mold Juice, etc).
- */
-bool psychometry(void)
-{
-       OBJECT_IDX      item;
-       object_type     *o_ptr;
-       char            o_name[MAX_NLEN];
-       byte            feel;
-       cptr            q, s;
-       bool okay = FALSE;
-
-       item_tester_no_ryoute = TRUE;
-       /* Get an item */
-       q = _("どのアイテムを調べますか?", "Meditate on which item? ");
-       s = _("調べるアイテムがありません。", "You have nothing appropriate.");
-
-       if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return (FALSE);
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
-
-       /* It is fully known, no information needed */
-       if (object_is_known(o_ptr))
-       {
-               msg_print(_("何も新しいことは判らなかった。", "You cannot find out anything more about that."));
-               return TRUE;
-       }
-
-       /* Check for a feeling */
-       feel = value_check_aux1(o_ptr);
-
-       /* Get an object description */
-       object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
-
-       /* Skip non-feelings */
-       if (!feel)
-       {
-               msg_format(_("%sからは特に変わった事は感じとれなかった。", "You do not perceive anything unusual about the %s."), o_name);
-               return TRUE;
-       }
-
-#ifdef JP
-msg_format("%sは%sという感じがする...",
-    o_name,  game_inscriptions[feel]);
-#else
-       msg_format("You feel that the %s %s %s...",
-                          o_name, ((o_ptr->number == 1) ? "is" : "are"),
-                          game_inscriptions[feel]);
-#endif
-
-
-       /* We have "felt" it */
-       o_ptr->ident |= (IDENT_SENSE);
-
-       /* "Inscribe" it */
-       o_ptr->feeling = feel;
-
-       /* Player touches it */
-       o_ptr->marked |= OM_TOUCHED;
-
-       /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
-
-       /* Window stuff */
-       p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
-
-       /* Valid "tval" codes */
-       switch (o_ptr->tval)
-       {
-       case TV_SHOT:
-       case TV_ARROW:
-       case TV_BOLT:
-       case TV_BOW:
-       case TV_DIGGING:
-       case TV_HAFTED:
-       case TV_POLEARM:
-       case TV_SWORD:
-       case TV_BOOTS:
-       case TV_GLOVES:
-       case TV_HELM:
-       case TV_CROWN:
-       case TV_SHIELD:
-       case TV_CLOAK:
-       case TV_SOFT_ARMOR:
-       case TV_HARD_ARMOR:
-       case TV_DRAG_ARMOR:
-       case TV_CARD:
-       case TV_RING:
-       case TV_AMULET:
-       case TV_LITE:
-       case TV_FIGURINE:
-               okay = TRUE;
-               break;
-       }
-
-       /* Auto-inscription/destroy */
-       autopick_alter_item(item, (bool)(okay && destroy_feeling));
-
-       /* Something happened */
-       return (TRUE);
-}
 
 /*!
  * @brief !!を刻んだ魔道具の時間経過による再充填を知らせる処理 / If player has inscribed the object with "!!", let him know when it's recharged. -LM-