2 * @brief プレイヤーの飲むコマンド実装
7 #include "cmd-item/cmd-quaff.h"
8 #include "action/action-limited.h"
9 #include "floor/floor-object.h"
10 #include "object-hook/hook-expendable.h"
11 #include "object-use/quaff-execution.h"
12 #include "object/item-tester-hooker.h"
13 #include "object/item-use-flags.h"
14 #include "player/attack-defense-types.h"
15 #include "player/special-defense-types.h"
16 #include "status/action-setter.h"
19 * @brief 薬を飲むコマンドのメインルーチン /
20 * Quaff some potion (from the pack or floor)
23 void do_cmd_quaff_potion(player_type *creature_ptr)
25 if (creature_ptr->wild_mode)
28 if (cmd_limit_arena(creature_ptr))
31 if (creature_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
32 set_action(creature_ptr, ACTION_NONE);
34 item_tester_hook = item_tester_hook_quaff;
35 concptr q = _("どの薬を飲みますか? ", "Quaff which potion? ");
36 concptr s = _("飲める薬がない。", "You have no potions to quaff.");
39 if (!choose_object(creature_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0))
42 exe_quaff_potion(creature_ptr, item);