1 #include "mind/mind-warrior.h"
2 #include "cmd-action/cmd-attack.h"
3 #include "floor/geometry.h"
5 #include "spell-kind/spells-teleport.h"
6 #include "system/floor-type-definition.h"
7 #include "system/player-type-definition.h"
8 #include "target/target-getter.h"
9 #include "view/display-messages.h"
12 * 戦士と盗賊における、ヒット&アウェイのレイシャルパワー/突然変異
13 * @param caster_ptr プレーヤーへの参照ポインタ
14 * @return コマンドの入力先にモンスターがいたらTRUE
16 bool hit_and_away(player_type *caster_ptr)
19 if (!get_direction(caster_ptr, &dir, FALSE, FALSE))
21 POSITION y = caster_ptr->y + ddy[dir];
22 POSITION x = caster_ptr->x + ddx[dir];
23 if (caster_ptr->current_floor_ptr->grid_array[y][x].m_idx) {
24 do_cmd_attack(caster_ptr, y, x, HISSATSU_NONE);
25 if (randint0(caster_ptr->skill_dis) < 7)
26 msg_print(_("うまく逃げられなかった。", "You failed to run away."));
28 teleport_player(caster_ptr, 30, TELEPORT_SPONTANEOUS);
32 msg_print(_("その方向にはモンスターはいません。", "You don't see any monster in this direction"));
39 * @param creature_ptr プレーヤーへの参照ポインタ
42 bool sword_dancing(player_type *creature_ptr)
45 POSITION y = 0, x = 0;
47 for (int i = 0; i < 6; i++) {
49 y = creature_ptr->y + ddy_ddd[dir];
50 x = creature_ptr->x + ddx_ddd[dir];
51 g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
53 /* Hack -- attack monsters */
55 do_cmd_attack(creature_ptr, y, x, HISSATSU_NONE);
57 msg_print(_("攻撃が空をきった。", "You attack the empty air."));