2 * @brief プレーヤーのステータス (麻痺等)に影響を与えるモンスターの打撃処理
7 #include "monster-attack/monster-attack-status.h"
8 #include "core/player-update-types.h"
9 #include "mind/mind-mirror-master.h"
10 #include "monster-race/monster-race.h"
11 #include "monster-race/race-indice-types.h"
12 #include "status/bad-status-setter.h"
13 #include "status/base-status.h"
14 #include "status/experience.h"
15 #include "view/display-messages.h"
17 void process_blind_attack(player_type *target_ptr, monap_type *monap_ptr)
19 if (target_ptr->resist_blind || check_multishadow(target_ptr))
22 if (!set_blind(target_ptr, target_ptr->blind + 10 + randint1(monap_ptr->rlev)))
25 if (monap_ptr->m_ptr->r_idx == MON_DIO)
26 msg_print(_("どうだッ!この血の目潰しはッ!", "How is it! This blood-blinding!"));
28 monap_ptr->obvious = TRUE;
31 void process_terrify_attack(player_type *target_ptr, monap_type *monap_ptr)
33 if (check_multishadow(target_ptr))
36 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
37 if (target_ptr->resist_fear) {
38 msg_print(_("しかし恐怖に侵されなかった!", "You stand your ground!"));
39 monap_ptr->obvious = TRUE;
43 if (randint0(100 + r_ptr->level / 2) < target_ptr->skill_sav) {
44 msg_print(_("しかし恐怖に侵されなかった!", "You stand your ground!"));
45 monap_ptr->obvious = TRUE;
49 if (set_afraid(target_ptr, target_ptr->afraid + 3 + randint1(monap_ptr->rlev)))
50 monap_ptr->obvious = TRUE;
53 void process_paralyze_attack(player_type *target_ptr, monap_type *monap_ptr)
55 if (check_multishadow(target_ptr))
58 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
59 if (target_ptr->free_act) {
60 msg_print(_("しかし効果がなかった!", "You are unaffected!"));
61 monap_ptr->obvious = TRUE;
65 if (randint0(100 + r_ptr->level / 2) < target_ptr->skill_sav) {
66 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
67 monap_ptr->obvious = TRUE;
71 if (!target_ptr->paralyzed && set_paralyzed(target_ptr, 3 + randint1(monap_ptr->rlev)))
72 monap_ptr->obvious = TRUE;
75 void process_lose_all_attack(player_type *target_ptr, monap_type *monap_ptr)
77 if (do_dec_stat(target_ptr, A_STR))
78 monap_ptr->obvious = TRUE;
80 if (do_dec_stat(target_ptr, A_DEX))
81 monap_ptr->obvious = TRUE;
83 if (do_dec_stat(target_ptr, A_CON))
84 monap_ptr->obvious = TRUE;
86 if (do_dec_stat(target_ptr, A_INT))
87 monap_ptr->obvious = TRUE;
89 if (do_dec_stat(target_ptr, A_WIS))
90 monap_ptr->obvious = TRUE;
92 if (do_dec_stat(target_ptr, A_CHR))
93 monap_ptr->obvious = TRUE;
96 void process_stun_attack(player_type *target_ptr, monap_type *monap_ptr)
98 if (target_ptr->resist_sound || check_multishadow(target_ptr))
101 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
102 if (set_stun(target_ptr, target_ptr->stun + 10 + randint1(r_ptr->level / 4)))
103 monap_ptr->obvious = TRUE;
107 * @brief 時間逆転攻撃による能力低下
108 * @param target_ptr プレーヤーへの参照ポインタ
109 * @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
112 static void describe_disability(player_type *target_ptr, monap_type *monap_ptr)
114 int stat = randint0(6);
117 monap_ptr->act = _("強く", "strong");
120 monap_ptr->act = _("聡明で", "bright");
123 monap_ptr->act = _("賢明で", "wise");
126 monap_ptr->act = _("器用で", "agile");
129 monap_ptr->act = _("健康で", "hale");
132 monap_ptr->act = _("美しく", "beautiful");
136 msg_format(_("あなたは以前ほど%sなくなってしまった...。", "You're not as %s as you used to be..."), monap_ptr->act);
137 target_ptr->stat_cur[stat] = (target_ptr->stat_cur[stat] * 3) / 4;
138 if (target_ptr->stat_cur[stat] < 3)
139 target_ptr->stat_cur[stat] = 3;
142 void process_monster_attack_time(player_type *target_ptr, monap_type *monap_ptr)
144 if (target_ptr->resist_time || check_multishadow(target_ptr))
147 switch (randint1(10)) {
153 if (target_ptr->prace == RACE_ANDROID)
156 msg_print(_("人生が逆戻りした気がする。", "You feel like a chunk of the past has been ripped away."));
157 lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
164 describe_disability(target_ptr, monap_ptr);
165 target_ptr->update |= (PU_BONUS);
169 msg_print(_("あなたは以前ほど力強くなくなってしまった...。", "You're not as powerful as you used to be..."));
170 for (int i = 0; i < A_MAX; i++) {
171 target_ptr->stat_cur[i] = (target_ptr->stat_cur[i] * 7) / 8;
172 if (target_ptr->stat_cur[i] < 3)
173 target_ptr->stat_cur[i] = 3;
176 target_ptr->update |= (PU_BONUS);