OSDN Git Service

Merge pull request #1866 from sikabane-works/release/3.0.0Alpha46
[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(PlayerType *player_ptr, effect_player_type *ep_ptr)
13 {
14     if (player_ptr->blind)
15         msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
16
17     (void)hp_player(player_ptr, ep_ptr->dam);
18     ep_ptr->dam = 0;
19 }
20
21 void effect_player_old_speed(PlayerType *player_ptr, effect_player_type *ep_ptr)
22 {
23     if (player_ptr->blind)
24         msg_print(_("何かで攻撃された!", "You are hit by something!"));
25
26     (void)set_fast(player_ptr, player_ptr->fast + randint1(5), false);
27     ep_ptr->dam = 0;
28 }
29
30 void effect_player_old_slow(PlayerType *player_ptr)
31 {
32     if (player_ptr->blind) {
33         msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
34     }
35
36     (void)BadStatusSetter(player_ptr).mod_slowness(randint0(4) + 4, false);
37 }
38
39 void effect_player_old_sleep(PlayerType *player_ptr, effect_player_type *ep_ptr)
40 {
41     if (player_ptr->free_act)
42         return;
43
44     if (player_ptr->blind)
45         msg_print(_("眠ってしまった!", "You fall asleep!"));
46
47     if (ironman_nightmare) {
48         msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
49
50         /* Have some nightmares */
51         sanity_blast(player_ptr, nullptr, false);
52     }
53
54     (void)BadStatusSetter(player_ptr).mod_paralysis(static_cast<TIME_EFFECT>(ep_ptr->dam));
55     ep_ptr->dam = 0;
56 }