OSDN Git Service

[Refactor] #40466 Separated bad-status-setter.c/h from player-effects.c/h
[hengband/hengband.git] / src / effect / effect-player-oldies.c
1 #include "effect/effect-player-oldies.h"
2 #include "game-option/birth-options.h"
3 #include "monster-race/race-indice-types.h"
4 #include "player/bad-status-setter.h"
5 #include "player/eldritch-horror.h"
6 #include "player/player-effects.h"
7 #include "view/display-messages.h"
8
9 void effect_player_old_heal(player_type *target_ptr, effect_player_type *ep_ptr)
10 {
11     if (target_ptr->blind)
12         msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
13
14     (void)hp_player(target_ptr, ep_ptr->dam);
15     ep_ptr->dam = 0;
16 }
17
18 void effect_player_old_speed(player_type *target_ptr, effect_player_type *ep_ptr)
19 {
20     if (target_ptr->blind)
21         msg_print(_("何かで攻撃された!", "You are hit by something!"));
22
23     (void)set_fast(target_ptr, target_ptr->fast + randint1(5), FALSE);
24     ep_ptr->dam = 0;
25 }
26
27 void effect_player_old_slow(player_type *target_ptr)
28 {
29     if (target_ptr->blind)
30         msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
31
32     (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
33 }
34
35 void effect_player_old_sleep(player_type *target_ptr, effect_player_type *ep_ptr)
36 {
37     if (target_ptr->free_act)
38         return;
39
40     if (target_ptr->blind)
41         msg_print(_("眠ってしまった!", "You fall asleep!"));
42
43     if (ironman_nightmare) {
44         msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
45
46         /* Have some nightmares */
47         sanity_blast(target_ptr, NULL, FALSE);
48     }
49
50     set_paralyzed(target_ptr, target_ptr->paralyzed + ep_ptr->dam);
51     ep_ptr->dam = 0;
52 }