OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / cmd-quaff.c
index f4fb7da..b25e23e 100644 (file)
  * @param item 飲む薬オブジェクトの所持品ID\r
  * @return なし\r
  */\r
-void do_cmd_quaff_potion_aux(int item)\r
+void do_cmd_quaff_potion_aux(INVENTORY_IDX item)\r
 {\r
-       int         ident, lev;\r
+       bool ident;\r
+       DEPTH lev;\r
        object_type *o_ptr;\r
        object_type forge;\r
        object_type *q_ptr;\r
 \r
 \r
-       /* Take a turn */\r
-       p_ptr->energy_use = 100;\r
-\r
        if (world_player)\r
        {\r
                if (flush_failure) flush();\r
@@ -79,7 +77,6 @@ void do_cmd_quaff_potion_aux(int item)
                floor_item_optimize(0 - item);\r
        }\r
 \r
-       /* Sound */\r
        sound(SOUND_QUAFF);\r
 \r
 \r
@@ -329,9 +326,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_BESERK_STRENGTH:\r
-                       if (set_afraid(0)) ident = TRUE;\r
-                       if (set_shero(p_ptr->shero + randint1(25) + 25, FALSE)) ident = TRUE;\r
-                       if (hp_player(30)) ident = TRUE;\r
+                       ident = berserk(randint1(25) + 25);\r
                        break;\r
 \r
                case SV_POTION_CURE_LIGHT:\r
@@ -560,7 +555,6 @@ void do_cmd_quaff_potion_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
        /* Potions can feed the player */\r
@@ -634,7 +628,6 @@ void do_cmd_quaff_potion(void)
        /* Restrict choices to potions */\r
        item_tester_hook = item_tester_hook_quaff;\r
 \r
-       /* Get an item */\r
        q = _("どの薬を飲みますか? ", "Quaff which potion? ");\r
        s = _("飲める薬がない。", "You have no potions to quaff.");\r
 \r