{
char out_val[160];
-
/* Note that we are in "inventory" mode */
command_wrk = FALSE;
if (easy_floor) command_wrk = (USE_INVEN);
screen_save();
- /* Hack -- show empty slots */
- item_tester_full = TRUE;
-
/* Display the inventory */
- (void)show_inven(0);
-
- /* Hack -- hide empty slots */
- item_tester_full = FALSE;
+ (void)show_inven(0, USE_FULL);
#ifdef JP
sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
- (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
- (long int)((p_ptr->total_weight * 100) / weight_limit()));
+ (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
+ (long int)((p_ptr->total_weight * 100) / weight_limit()));
#else
sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
- (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
- (p_ptr->total_weight * 100) / weight_limit());
+ (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
+ (p_ptr->total_weight * 100) / weight_limit());
#endif
-
- /* Get a command */
prt(out_val, 0, 0);
-
- /* Get a new command */
command_new = inkey();
screen_load();
-
/* Process "Escape" */
if (command_new == ESCAPE)
{
if (easy_floor) command_wrk = (USE_EQUIP);
screen_save();
- /* Hack -- show empty slots */
- item_tester_full = TRUE;
-
- /* Display the equipment */
- (void)show_equip(0);
-
- /* Hack -- undo the hack above */
- item_tester_full = FALSE;
+ (void)show_equip(0, USE_FULL);
/* Build a prompt */
#ifdef JP
(long int)((p_ptr->total_weight * 100) / weight_limit()));
#endif
-
- /* Get a command */
prt(out_val, 0, 0);
-
- /* Get a new command */
command_new = inkey();
-
- /* Restore the screen */
screen_load();
-
/* Process "Escape" */
if (command_new == ESCAPE)
{
void do_cmd_wield(void)
{
OBJECT_IDX item, slot;
-
object_type forge;
object_type *q_ptr;
-
object_type *o_ptr;
cptr act;
+ cptr q, s;
- char o_name[MAX_NLEN];
+ GAME_TEXT o_name[MAX_NLEN];
- cptr q, s;
OBJECT_IDX need_switch_wielding = 0;
q = _("どれを装備しますか? ", "Wear/Wield which item? ");
s = _("装備可能なアイテムがない。", "You have nothing you can wear or wield.");
- 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;
/* Check the slot */
slot = wield_slot(o_ptr);
{
/* Restrict the choices */
item_tester_hook = item_tester_hook_melee_weapon;
- item_tester_no_ryoute = TRUE;
/* Choose a weapon from the equipment only */
q = _("どちらの武器と取り替えますか?", "Replace which weapon? ");
s = _("おっと。", "Oops.");
- if (!get_item(&slot, q, s, (USE_EQUIP))) return;
+ if (!get_item(&slot, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
if (slot == INVEN_RARM) need_switch_wielding = INVEN_LARM;
}
/* Restrict the choices */
select_ring_slot = TRUE;
- item_tester_no_ryoute = TRUE;
- if (!get_item(&slot, q, s, (USE_EQUIP)))
+ if (!get_item(&slot, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT)))
{
select_ring_slot = FALSE;
return;
/* Prevent wielding into a cursed slot */
if (object_is_cursed(&inventory[slot]))
{
- /* Describe it */
object_desc(o_name, &inventory[slot], (OD_OMIT_PREFIX | OD_NAME_ONLY));
#ifdef JP
- msg_format("%s%sは呪われているようだ。",
- describe_use(slot) , o_name );
+ msg_format("%s%sは呪われているようだ。", describe_use(slot) , o_name );
#else
- msg_format("The %s you are %s appears to be cursed.",
- o_name, describe_use(slot));
+ msg_format("The %s you are %s appears to be cursed.", o_name, describe_use(slot));
#endif
/* Cancel the command */
{
char dummy[MAX_NLEN+80];
- /* Describe it */
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
sprintf(dummy, _("本当に%s{呪われている}を使いますか?", "Really use the %s {cursed}? "), o_name);
{
char dummy[MAX_NLEN+80];
- /* Describe it */
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
#ifdef JP
object_type *switch_o_ptr = &inventory[need_switch_wielding];
object_type object_tmp;
object_type *otmp_ptr = &object_tmp;
- char switch_name[MAX_NLEN];
+ GAME_TEXT switch_name[MAX_NLEN];
object_desc(switch_name, switch_o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
break;
}
- /* Describe the result */
object_desc(o_name, o_ptr, 0);
msg_format(act, o_name, index_to_label(slot));
/* Cursed! */
if (object_is_cursed(o_ptr))
{
- /* Warn the player */
msg_print(_("うわ! すさまじく冷たい!", "Oops! It feels deathly cold!"));
chg_virtue(V_HARMONY, -1);
change_race(RACE_VAMPIRE, "");
}
- /* Recalculate bonuses */
- p_ptr->update |= (PU_BONUS);
-
- /* Recalculate torch */
- p_ptr->update |= (PU_TORCH);
-
- /* Recalculate mana */
- p_ptr->update |= (PU_MANA);
-
+ p_ptr->update |= (PU_BONUS | PU_TORCH | PU_MANA);
p_ptr->redraw |= (PR_EQUIPPY);
-
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
calc_android_exp();
void kamaenaoshi(INVENTORY_IDX item)
{
object_type *o_ptr, *new_o_ptr;
- char o_name[MAX_NLEN];
+ GAME_TEXT o_name[MAX_NLEN];
if (item == INVEN_RARM)
{
inven_item_optimize(INVEN_LARM);
if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
- else
- msg_format(_("%sを%sで構えた。", "You are wielding %s in your %s hand."), o_name,
- (left_hander ? _("左手", "left") : _("右手", "right")));
+ else
+ msg_format(_("%sを%sで構えた。", "You are wielding %s in your %s hand."), o_name,
+ (left_hander ? _("左手", "left") : _("右手", "right")));
}
else
{
set_action(ACTION_NONE);
}
- item_tester_no_ryoute = TRUE;
-
q = _("どれを装備からはずしますか? ", "Take off which item? ");
s = _("はずせる装備がない。", "You are not wearing anything to take off.");
- if (!get_item(&item, q, s, (USE_EQUIP))) return;
+ if (!get_item(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)
{
msg_print(_("呪われた装備を力づくで剥がした!", "You teared a cursed equipment off by sheer strength!"));
- /* Hack -- Assume felt */
o_ptr->ident |= (IDENT_SENSE);
-
o_ptr->curse_flags = 0L;
-
- /* Take note */
o_ptr->feeling = FEEL_NONE;
- /* Recalculate the bonuses */
p_ptr->update |= (PU_BONUS);
-
p_ptr->window |= (PW_EQUIP);
msg_print(_("呪いを打ち破った。", "You break the curse."));
set_action(ACTION_NONE);
}
- item_tester_no_ryoute = TRUE;
q = _("どのアイテムを落としますか? ", "Drop which item? ");
s = _("落とせるアイテムを持っていない。", "You have nothing to drop.");
- if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN))) return;
+ if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)
object_type forge;
object_type *q_ptr = &forge;
- char o_name[MAX_NLEN];
+ GAME_TEXT o_name[MAX_NLEN];
char out_val[MAX_NLEN+40];
cptr q, s;
void do_cmd_observe(void)
{
OBJECT_IDX item;
- object_type *o_ptr;
- char o_name[MAX_NLEN];
-
+ object_type *o_ptr;
+ GAME_TEXT o_name[MAX_NLEN];
cptr q, s;
- item_tester_no_ryoute = TRUE;
q = _("どのアイテムを調べますか? ", "Examine which item? ");
s = _("調べられるアイテムがない。", "You have nothing to examine.");
- if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
+ if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)
object_type *o_ptr;
cptr q, s;
- item_tester_no_ryoute = TRUE;
q = _("どのアイテムの銘を消しますか? ", "Un-inscribe which item? ");
s = _("銘を消せるアイテムがない。", "You have nothing to un-inscribe.");
- if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
+ if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)
{
OBJECT_IDX item;
object_type *o_ptr;
- char o_name[MAX_NLEN];
+ GAME_TEXT o_name[MAX_NLEN];
char out_val[80];
cptr q, s;
- item_tester_no_ryoute = TRUE;
q = _("どのアイテムに銘を刻みますか? ", "Inscribe which item? ");
s = _("銘を刻めるアイテムがない。", "You have nothing to inscribe.");
- if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
+ if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)
set_action(ACTION_NONE);
}
- item_tester_no_ryoute = TRUE;
item_tester_hook = item_tester_hook_use;
q = _("どれを使いますか?", "Use which item? ");
s = _("使えるものがありません。", "You have nothing to use.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_EQUIP | USE_FLOOR))) return;
+ if (!get_item(&item, q, s, (USE_INVEN | USE_EQUIP | USE_FLOOR | IGNORE_BOTHHAND_SLOT))) return;
/* Get the item (in the pack) */
if (item >= 0)