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/quaff-execution.h"
12 #include "object/item-tester-hooker.h"
13 #include "object/item-use-flags.h"
14 #include "player-base/player-class.h"
15 #include "player-info/samurai-data-type.h"
16 #include "player/attack-defense-types.h"
17 #include "player/special-defense-types.h"
18 #include "realm/realm-hex-numbers.h"
19 #include "spell-realm/spells-hex.h"
20 #include "status/action-setter.h"
21 #include "system/player-type-definition.h"
24 * @brief 薬を飲むコマンドのメインルーチン /
25 * Quaff some potion (from the pack or floor)
27 void do_cmd_quaff_potion(PlayerType *player_ptr)
29 if (player_ptr->wild_mode) {
33 if (!SpellHex(player_ptr).is_spelling_specific(HEX_INHALE) && cmd_limit_arena(player_ptr)) {
37 PlayerClass(player_ptr).break_samurai_stance({ SamuraiStanceType::MUSOU, SamuraiStanceType::KOUKIJIN });
39 concptr q = _("どの薬を飲みますか? ", "Quaff which potion? ");
40 concptr s = _("飲める薬がない。", "You have no potions to quaff.");
43 if (!choose_object(player_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), FuncItemTester(item_tester_hook_quaff, player_ptr))) {
47 ObjectQuaffEntity(player_ptr).execute(item);