OSDN Git Service

[Refactor] #define ALLOW_EASY_DISARM による分岐処理削除 / Delete #define branch by ALLOW_EASY_...
[hengband/hengband.git] / src / cmd-eat.c
index cdb861a..d469cdc 100644 (file)
@@ -15,7 +15,7 @@
  * @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
@@ -35,10 +35,8 @@ void do_cmd_eat_food_aux(int item)
                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
@@ -198,7 +196,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_CURE_SERIOUS:\r
                {\r
-                       ident = cure_serious_wound(4, 8);\r
+                       ident = cure_serious_wounds(4, 8);\r
                        break;\r
                }\r
 \r
@@ -216,12 +214,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_RESTORING:\r
                {\r
-                       if (do_res_stat(A_STR)) ident = TRUE;\r
-                       if (do_res_stat(A_INT)) ident = TRUE;\r
-                       if (do_res_stat(A_WIS)) ident = TRUE;\r
-                       if (do_res_stat(A_DEX)) ident = TRUE;\r
-                       if (do_res_stat(A_CON)) ident = TRUE;\r
-                       if (do_res_stat(A_CHR)) ident = TRUE;\r
+                       ident = restore_all_status();\r
                        break;\r
                }\r
 \r
@@ -324,7 +317,6 @@ void do_cmd_eat_food_aux(int item)
                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
@@ -400,7 +392,6 @@ void do_cmd_eat_food_aux(int item)
                        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
@@ -416,7 +407,6 @@ void do_cmd_eat_food_aux(int item)
                        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
@@ -523,7 +513,6 @@ void do_cmd_eat_food(void)
        /* 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