OSDN Git Service

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