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);
27 * @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é
28 * @param target_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
29 * @param em_ptr
\83v
\83\8c\81[
\83\84\81[
\8cø
\89Ê
\8d\
\91¢
\91Ì
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
32 void switch_effects_player(player_type *target_ptr, effect_player_type *ep_ptr)
34 switch (ep_ptr->effect_type)
37 effect_player_elements(target_ptr, ep_ptr, _("
\8e_
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by acid!"), acid_dam);
40 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);
43 effect_player_elements(target_ptr, ep_ptr, _("
\97â
\8bC
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by cold!"), cold_dam);
46 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);
50 bool double_resist = is_oppose_pois(target_ptr);
51 if (target_ptr->blind) msg_print(_("
\93Å
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by poison!"));
53 if (target_ptr->resist_pois) ep_ptr->dam = (ep_ptr->dam + 2) / 3;
54 if (double_resist) ep_ptr->dam = (ep_ptr->dam + 2) / 3;
56 if ((!(double_resist || target_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(target_ptr))
58 do_dec_stat(target_ptr, A_CON);
61 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
63 if (!(double_resist || target_ptr->resist_pois) && !CHECK_MULTISHADOW(target_ptr))
64 set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
70 bool double_resist = is_oppose_pois(target_ptr);
71 if (target_ptr->blind) msg_print(_("
\95ú
\8eË
\94\
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by radiation!"));
73 if (target_ptr->resist_pois) ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
74 if (double_resist) ep_ptr->dam = (2 * ep_ptr->dam + 2) / 5;
75 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
76 if ((double_resist || target_ptr->resist_pois) || CHECK_MULTISHADOW(target_ptr))
79 set_poisoned(target_ptr, target_ptr->poisoned + randint0(ep_ptr->dam) + 10);
81 if (one_in_(5)) /* 6 */
83 msg_print(_("
\8aï
\8c`
\93I
\82È
\95Ï
\90g
\82ð
\90\8b\82°
\82½
\81I", "You undergo a freakish metamorphosis!"));
84 if (one_in_(4)) /* 4 */
85 do_poly_self(target_ptr);
87 status_shuffle(target_ptr);
92 inventory_damage(target_ptr, set_acid_destroy, 2);
99 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
100 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
105 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
106 if (target_ptr->align > 10)
108 else if (target_ptr->align < -10)
110 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
115 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
116 if (target_ptr->align > 10)
118 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
123 if (target_ptr->blind)
125 msg_print(_("
\89½
\82©
\89s
\82¢
\82à
\82Ì
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something sharp!"));
127 else if ((target_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (target_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU))
129 msg_print(_("
\96î
\82ð
\8ea
\82è
\8eÌ
\82Ä
\82½
\81I", "You cut down the arrow!"));
133 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
138 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*!"));
139 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
141 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
143 int plus_stun = (randint1((ep_ptr->dam > 40) ? 35 : (ep_ptr->dam * 3 / 4 + 5)));
144 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
147 if (!(target_ptr->resist_fire || is_oppose_fire(target_ptr) || target_ptr->immune_fire))
149 inventory_damage(target_ptr, set_acid_destroy, 3);
156 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!"));
157 if (target_ptr->resist_neth)
159 if (!PRACE_IS_(target_ptr, RACE_SPECTRE))
161 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
164 else if (!CHECK_MULTISHADOW(target_ptr)) drain_exp(target_ptr, 200 + (target_ptr->exp / 100), 200 + (target_ptr->exp / 1000), 75);
166 if (PRACE_IS_(target_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW(target_ptr))
168 msg_print(_("
\8bC
\95ª
\82ª
\82æ
\82
\82È
\82Á
\82½
\81B", "You feel invigorated!"));
169 hp_player(target_ptr, ep_ptr->dam / 4);
170 learn_spell(target_ptr, ep_ptr->monspell);
174 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
181 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!"));
182 if (CHECK_MULTISHADOW(target_ptr))
184 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
188 if (!target_ptr->resist_sound && !target_ptr->resist_water)
190 set_stun(target_ptr, target_ptr->stun + randint1(40));
192 if (!target_ptr->resist_conf && !target_ptr->resist_water)
194 set_confused(target_ptr, target_ptr->confused + randint1(5) + 5);
197 if (one_in_(5) && !target_ptr->resist_water)
199 inventory_damage(target_ptr, set_cold_destroy, 3);
202 if (target_ptr->resist_water) ep_ptr->get_damage /= 4;
204 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
209 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!"));
210 if (target_ptr->resist_chaos)
212 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
215 if (CHECK_MULTISHADOW(target_ptr))
217 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
221 if (!target_ptr->resist_conf)
223 (void)set_confused(target_ptr, target_ptr->confused + randint0(20) + 10);
225 if (!target_ptr->resist_chaos)
227 (void)set_image(target_ptr, target_ptr->image + randint1(10));
230 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!"));
231 (void)gain_mutation(target_ptr, 0);
234 if (!target_ptr->resist_neth && !target_ptr->resist_chaos)
236 drain_exp(target_ptr, 5000 + (target_ptr->exp / 100), 500 + (target_ptr->exp / 1000), 75);
239 if (!target_ptr->resist_chaos || one_in_(9))
241 inventory_damage(target_ptr, set_elec_destroy, 2);
242 inventory_damage(target_ptr, set_fire_destroy, 2);
245 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
250 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!"));
251 if (target_ptr->resist_shard)
253 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
255 else if (!CHECK_MULTISHADOW(target_ptr))
257 (void)set_cut(target_ptr, target_ptr->cut + ep_ptr->dam);
260 if (!target_ptr->resist_shard || one_in_(13))
262 inventory_damage(target_ptr, set_cold_destroy, 2);
265 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
270 if (target_ptr->blind) msg_print(_("
\8d\8c\89¹
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by a loud noise!"));
271 if (target_ptr->resist_sound)
273 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
275 else if (!CHECK_MULTISHADOW(target_ptr))
277 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
278 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
281 if (!target_ptr->resist_sound || one_in_(13))
283 inventory_damage(target_ptr, set_cold_destroy, 2);
286 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
291 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!"));
292 if (target_ptr->resist_conf)
294 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
296 else if (!CHECK_MULTISHADOW(target_ptr))
298 (void)set_confused(target_ptr, target_ptr->confused + randint1(20) + 10);
300 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
305 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!"));
306 if (target_ptr->resist_disen)
308 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
310 else if (!CHECK_MULTISHADOW(target_ptr))
312 (void)apply_disenchant(target_ptr, 0);
314 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
319 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!"));
320 if (target_ptr->resist_nexus)
322 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
324 else if (!CHECK_MULTISHADOW(target_ptr))
326 apply_nexus(ep_ptr->m_ptr, target_ptr);
329 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
334 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!"));
335 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
337 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
340 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
345 if (target_ptr->blind) msg_print(_("
\94\9a\94
\82ª
\82 \82Á
\82½
\81I", "There is an explosion!"));
346 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
348 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
351 if (target_ptr->resist_shard)
355 else if (!CHECK_MULTISHADOW(target_ptr))
357 (void)set_cut(target_ptr, target_ptr->cut + (ep_ptr->dam / 2));
360 if (!target_ptr->resist_shard || one_in_(12))
362 inventory_damage(target_ptr, set_cold_destroy, 3);
365 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
370 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!"));
371 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
373 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
378 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
379 if (target_ptr->resist_lite)
381 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
383 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
385 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
388 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE))
390 if (!CHECK_MULTISHADOW(target_ptr)) msg_print(_("
\8cõ
\82Å
\93÷
\91Ì
\82ª
\8fÅ
\82ª
\82³
\82ê
\82½
\81I", "The light scorches your flesh!"));
393 else if (PRACE_IS_(target_ptr, RACE_S_FAIRY))
395 ep_ptr->dam = ep_ptr->dam * 4 / 3;
398 if (target_ptr->wraith_form) ep_ptr->dam *= 2;
399 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
401 if (!target_ptr->wraith_form || CHECK_MULTISHADOW(target_ptr))
404 target_ptr->wraith_form = 0;
405 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",
406 "The light forces you out of your incorporeal shadow form."));
408 target_ptr->redraw |= (PR_MAP | PR_STATUS);
409 target_ptr->update |= (PU_MONSTERS);
410 target_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
415 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
416 if (target_ptr->resist_dark)
418 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
420 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE) || target_ptr->wraith_form) ep_ptr->dam = 0;
422 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
424 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
427 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
432 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!"));
434 if (target_ptr->resist_time)
437 ep_ptr->dam /= (randint1(4) + 7);
438 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."));
439 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
443 if (CHECK_MULTISHADOW(target_ptr))
445 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
449 switch (randint1(10))
457 if (target_ptr->prace == RACE_ANDROID) break;
459 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."));
460 lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
472 case 1: k = A_STR; act = _("
\8b
\82", "strong"); break;
473 case 2: k = A_INT; act = _("
\91\8f\96¾
\82Å", "bright"); break;
474 case 3: k = A_WIS; act = _("
\8c«
\96¾
\82Å", "wise"); break;
475 case 4: k = A_DEX; act = _("
\8aí
\97p
\82Å", "agile"); break;
476 case 5: k = A_CON; act = _("
\8c\92\8dN
\82Å", "hale"); break;
477 case 6: k = A_CHR; act = _("
\94ü
\82µ
\82", "beautiful"); break;
480 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);
481 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 3) / 4;
482 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
484 target_ptr->update |= (PU_BONUS);
489 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..."));
490 for (int k = 0; k < A_MAX; k++)
492 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 7) / 8;
493 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
496 target_ptr->update |= (PU_BONUS);
501 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
506 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!"));
507 msg_print(_("
\8eü
\95Ó
\82Ì
\8fd
\97Í
\82ª
\82ä
\82ª
\82ñ
\82¾
\81B", "Gravity warps around you."));
509 if (!CHECK_MULTISHADOW(target_ptr))
511 teleport_player(target_ptr, 5, TELEPORT_PASSIVE);
512 if (!target_ptr->levitation)
513 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
514 if (!(target_ptr->resist_sound || target_ptr->levitation))
516 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
517 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
521 if (target_ptr->levitation)
523 ep_ptr->dam = (ep_ptr->dam * 2) / 3;
526 if (!target_ptr->levitation || one_in_(13))
528 inventory_damage(target_ptr, set_cold_destroy, 2);
531 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
534 case GF_DISINTEGRATE:
536 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!"));
538 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
543 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!"));
545 (void)hp_player(target_ptr, ep_ptr->dam);
551 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
552 (void)set_fast(target_ptr, target_ptr->fast + randint1(5), FALSE);
558 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!"));
559 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
564 if (target_ptr->free_act) break;
565 if (target_ptr->blind) msg_print(_("
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I", "You fall asleep!"));
567 if (ironman_nightmare)
569 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."));
570 /* Have some nightmares */
571 sanity_blast(target_ptr, NULL, FALSE);
574 set_paralyzed(target_ptr, target_ptr->paralyzed + ep_ptr->dam);
582 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!"));
584 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
589 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!"));
591 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_FORCE, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
596 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!"));
598 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
599 if (!target_ptr->resist_shard || one_in_(13))
601 if (!target_ptr->immune_fire) inventory_damage(target_ptr, set_fire_destroy, 2);
602 inventory_damage(target_ptr, set_cold_destroy, 2);
609 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!"));
611 ep_ptr->get_damage = cold_dam(target_ptr, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell, FALSE);
612 if (CHECK_MULTISHADOW(target_ptr)) break;
614 if (!target_ptr->resist_shard)
616 (void)set_cut(target_ptr, target_ptr->cut + damroll(5, 8));
619 if (!target_ptr->resist_sound)
621 (void)set_stun(target_ptr, target_ptr->stun + randint1(15));
624 if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12))
626 if (!target_ptr->immune_cold) inventory_damage(target_ptr, set_cold_destroy, 3);
633 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!"));
635 if (target_ptr->mimic_form)
637 if (!(mimic_info[target_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
638 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
643 switch (target_ptr->prace)
657 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
666 if (CHECK_MULTISHADOW(target_ptr))
668 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!"));
673 if (target_ptr->csp == 0)
680 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);
682 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!"));
684 if (ep_ptr->dam >= target_ptr->csp)
686 ep_ptr->dam = target_ptr->csp;
688 target_ptr->csp_frac = 0;
692 target_ptr->csp -= ep_ptr->dam;
695 learn_spell(target_ptr, ep_ptr->monspell);
696 target_ptr->redraw |= (PR_MANA);
697 target_ptr->window |= (PW_PLAYER | PW_SPELL);
699 if ((ep_ptr->who <= 0) || (ep_ptr->m_ptr->hp >= ep_ptr->m_ptr->maxhp))
705 ep_ptr->m_ptr->hp += ep_ptr->dam;
706 if (ep_ptr->m_ptr->hp > ep_ptr->m_ptr->maxhp) ep_ptr->m_ptr->hp = ep_ptr->m_ptr->maxhp;
708 if (target_ptr->health_who == ep_ptr->who) target_ptr->redraw |= (PR_HEALTH);
709 if (target_ptr->riding == ep_ptr->who) target_ptr->redraw |= (PR_UHEALTH);
711 if (ep_ptr->m_ptr->ml)
713 msg_format(_("%^s
\82Í
\8bC
\95ª
\82ª
\97Ç
\82³
\82»
\82¤
\82¾
\81B", "%^s appears healthier."), ep_ptr->m_name);
721 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
723 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
724 learn_spell(target_ptr, ep_ptr->monspell);
728 if (CHECK_MULTISHADOW(target_ptr))
730 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
734 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."));
735 if (!target_ptr->resist_conf)
737 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
740 if (!target_ptr->resist_chaos && one_in_(3))
742 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
745 target_ptr->csp -= 50;
746 if (target_ptr->csp < 0)
749 target_ptr->csp_frac = 0;
752 target_ptr->redraw |= PR_MANA;
753 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
758 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
760 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
761 learn_spell(target_ptr, ep_ptr->monspell);
765 if (!CHECK_MULTISHADOW(target_ptr))
767 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."));
769 target_ptr->csp -= 100;
770 if (target_ptr->csp < 0)
773 target_ptr->csp_frac = 0;
775 target_ptr->redraw |= PR_MANA;
778 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
779 if (CHECK_MULTISHADOW(target_ptr)) break;
781 if (!target_ptr->resist_blind)
783 (void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
786 if (!target_ptr->resist_conf)
788 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
791 if (!target_ptr->free_act)
793 (void)set_paralyzed(target_ptr, target_ptr->paralyzed + randint0(4) + 4);
796 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
798 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
799 (void)do_dec_stat(target_ptr, A_INT);
800 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
801 (void)do_dec_stat(target_ptr, A_WIS);
803 if (!target_ptr->resist_chaos)
805 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
812 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
814 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
815 learn_spell(target_ptr, ep_ptr->monspell);
819 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 15, 0);
820 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
826 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
828 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
829 learn_spell(target_ptr, ep_ptr->monspell);
833 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 25, MIN(ep_ptr->rlev / 2 - 15, 5));
834 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
840 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
842 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
843 learn_spell(target_ptr, ep_ptr->monspell);
847 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 33, MIN(ep_ptr->rlev / 2 - 15, 15));
848 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
854 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !(ep_ptr->m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(target_ptr))
856 msg_print(_("
\82µ
\82©
\82µ
\94é
\8dE
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
857 learn_spell(target_ptr, ep_ptr->monspell);
861 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
862 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_cut(target_ptr, target_ptr->cut + damroll(10, 10));
869 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
871 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
872 learn_spell(target_ptr, ep_ptr->monspell);
876 if (!CHECK_MULTISHADOW(target_ptr))
878 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!"));
879 curse_equipment(target_ptr, 40, 20);
882 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->m_name, ep_ptr->monspell);
884 if (target_ptr->chp < 1) target_ptr->chp = 1;