\r
#include "angband.h"\r
#include "object-hook.h"\r
+#include "avatar.h"\r
\r
/*!\r
* @brief 食料を食べるコマンドのサブルーチン\r
* @param item 食べるオブジェクトの所持品ID\r
* @return なし\r
*/\r
-void do_cmd_eat_food_aux(int item)\r
+void do_cmd_eat_food_aux(INVENTORY_IDX item)\r
{\r
int ident, lev;\r
object_type *o_ptr;\r
o_ptr = &o_list[0 - item];\r
}\r
\r
- /* Sound */\r
sound(SOUND_EAT);\r
\r
- /* Take a turn */\r
p_ptr->energy_use = 100;\r
\r
/* Identity not known yet */\r
}\r
\r
/* Combine / Reorder the pack (later) */\r
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);\r
+ p_ptr->update |= (PU_COMBINE | PU_REORDER);\r
\r
if (!(object_is_aware(o_ptr)))\r
{\r
gain_exp((lev + (p_ptr->lev >> 1)) / p_ptr->lev);\r
}\r
\r
- /* Window stuff */\r
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);\r
\r
\r
prace_is_(RACE_SPECTRE)) &&\r
(o_ptr->tval == TV_STAFF || o_ptr->tval == TV_WAND))\r
{\r
- cptr staff;\r
+ concptr staff;\r
\r
if (o_ptr->tval == TV_STAFF &&\r
(item < 0) && (o_ptr->number > 1))\r
o_ptr->ident |= (IDENT_EMPTY);\r
\r
/* Combine / Reorder the pack (later) */\r
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);\r
+ p_ptr->update |= (PU_COMBINE | PU_REORDER);\r
p_ptr->window |= (PW_INVEN);\r
\r
return;\r
{\r
object_type forge;\r
object_type *q_ptr;\r
-\r
- /* Get local object */\r
q_ptr = &forge;\r
\r
/* Obtain a local object */\r
p_ptr->total_weight -= q_ptr->weight;\r
item = inven_carry(q_ptr);\r
\r
- /* Message */\r
msg_format(_("杖をまとめなおした。", "You unstack your staff."));\r
}\r
\r
floor_item_charges(0 - item);\r
}\r
\r
- /* Window stuff */\r
p_ptr->window |= (PW_INVEN | PW_EQUIP);\r
\r
/* Don't eat a staff/wand itself */\r
my_strchr("pht", r_info[o_ptr->pval].d_char)))\r
{\r
/* Drain vitality of humanoids */\r
- char o_name[MAX_NLEN];\r
+ GAME_TEXT o_name[MAX_NLEN];\r
object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));\r
msg_format(_("%sは燃え上り灰になった。精力を吸収した気がする。", "%^s is burnt to ashes. You absorb its vitality!"), o_name);\r
(void)set_food(PY_FOOD_MAX - 1);\r
object_type *q_ptr = &forge;\r
\r
msg_print(_("食べ物がアゴを素通りして落ちた!", "The food falls through your jaws!"));\r
-\r
- /* Create the item */\r
object_prep(q_ptr, lookup_kind(o_ptr->tval, o_ptr->sval));\r
\r
/* Drop the object from heaven */\r
void do_cmd_eat_food(void)\r
{\r
OBJECT_IDX item;\r
- cptr q, s;\r
-\r
+ concptr q, s;\r
\r
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))\r
{\r
/* Restrict choices to food */\r
item_tester_hook = item_tester_hook_eatable;\r
\r
- /* Get an item */\r
q = _("どれを食べますか? ", "Eat which item? ");\r
s = _("食べ物がない。", "You have nothing to eat.");\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
/* Eat the object */\r
do_cmd_eat_food_aux(item);\r