q = _("どのアイテムから作りますか? ", "Convert which item? ");
s = _("材料を持っていない。", "You have no item to convert.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return FALSE;
- /* Get the item (in the pack) */
- if (item >= 0)
- {
- q_ptr = &inventory[item];
- }
+ q_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ if (!q_ptr) return FALSE;
- /* Get the item (on the floor) */
- else
- {
- q_ptr = &o_list[0 - item];
- }
q_ptr = &forge;
/* Hack -- Give the player some small firestones */
q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? ");
s = _("魔力を取り込めるアイテムがない。", "You have nothing to gain power.");
- if (!get_item(&item, q, s, (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];
- }
+ o_ptr = get_item(&item, q, s, (USE_INVEN | USE_FLOOR));
+ if (!o_ptr) return (FALSE);
if (o_ptr->tval == TV_STAFF && o_ptr->sval == SV_STAFF_NOTHING)
{
q = _("どれを呪いますか?", "Which weapon do you curse?");
s = _("武器を装備していない。", "You wield no weapons.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
- o_ptr = &inventory[item];
object_desc(o_name, o_ptr, OD_NAME_ONLY);
object_flags(o_ptr, f);
q = _("どれを呪いますか?", "Which piece of armour do you curse?");
s = _("防具を装備していない。", "You wield no piece of armours.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
o_ptr = &inventory[item];
object_desc(o_name, o_ptr, OD_NAME_ONLY);
q = _("どの装備品から吸収しますか?", "Which cursed equipment do you drain mana from?");
s = _("呪われたアイテムを装備していない。", "You have no cursed equipment.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return FALSE;
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr) return FALSE;
- o_ptr = &inventory[item];
object_flags(o_ptr, f);
p_ptr->csp += (p_ptr->lev / 5) + randint1(p_ptr->lev / 5);