2 * @brief プレーヤーのステータス (麻痺等)に影響を与えるモンスターの打撃処理
7 #include "monster-attack/monster-attack-status.h"
8 #include "mind/mind-mirror-master.h"
9 #include "monster-race/race-indice-types.h"
10 #include "player/player-effects.h"
12 void process_blind_attack(player_type *target_ptr, monap_type *monap_ptr)
14 if (target_ptr->resist_blind || check_multishadow(target_ptr))
17 if (!set_blind(target_ptr, target_ptr->blind + 10 + randint1(monap_ptr->rlev)))
20 if (monap_ptr->m_ptr->r_idx == MON_DIO)
21 msg_print(_("どうだッ!この血の目潰しはッ!", "How is it! This blood-blinding!"));
23 monap_ptr->obvious = TRUE;
26 void process_terrify_attack(player_type *target_ptr, monap_type *monap_ptr)
28 if (check_multishadow(target_ptr))
31 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
32 if (target_ptr->resist_fear) {
33 msg_print(_("しかし恐怖に侵されなかった!", "You stand your ground!"));
34 monap_ptr->obvious = TRUE;
38 if (randint0(100 + r_ptr->level / 2) < target_ptr->skill_sav) {
39 msg_print(_("しかし恐怖に侵されなかった!", "You stand your ground!"));
40 monap_ptr->obvious = TRUE;
44 if (set_afraid(target_ptr, target_ptr->afraid + 3 + randint1(monap_ptr->rlev)))
45 monap_ptr->obvious = TRUE;
48 void process_paralyze_attack(player_type *target_ptr, monap_type *monap_ptr)
50 if (check_multishadow(target_ptr))
53 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
54 if (target_ptr->free_act) {
55 msg_print(_("しかし効果がなかった!", "You are unaffected!"));
56 monap_ptr->obvious = TRUE;
60 if (randint0(100 + r_ptr->level / 2) < target_ptr->skill_sav) {
61 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
62 monap_ptr->obvious = TRUE;
66 if (!target_ptr->paralyzed && set_paralyzed(target_ptr, 3 + randint1(monap_ptr->rlev)))
67 monap_ptr->obvious = TRUE;
70 void process_lose_all_attack(player_type *target_ptr, monap_type *monap_ptr)
72 if (do_dec_stat(target_ptr, A_STR))
73 monap_ptr->obvious = TRUE;
75 if (do_dec_stat(target_ptr, A_DEX))
76 monap_ptr->obvious = TRUE;
78 if (do_dec_stat(target_ptr, A_CON))
79 monap_ptr->obvious = TRUE;
81 if (do_dec_stat(target_ptr, A_INT))
82 monap_ptr->obvious = TRUE;
84 if (do_dec_stat(target_ptr, A_WIS))
85 monap_ptr->obvious = TRUE;
87 if (do_dec_stat(target_ptr, A_CHR))
88 monap_ptr->obvious = TRUE;
91 void process_stun_attack(player_type *target_ptr, monap_type *monap_ptr)
93 if (target_ptr->resist_sound || check_multishadow(target_ptr))
96 monster_race *r_ptr = &r_info[monap_ptr->m_ptr->r_idx];
97 if (set_stun(target_ptr, target_ptr->stun + 10 + randint1(r_ptr->level / 4)))
98 monap_ptr->obvious = TRUE;
102 * @brief 時間逆転攻撃による能力低下
103 * @param target_ptr プレーヤーへの参照ポインタ
104 * @monap_ptr モンスターからモンスターへの直接攻撃構造体への参照ポインタ
107 static void describe_disability(player_type *target_ptr, monap_type *monap_ptr)
109 int stat = randint0(6);
112 monap_ptr->act = _("強く", "strong");
115 monap_ptr->act = _("聡明で", "bright");
118 monap_ptr->act = _("賢明で", "wise");
121 monap_ptr->act = _("器用で", "agile");
124 monap_ptr->act = _("健康で", "hale");
127 monap_ptr->act = _("美しく", "beautiful");
131 msg_format(_("あなたは以前ほど%sなくなってしまった...。", "You're not as %s as you used to be..."), monap_ptr->act);
132 target_ptr->stat_cur[stat] = (target_ptr->stat_cur[stat] * 3) / 4;
133 if (target_ptr->stat_cur[stat] < 3)
134 target_ptr->stat_cur[stat] = 3;
137 void process_monster_attack_time(player_type *target_ptr, monap_type *monap_ptr)
139 if (target_ptr->resist_time || check_multishadow(target_ptr))
142 switch (randint1(10)) {
148 if (target_ptr->prace == RACE_ANDROID)
151 msg_print(_("人生が逆戻りした気がする。", "You feel like a chunk of the past has been ripped away."));
152 lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
159 describe_disability(target_ptr, monap_ptr);
160 target_ptr->update |= (PU_BONUS);
164 msg_print(_("あなたは以前ほど力強くなくなってしまった...。", "You're not as powerful as you used to be..."));
165 for (int i = 0; i < A_MAX; i++) {
166 target_ptr->stat_cur[i] = (target_ptr->stat_cur[i] * 7) / 8;
167 if (target_ptr->stat_cur[i] < 3)
168 target_ptr->stat_cur[i] = 3;
171 target_ptr->update |= (PU_BONUS);