OSDN Git Service

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