OSDN Git Service

[Refactor] #40514 player-status-flags.c/h から player-status-resist.c/h を分離. / Separate...
[hengband/hengband.git] / src / effect / effect-player-resist-hurt.c
1 #include "effect/effect-player-resist-hurt.h"
2 #include "art-definition/art-sword-types.h"
3 #include "blue-magic/blue-magic-checker.h"
4 #include "core/hp-mp-processor.h"
5 #include "core/player-redraw-types.h"
6 #include "core/player-update-types.h"
7 #include "core/window-redrawer.h"
8 #include "inventory/inventory-damage.h"
9 #include "inventory/inventory-slot-types.h"
10 #include "mind/mind-mirror-master.h"
11 #include "monster-race/race-indice-types.h"
12 #include "mutation/mutation-investor-remover.h"
13 #include "object/object-broken.h"
14 #include "player/player-damage.h"
15 #include "player/player-race-types.h"
16 #include "player/player-race.h"
17 #include "player/player-status-flags.h"
18 #include "player/player-status-resist.h"
19 #include "spell-kind/spells-equipment.h"
20 #include "spell-kind/spells-teleport.h"
21 #include "spell/spells-status.h"
22 #include "status/bad-status-setter.h"
23 #include "status/base-status.h"
24 #include "status/element-resistance.h"
25 #include "status/experience.h"
26 #include "status/shape-changer.h"
27 #include "system/object-type-definition.h"
28 #include "view/display-messages.h"
29 #include "world/world.h"
30
31 // 毒を除く4元素.
32 void effect_player_elements(
33     player_type *target_ptr, effect_player_type *ep_ptr, concptr attack_message, HIT_POINT (*damage_func)(player_type *, HIT_POINT, concptr, int, bool))
34 {
35     if (target_ptr->blind)
36         msg_print(attack_message);
37
38     ep_ptr->get_damage = (*damage_func)(target_ptr, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell, FALSE);
39 }
40
41 void effect_player_poison(player_type *target_ptr, effect_player_type *ep_ptr)
42 {
43     bool double_resist = is_oppose_pois(target_ptr);
44     if (target_ptr->blind)
45         msg_print(_("毒で攻撃された!", "You are hit by poison!"));
46
47     if (target_ptr->resist_pois)
48         ep_ptr->dam = (ep_ptr->dam + 2) / 3;
49     if (double_resist)
50         ep_ptr->dam = (ep_ptr->dam + 2) / 3;
51
52     if ((!(double_resist || target_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !check_multishadow(target_ptr)) {
53         do_dec_stat(target_ptr, A_CON);
54     }
55
56     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
57
58     if (!(double_resist || target_ptr->resist_pois) && !check_multishadow(target_ptr))
59         set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
60 }
61
62 void effect_player_nuke(player_type *target_ptr, effect_player_type *ep_ptr)
63 {
64     bool double_resist = is_oppose_pois(target_ptr);
65     if (target_ptr->blind)
66         msg_print(_("放射能で攻撃された!", "You are hit by radiation!"));
67
68     if (target_ptr->resist_pois)
69         ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
70     if (double_resist)
71         ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
72
73     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
74     if ((double_resist || target_ptr->resist_pois) || check_multishadow(target_ptr))
75         return;
76
77     set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
78     if (one_in_(5)) /* 6 */
79     {
80         msg_print(_("奇形的な変身を遂げた!", "You undergo a freakish metamorphosis!"));
81         if (one_in_(4)) /* 4 */
82             do_poly_self(target_ptr);
83         else
84             status_shuffle(target_ptr);
85     }
86
87     if (one_in_(6))
88         inventory_damage(target_ptr, set_acid_destroy, 2);
89 }
90
91 void effect_player_missile(player_type *target_ptr, effect_player_type *ep_ptr)
92 {
93     if (target_ptr->blind)
94         msg_print(_("何かで攻撃された!", "You are hit by something!"));
95
96     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
97 }
98
99 void effect_player_holy_fire(player_type *target_ptr, effect_player_type *ep_ptr)
100 {
101     if (target_ptr->blind)
102         msg_print(_("何かで攻撃された!", "You are hit by something!"));
103
104     if (target_ptr->align > 10)
105         ep_ptr->dam /= 2;
106     else if (target_ptr->align < -10)
107         ep_ptr->dam *= 2;
108
109     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
110 }
111
112 void effect_player_hell_fire(player_type *target_ptr, effect_player_type *ep_ptr)
113 {
114     if (target_ptr->blind)
115         msg_print(_("何かで攻撃された!", "You are hit by something!"));
116
117     if (target_ptr->align > 10)
118         ep_ptr->dam *= 2;
119
120     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
121 }
122
123 void effect_player_arrow(player_type *target_ptr, effect_player_type *ep_ptr)
124 {
125     if (target_ptr->blind) {
126         msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
127         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
128         return;
129     }
130
131     if ((target_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (target_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU)) {
132         msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
133         return;
134     }
135
136     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
137 }
138
139 void effect_player_plasma(player_type *target_ptr, effect_player_type *ep_ptr)
140 {
141     if (target_ptr->blind)
142         msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
143
144     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
145
146     if (!target_ptr->resist_sound && !check_multishadow(target_ptr)) {
147         int plus_stun = (randint1((ep_ptr->dam > 40) ? 35 : (ep_ptr->dam * 3 / 4 + 5)));
148         (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
149     }
150
151     if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || is_immune_fire(target_ptr)))
152         inventory_damage(target_ptr, set_acid_destroy, 3);
153 }
154
155 void effect_player_nether(player_type *target_ptr, effect_player_type *ep_ptr)
156 {
157     if (target_ptr->blind)
158         msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
159
160     if (target_ptr->resist_neth) {
161         if (!is_specific_player_race(target_ptr, RACE_SPECTRE))
162             ep_ptr->dam *= 6;
163         ep_ptr->dam /= (randint1(4) + 7);
164     } else if (!check_multishadow(target_ptr))
165         drain_exp(target_ptr, 200 + (target_ptr->exp / 100), 200 + (target_ptr->exp / 1000), 75);
166
167     if (!is_specific_player_race(target_ptr, RACE_SPECTRE) || check_multishadow(target_ptr)) {
168         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
169         return;
170     }
171
172     msg_print(_("気分がよくなった。", "You feel invigorated!"));
173     hp_player(target_ptr, ep_ptr->dam / 4);
174     learn_spell(target_ptr, ep_ptr->monspell);
175 }
176
177 void effect_player_water(player_type *target_ptr, effect_player_type *ep_ptr)
178 {
179     if (target_ptr->blind)
180         msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
181     if (check_multishadow(target_ptr)) {
182         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
183         return;
184     }
185
186     if (!target_ptr->resist_sound && !target_ptr->resist_water) {
187         set_stun(target_ptr, target_ptr->stun + randint1(40));
188     }
189     if (!target_ptr->resist_conf && !target_ptr->resist_water) {
190         set_confused(target_ptr, target_ptr->confused + randint1(5) + 5);
191     }
192
193     if (one_in_(5) && !target_ptr->resist_water) {
194         inventory_damage(target_ptr, set_cold_destroy, 3);
195     }
196
197     if (target_ptr->resist_water)
198         ep_ptr->get_damage /= 4;
199
200     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
201 }
202
203 void effect_player_chaos(player_type *target_ptr, effect_player_type *ep_ptr)
204 {
205     if (target_ptr->blind)
206         msg_print(_("無秩序の波動で攻撃された!", "You are hit by a wave of anarchy!"));
207     if (target_ptr->resist_chaos) {
208         ep_ptr->dam *= 6;
209         ep_ptr->dam /= (randint1(4) + 7);
210     }
211
212     if (check_multishadow(target_ptr)) {
213         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
214         return;
215     }
216
217     if (!target_ptr->resist_conf) {
218         (void)set_confused(target_ptr, target_ptr->confused + randint0(20) + 10);
219     }
220     if (!target_ptr->resist_chaos) {
221         (void)set_image(target_ptr, target_ptr->image + randint1(10));
222         if (one_in_(3)) {
223             msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
224             (void)gain_mutation(target_ptr, 0);
225         }
226     }
227     if (!target_ptr->resist_neth && !target_ptr->resist_chaos) {
228         drain_exp(target_ptr, 5000 + (target_ptr->exp / 100), 500 + (target_ptr->exp / 1000), 75);
229     }
230
231     if (!target_ptr->resist_chaos || one_in_(9)) {
232         inventory_damage(target_ptr, set_elec_destroy, 2);
233         inventory_damage(target_ptr, set_fire_destroy, 2);
234     }
235
236     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
237 }
238
239 void effect_player_shards(player_type *target_ptr, effect_player_type *ep_ptr)
240 {
241     if (target_ptr->blind)
242         msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
243     if (target_ptr->resist_shard) {
244         ep_ptr->dam *= 6;
245         ep_ptr->dam /= (randint1(4) + 7);
246     } else if (!check_multishadow(target_ptr)) {
247         (void)set_cut(target_ptr, target_ptr->cut + ep_ptr->dam);
248     }
249
250     if (!target_ptr->resist_shard || one_in_(13))
251         inventory_damage(target_ptr, set_cold_destroy, 2);
252
253     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
254 }
255
256 void effect_player_sound(player_type *target_ptr, effect_player_type *ep_ptr)
257 {
258     if (target_ptr->blind)
259         msg_print(_("轟音で攻撃された!", "You are hit by a loud noise!"));
260     if (target_ptr->resist_sound) {
261         ep_ptr->dam *= 5;
262         ep_ptr->dam /= (randint1(4) + 7);
263     } else if (!check_multishadow(target_ptr)) {
264         int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
265         (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
266     }
267
268     if (!target_ptr->resist_sound || one_in_(13))
269         inventory_damage(target_ptr, set_cold_destroy, 2);
270
271     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
272 }
273
274 void effect_player_confusion(player_type *target_ptr, effect_player_type *ep_ptr)
275 {
276     if (target_ptr->blind)
277         msg_print(_("何か混乱するもので攻撃された!", "You are hit by something puzzling!"));
278     if (target_ptr->resist_conf) {
279         ep_ptr->dam *= 5;
280         ep_ptr->dam /= (randint1(4) + 7);
281     } else if (!check_multishadow(target_ptr)) {
282         (void)set_confused(target_ptr, target_ptr->confused + randint1(20) + 10);
283     }
284
285     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
286 }
287
288 void effect_player_disenchant(player_type *target_ptr, effect_player_type *ep_ptr)
289 {
290     if (target_ptr->blind)
291         msg_print(_("何かさえないもので攻撃された!", "You are hit by something static!"));
292     if (target_ptr->resist_disen) {
293         ep_ptr->dam *= 6;
294         ep_ptr->dam /= (randint1(4) + 7);
295     } else if (!check_multishadow(target_ptr)) {
296         (void)apply_disenchant(target_ptr, 0);
297     }
298
299     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
300 }
301
302 void effect_player_nexus(player_type *target_ptr, effect_player_type *ep_ptr)
303 {
304     if (target_ptr->blind)
305         msg_print(_("何か奇妙なもので攻撃された!", "You are hit by something strange!"));
306     if (target_ptr->resist_nexus) {
307         ep_ptr->dam *= 6;
308         ep_ptr->dam /= (randint1(4) + 7);
309     } else if (!check_multishadow(target_ptr)) {
310         apply_nexus(ep_ptr->m_ptr, target_ptr);
311     }
312
313     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
314 }
315
316 void effect_player_force(player_type *target_ptr, effect_player_type *ep_ptr)
317 {
318     if (target_ptr->blind)
319         msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
320     if (!target_ptr->resist_sound && !check_multishadow(target_ptr)) {
321         (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
322     }
323
324     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
325 }
326
327 void effect_player_rocket(player_type *target_ptr, effect_player_type *ep_ptr)
328 {
329     if (target_ptr->blind)
330         msg_print(_("爆発があった!", "There is an explosion!"));
331     if (!target_ptr->resist_sound && !check_multishadow(target_ptr)) {
332         (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
333     }
334
335     if (target_ptr->resist_shard) {
336         ep_ptr->dam /= 2;
337     } else if (!check_multishadow(target_ptr)) {
338         (void)set_cut(target_ptr, target_ptr->cut + (ep_ptr->dam / 2));
339     }
340
341     if (!target_ptr->resist_shard || one_in_(12)) {
342         inventory_damage(target_ptr, set_cold_destroy, 3);
343     }
344
345     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
346 }
347
348 void effect_player_inertial(player_type *target_ptr, effect_player_type *ep_ptr)
349 {
350     if (target_ptr->blind)
351         msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
352     if (!check_multishadow(target_ptr))
353         (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
354
355     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
356 }
357
358 void effect_player_lite(player_type *target_ptr, effect_player_type *ep_ptr)
359 {
360     if (target_ptr->blind)
361         msg_print(_("何かで攻撃された!", "You are hit by something!"));
362     if (target_ptr->resist_lite) {
363         ep_ptr->dam *= 4;
364         ep_ptr->dam /= (randint1(4) + 7);
365     } else if (!target_ptr->blind && !target_ptr->resist_blind && !check_multishadow(target_ptr)) {
366         (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
367     }
368
369     ep_ptr->dam = ep_ptr->dam * calc_vuln_fire_rate(target_ptr) / 100;
370
371     if (is_specific_player_race(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE)) {
372         if (!check_multishadow(target_ptr))
373             msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
374     }
375
376     if (target_ptr->wraith_form)
377         ep_ptr->dam *= 2;
378     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
379
380     if (!target_ptr->wraith_form || check_multishadow(target_ptr))
381         return;
382
383     target_ptr->wraith_form = 0;
384     msg_print(_("閃光のため非物質的な影の存在でいられなくなった。", "The light forces you out of your incorporeal shadow form."));
385
386     target_ptr->redraw |= (PR_MAP | PR_STATUS);
387     target_ptr->update |= (PU_MONSTERS);
388     target_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
389 }
390
391 void effect_player_dark(player_type *target_ptr, effect_player_type *ep_ptr)
392 {
393     if (target_ptr->blind)
394         msg_print(_("何かで攻撃された!", "You are hit by something!"));
395     if (target_ptr->resist_dark) {
396         ep_ptr->dam *= 4;
397         ep_ptr->dam /= (randint1(4) + 7);
398
399         if (is_specific_player_race(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE) || target_ptr->wraith_form)
400             ep_ptr->dam = 0;
401     } else if (!target_ptr->blind && !target_ptr->resist_blind && !check_multishadow(target_ptr)) {
402         (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
403     }
404
405     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
406 }
407
408 static void effect_player_time_one_disability(player_type *target_ptr)
409 {
410     int k = 0;
411     concptr act = NULL;
412     switch (randint1(6)) {
413     case 1:
414         k = A_STR;
415         act = _("強く", "strong");
416         break;
417     case 2:
418         k = A_INT;
419         act = _("聡明で", "bright");
420         break;
421     case 3:
422         k = A_WIS;
423         act = _("賢明で", "wise");
424         break;
425     case 4:
426         k = A_DEX;
427         act = _("器用で", "agile");
428         break;
429     case 5:
430         k = A_CON;
431         act = _("健康で", "hale");
432         break;
433     case 6:
434         k = A_CHR;
435         act = _("美しく", "beautiful");
436         break;
437     }
438
439     msg_format(_("あなたは以前ほど%sなくなってしまった...。", "You're not as %s as you used to be..."), act);
440     target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 3) / 4;
441     if (target_ptr->stat_cur[k] < 3)
442         target_ptr->stat_cur[k] = 3;
443
444     target_ptr->update |= (PU_BONUS);
445 }
446
447 static void effect_player_time_all_disabilities(player_type *target_ptr)
448 {
449     msg_print(_("あなたは以前ほど力強くなくなってしまった...。", "You're not as powerful as you used to be..."));
450     for (int k = 0; k < A_MAX; k++) {
451         target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 7) / 8;
452         if (target_ptr->stat_cur[k] < 3)
453             target_ptr->stat_cur[k] = 3;
454     }
455
456     target_ptr->update |= (PU_BONUS);
457 }
458
459 static void effect_player_time_addition(player_type *target_ptr)
460 {
461     switch (randint1(10)) {
462     case 1:
463     case 2:
464     case 3:
465     case 4:
466     case 5: {
467         if (target_ptr->prace == RACE_ANDROID)
468             break;
469
470         msg_print(_("人生が逆戻りした気がする。", "You feel like a chunk of the past has been ripped away."));
471         lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
472         break;
473     }
474     case 6:
475     case 7:
476     case 8:
477     case 9:
478         effect_player_time_one_disability(target_ptr);
479         break;
480     case 10:
481         effect_player_time_all_disabilities(target_ptr);
482         break;
483     }
484 }
485
486 void effect_player_time(player_type *target_ptr, effect_player_type *ep_ptr)
487 {
488     if (target_ptr->blind)
489         msg_print(_("過去からの衝撃に攻撃された!", "You are hit by a blast from the past!"));
490
491     if (target_ptr->resist_time) {
492         ep_ptr->dam *= 4;
493         ep_ptr->dam /= (randint1(4) + 7);
494         msg_print(_("時間が通り過ぎていく気がする。", "You feel as if time is passing you by."));
495         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
496         return;
497     }
498
499     if (check_multishadow(target_ptr)) {
500         ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
501         return;
502     }
503
504     effect_player_time_addition(target_ptr);
505     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
506 }
507
508 void effect_player_gravity(player_type *target_ptr, effect_player_type *ep_ptr)
509 {
510     if (target_ptr->blind)
511         msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
512     msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
513
514     if (!check_multishadow(target_ptr)) {
515         teleport_player(target_ptr, 5, TELEPORT_PASSIVE);
516         if (!target_ptr->levitation)
517             (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
518         if (!(target_ptr->resist_sound || target_ptr->levitation)) {
519             int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
520             (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
521         }
522     }
523
524     if (target_ptr->levitation) {
525         ep_ptr->dam = (ep_ptr->dam * 2) / 3;
526     }
527
528     if (!target_ptr->levitation || one_in_(13)) {
529         inventory_damage(target_ptr, set_cold_destroy, 2);
530     }
531
532     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
533 }
534
535 void effect_player_disintegration(player_type *target_ptr, effect_player_type *ep_ptr)
536 {
537     if (target_ptr->blind)
538         msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
539
540     ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
541 }