q = _("どの薬を飲みますか? ", "Quaff which potion? ");\r
s = _("飲める薬がない。", "You have no potions to quaff.");\r
\r
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
+ if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
\r
/* Quaff the potion */\r
do_cmd_quaff_potion_aux(item);\r
q = _("どの巻物を読みますか? ", "Read which scroll? ");\r
s = _("読める巻物がない。", "You have no scrolls to read.");\r
\r
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
-\r
- /* Get the item (in the pack) */\r
- if (item >= 0)\r
- {\r
- o_ptr = &inventory[item];\r
- }\r
-\r
- /* Get the item (on the floor) */\r
- else\r
- {\r
- o_ptr = &o_list[0 - item];\r
- }\r
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));\r
+ if (!o_ptr) return;\r
\r
/* Read the scroll */\r
do_cmd_read_scroll_aux(item, object_is_aware(o_ptr));\r
q = _("どの杖を使いますか? ", "Use which staff? ");\r
s = _("使える杖がない。", "You have no staff to use.");\r
\r
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
+ if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
\r
do_cmd_use_staff_aux(item);\r
}\r
q = _("どのロッドを振りますか? ", "Zap which rod? ");
s = _("使えるロッドがない。", "You have no rod to zap.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
+ if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
/* Zap the rod */
do_cmd_zap_rod_aux(item);
q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
s = _("使える魔法棒がない。", "You have no wand to aim.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
+ if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
do_cmd_aim_wand_aux(item);
}
q = _("どの書から学びますか? ", "Study which book? ");
s = _("読める書がない。", "You have no books that you can read.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
-
- /* 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];
- }
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ if (!o_ptr) return;
for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
{