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