/* Only forge broken weapons */
item_tester_hook = item_tester_hook_orthodox_melee_weapons;
- if (!get_item(&mater, q, s, (USE_INVEN | USE_EQUIP))) return (0);
+ mo_ptr = choose_object(&mater, q, s, (USE_INVEN | USE_EQUIP));
+ if (!mo_ptr) return (0);
if (mater == item)
{
msg_print(_("クラインの壷じゃない!", "This is not a klein bottle!"));
return (0);
}
- /* Get the item (in the pack) */
- mo_ptr = &inventory[mater];
-
/* Display item name */
object_desc(basenm, mo_ptr, OD_NAME_ONLY);
prt(format(_("材料とする武器: %s", "Material : %s"), basenm), row+4, 2);
q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
- 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;
k_ptr = &k_info[o_ptr->k_idx];
if (c_ptr->info & (CAVE_MARK)) msg_print(_("岩が砕け散った。", "Wall rocks were shattered."));
/* Forget the wall */
c_ptr->info &= ~(CAVE_MARK);
-
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
/* Destroy the wall */
if (snipe_type == SP_LITE)
{
cave[ny][nx].info |= (CAVE_GLOW);
-
note_spot(ny, nx);
-
lite_spot(ny, nx);
}
if (snipe_type == SP_EVILNESS)
{
cave[ny][nx].info &= ~(CAVE_GLOW | CAVE_MARK);
-
note_spot(ny, nx);
-
lite_spot(ny, nx);
}
x = nx;
y = ny;
-
/* Monster here, Try to hit it */
if (cave[y][x].m_idx)
{
void do_cmd_fire(void)
{
OBJECT_IDX item;
- object_type *j_ptr;
+ object_type *j_ptr, *ammo_ptr;
cptr q, s;
is_fired = FALSE; /* not fired yet */
q = _("どれを撃ちますか? ", "Fire which item? ");
s = _("発射されるアイテムがありません。", "You have nothing to fire.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR)))
+
+
+ ammo_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ if (!ammo_ptr)
{
flush();
return;
item_tester_hook = item_tester_hook_boomerang;
q = _("どの武器を投げますか? ", "Throw which item? ");
s = _("投げる武器がない。", "You have nothing to throw.");
- if (!get_item(&item, q, s, (USE_EQUIP)))
+ o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+ if (!o_ptr)
{
flush();
return FALSE;
{
q = _("どのアイテムを投げますか? ", "Throw which item? ");
s = _("投げるアイテムがない。", "You have nothing to throw.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP)))
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP));
+ if (!o_ptr)
{
flush();
return FALSE;
}
}
- /* Access the item (if in the pack) */
- if (item >= 0)
- {
- o_ptr = &inventory[item];
- }
- else
- {
- o_ptr = &o_list[0 - item];
- }
-
/* Item is cursed */
if (object_is_cursed(o_ptr) && (item >= INVEN_RARM))
{