OSDN Git Service

[Refactor] #37353 バリアント名称とバージョン定義を core.h へ移動.
[hengband/hengband.git] / src / cmd-quaff.c
index 42957bf..c398785 100644 (file)
@@ -7,13 +7,25 @@
  */
 
 #include "angband.h"
+#include "util.h"
+
+#include "birth.h"
 #include "selfinfo.h"
 #include "object-hook.h"
 #include "mutation.h"
 #include "avatar.h"
+#include "spells.h"
 #include "spells-status.h"
+#include "player-status.h"
+#include "player-effects.h"
+#include "player-race.h"
 #include "realm-hex.h"
+#include "realm-song.h"
 #include "spells-floor.h"
+#include "object-broken.h"
+#include "cmd-basic.h"
+#include "floor.h"
+#include "objectkind.h"
 
 /*!
  * @brief 薬を飲むコマンドのサブルーチン /
@@ -29,6 +41,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
        object_type forge;
        object_type *q_ptr;
 
+       take_turn(p_ptr, 100);
 
        if (p_ptr->timewalk)
        {
@@ -48,7 +61,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
        /* Get the item (in the pack) */
        if (item >= 0)
        {
-               o_ptr = &inventory[item];
+               o_ptr = &p_ptr->inventory_list[item];
        }
 
        /* Get the item (on the floor) */
@@ -64,7 +77,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
        /* Single object */
        q_ptr->number = 1;
 
-       /* Reduce and describe inventory */
+       /* Reduce and describe p_ptr->inventory_list */
        if (item >= 0)
        {
                inven_item_increase(item, -1);
@@ -426,7 +439,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
                        chg_virtue(V_ENLIGHTEN, 1);
                        if (p_ptr->exp < PY_MAX_EXP)
                        {
-                               s32b ee = (p_ptr->exp / 2) + 10;
+                               EXP ee = (p_ptr->exp / 2) + 10;
                                if (ee > 100000L) ee = 100000L;
                                msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
                                gain_exp(ee);