1 #include "cmd-action/cmd-shoot.h"
2 #include "combat/shoot.h"
3 #include "floor/floor-object.h"
4 #include "inventory/inventory-slot-types.h"
5 #include "mind/snipe-types.h"
6 #include "object/item-use-flags.h"
7 #include "player/attack-defense-types.h"
8 #include "player/special-defense-types.h"
9 #include "spell-kind/spells-teleport.h"
10 #include "status/action-setter.h"
11 #include "status/bad-status-setter.h"
12 #include "sv-definition/sv-bow-types.h"
13 #include "system/object-type-definition.h"
14 #include "term/screen-processor.h"
15 #include "view/display-messages.h"
20 * @param creature_ptr プレーヤーへの参照ポインタ
21 * @param snipe_type ???
24 void do_cmd_fire(player_type *creature_ptr, SPELL_IDX snipe_type)
27 object_type *j_ptr, *ammo_ptr;
28 if (creature_ptr->wild_mode)
31 creature_ptr->is_fired = FALSE;
32 j_ptr = &creature_ptr->inventory_list[INVEN_BOW];
34 msg_print(_("射撃用の武器を持っていない。", "You have nothing to fire with."));
39 if (j_ptr->sval == SV_CRIMSON) {
40 msg_print(_("この武器は発動して使うもののようだ。", "It's already activated."));
45 if (j_ptr->sval == SV_HARP) {
46 msg_print(_("この武器で射撃はできない。", "It's not for firing."));
51 if (creature_ptr->special_defense & KATA_MUSOU)
52 set_action(creature_ptr, ACTION_NONE);
54 concptr q = _("どれを撃ちますか? ", "Fire which item? ");
55 concptr s = _("発射されるアイテムがありません。", "You have nothing to fire.");
56 ammo_ptr = choose_object(creature_ptr, &item, q, s, USE_INVEN | USE_FLOOR, creature_ptr->tval_ammo);
62 exe_fire(creature_ptr, item, j_ptr, snipe_type);
63 if (!creature_ptr->is_fired || creature_ptr->pclass != CLASS_SNIPER)
66 if (snipe_type == SP_AWAY)
67 teleport_player(creature_ptr, 10 + (creature_ptr->concent * 2), TELEPORT_SPONTANEOUS);
69 if (snipe_type == SP_FINAL) {
70 msg_print(_("射撃の反動が体を襲った。", "The weapon's recoil stuns you. "));
71 (void)set_slow(creature_ptr, creature_ptr->slow + randint0(7) + 7, FALSE);
72 (void)set_stun(creature_ptr, creature_ptr->stun + randint1(25));