1 #include "mind/mind-mindcrafter.h"
2 #include "autopick/autopick.h"
3 #include "game-option/auto-destruction-options.h"
4 #include "inventory/player-inventory.h"
5 #include "object-enchant/item-feeling.h"
6 #include "object-enchant/special-object-flags.h"
7 #include "object/item-use-flags.h"
8 #include "object/object-flavor.h"
9 #include "object/object-mark-types.h"
10 #include "perception/object-perception.h"
11 #include "perception/simple-perception.h"
12 #include "view/display-messages.h"
15 * @brief 超能力者のサイコメトリー処理/ Forcibly pseudo-identify an object in the inventory (or on the floor)
16 * @param caster_ptr プレーヤーへの参照ポインタ
19 * currently this function allows pseudo-id of any object,
20 * including silly ones like potions & scrolls, which always
21 * get '{average}'. This should be changed, either to stop such
22 * items from being pseudo-id'd, or to allow psychometry to
23 * detect whether the unidentified potion/scroll/etc is
24 * good (Cure Light Wounds, Restore Strength, etc) or
25 * bad (Poison, Weakness etc) or 'useless' (Slime Mold Juice, etc).
27 bool psychometry(player_type *caster_ptr)
29 concptr q = _("どのアイテムを調べますか?", "Meditate on which item? ");
30 concptr s = _("調べるアイテムがありません。", "You have nothing appropriate.");
33 o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
37 if (object_is_known(o_ptr)) {
38 msg_print(_("何も新しいことは判らなかった。", "You cannot find out anything more about that."));
42 item_feel_type feel = pseudo_value_check_heavy(o_ptr);
43 GAME_TEXT o_name[MAX_NLEN];
44 object_desc(caster_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
47 msg_format(_("%sからは特に変わった事は感じとれなかった。", "You do not perceive anything unusual about the %s."), o_name);
52 msg_format("%sは%sという感じがする...", o_name, game_inscriptions[feel]);
54 msg_format("You feel that the %s %s %s...", o_name, ((o_ptr->number == 1) ? "is" : "are"), game_inscriptions[feel]);
57 o_ptr->ident |= (IDENT_SENSE);
58 o_ptr->feeling = feel;
59 o_ptr->marked |= OM_TOUCHED;
61 caster_ptr->update |= (PU_COMBINE | PU_REORDER);
62 caster_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
65 switch (o_ptr->tval) {
92 autopick_alter_item(caster_ptr, item, (bool)(okay && destroy_feeling));