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_fire(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);
164 void effect_player_water(player_type *target_ptr, effect_player_type *ep_ptr)
166 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!"));
167 if (CHECK_MULTISHADOW(target_ptr))
169 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
173 if (!target_ptr->resist_sound && !target_ptr->resist_water)
175 set_stun(target_ptr, target_ptr->stun + randint1(40));
177 if (!target_ptr->resist_conf && !target_ptr->resist_water)
179 set_confused(target_ptr, target_ptr->confused + randint1(5) + 5);
182 if (one_in_(5) && !target_ptr->resist_water)
184 inventory_damage(target_ptr, set_cold_destroy, 3);
187 if (target_ptr->resist_water) ep_ptr->get_damage /= 4;
189 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
193 void effect_player_chaos(player_type *target_ptr, effect_player_type *ep_ptr)
195 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!"));
196 if (target_ptr->resist_chaos)
198 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
201 if (CHECK_MULTISHADOW(target_ptr))
203 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
207 if (!target_ptr->resist_conf)
209 (void)set_confused(target_ptr, target_ptr->confused + randint0(20) + 10);
211 if (!target_ptr->resist_chaos)
213 (void)set_image(target_ptr, target_ptr->image + randint1(10));
216 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!"));
217 (void)gain_mutation(target_ptr, 0);
220 if (!target_ptr->resist_neth && !target_ptr->resist_chaos)
222 drain_exp(target_ptr, 5000 + (target_ptr->exp / 100), 500 + (target_ptr->exp / 1000), 75);
225 if (!target_ptr->resist_chaos || one_in_(9))
227 inventory_damage(target_ptr, set_elec_destroy, 2);
228 inventory_damage(target_ptr, set_fire_destroy, 2);
231 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
235 void effect_player_shards(player_type *target_ptr, effect_player_type *ep_ptr)
237 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!"));
238 if (target_ptr->resist_shard)
240 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
242 else if (!CHECK_MULTISHADOW(target_ptr))
244 (void)set_cut(target_ptr, target_ptr->cut + ep_ptr->dam);
247 if (!target_ptr->resist_shard || one_in_(13))
248 inventory_damage(target_ptr, set_cold_destroy, 2);
250 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
254 void effect_player_sound(player_type *target_ptr, effect_player_type *ep_ptr)
256 if (target_ptr->blind) msg_print(_("
\8d\8c\89¹
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by a loud noise!"));
257 if (target_ptr->resist_sound)
259 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
261 else if (!CHECK_MULTISHADOW(target_ptr))
263 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
264 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
267 if (!target_ptr->resist_sound || one_in_(13))
268 inventory_damage(target_ptr, set_cold_destroy, 2);
270 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
275 * @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é
276 * @param target_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
277 * @param em_ptr
\83v
\83\8c\81[
\83\84\81[
\8cø
\89Ê
\8d\
\91¢
\91Ì
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
280 void switch_effects_player(player_type *target_ptr, effect_player_type *ep_ptr)
282 switch (ep_ptr->effect_type)
285 effect_player_elements(target_ptr, ep_ptr, _("
\8e_
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by acid!"), acid_dam);
288 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);
291 effect_player_elements(target_ptr, ep_ptr, _("
\97â
\8bC
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by cold!"), cold_dam);
294 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);
297 effect_player_poison(target_ptr, ep_ptr);
300 effect_player_nuke(target_ptr, ep_ptr);
303 effect_player_missile(target_ptr, ep_ptr);
306 effect_player_holy_fire(target_ptr, ep_ptr);
309 effect_player_hell_fire(target_ptr, ep_ptr);
312 effect_player_arrow(target_ptr, ep_ptr);
315 effect_player_plasma(target_ptr, ep_ptr);
318 effect_player_nether(target_ptr, ep_ptr);
321 effect_player_water(target_ptr, ep_ptr);
324 effect_player_chaos(target_ptr, ep_ptr);
327 effect_player_shards(target_ptr, ep_ptr);
330 effect_player_sound(target_ptr, ep_ptr);
334 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!"));
335 if (target_ptr->resist_conf)
337 ep_ptr->dam *= 5; ep_ptr->dam /= (randint1(4) + 7);
339 else if (!CHECK_MULTISHADOW(target_ptr))
341 (void)set_confused(target_ptr, target_ptr->confused + randint1(20) + 10);
343 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
348 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!"));
349 if (target_ptr->resist_disen)
351 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
353 else if (!CHECK_MULTISHADOW(target_ptr))
355 (void)apply_disenchant(target_ptr, 0);
357 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
362 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!"));
363 if (target_ptr->resist_nexus)
365 ep_ptr->dam *= 6; ep_ptr->dam /= (randint1(4) + 7);
367 else if (!CHECK_MULTISHADOW(target_ptr))
369 apply_nexus(ep_ptr->m_ptr, target_ptr);
372 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
377 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!"));
378 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
380 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
383 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
388 if (target_ptr->blind) msg_print(_("
\94\9a\94
\82ª
\82 \82Á
\82½
\81I", "There is an explosion!"));
389 if (!target_ptr->resist_sound && !CHECK_MULTISHADOW(target_ptr))
391 (void)set_stun(target_ptr, target_ptr->stun + randint1(20));
394 if (target_ptr->resist_shard)
398 else if (!CHECK_MULTISHADOW(target_ptr))
400 (void)set_cut(target_ptr, target_ptr->cut + (ep_ptr->dam / 2));
403 if (!target_ptr->resist_shard || one_in_(12))
405 inventory_damage(target_ptr, set_cold_destroy, 3);
408 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
413 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!"));
414 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
416 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
421 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
422 if (target_ptr->resist_lite)
424 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
426 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
428 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
431 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE))
433 if (!CHECK_MULTISHADOW(target_ptr)) msg_print(_("
\8cõ
\82Å
\93÷
\91Ì
\82ª
\8fÅ
\82ª
\82³
\82ê
\82½
\81I", "The light scorches your flesh!"));
436 else if (PRACE_IS_(target_ptr, RACE_S_FAIRY))
438 ep_ptr->dam = ep_ptr->dam * 4 / 3;
441 if (target_ptr->wraith_form) ep_ptr->dam *= 2;
442 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
444 if (!target_ptr->wraith_form || CHECK_MULTISHADOW(target_ptr))
447 target_ptr->wraith_form = 0;
448 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",
449 "The light forces you out of your incorporeal shadow form."));
451 target_ptr->redraw |= (PR_MAP | PR_STATUS);
452 target_ptr->update |= (PU_MONSTERS);
453 target_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
458 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
459 if (target_ptr->resist_dark)
461 ep_ptr->dam *= 4; ep_ptr->dam /= (randint1(4) + 7);
463 if (PRACE_IS_(target_ptr, RACE_VAMPIRE) || (target_ptr->mimic_form == MIMIC_VAMPIRE) || target_ptr->wraith_form) ep_ptr->dam = 0;
465 else if (!target_ptr->blind && !target_ptr->resist_blind && !CHECK_MULTISHADOW(target_ptr))
467 (void)set_blind(target_ptr, target_ptr->blind + randint1(5) + 2);
470 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
475 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!"));
477 if (target_ptr->resist_time)
480 ep_ptr->dam /= (randint1(4) + 7);
481 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."));
482 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
486 if (CHECK_MULTISHADOW(target_ptr))
488 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
492 switch (randint1(10))
500 if (target_ptr->prace == RACE_ANDROID) break;
502 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."));
503 lose_exp(target_ptr, 100 + (target_ptr->exp / 100) * MON_DRAIN_LIFE);
515 case 1: k = A_STR; act = _("
\8b
\82", "strong"); break;
516 case 2: k = A_INT; act = _("
\91\8f\96¾
\82Å", "bright"); break;
517 case 3: k = A_WIS; act = _("
\8c«
\96¾
\82Å", "wise"); break;
518 case 4: k = A_DEX; act = _("
\8aí
\97p
\82Å", "agile"); break;
519 case 5: k = A_CON; act = _("
\8c\92\8dN
\82Å", "hale"); break;
520 case 6: k = A_CHR; act = _("
\94ü
\82µ
\82", "beautiful"); break;
523 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);
524 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 3) / 4;
525 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
527 target_ptr->update |= (PU_BONUS);
532 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..."));
533 for (int k = 0; k < A_MAX; k++)
535 target_ptr->stat_cur[k] = (target_ptr->stat_cur[k] * 7) / 8;
536 if (target_ptr->stat_cur[k] < 3) target_ptr->stat_cur[k] = 3;
539 target_ptr->update |= (PU_BONUS);
544 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
549 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!"));
550 msg_print(_("
\8eü
\95Ó
\82Ì
\8fd
\97Í
\82ª
\82ä
\82ª
\82ñ
\82¾
\81B", "Gravity warps around you."));
552 if (!CHECK_MULTISHADOW(target_ptr))
554 teleport_player(target_ptr, 5, TELEPORT_PASSIVE);
555 if (!target_ptr->levitation)
556 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
557 if (!(target_ptr->resist_sound || target_ptr->levitation))
559 int plus_stun = (randint1((ep_ptr->dam > 90) ? 35 : (ep_ptr->dam / 3 + 5)));
560 (void)set_stun(target_ptr, target_ptr->stun + plus_stun);
564 if (target_ptr->levitation)
566 ep_ptr->dam = (ep_ptr->dam * 2) / 3;
569 if (!target_ptr->levitation || one_in_(13))
571 inventory_damage(target_ptr, set_cold_destroy, 2);
574 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
577 case GF_DISINTEGRATE:
579 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!"));
581 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
586 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!"));
588 (void)hp_player(target_ptr, ep_ptr->dam);
594 if (target_ptr->blind) msg_print(_("
\89½
\82©
\82Å
\8dU
\8c\82\82³
\82ê
\82½
\81I", "You are hit by something!"));
595 (void)set_fast(target_ptr, target_ptr->fast + randint1(5), FALSE);
601 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!"));
602 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
607 if (target_ptr->free_act) break;
608 if (target_ptr->blind) msg_print(_("
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81I", "You fall asleep!"));
610 if (ironman_nightmare)
612 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."));
613 /* Have some nightmares */
614 sanity_blast(target_ptr, NULL, FALSE);
617 set_paralyzed(target_ptr, target_ptr->paralyzed + ep_ptr->dam);
625 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!"));
627 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
632 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!"));
634 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_FORCE, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
639 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!"));
641 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
642 if (!target_ptr->resist_shard || one_in_(13))
644 if (!target_ptr->immune_fire) inventory_damage(target_ptr, set_fire_destroy, 2);
645 inventory_damage(target_ptr, set_cold_destroy, 2);
652 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!"));
654 ep_ptr->get_damage = cold_dam(target_ptr, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell, FALSE);
655 if (CHECK_MULTISHADOW(target_ptr)) break;
657 if (!target_ptr->resist_shard)
659 (void)set_cut(target_ptr, target_ptr->cut + damroll(5, 8));
662 if (!target_ptr->resist_sound)
664 (void)set_stun(target_ptr, target_ptr->stun + randint1(15));
667 if ((!(target_ptr->resist_cold || is_oppose_cold(target_ptr))) || one_in_(12))
669 if (!target_ptr->immune_cold) inventory_damage(target_ptr, set_cold_destroy, 3);
676 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!"));
678 if (target_ptr->mimic_form)
680 if (!(mimic_info[target_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
681 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
686 switch (target_ptr->prace)
700 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
709 if (CHECK_MULTISHADOW(target_ptr))
711 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!"));
716 if (target_ptr->csp == 0)
723 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);
725 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!"));
727 if (ep_ptr->dam >= target_ptr->csp)
729 ep_ptr->dam = target_ptr->csp;
731 target_ptr->csp_frac = 0;
735 target_ptr->csp -= ep_ptr->dam;
738 learn_spell(target_ptr, ep_ptr->monspell);
739 target_ptr->redraw |= (PR_MANA);
740 target_ptr->window |= (PW_PLAYER | PW_SPELL);
742 if ((ep_ptr->who <= 0) || (ep_ptr->m_ptr->hp >= ep_ptr->m_ptr->maxhp))
748 ep_ptr->m_ptr->hp += ep_ptr->dam;
749 if (ep_ptr->m_ptr->hp > ep_ptr->m_ptr->maxhp) ep_ptr->m_ptr->hp = ep_ptr->m_ptr->maxhp;
751 if (target_ptr->health_who == ep_ptr->who) target_ptr->redraw |= (PR_HEALTH);
752 if (target_ptr->riding == ep_ptr->who) target_ptr->redraw |= (PR_UHEALTH);
754 if (ep_ptr->m_ptr->ml)
756 msg_format(_("%^s
\82Í
\8bC
\95ª
\82ª
\97Ç
\82³
\82»
\82¤
\82¾
\81B", "%^s appears healthier."), ep_ptr->m_name);
764 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
766 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
767 learn_spell(target_ptr, ep_ptr->monspell);
771 if (CHECK_MULTISHADOW(target_ptr))
773 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
777 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."));
778 if (!target_ptr->resist_conf)
780 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
783 if (!target_ptr->resist_chaos && one_in_(3))
785 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
788 target_ptr->csp -= 50;
789 if (target_ptr->csp < 0)
792 target_ptr->csp_frac = 0;
795 target_ptr->redraw |= PR_MANA;
796 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
801 if ((randint0(100 + ep_ptr->rlev / 2) < MAX(5, target_ptr->skill_sav)) && !CHECK_MULTISHADOW(target_ptr))
803 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
804 learn_spell(target_ptr, ep_ptr->monspell);
808 if (!CHECK_MULTISHADOW(target_ptr))
810 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."));
812 target_ptr->csp -= 100;
813 if (target_ptr->csp < 0)
816 target_ptr->csp_frac = 0;
818 target_ptr->redraw |= PR_MANA;
821 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
822 if (CHECK_MULTISHADOW(target_ptr)) break;
824 if (!target_ptr->resist_blind)
826 (void)set_blind(target_ptr, target_ptr->blind + 8 + randint0(8));
829 if (!target_ptr->resist_conf)
831 (void)set_confused(target_ptr, target_ptr->confused + randint0(4) + 4);
834 if (!target_ptr->free_act)
836 (void)set_paralyzed(target_ptr, target_ptr->paralyzed + randint0(4) + 4);
839 (void)set_slow(target_ptr, target_ptr->slow + randint0(4) + 4, FALSE);
841 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
842 (void)do_dec_stat(target_ptr, A_INT);
843 while (randint0(100 + ep_ptr->rlev / 2) > (MAX(5, target_ptr->skill_sav)))
844 (void)do_dec_stat(target_ptr, A_WIS);
846 if (!target_ptr->resist_chaos)
848 (void)set_image(target_ptr, target_ptr->image + randint0(250) + 150);
855 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
857 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
858 learn_spell(target_ptr, ep_ptr->monspell);
862 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 15, 0);
863 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
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)) curse_equipment(target_ptr, 25, MIN(ep_ptr->rlev / 2 - 15, 5));
877 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
883 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
885 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
886 learn_spell(target_ptr, ep_ptr->monspell);
890 if (!CHECK_MULTISHADOW(target_ptr)) curse_equipment(target_ptr, 33, MIN(ep_ptr->rlev / 2 - 15, 15));
891 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
897 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !(ep_ptr->m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(target_ptr))
899 msg_print(_("
\82µ
\82©
\82µ
\94é
\8dE
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
900 learn_spell(target_ptr, ep_ptr->monspell);
904 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer, ep_ptr->monspell);
905 if (!CHECK_MULTISHADOW(target_ptr)) (void)set_cut(target_ptr, target_ptr->cut + damroll(10, 10));
912 if ((randint0(100 + ep_ptr->rlev / 2) < target_ptr->skill_sav) && !CHECK_MULTISHADOW(target_ptr))
914 msg_print(_("
\82µ
\82©
\82µ
\8cø
\97Í
\82ð
\92µ
\82Ë
\95Ô
\82µ
\82½
\81I", "You resist the effects!"));
915 learn_spell(target_ptr, ep_ptr->monspell);
919 if (!CHECK_MULTISHADOW(target_ptr))
921 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!"));
922 curse_equipment(target_ptr, 40, 20);
925 ep_ptr->get_damage = take_hit(target_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->m_name, ep_ptr->monspell);
927 if (target_ptr->chp < 1) target_ptr->chp = 1;