2 #include "effect-player-util.h"
3 #include "effect/effect-player-switcher.h"
4 #include "spell/spells-type.h"
5 #include "player-damage.h"
7 #include "object-broken.h"
8 #include "player-effects.h"
9 #include "spells-status.h"
11 #include "player/mimic-info-table.h"
12 #include "monster-spell.h"
14 #include "object-curse.h"
16 //
\93Å
\82ð
\8f\9c\824
\8c³
\91f.
17 void effect_player_elements(player_type *target_ptr, effect_player_type *ep_ptr, concptr attack_message,
18 HIT_POINT(*damage_func)(player_type*, HIT_POINT, concptr, int, bool))
20 if (target_ptr->blind) msg_print(attack_message);
22 ep_ptr->get_damage = (*damage_func)(target_ptr, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell, FALSE);
26 void effect_player_poison(player_type *target_ptr, effect_player_type *ep_ptr)
28 bool double_resist = is_oppose_pois(target_ptr);
29 if (target_ptr->blind) msg_print(_("
\93Å
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by poison!"));
31 if (target_ptr->resist_pois) ep_ptr->dam = (ep_ptr->dam + 2) / 3;
32 if (double_resist) ep_ptr->dam = (ep_ptr->dam + 2) / 3;
34 if ((!(double_resist || target_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(target_ptr))
36 do_dec_stat(target_ptr, A_CON);
39 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
41 if (!(double_resist || target_ptr->resist_pois) && !CHECK_MULTISHADOW(target_ptr))
42 set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
46 void effect_player_nuke(player_type *target_ptr, effect_player_type *ep_ptr)
48 bool double_resist = is_oppose_pois(target_ptr);
49 if (target_ptr->blind) msg_print(_("
\95ú
\8eË
\94\
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by radiation!"));
51 if (target_ptr->resist_pois) ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
52 if (double_resist) ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
54 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
55 if ((double_resist || target_ptr->resist_pois) || CHECK_MULTISHADOW(target_ptr))
58 set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
59 if (one_in_(5)) /* 6 */
61 msg_print(_("
\8aï
\8c`
\93I
\82È
\95Ï
\90g
\82ð
\90\8b\82°
\82½
\81I", "You undergo a freakish metamorphosis!"));
62 if (one_in_(4)) /* 4 */
63 do_poly_self(target_ptr);
65 status_shuffle(target_ptr);
69 inventory_damage(target_ptr, set_acid_destroy, 2);
73 void effect_player_missile(player_type *target_ptr, effect_player_type *ep_ptr)
75 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
77 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
81 void effect_player_holy_file(player_type *target_ptr, effect_player_type *ep_ptr)
83 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
85 if (target_ptr->align > 10)
87 else if (target_ptr->align < -10)
90 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
94 void effect_player_hell_fire(player_type *target_ptr, effect_player_type *ep_ptr)
96 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
98 if (target_ptr->align > 10)
101 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
105 void effect_player_arrow(player_type *target_ptr, effect_player_type *ep_ptr)
107 if (target_ptr->blind)
109 msg_print(_("
\89½
\82©
\89s
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something sharp!"));
110 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
114 if ((target_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (target_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU))
116 msg_print(_("
\96î
\82ð
\8ea
\82è
\8eÌ
\82Ä
\82½
\81I", "You cut down the arrow!"));
120 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
124 void effect_player_plasma(player_type *target_ptr, effect_player_type *ep_ptr)
126 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Æ
\82Ä
\82à
\94M
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something *HOT*!"));
128 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
130 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
132 int plus_stun = (randint1((ep_ptr->dam > 40) ? 35 : (ep_ptr->dam * 3 / 4 + 5)));
133 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
136 if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || target_ptr->immune_fire))
137 inventory_damage(target_ptr, set_acid_destroy, 3);
141 void effect_player_nether(player_type *target_ptr, effect_player_type *ep_ptr)
143 if (target_ptr->blind) msg_print(_("
\92n
\8d\96\82Ì
\97Í
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by nether forces!"));
145 if (target_ptr->resist_neth)
147 if (!PRACE_IS_(target_ptr, RACE_SPECTRE))
148 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
150 else if (!CHECK_MULTISHADOW(target_ptr)) drain_exp(target_ptr, 200 + (target_ptr->exp / 100), 200 + (target_ptr->exp / 1000), 75);
152 if (!PRACE_IS_(target_ptr, RACE_SPECTRE) || CHECK_MULTISHADOW(target_ptr))
154 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
158 msg_print(_("
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81B", "You feel invigorated!"));
159 hp_player(target_ptr, ep_ptr->dam / 4);
160 learn_spell(target_ptr, ep_ptr->monspell);
165 * @brief
\96\82\96@
\82Ì
\8cø
\89Ê
\82É
\82æ
\82Á
\82Ä
\97l
\81X
\82È
\83\81\83b
\83Z
\81[
\82ð
\8fo
\97Í
\82µ
\82½
\82è
\97^
\82¦
\82é
\83_
\83\81\81[
\83W
\82Ì
\91\9d\8c¸
\82ð
\8ds
\82Á
\82½
\82è
\82·
\82é
166 * @param target_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
167 * @param em_ptr
\83v
\83\8c\81[
\83\84\81[
\8cø
\89Ê
\8d\
\91¢
\91Ì
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
170 void switch_effects_player(player_type *target_ptr, effect_player_type *ep_ptr)
172 switch (ep_ptr->effect_type)
175 effect_player_elements(target_ptr, ep_ptr, _("
\8e_
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by acid!"), acid_dam);
178 effect_player_elements(target_ptr, ep_ptr, _("
\89Î
\89\8a\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by fire!"), fire_dam);
181 effect_player_elements(target_ptr, ep_ptr, _("
\97â
\8bC
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by cold!"), cold_dam);
184 effect_player_elements(target_ptr, ep_ptr, _("
\93d
\8c\82\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by lightning!"), elec_dam);
187 effect_player_poison(target_ptr, ep_ptr);
190 effect_player_nuke(target_ptr, ep_ptr);
193 effect_player_missile(target_ptr, ep_ptr);
196 effect_player_holy_file(target_ptr, ep_ptr);
199 effect_plyaer_hell_fire(target_ptr, ep_ptr);
201 effect_player_arrow(target_ptr, ep_ptr);
203 effect_player_plasma(target_ptr, ep_ptr);
205 effect_player_nether(target_ptr, ep_ptr);
208 if (target_ptr->blind) msg_print(_("
\89½
\82©
\8e¼
\82Á
\82½
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something wet!"));
209 if (CHECK_MULTISHADOW(target_ptr))
211 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
215 if (!target_ptr->resist_sound && !target_ptr->resist_water)
217 set_stun(target_ptr, target_ptr->stun + randint1(40));
219 if (!target_ptr->resist_conf && !target_ptr->resist_water)
221 set_confused(target_ptr, target_ptr->confused + randint1(5) + 5);
224 if (one_in_(5) && !target_ptr->resist_water)
226 inventory_damage(target_ptr, set_cold_destroy, 3);
229 if (target_ptr->resist_water) ep_ptr->get_damage /= 4;
231 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
236 if (target_ptr->blind) msg_print(_("
\96³
\92\81\8f\98\82Ì
\94g
\93®
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by a wave of anarchy!"));
237 if (target_ptr->resist_chaos)
239 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
242 if (CHECK_MULTISHADOW(target_ptr))
244 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
248 if (!target_ptr->resist_conf)
250 (void)set_confused(target_ptr, target_ptr->confused + randint0(20) + 10);
252 if (!target_ptr->resist_chaos)
254 (void)set_image(target_ptr, target_ptr->image + randint1(10));
257 msg_print(_("
\82 \82È
\82½
\82Ì
\90g
\91Ì
\82Í
\83J
\83I
\83X
\82Ì
\97Í
\82Å
\94P
\82¶
\8bÈ
\82°
\82ç
\82ê
\82½
\81I", "Your body is twisted by chaos!"));
258 (void)gain_mutation(target_ptr, 0);
261 if (!target_ptr->resist_neth && !target_ptr->resist_chaos)
263 drain_exp(target_ptr, 5000 + (target_ptr->exp / 100), 500 + (target_ptr->exp / 1000), 75);
266 if (!target_ptr->resist_chaos || one_in_(9))
268 inventory_damage(target_ptr, set_elec_destroy, 2);
269 inventory_damage(target_ptr, set_fire_destroy, 2);
272 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
277 if (target_ptr->blind) msg_print(_("
\89½
\82©
\89s
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something sharp!"));
278 if (target_ptr->resist_shard)
280 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
282 else if (!CHECK_MULTISHADOW(target_ptr))
284 (void)set_cut(target_ptr, target_ptr->cut + ep_ptr->dam);
287 if (!target_ptr->resist_shard || one_in_(13))
289 inventory_damage(target_ptr, set_cold_destroy, 2);
292 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
297 if (target_ptr->blind) msg_print(_("
\8d\8c\89¹
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by a loud noise!"));
298 if (target_ptr->resist_sound)
300 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
302 else if (!CHECK_MULTISHADOW(target_ptr))
304 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
305 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
308 if (!target_ptr->resist_sound || one_in_(13))
310 inventory_damage(target_ptr, set_cold_destroy, 2);
313 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
318 if (target_ptr->blind) msg_print(_("
\89½
\82©
\8d¬
\97\90\82·
\82é
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something puzzling!"));
319 if (target_ptr->resist_conf)
321 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
323 else if (!CHECK_MULTISHADOW(target_ptr))
325 (void)set_confused(target_ptr, target_ptr->confused + randint1(20) + 10);
327 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
332 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82³
\82¦
\82È
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something static!"));
333 if (target_ptr->resist_disen)
335 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
337 else if (!CHECK_MULTISHADOW(target_ptr))
339 (void)apply_disenchant(target_ptr, 0);
341 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
346 if (target_ptr->blind) msg_print(_("
\89½
\82©
\8aï
\96
\82È
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something strange!"));
347 if (target_ptr->resist_nexus)
349 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
351 else if (!CHECK_MULTISHADOW(target_ptr))
353 apply_nexus(ep_ptr->m_ptr, target_ptr);
356 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
361 if (target_ptr->blind) msg_print(_("
\89^
\93®
\83G
\83l
\83\8b\83M
\81[
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by kinetic force!"));
362 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
364 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
367 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
372 if (target_ptr->blind) msg_print(_("
\94\9a\94
\82ª
\82 \82Á
\82½
\81I", "There is an explosion!"));
373 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
375 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
378 if (target_ptr->resist_shard)
382 else if (!CHECK_MULTISHADOW(target_ptr))
384 (void)set_cut(target_ptr, target_ptr->cut + (ep_ptr->dam / 2));
387 if (!target_ptr->resist_shard || one_in_(12))
389 inventory_damage(target_ptr, set_cold_destroy, 3);
392 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
397 if (target_ptr->blind) msg_print(_("
\89½
\82©
\92x
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something slow!"));
398 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
400 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
405 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
406 if (target_ptr->resist_lite)
408 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
410 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
412 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
415 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE))
417 if (!CHECK_MULTISHADOW(target_ptr)) msg_print(_("
\8cõ
\82Å
\93÷
\91Ì
\82ª
\8fÅ
\82ª
\82³
\82ê
\82½
\81I", "The light scorches your flesh!"));
420 else if (PRACE_IS_(target_ptr, RACE_S_FAIRY))
422 ep_ptr->dam = ep_ptr->dam * 4 / 3;
425 if (target_ptr->wraith_form) ep_ptr->dam *= 2;
426 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
428 if (!target_ptr->wraith_form || CHECK_MULTISHADOW(target_ptr))
431 target_ptr->wraith_form = 0;
432 msg_print(_("
\91M
\8cõ
\82Ì
\82½
\82ß
\94ñ
\95¨
\8e¿
\93I
\82È
\89e
\82Ì
\91¶
\8dÝ
\82Å
\82¢
\82ç
\82ê
\82È
\82
\82È
\82Á
\82½
\81B",
433 "The light forces you out of your incorporeal shadow form."));
435 target_ptr->redraw |= (PR_MAP | PR_STATUS);
436 target_ptr->update |= (PU_MONSTERS);
437 target_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
442 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
443 if (target_ptr->resist_dark)
445 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
447 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE) || target_ptr->wraith_form) ep_ptr->dam = 0;
449 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
451 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
454 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
459 if (target_ptr->blind) msg_print(_("
\89ß
\8b\8e\82©
\82ç
\82Ì
\8fÕ
\8c\82\82É
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by a blast from the past!"));
461 if (target_ptr->resist_time)
464 ep_ptr->dam /= (randint1(4) + 7);
465 msg_print(_("
\8e\9e\8aÔ
\82ª
\92Ê
\82è
\89ß
\82¬
\82Ä
\82¢
\82
\8bC
\82ª
\82·
\82é
\81B", "You feel as if time is passing you by."));
466 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
470 if (CHECK_MULTISHADOW(target_ptr))
472 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
476 switch (randint1(10))
484 if (target_ptr->prace == RACE_ANDROID) break;
486 msg_print(_("
\90l
\90¶
\82ª
\8bt
\96ß
\82è
\82µ
\82½
\8bC
\82ª
\82·
\82é
\81B", "You feel like a chunk of the past has been ripped away."));
487 lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
499 case 1: k = A_STR; act = _("
\8b
\82", "strong"); break;
500 case 2: k = A_INT; act = _("
\91\8f\96¾
\82Å", "bright"); break;
501 case 3: k = A_WIS; act = _("
\8c«
\96¾
\82Å", "wise"); break;
502 case 4: k = A_DEX; act = _("
\8aí
\97p
\82Å", "agile"); break;
503 case 5: k = A_CON; act = _("
\8c\92\8dN
\82Å", "hale"); break;
504 case 6: k = A_CHR; act = _("
\94ü
\82µ
\82", "beautiful"); break;
507 msg_format(_("
\82 \82È
\82½
\82Í
\88È
\91O
\82Ù
\82Ç%s
\82È
\82
\82È
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½...
\81B", "You're not as %s as you used to be..."), act);
508 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 3) / 4;
509 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
511 target_ptr->update |= (PU_BONUS);
516 msg_print(_("
\82 \82È
\82½
\82Í
\88È
\91O
\82Ù
\82Ç
\97Í
\8b
\82
\82È
\82
\82È
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½...
\81B", "You're not as powerful as you used to be..."));
517 for (int k = 0; k < A_MAX; k++)
519 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 7) / 8;
520 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
523 target_ptr->update |= (PU_BONUS);
528 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
533 if (target_ptr->blind) msg_print(_("
\89½
\82©
\8fd
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something heavy!"));
534 msg_print(_("
\8eü
\95Ó
\82Ì
\8fd
\97Í
\82ª
\82ä
\82ª
\82ñ
\82¾
\81B", "Gravity warps around you."));
536 if (!CHECK_MULTISHADOW(target_ptr))
538 teleport_player(target_ptr, 5, TELEPORT_PASSIVE);
539 if (!target_ptr->levitation)
540 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
541 if (!(target_ptr->resist_sound || target_ptr->levitation))
543 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
544 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
548 if (target_ptr->levitation)
550 ep_ptr->dam = (ep_ptr->dam * 2) / 3;
553 if (!target_ptr->levitation || one_in_(13))
555 inventory_damage(target_ptr, set_cold_destroy, 2);
558 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
561 case GF_DISINTEGRATE:
563 if (target_ptr->blind) msg_print(_("
\8f\83\90\88\82È
\83G
\83l
\83\8b\83M
\81[
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by pure energy!"));
565 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
570 if (target_ptr->blind) msg_print(_("
\89½
\82ç
\82©
\82Ì
\8dU
\8c\82\82É
\82æ
\82Á
\82Ä
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81B", "You are hit by something invigorating!"));
572 (void)hp_player(target_ptr, ep_ptr->dam);
578 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
579 (void)set_fast(target_ptr, target_ptr->fast + randint1(5), FALSE);
585 if (target_ptr->blind) msg_print(_("
\89½
\82©
\92x
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something slow!"));
586 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
591 if (target_ptr->free_act) break;
592 if (target_ptr->blind) msg_print(_("
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I", "You fall asleep!"));
594 if (ironman_nightmare)
596 msg_print(_("
\8b°
\82ë
\82µ
\82¢
\8cõ
\8ci
\82ª
\93ª
\82É
\95\82\82©
\82ñ
\82Å
\82«
\82½
\81B", "A horrible vision enters your mind."));
597 /* Have some nightmares */
598 sanity_blast(target_ptr, NULL, FALSE);
601 set_paralyzed(target_ptr, target_ptr->paralyzed + ep_ptr->dam);
609 if (target_ptr->blind) msg_print(_("
\96\82\96@
\82Ì
\83I
\81[
\83\89\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by an aura of magic!"));
611 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
616 if (target_ptr->blind) msg_print(_("
\83G
\83l
\83\8b\83M
\81[
\82Ì
\89ò
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by an energy!"));
618 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_FORCE, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
623 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82ª
\8bó
\82©
\82ç
\82 \82È
\82½
\82Ì
\93ª
\8fã
\82É
\97\8e\82¿
\82Ä
\82«
\82½
\81I", "Something falls from the sky on you!"));
625 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
626 if (!target_ptr->resist_shard || one_in_(13))
628 if (!target_ptr->immune_fire) inventory_damage(target_ptr, set_fire_destroy, 2);
629 inventory_damage(target_ptr, set_cold_destroy, 2);
636 if (target_ptr->blind) msg_print(_("
\89½
\82©
\89s
\82
\97â
\82½
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something sharp and cold!"));
638 ep_ptr->get_damage = cold_dam(target_ptr, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell, FALSE);
639 if (CHECK_MULTISHADOW(target_ptr)) break;
641 if (!target_ptr->resist_shard)
643 (void)set_cut(target_ptr, target_ptr->cut + damroll(5, 8));
646 if (!target_ptr->resist_sound)
648 (void)set_stun(target_ptr, target_ptr->stun + randint1(15));
651 if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12))
653 if (!target_ptr->immune_cold) inventory_damage(target_ptr, set_cold_destroy, 3);
660 if (target_ptr->blind) msg_print(_("
\89½
\82©
\94ñ
\8fí
\82É
\97â
\82½
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something extremely cold!"));
662 if (target_ptr->mimic_form)
664 if (!(mimic_info[target_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
665 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
670 switch (target_ptr->prace)
684 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
693 if (CHECK_MULTISHADOW(target_ptr))
695 msg_print(_("
\8dU
\8c\82\82Í
\8c¶
\89e
\82É
\96½
\92\86\82µ
\81A
\82 \82È
\82½
\82É
\82Í
\93Í
\82©
\82È
\82©
\82Á
\82½
\81B", "The attack hits Shadow, but you are unharmed!"));
700 if (target_ptr->csp == 0)
707 msg_format(_("%^s
\82É
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\82ð
\8bz
\82¢
\8eæ
\82ç
\82ê
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I", "%^s draws psychic energy from you!"), ep_ptr->m_name);
709 msg_print(_("
\90¸
\90_
\83G
\83l
\83\8b\83M
\81[
\82ð
\8bz
\82¢
\8eæ
\82ç
\82ê
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I", "Your psychic energy is drawn!"));
711 if (ep_ptr->dam >= target_ptr->csp)
713 ep_ptr->dam = target_ptr->csp;
715 target_ptr->csp_frac = 0;
719 target_ptr->csp -= ep_ptr->dam;
722 learn_spell(target_ptr, ep_ptr->monspell);
723 target_ptr->redraw |= (PR_MANA);
724 target_ptr->window |= (PW_PLAYER | PW_SPELL);
726 if ((ep_ptr->who <= 0) || (ep_ptr->m_ptr->hp >= ep_ptr->m_ptr->maxhp))
732 ep_ptr->m_ptr->hp += ep_ptr->dam;
733 if (ep_ptr->m_ptr->hp > ep_ptr->m_ptr->maxhp) ep_ptr->m_ptr->hp = ep_ptr->m_ptr->maxhp;
735 if (target_ptr->health_who == ep_ptr->who) target_ptr->redraw |= (PR_HEALTH);
736 if (target_ptr->riding == ep_ptr->who) target_ptr->redraw |= (PR_UHEALTH);
738 if (ep_ptr->m_ptr->ml)
740 msg_format(_("%^s
\82Í
\8bC
\95ª
\82ª
\97Ç
\82³
\82»
\82¤
\82¾
\81B", "%^s appears healthier."), ep_ptr->m_name);
748 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
750 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
751 learn_spell(target_ptr, ep_ptr->monspell);
755 if (CHECK_MULTISHADOW(target_ptr))
757 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
761 msg_print(_("
\97ì
\93I
\83G
\83l
\83\8b\83M
\81[
\82Å
\90¸
\90_
\82ª
\8dU
\8c\82\82³
\82ê
\82½
\81B", "Your mind is blasted by psionic energy."));
762 if (!target_ptr->resist_conf)
764 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
767 if (!target_ptr->resist_chaos && one_in_(3))
769 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
772 target_ptr->csp -= 50;
773 if (target_ptr->csp < 0)
776 target_ptr->csp_frac = 0;
779 target_ptr->redraw |= PR_MANA;
780 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
785 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
787 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
788 learn_spell(target_ptr, ep_ptr->monspell);
792 if (!CHECK_MULTISHADOW(target_ptr))
794 msg_print(_("
\97ì
\93I
\83G
\83l
\83\8b\83M
\81[
\82Å
\90¸
\90_
\82ª
\8dU
\8c\82\82³
\82ê
\82½
\81B", "Your mind is blasted by psionic energy."));
796 target_ptr->csp -= 100;
797 if (target_ptr->csp < 0)
800 target_ptr->csp_frac = 0;
802 target_ptr->redraw |= PR_MANA;
805 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
806 if (CHECK_MULTISHADOW(target_ptr)) break;
808 if (!target_ptr->resist_blind)
810 (void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
813 if (!target_ptr->resist_conf)
815 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
818 if (!target_ptr->free_act)
820 (void)set_paralyzed(target_ptr, target_ptr->paralyzed + randint0(4) + 4);
823 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
825 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
826 (void)do_dec_stat(target_ptr, A_INT);
827 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
828 (void)do_dec_stat(target_ptr, A_WIS);
830 if (!target_ptr->resist_chaos)
832 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
839 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
841 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
842 learn_spell(target_ptr, ep_ptr->monspell);
846 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 15, 0);
847 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
853 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
855 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
856 learn_spell(target_ptr, ep_ptr->monspell);
860 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 25, MIN(ep_ptr->rlev / 2 - 15, 5));
861 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
867 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
869 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
870 learn_spell(target_ptr, ep_ptr->monspell);
874 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 33, MIN(ep_ptr->rlev / 2 - 15, 15));
875 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
881 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !(ep_ptr->m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(target_ptr))
883 msg_print(_("
\82µ
\82©
\82µ
\94é
\8dE
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
884 learn_spell(target_ptr, ep_ptr->monspell);
888 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
889 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_cut(target_ptr, target_ptr->cut + damroll(10, 10));
896 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
898 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
899 learn_spell(target_ptr, ep_ptr->monspell);
903 if (!CHECK_MULTISHADOW(target_ptr))
905 msg_print(_("
\82 \82È
\82½
\82Í
\96½
\82ª
\94\96\82Ü
\82Á
\82Ä
\82¢
\82
\82æ
\82¤
\82É
\8a´
\82¶
\82½
\81I", "You feel your life fade away!"));
906 curse_equipment(target_ptr, 40, 20);
909 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->m_name, ep_ptr->monspell);
911 if (target_ptr->chp < 1) target_ptr->chp = 1;