OSDN Git Service

[Refactor] #40571 Moved targeting.c/h from io/ to target/
[hengband/hengband.git] / src / mutation / mutation.c
1 /*!
2  * @file mutation.c
3  * @brief 突然変異ルールの実装 / Mutation effects (and racial powers)
4  * @date 2014/01/11
5  * @author
6  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
7  *\n
8  * This software may be copied and distributed for educational, research,\n
9  * and not for profit purposes provided that this copyright and statement\n
10  * are included in all such copies.  Other copyrights may also apply.\n
11  * 2014 Deskull rearranged comment for Doxygen.\n
12  */
13
14 #include "mutation/mutation.h"
15 #include "cmd-io/cmd-dump.h"
16 #include "cmd-item/cmd-throw.h"
17 #include "core/asking-player.h"
18 #include "core/player-update-types.h"
19 #include "core/show-file.h"
20 #include "core/stuff-handler.h"
21 #include "effect/spells-effect-util.h"
22 #include "game-option/play-record-options.h"
23 #include "grid/grid.h"
24 #include "inventory/inventory-slot-types.h"
25 #include "io/write-diary.h"
26 #include "mind/mind-mage.h"
27 #include "mind/mind-warrior.h"
28 #include "monster-floor/monster-remover.h"
29 #include "monster-floor/monster-summon.h"
30 #include "monster-floor/place-monster-types.h"
31 #include "monster-race/monster-race.h"
32 #include "monster-race/race-flags1.h"
33 #include "monster-race/race-flags3.h"
34 #include "monster/monster-describer.h"
35 #include "monster/monster-description-types.h"
36 #include "monster/monster-flag-types.h"
37 #include "monster/monster-info.h"
38 #include "monster/smart-learn-types.h"
39 #include "mutation/mutation-flag-types.h"
40 #include "mutation/mutation-techniques.h"
41 #include "object-enchant/item-feeling.h"
42 #include "object-hook/hook-checker.h"
43 #include "player/avatar.h"
44 #include "player/player-class.h"
45 #include "player/player-damage.h"
46 #include "player/player-personalities-types.h"
47 #include "player/player-race-types.h"
48 #include "player/selfinfo.h"
49 #include "racial/racial-vampire.h"
50 #include "spell-kind/earthquake.h"
51 #include "spell-kind/spells-charm.h"
52 #include "spell-kind/spells-detection.h"
53 #include "spell-kind/spells-fetcher.h"
54 #include "spell-kind/spells-launcher.h"
55 #include "spell-kind/spells-lite.h"
56 #include "spell-kind/spells-sight.h"
57 #include "spell-kind/spells-teleport.h"
58 #include "spell-kind/spells-world.h"
59 #include "spell-realm/spells-sorcery.h"
60 #include "spell/spell-types.h"
61 #include "spell/spells-status.h"
62 #include "spell/spells-summon.h"
63 #include "status/element-resistance.h"
64 #include "status/shape-changer.h"
65 #include "system/floor-type-definition.h"
66 #include "system/object-type-definition.h"
67 #include "target/targeting.h"
68 #include "view/display-messages.h"
69
70 /*!
71  * @brief プレイヤーに突然変異を与える
72  * @param choose_mut 与えたい突然変異のID、0ならばランダムに選択
73  * @return なし
74  */
75 bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
76 {
77     int attempts_left = 20;
78     concptr muta_desc = "";
79     bool muta_chosen = FALSE;
80     int muta_which = 0; // mutation_flag_type_1 とmutation_flag_type_2 の両対応とするため、敢えてint型で定義する
81     BIT_FLAGS *muta_class = NULL;
82
83     if (choose_mut)
84         attempts_left = 1;
85
86     while (attempts_left--) {
87         switch (choose_mut ? choose_mut : (creature_ptr->pclass == CLASS_BERSERKER ? 74 + randint1(119) : randint1(193))) {
88         case 1:
89         case 2:
90         case 3:
91         case 4:
92             muta_class = &(creature_ptr->muta1);
93             muta_which = MUT1_SPIT_ACID;
94             muta_desc = _("酸を吐く能力を得た。", "You gain the ability to spit acid.");
95             break;
96
97         case 5:
98         case 6:
99         case 7:
100             muta_class = &(creature_ptr->muta1);
101             muta_which = MUT1_BR_FIRE;
102             muta_desc = _("火を吐く能力を得た。", "You gain the ability to breathe fire.");
103             break;
104
105         case 8:
106         case 9:
107             muta_class = &(creature_ptr->muta1);
108             muta_which = MUT1_HYPN_GAZE;
109             muta_desc = _("催眠眼の能力を得た。", "Your eyes look mesmerizing...");
110             break;
111
112         case 10:
113         case 11:
114             muta_class = &(creature_ptr->muta1);
115             muta_which = MUT1_TELEKINES;
116             muta_desc = _("物体を念動力で動かす能力を得た。", "You gain the ability to move objects telekinetically.");
117             break;
118
119         case 12:
120         case 13:
121         case 14:
122             muta_class = &(creature_ptr->muta1);
123             muta_which = MUT1_VTELEPORT;
124             muta_desc = _("自分の意思でテレポートする能力を得た。", "You gain the power of teleportation at will.");
125             break;
126
127         case 15:
128         case 16:
129             muta_class = &(creature_ptr->muta1);
130             muta_which = MUT1_MIND_BLST;
131             muta_desc = _("精神攻撃の能力を得た。", "You gain the power of Mind Blast.");
132             break;
133
134         case 17:
135         case 18:
136             muta_class = &(creature_ptr->muta1);
137             muta_which = MUT1_RADIATION;
138             muta_desc = _("あなたは強い放射線を発生し始めた。", "You start emitting hard radiation.");
139             break;
140
141         case 19:
142         case 20:
143             muta_class = &(creature_ptr->muta1);
144             muta_which = MUT1_VAMPIRISM;
145             muta_desc = _("生命力を吸収できるようになった。", "You become vampiric.");
146             break;
147
148         case 21:
149         case 22:
150         case 23:
151             muta_class = &(creature_ptr->muta1);
152             muta_which = MUT1_SMELL_MET;
153             muta_desc = _("金属の匂いを嗅ぎ分けられるようになった。", "You smell a metallic odor.");
154             break;
155
156         case 24:
157         case 25:
158         case 26:
159         case 27:
160             muta_class = &(creature_ptr->muta1);
161             muta_which = MUT1_SMELL_MON;
162             muta_desc = _("モンスターの臭いを嗅ぎ分けられるようになった。", "You smell filthy monsters.");
163             break;
164
165         case 28:
166         case 29:
167         case 30:
168             muta_class = &(creature_ptr->muta1);
169             muta_which = MUT1_BLINK;
170             muta_desc = _("近距離テレポートの能力を得た。", "You gain the power of minor teleportation.");
171             break;
172
173         case 31:
174         case 32:
175             muta_class = &(creature_ptr->muta1);
176             muta_which = MUT1_EAT_ROCK;
177             muta_desc = _("壁が美味しそうに見える。", "The walls look delicious.");
178             break;
179
180         case 33:
181         case 34:
182             muta_class = &(creature_ptr->muta1);
183             muta_which = MUT1_SWAP_POS;
184             muta_desc = _("他人の靴で一マイル歩くような気分がする。", "You feel like walking a mile in someone else's shoes.");
185             break;
186
187         case 35:
188         case 36:
189         case 37:
190             muta_class = &(creature_ptr->muta1);
191             muta_which = MUT1_SHRIEK;
192             muta_desc = _("あなたの声は相当強くなった。", "Your vocal cords get much tougher.");
193             break;
194
195         case 38:
196         case 39:
197         case 40:
198             muta_class = &(creature_ptr->muta1);
199             muta_which = MUT1_ILLUMINE;
200             muta_desc = _("あなたは光り輝いて部屋を明るくするようになった。", "You can light up rooms with your presence.");
201             break;
202
203         case 41:
204         case 42:
205             muta_class = &(creature_ptr->muta1);
206             muta_which = MUT1_DET_CURSE;
207             muta_desc = _("邪悪な魔法を感知できるようになった。", "You can feel evil magics.");
208             break;
209
210         case 43:
211         case 44:
212         case 45:
213             muta_class = &(creature_ptr->muta1);
214             muta_which = MUT1_BERSERK;
215             muta_desc = _("制御できる激情を感じる。", "You feel a controlled rage.");
216             break;
217
218         case 46:
219             muta_class = &(creature_ptr->muta1);
220             muta_which = MUT1_POLYMORPH;
221             muta_desc = _("体が変異しやすくなった。", "Your body seems mutable.");
222             break;
223
224         case 47:
225         case 48:
226             muta_class = &(creature_ptr->muta1);
227             muta_which = MUT1_MIDAS_TCH;
228             muta_desc = _("「ミダス王の手」の能力を得た。", "You gain the Midas touch."); /*トゥームレイダースにありましたね。 */
229             break;
230
231         case 49:
232             muta_class = &(creature_ptr->muta1);
233             muta_which = MUT1_GROW_MOLD;
234             muta_desc = _("突然カビに親しみを覚えた。", "You feel a sudden affinity for mold.");
235             break;
236
237         case 50:
238         case 51:
239         case 52:
240             muta_class = &(creature_ptr->muta1);
241             muta_which = MUT1_RESIST;
242             muta_desc = _("あなたは自分自身を守れる気がする。", "You feel like you can protect yourself.");
243             break;
244
245         case 53:
246         case 54:
247         case 55:
248             muta_class = &(creature_ptr->muta1);
249             muta_which = MUT1_EARTHQUAKE;
250             muta_desc = _("ダンジョンを破壊する能力を得た。", "You gain the ability to wreck the dungeon.");
251             break;
252
253         case 56:
254             muta_class = &(creature_ptr->muta1);
255             muta_which = MUT1_EAT_MAGIC;
256             muta_desc = _("魔法のアイテムが美味そうに見える。", "Your magic items look delicious.");
257             break;
258
259         case 57:
260         case 58:
261             muta_class = &(creature_ptr->muta1);
262             muta_which = MUT1_WEIGH_MAG;
263             muta_desc = _("あなたは周囲にある魔法をより良く理解できる気がする。", "You feel you can better understand the magic around you.");
264             break;
265
266         case 59:
267             muta_class = &(creature_ptr->muta1);
268             muta_which = MUT1_STERILITY;
269             muta_desc = _("周りの全ての者に頭痛を起こすことができる。", "You can give everything around you a headache.");
270             break;
271         case 60:
272         case 61:
273             muta_class = &(creature_ptr->muta1);
274             muta_which = MUT1_HIT_AND_AWAY;
275             muta_desc = _("突然、泥棒の気分が分かるようになった。", "You suddenly understand how thieves feel.");
276             break;
277
278         case 62:
279         case 63:
280         case 64:
281             muta_class = &(creature_ptr->muta1);
282             muta_which = MUT1_DAZZLE;
283             muta_desc = _("眩い閃光を発する能力を得た。", "You gain the ability to emit dazzling lights.");
284             break;
285
286         case 65:
287         case 66:
288         case 67:
289             muta_class = &(creature_ptr->muta1);
290             muta_which = MUT1_LASER_EYE;
291             muta_desc = _("あなたの目は一瞬焼け付いた。", "Your eyes burn for a moment.");
292             break;
293
294         case 68:
295         case 69:
296             muta_class = &(creature_ptr->muta1);
297             muta_which = MUT1_RECALL;
298             muta_desc = _("少しだけホームシックになったが、すぐ直った。", "You feel briefly homesick, but it passes.");
299             break;
300
301         case 70:
302             muta_class = &(creature_ptr->muta1);
303             muta_which = MUT1_BANISH;
304             muta_desc = _("神聖な怒りの力に満たされた。", "You feel a holy wrath fill you.");
305             break;
306
307         case 71:
308         case 72:
309             muta_class = &(creature_ptr->muta1);
310             muta_which = MUT1_COLD_TOUCH;
311             muta_desc = _("あなたの両手はとても冷たくなった。", "Your hands get very cold.");
312             break;
313
314         case 73:
315         case 74:
316             muta_class = &(creature_ptr->muta1);
317             muta_which = MUT1_LAUNCHER;
318             muta_desc = _("あなたの物を投げる手はかなり強くなった気がする。", "Your throwing arm feels much stronger.");
319             break;
320
321         case 75:
322             muta_class = &(creature_ptr->muta2);
323             muta_which = MUT2_BERS_RAGE;
324             muta_desc = _("あなたは狂暴化の発作を起こすようになった!", "You become subject to fits of berserk rage!");
325             break;
326
327         case 76:
328             muta_class = &(creature_ptr->muta2);
329             muta_which = MUT2_COWARDICE;
330             muta_desc = _("信じられないくらい臆病になった!", "You become an incredible coward!");
331             break;
332
333         case 77:
334             muta_class = &(creature_ptr->muta2);
335             muta_which = MUT2_RTELEPORT;
336             muta_desc = _("あなたの位置は非常に不確定になった。", "Your position seems very uncertain...");
337             break;
338
339         case 78:
340             muta_class = &(creature_ptr->muta2);
341             muta_which = MUT2_ALCOHOL;
342             muta_desc = _("あなたはアルコールを分泌するようになった。", "Your body starts producing alcohol!");
343             break;
344
345         case 79:
346             muta_class = &(creature_ptr->muta2);
347             muta_which = MUT2_HALLU;
348             muta_desc = _("あなたは幻覚を引き起こす精神錯乱に侵された。", "You are afflicted by a hallucinatory insanity!");
349             break;
350
351         case 80:
352             muta_class = &(creature_ptr->muta2);
353             muta_which = MUT2_FLATULENT;
354             muta_desc = _("あなたは制御不能な強烈な屁をこくようになった。", "You become subject to uncontrollable flatulence.");
355
356             break;
357         case 81:
358         case 82:
359             muta_class = &(creature_ptr->muta2);
360             muta_which = MUT2_SCOR_TAIL;
361             muta_desc = _("サソリの尻尾が生えてきた!", "You grow a scorpion tail!");
362
363             break;
364         case 83:
365         case 84:
366             muta_class = &(creature_ptr->muta2);
367             muta_which = MUT2_HORNS;
368             muta_desc = _("額に角が生えた!", "Horns pop forth into your forehead!");
369
370             break;
371         case 85:
372         case 86:
373             muta_class = &(creature_ptr->muta2);
374             muta_which = MUT2_BEAK;
375             muta_desc = _("口が鋭く強いクチバシに変化した!", "Your mouth turns into a sharp, powerful beak!");
376
377             break;
378         case 87:
379         case 88:
380             muta_class = &(creature_ptr->muta2);
381             muta_which = MUT2_ATT_DEMON;
382             muta_desc = _("悪魔を引き付けるようになった。", "You start attracting demons.");
383
384             break;
385         case 89:
386             muta_class = &(creature_ptr->muta2);
387             muta_which = MUT2_PROD_MANA;
388             muta_desc = _("あなたは制御不能な魔法のエネルギーを発生するようになった。", "You start producing magical energy uncontrollably.");
389
390             break;
391         case 90:
392         case 91:
393             muta_class = &(creature_ptr->muta2);
394             muta_which = MUT2_SPEED_FLUX;
395             muta_desc = _("あなたは躁鬱質になった。", "You become manic-depressive.");
396
397             break;
398         case 92:
399         case 93:
400             muta_class = &(creature_ptr->muta2);
401             muta_which = MUT2_BANISH_ALL;
402             muta_desc = _("恐ろしい力があなたの背後に潜んでいる気がする。", "You feel a terrifying power lurking behind you.");
403
404             break;
405         case 94:
406             muta_class = &(creature_ptr->muta2);
407             muta_which = MUT2_EAT_LIGHT;
408             muta_desc = _("あなたはウンゴリアントに奇妙な親しみを覚えるようになった。", "You feel a strange kinship with Ungoliant.");
409
410             break;
411         case 95:
412         case 96:
413             muta_class = &(creature_ptr->muta2);
414             muta_which = MUT2_TRUNK;
415             muta_desc = _("あなたの鼻は伸びて象の鼻のようになった。", "Your nose grows into an elephant-like trunk.");
416
417             break;
418         case 97:
419             muta_class = &(creature_ptr->muta2);
420             muta_which = MUT2_ATT_ANIMAL;
421             muta_desc = _("動物を引き付けるようになった。", "You start attracting animals.");
422
423             break;
424         case 98:
425             muta_class = &(creature_ptr->muta2);
426             muta_which = MUT2_TENTACLES;
427             muta_desc = _("邪悪な触手が体の両側に生えてきた。", "Evil-looking tentacles sprout from your sides.");
428
429             break;
430         case 99:
431             muta_class = &(creature_ptr->muta2);
432             muta_which = MUT2_RAW_CHAOS;
433             muta_desc = _("周囲の空間が不安定になった気がする。", "You feel the universe is less stable around you.");
434
435             break;
436         case 100:
437         case 101:
438         case 102:
439             muta_class = &(creature_ptr->muta2);
440             muta_which = MUT2_NORMALITY;
441             muta_desc = _("あなたは奇妙なほど普通になった気がする。", "You feel strangely normal.");
442
443             break;
444         case 103:
445             muta_class = &(creature_ptr->muta2);
446             muta_which = MUT2_WRAITH;
447             muta_desc = _("あなたは幽体化したり実体化したりするようになった。", "You start to fade in and out of the physical world.");
448
449             break;
450         case 104:
451             muta_class = &(creature_ptr->muta2);
452             muta_which = MUT2_POLY_WOUND;
453             muta_desc = _("あなたはカオスの力が古い傷に入り込んでくるのを感じた。", "You feel forces of chaos entering your old scars.");
454
455             break;
456         case 105:
457             muta_class = &(creature_ptr->muta2);
458             muta_which = MUT2_WASTING;
459             muta_desc = _("あなたは突然おぞましい衰弱病にかかった。", "You suddenly contract a horrible wasting disease.");
460
461             break;
462         case 106:
463             muta_class = &(creature_ptr->muta2);
464             muta_which = MUT2_ATT_DRAGON;
465             muta_desc = _("あなたはドラゴンを引きつけるようになった。", "You start attracting dragons.");
466
467             break;
468         case 107:
469         case 108:
470             muta_class = &(creature_ptr->muta2);
471             muta_which = MUT2_WEIRD_MIND;
472             muta_desc = _("あなたの思考は突然おかしな方向に向き始めた。", "Your thoughts suddenly take off in strange directions.");
473
474             break;
475         case 109:
476             muta_class = &(creature_ptr->muta2);
477             muta_which = MUT2_NAUSEA;
478             muta_desc = _("胃袋がピクピクしはじめた。", "Your stomach starts to roil nauseously.");
479
480             break;
481         case 110:
482         case 111:
483             /* Chaos warriors already have a chaos deity */
484             if (creature_ptr->pclass != CLASS_CHAOS_WARRIOR) {
485                 muta_class = &(creature_ptr->muta2);
486                 muta_which = MUT2_CHAOS_GIFT;
487                 muta_desc = _("あなたはカオスの守護悪魔の注意を惹くようになった。", "You attract the notice of a chaos deity!");
488             }
489             break;
490         case 112:
491             muta_class = &(creature_ptr->muta2);
492             muta_which = MUT2_WALK_SHAD;
493             muta_desc = _("あなたは現実が紙のように薄いと感じるようになった。", "You feel like reality is as thin as paper.");
494
495             break;
496         case 113:
497         case 114:
498             muta_class = &(creature_ptr->muta2);
499             muta_which = MUT2_WARNING;
500             muta_desc = _("あなたは突然パラノイアになった気がする。", "You suddenly feel paranoid.");
501
502             break;
503         case 115:
504             muta_class = &(creature_ptr->muta2);
505             muta_which = MUT2_INVULN;
506             muta_desc = _("あなたは祝福され、無敵状態になる発作を起こすようになった。", "You are blessed with fits of invulnerability.");
507
508             break;
509         case 116:
510         case 117:
511             muta_class = &(creature_ptr->muta2);
512             muta_which = MUT2_SP_TO_HP;
513             muta_desc = _("魔法の治癒の発作を起こすようになった。", "You are subject to fits of magical healing.");
514
515             break;
516         case 118:
517             muta_class = &(creature_ptr->muta2);
518             muta_which = MUT2_HP_TO_SP;
519             muta_desc = _("痛みを伴う精神明瞭化の発作を起こすようになった。", "You are subject to fits of painful clarity.");
520
521             break;
522         case 119:
523             muta_class = &(creature_ptr->muta2);
524             muta_which = MUT2_DISARM;
525             muta_desc = _("あなたの脚は長さが四倍になった。", "Your feet grow to four times their former size.");
526
527             break;
528         case 120:
529         case 121:
530         case 122:
531             muta_class = &(creature_ptr->muta3);
532             muta_which = MUT3_HYPER_STR;
533             muta_desc = _("超人的に強くなった!", "You turn into a superhuman he-man!");
534
535             break;
536         case 123:
537         case 124:
538         case 125:
539             muta_class = &(creature_ptr->muta3);
540             muta_which = MUT3_PUNY;
541             muta_desc = _("筋肉が弱ってしまった...", "Your muscles wither away...");
542
543             break;
544         case 126:
545         case 127:
546         case 128:
547             muta_class = &(creature_ptr->muta3);
548             muta_which = MUT3_HYPER_INT;
549             muta_desc = _("あなたの脳は生体コンピュータに進化した!", "Your brain evolves into a living computer!");
550
551             break;
552         case 129:
553         case 130:
554         case 131:
555             muta_class = &(creature_ptr->muta3);
556             muta_which = MUT3_MORONIC;
557             muta_desc = _("脳が萎縮してしまった...", "Your brain withers away...");
558
559             break;
560         case 132:
561         case 133:
562             muta_class = &(creature_ptr->muta3);
563             muta_which = MUT3_RESILIENT;
564             muta_desc = _("並外れてタフになった。", "You become extraordinarily resilient.");
565
566             break;
567         case 134:
568         case 135:
569             muta_class = &(creature_ptr->muta3);
570             muta_which = MUT3_XTRA_FAT;
571             muta_desc = _("あなたは気持ち悪いくらい太った!", "You become sickeningly fat!");
572
573             break;
574         case 136:
575         case 137:
576             muta_class = &(creature_ptr->muta3);
577             muta_which = MUT3_ALBINO;
578             muta_desc = _("アルビノになった!弱くなった気がする...", "You turn into an albino! You feel frail...");
579
580             break;
581         case 138:
582         case 139:
583         case 140:
584             muta_class = &(creature_ptr->muta3);
585             muta_which = MUT3_FLESH_ROT;
586             muta_desc = _("あなたの肉体は腐敗する病気に侵された!", "Your flesh is afflicted by a rotting disease!");
587
588             break;
589         case 141:
590         case 142:
591             muta_class = &(creature_ptr->muta3);
592             muta_which = MUT3_SILLY_VOI;
593             muta_desc = _("声が間抜けなキーキー声になった!", "Your voice turns into a ridiculous squeak!");
594
595             break;
596         case 143:
597         case 144:
598             muta_class = &(creature_ptr->muta3);
599             muta_which = MUT3_BLANK_FAC;
600             muta_desc = _("のっぺらぼうになった!", "Your face becomes completely featureless!");
601
602             break;
603         case 145:
604             muta_class = &(creature_ptr->muta3);
605             muta_which = MUT3_ILL_NORM;
606             muta_desc = _("心の安らぐ幻影を映し出すようになった。", "You start projecting a reassuring image.");
607
608             break;
609         case 146:
610         case 147:
611         case 148:
612             muta_class = &(creature_ptr->muta3);
613             muta_which = MUT3_XTRA_EYES;
614             muta_desc = _("新たに二つの目が出来た!", "You grow an extra pair of eyes!");
615
616             break;
617         case 149:
618         case 150:
619             muta_class = &(creature_ptr->muta3);
620             muta_which = MUT3_MAGIC_RES;
621             muta_desc = _("魔法への耐性がついた。", "You become resistant to magic.");
622
623             break;
624         case 151:
625         case 152:
626         case 153:
627             muta_class = &(creature_ptr->muta3);
628             muta_which = MUT3_XTRA_NOIS;
629             muta_desc = _("あなたは奇妙な音を立て始めた!", "You start making strange noise!");
630
631             break;
632         case 154:
633         case 155:
634         case 156:
635             muta_class = &(creature_ptr->muta3);
636             muta_which = MUT3_INFRAVIS;
637             muta_desc = _("赤外線視力が増した。", "Your infravision is improved.");
638
639             break;
640         case 157:
641         case 158:
642             muta_class = &(creature_ptr->muta3);
643             muta_which = MUT3_XTRA_LEGS;
644             muta_desc = _("新たに二本の足が生えてきた!", "You grow an extra pair of legs!");
645
646             break;
647         case 159:
648         case 160:
649             muta_class = &(creature_ptr->muta3);
650             muta_which = MUT3_SHORT_LEG;
651             muta_desc = _("足が短い突起になってしまった!", "Your legs turn into short stubs!");
652
653             break;
654         case 161:
655         case 162:
656             muta_class = &(creature_ptr->muta3);
657             muta_which = MUT3_ELEC_TOUC;
658             muta_desc = _("血管を電流が流れ始めた!", "Electricity starts running through you!");
659
660             break;
661         case 163:
662         case 164:
663             muta_class = &(creature_ptr->muta3);
664             muta_which = MUT3_FIRE_BODY;
665             muta_desc = _("あなたの体は炎につつまれている。", "Your body is enveloped in flames!");
666
667             break;
668         case 165:
669         case 166:
670         case 167:
671             muta_class = &(creature_ptr->muta3);
672             muta_which = MUT3_WART_SKIN;
673             muta_desc = _("気持ち悪いイボイボが体中にできた!", "Disgusting warts appear everywhere on you!");
674
675             break;
676         case 168:
677         case 169:
678         case 170:
679             muta_class = &(creature_ptr->muta3);
680             muta_which = MUT3_SCALES;
681             muta_desc = _("肌が黒い鱗に変わった!", "Your skin turns into black scales!");
682
683             break;
684         case 171:
685         case 172:
686             muta_class = &(creature_ptr->muta3);
687             muta_which = MUT3_IRON_SKIN;
688             muta_desc = _("あなたの肌は鉄になった!", "Your skin turns to steel!");
689
690             break;
691         case 173:
692         case 174:
693             muta_class = &(creature_ptr->muta3);
694             muta_which = MUT3_WINGS;
695             muta_desc = _("背中に羽が生えた。", "You grow a pair of wings.");
696
697             break;
698         case 175:
699         case 176:
700         case 177:
701             muta_class = &(creature_ptr->muta3);
702             muta_which = MUT3_FEARLESS;
703             muta_desc = _("完全に怖れ知らずになった。", "You become completely fearless.");
704
705             break;
706         case 178:
707         case 179:
708             muta_class = &(creature_ptr->muta3);
709             muta_which = MUT3_REGEN;
710             muta_desc = _("急速に回復し始めた。", "You start regenerating.");
711
712             break;
713         case 180:
714         case 181:
715             muta_class = &(creature_ptr->muta3);
716             muta_which = MUT3_ESP;
717             muta_desc = _("テレパシーの能力を得た!", "You develop a telepathic ability!");
718
719             break;
720         case 182:
721         case 183:
722         case 184:
723             muta_class = &(creature_ptr->muta3);
724             muta_which = MUT3_LIMBER;
725             muta_desc = _("筋肉がしなやかになった。", "Your muscles become limber.");
726
727             break;
728         case 185:
729         case 186:
730         case 187:
731             muta_class = &(creature_ptr->muta3);
732             muta_which = MUT3_ARTHRITIS;
733             muta_desc = _("関節が突然痛み出した。", "Your joints suddenly hurt.");
734
735             break;
736         case 188:
737             if (creature_ptr->pseikaku == PERSONALITY_LUCKY)
738                 break;
739             muta_class = &(creature_ptr->muta3);
740             muta_which = MUT3_BAD_LUCK;
741             muta_desc = _("悪意に満ちた黒いオーラがあなたをとりまいた...", "There is a malignant black aura surrounding you...");
742
743             break;
744         case 189:
745             muta_class = &(creature_ptr->muta3);
746             muta_which = MUT3_VULN_ELEM;
747             muta_desc = _("妙に無防備になった気がする。", "You feel strangely exposed.");
748
749             break;
750         case 190:
751         case 191:
752         case 192:
753             muta_class = &(creature_ptr->muta3);
754             muta_which = MUT3_MOTION;
755             muta_desc = _("体の動作がより正確になった。", "You move with new assurance.");
756
757             break;
758         case 193:
759             muta_class = &(creature_ptr->muta3);
760             muta_which = MUT3_GOOD_LUCK;
761             muta_desc = _("慈悲深い白いオーラがあなたをとりまいた...", "There is a benevolent white aura surrounding you...");
762
763             break;
764         default:
765             muta_class = NULL;
766             muta_which = 0;
767         }
768
769         if (muta_class && muta_which) {
770             if (!(*muta_class & muta_which)) {
771                 muta_chosen = TRUE;
772             }
773         }
774         if (muta_chosen == TRUE)
775             break;
776     }
777
778     if (!muta_chosen) {
779         msg_print(_("普通になった気がする。", "You feel normal."));
780         return FALSE;
781     }
782
783     chg_virtue(creature_ptr, V_CHANCE, 1);
784
785     /*
786       some races are apt to gain specified mutations
787       This should be allowed only if "choose_mut" is 0.
788                                             --- henkma
789     */
790     if (!choose_mut) {
791         if (creature_ptr->prace == RACE_VAMPIRE && !(creature_ptr->muta1 & MUT1_HYPN_GAZE) && (randint1(10) < 7)) {
792             muta_class = &(creature_ptr->muta1);
793             muta_which = MUT1_HYPN_GAZE;
794             muta_desc = _("眼が幻惑的になった...", "Your eyes look mesmerizing...");
795
796         }
797
798         else if (creature_ptr->prace == RACE_IMP && !(creature_ptr->muta2 & MUT2_HORNS) && (randint1(10) < 7)) {
799             muta_class = &(creature_ptr->muta2);
800             muta_which = MUT2_HORNS;
801             muta_desc = _("角が額から生えてきた!", "Horns pop forth into your forehead!");
802
803         }
804
805         else if (creature_ptr->prace == RACE_YEEK && !(creature_ptr->muta1 & MUT1_SHRIEK) && (randint1(10) < 7)) {
806             muta_class = &(creature_ptr->muta1);
807             muta_which = MUT1_SHRIEK;
808             muta_desc = _("声質がかなり強くなった。", "Your vocal cords get much tougher.");
809
810         }
811
812         else if (creature_ptr->prace == RACE_BEASTMAN && !(creature_ptr->muta1 & MUT1_POLYMORPH) && (randint1(10) < 2)) {
813             muta_class = &(creature_ptr->muta1);
814             muta_which = MUT1_POLYMORPH;
815             muta_desc = _("あなたの肉体は変化できるようになった、", "Your body seems mutable.");
816
817         }
818
819         else if (creature_ptr->prace == RACE_MIND_FLAYER && !(creature_ptr->muta2 & MUT2_TENTACLES) && (randint1(10) < 7)) {
820             muta_class = &(creature_ptr->muta2);
821             muta_which = MUT2_TENTACLES;
822             muta_desc = _("邪悪な触手が口の周りに生えた。", "Evil-looking tentacles sprout from your mouth.");
823         }
824     }
825
826     msg_print(_("突然変異した!", "You mutate!"));
827
828     msg_print(muta_desc);
829     *muta_class |= muta_which;
830
831     if (muta_class == &(creature_ptr->muta3)) {
832         if (muta_which == MUT3_PUNY) {
833             if (creature_ptr->muta3 & MUT3_HYPER_STR) {
834                 msg_print(_("あなたはもう超人的に強くはない!", "You no longer feel super-strong!"));
835
836                 creature_ptr->muta3 &= ~(MUT3_HYPER_STR);
837             }
838         } else if (muta_which == MUT3_HYPER_STR) {
839             if (creature_ptr->muta3 & MUT3_PUNY) {
840                 msg_print(_("あなたはもう虚弱ではない!", "You no longer feel puny!"));
841
842                 creature_ptr->muta3 &= ~(MUT3_PUNY);
843             }
844         } else if (muta_which == MUT3_MORONIC) {
845             if (creature_ptr->muta3 & MUT3_HYPER_INT) {
846                 msg_print(_("あなたの脳はもう生体コンピュータではない。", "Your brain is no longer a living computer."));
847
848                 creature_ptr->muta3 &= ~(MUT3_HYPER_INT);
849             }
850         } else if (muta_which == MUT3_HYPER_INT) {
851             if (creature_ptr->muta3 & MUT3_MORONIC) {
852                 msg_print(_("あなたはもう精神薄弱ではない。", "You are no longer moronic."));
853
854                 creature_ptr->muta3 &= ~(MUT3_MORONIC);
855             }
856         } else if (muta_which == MUT3_IRON_SKIN) {
857             if (creature_ptr->muta3 & MUT3_SCALES) {
858                 msg_print(_("鱗がなくなった。", "You lose your scales."));
859
860                 creature_ptr->muta3 &= ~(MUT3_SCALES);
861             }
862             if (creature_ptr->muta3 & MUT3_FLESH_ROT) {
863                 msg_print(_("肉体が腐乱しなくなった。", "Your flesh rots no longer."));
864
865                 creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
866             }
867             if (creature_ptr->muta3 & MUT3_WART_SKIN) {
868                 msg_print(_("肌のイボイボがなくなった。", "You lose your warts."));
869
870                 creature_ptr->muta3 &= ~(MUT3_WART_SKIN);
871             }
872         } else if (muta_which == MUT3_WART_SKIN || muta_which == MUT3_SCALES || muta_which == MUT3_FLESH_ROT) {
873             if (creature_ptr->muta3 & MUT3_IRON_SKIN) {
874                 msg_print(_("あなたの肌はもう鉄ではない。", "Your skin is no longer made of steel."));
875
876                 creature_ptr->muta3 &= ~(MUT3_IRON_SKIN);
877             }
878         } else if (muta_which == MUT3_FEARLESS) {
879             if (creature_ptr->muta2 & MUT2_COWARDICE) {
880                 msg_print(_("臆病でなくなった。", "You are no longer cowardly."));
881
882                 creature_ptr->muta2 &= ~(MUT2_COWARDICE);
883             }
884         } else if (muta_which == MUT3_FLESH_ROT) {
885             if (creature_ptr->muta3 & MUT3_REGEN) {
886                 msg_print(_("急速に回復しなくなった。", "You stop regenerating."));
887
888                 creature_ptr->muta3 &= ~(MUT3_REGEN);
889             }
890         } else if (muta_which == MUT3_REGEN) {
891             if (creature_ptr->muta3 & MUT3_FLESH_ROT) {
892                 msg_print(_("肉体が腐乱しなくなった。", "Your flesh stops rotting."));
893
894                 creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
895             }
896         } else if (muta_which == MUT3_LIMBER) {
897             if (creature_ptr->muta3 & MUT3_ARTHRITIS) {
898                 msg_print(_("関節が痛くなくなった。", "Your joints stop hurting."));
899
900                 creature_ptr->muta3 &= ~(MUT3_ARTHRITIS);
901             }
902         } else if (muta_which == MUT3_ARTHRITIS) {
903             if (creature_ptr->muta3 & MUT3_LIMBER) {
904                 msg_print(_("あなたはしなやかでなくなった。", "You no longer feel limber."));
905
906                 creature_ptr->muta3 &= ~(MUT3_LIMBER);
907             }
908         }
909     } else if (muta_class == &(creature_ptr->muta2)) {
910         if (muta_which == MUT2_COWARDICE) {
911             if (creature_ptr->muta3 & MUT3_FEARLESS) {
912                 msg_print(_("恐れ知らずでなくなった。", "You no longer feel fearless."));
913
914                 creature_ptr->muta3 &= ~(MUT3_FEARLESS);
915             }
916         }
917         if (muta_which == MUT2_BEAK) {
918             if (creature_ptr->muta2 & MUT2_TRUNK) {
919                 msg_print(_("あなたの鼻はもう象の鼻のようではなくなった。", "Your nose is no longer elephantine."));
920
921                 creature_ptr->muta2 &= ~(MUT2_TRUNK);
922             }
923         }
924         if (muta_which == MUT2_TRUNK) {
925             if (creature_ptr->muta2 & MUT2_BEAK) {
926                 msg_print(_("硬いクチバシがなくなった。", "You no longer have a hard beak."));
927
928                 creature_ptr->muta2 &= ~(MUT2_BEAK);
929             }
930         }
931     }
932
933     creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
934     creature_ptr->update |= PU_BONUS;
935     handle_stuff(creature_ptr);
936     return TRUE;
937 }
938
939 /*!
940  * @brief プレイヤーから突然変異を取り除く
941  * @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去
942  * @return なし
943  */
944 bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
945 {
946     int attempts_left = 20;
947     concptr muta_desc = "";
948     bool muta_chosen = FALSE;
949     int muta_which = 0; // mutation_flag_type_1 とmutation_flag_type_2 の両対応とするため、敢えてint型で定義する
950     BIT_FLAGS *muta_class = NULL;
951
952     if (choose_mut)
953         attempts_left = 1;
954
955     while (attempts_left--) {
956         switch (choose_mut ? choose_mut : randint1(193)) {
957         case 1:
958         case 2:
959         case 3:
960         case 4:
961             muta_class = &(creature_ptr->muta1);
962             muta_which = MUT1_SPIT_ACID;
963             muta_desc = _("酸を吹きかける能力を失った。", "You lose the ability to spit acid.");
964
965             break;
966         case 5:
967         case 6:
968         case 7:
969             muta_class = &(creature_ptr->muta1);
970             muta_which = MUT1_BR_FIRE;
971             muta_desc = _("炎のブレスを吐く能力を失った。", "You lose the ability to breathe fire.");
972
973             break;
974         case 8:
975         case 9:
976             muta_class = &(creature_ptr->muta1);
977             muta_which = MUT1_HYPN_GAZE;
978             muta_desc = _("あなたの目はつまらない目になった。", "Your eyes look uninteresting.");
979
980             break;
981         case 10:
982         case 11:
983             muta_class = &(creature_ptr->muta1);
984             muta_which = MUT1_TELEKINES;
985             muta_desc = _("念動力で物を動かす能力を失った。", "You lose the ability to move objects telekinetically.");
986
987             break;
988         case 12:
989         case 13:
990         case 14:
991             muta_class = &(creature_ptr->muta1);
992             muta_which = MUT1_VTELEPORT;
993             muta_desc = _("自分の意思でテレポートする能力を失った。", "You lose the power of teleportation at will.");
994
995             break;
996         case 15:
997         case 16:
998             muta_class = &(creature_ptr->muta1);
999             muta_which = MUT1_MIND_BLST;
1000             muta_desc = _("精神攻撃の能力を失った。", "You lose the power of Mind Blast.");
1001
1002             break;
1003         case 17:
1004         case 18:
1005             muta_class = &(creature_ptr->muta1);
1006             muta_which = MUT1_RADIATION;
1007             muta_desc = _("あなたは放射能を発生しなくなった。", "You stop emitting hard radiation.");
1008
1009             break;
1010         case 19:
1011         case 20:
1012             muta_class = &(creature_ptr->muta1);
1013             muta_which = MUT1_VAMPIRISM;
1014             muta_desc = _("吸血の能力を失った。", "You are no longer vampiric.");
1015
1016             break;
1017         case 21:
1018         case 22:
1019         case 23:
1020             muta_class = &(creature_ptr->muta1);
1021             muta_which = MUT1_SMELL_MET;
1022             muta_desc = _("金属の臭いを嗅げなくなった。", "You no longer smell a metallic odor.");
1023
1024             break;
1025         case 24:
1026         case 25:
1027         case 26:
1028         case 27:
1029             muta_class = &(creature_ptr->muta1);
1030             muta_which = MUT1_SMELL_MON;
1031             muta_desc = _("不潔なモンスターの臭いを嗅げなくなった。", "You no longer smell filthy monsters.");
1032
1033             break;
1034         case 28:
1035         case 29:
1036         case 30:
1037             muta_class = &(creature_ptr->muta1);
1038             muta_which = MUT1_BLINK;
1039             muta_desc = _("近距離テレポートの能力を失った。", "You lose the power of minor teleportation.");
1040
1041             break;
1042         case 31:
1043         case 32:
1044             muta_class = &(creature_ptr->muta1);
1045             muta_which = MUT1_EAT_ROCK;
1046             muta_desc = _("壁は美味しそうに見えなくなった。", "The walls look unappetizing.");
1047
1048             break;
1049         case 33:
1050         case 34:
1051             muta_class = &(creature_ptr->muta1);
1052             muta_which = MUT1_SWAP_POS;
1053             muta_desc = _("あなたは自分の靴に留まる感じがする。", "You feel like staying in your own shoes.");
1054
1055             break;
1056         case 35:
1057         case 36:
1058         case 37:
1059             muta_class = &(creature_ptr->muta1);
1060             muta_which = MUT1_SHRIEK;
1061             muta_desc = _("あなたの声質は弱くなった。", "Your vocal cords get much weaker.");
1062
1063             break;
1064         case 38:
1065         case 39:
1066         case 40:
1067             muta_class = &(creature_ptr->muta1);
1068             muta_which = MUT1_ILLUMINE;
1069             muta_desc = _("部屋を明るく照らすことが出来なくなった。", "You can no longer light up rooms with your presence.");
1070
1071             break;
1072         case 41:
1073         case 42:
1074             muta_class = &(creature_ptr->muta1);
1075             muta_which = MUT1_DET_CURSE;
1076             muta_desc = _("邪悪な魔法を感じられなくなった。", "You can no longer feel evil magics.");
1077
1078             break;
1079         case 43:
1080         case 44:
1081         case 45:
1082             muta_class = &(creature_ptr->muta1);
1083             muta_which = MUT1_BERSERK;
1084             muta_desc = _("制御できる激情を感じなくなった。", "You no longer feel a controlled rage.");
1085
1086             break;
1087         case 46:
1088             muta_class = &(creature_ptr->muta1);
1089             muta_which = MUT1_POLYMORPH;
1090             muta_desc = _("あなたの体は安定したように見える。", "Your body seems stable.");
1091
1092             break;
1093         case 47:
1094         case 48:
1095             muta_class = &(creature_ptr->muta1);
1096             muta_which = MUT1_MIDAS_TCH;
1097             muta_desc = _("ミダスの手の能力を失った。", "You lose the Midas touch.");
1098
1099             break;
1100         case 49:
1101             muta_class = &(creature_ptr->muta1);
1102             muta_which = MUT1_GROW_MOLD;
1103             muta_desc = _("突然カビが嫌いになった。", "You feel a sudden dislike for mold.");
1104
1105             break;
1106         case 50:
1107         case 51:
1108         case 52:
1109             muta_class = &(creature_ptr->muta1);
1110             muta_which = MUT1_RESIST;
1111             muta_desc = _("傷つき易くなった気がする。", "You feel like you might be vulnerable.");
1112
1113             break;
1114         case 53:
1115         case 54:
1116         case 55:
1117             muta_class = &(creature_ptr->muta1);
1118             muta_which = MUT1_EARTHQUAKE;
1119             muta_desc = _("ダンジョンを壊す能力を失った。", "You lose the ability to wreck the dungeon.");
1120
1121             break;
1122         case 56:
1123             muta_class = &(creature_ptr->muta1);
1124             muta_which = MUT1_EAT_MAGIC;
1125             muta_desc = _("魔法のアイテムはもう美味しそうに見えなくなった。", "Your magic items no longer look delicious.");
1126
1127             break;
1128         case 57:
1129         case 58:
1130             muta_class = &(creature_ptr->muta1);
1131             muta_which = MUT1_WEIGH_MAG;
1132             muta_desc = _("魔力を感じられなくなった。", "You no longer sense magic.");
1133
1134             break;
1135         case 59:
1136             muta_class = &(creature_ptr->muta1);
1137             muta_which = MUT1_STERILITY;
1138             muta_desc = _("たくさんの安堵の吐息が聞こえた。", "You hear a massed sigh of relief.");
1139
1140             break;
1141         case 60:
1142         case 61:
1143             muta_class = &(creature_ptr->muta1);
1144             muta_which = MUT1_HIT_AND_AWAY;
1145             muta_desc = _("あちこちへ跳べる気分がなくなった。", "You no longer feel jumpy.");
1146
1147             break;
1148         case 62:
1149         case 63:
1150         case 64:
1151             muta_class = &(creature_ptr->muta1);
1152             muta_which = MUT1_DAZZLE;
1153             muta_desc = _("まばゆい閃光を発する能力を失った。", "You lose the ability to emit dazzling lights.");
1154
1155             break;
1156         case 65:
1157         case 66:
1158         case 67:
1159             muta_class = &(creature_ptr->muta1);
1160             muta_which = MUT1_LASER_EYE;
1161             muta_desc = _("眼が少しの間焼き付いて、痛みが和らいだ。", "Your eyes burn for a moment, then feel soothed.");
1162
1163             break;
1164         case 68:
1165         case 69:
1166             muta_class = &(creature_ptr->muta1);
1167             muta_which = MUT1_RECALL;
1168             muta_desc = _("少しの間ホームシックになった。", "You feel briefly homesick.");
1169
1170             break;
1171         case 70:
1172             muta_class = &(creature_ptr->muta1);
1173             muta_which = MUT1_BANISH;
1174             muta_desc = _("神聖な怒りの力を感じなくなった。", "You no longer feel a holy wrath.");
1175
1176             break;
1177         case 71:
1178         case 72:
1179             muta_class = &(creature_ptr->muta1);
1180             muta_which = MUT1_COLD_TOUCH;
1181             muta_desc = _("手が暖かくなった。", "Your hands warm up.");
1182
1183             break;
1184         case 73:
1185         case 74:
1186             muta_class = &(creature_ptr->muta1);
1187             muta_which = MUT1_LAUNCHER;
1188             muta_desc = _("物を投げる手が弱くなった気がする。", "Your throwing arm feels much weaker.");
1189
1190             break;
1191         case 75:
1192             muta_class = &(creature_ptr->muta2);
1193             muta_which = MUT2_BERS_RAGE;
1194             muta_desc = _("凶暴化の発作にさらされなくなった!", "You are no longer subject to fits of berserk rage!");
1195
1196             break;
1197         case 76:
1198             muta_class = &(creature_ptr->muta2);
1199             muta_which = MUT2_COWARDICE;
1200             muta_desc = _("もう信じがたいほど臆病ではなくなった!", "You are no longer an incredible coward!");
1201
1202             break;
1203         case 77:
1204             muta_class = &(creature_ptr->muta2);
1205             muta_which = MUT2_RTELEPORT;
1206             muta_desc = _("あなたの位置はより確定的になった。", "Your position seems more certain.");
1207
1208             break;
1209         case 78:
1210             muta_class = &(creature_ptr->muta2);
1211             muta_which = MUT2_ALCOHOL;
1212             muta_desc = _("あなたはアルコールを分泌しなくなった!", "Your body stops producing alcohol!");
1213
1214             break;
1215         case 79:
1216             muta_class = &(creature_ptr->muta2);
1217             muta_which = MUT2_HALLU;
1218             muta_desc = _("幻覚をひき起こす精神障害を起こさなくなった!", "You are no longer afflicted by a hallucinatory insanity!");
1219
1220             break;
1221         case 80:
1222             muta_class = &(creature_ptr->muta2);
1223             muta_which = MUT2_FLATULENT;
1224             muta_desc = _("もう強烈な屁はこかなくなった。", "You are no longer subject to uncontrollable flatulence.");
1225
1226             break;
1227         case 81:
1228         case 82:
1229             muta_class = &(creature_ptr->muta2);
1230             muta_which = MUT2_SCOR_TAIL;
1231             muta_desc = _("サソリの尻尾がなくなった!", "You lose your scorpion tail!");
1232
1233             break;
1234         case 83:
1235         case 84:
1236             muta_class = &(creature_ptr->muta2);
1237             muta_which = MUT2_HORNS;
1238             muta_desc = _("額から角が消えた!", "Your horns vanish from your forehead!");
1239
1240             break;
1241         case 85:
1242         case 86:
1243             muta_class = &(creature_ptr->muta2);
1244             muta_which = MUT2_BEAK;
1245             muta_desc = _("口が普通に戻った!", "Your mouth reverts to normal!");
1246
1247             break;
1248         case 87:
1249         case 88:
1250             muta_class = &(creature_ptr->muta2);
1251             muta_which = MUT2_ATT_DEMON;
1252             muta_desc = _("デーモンを引き寄せなくなった。", "You stop attracting demons.");
1253
1254             break;
1255         case 89:
1256             muta_class = &(creature_ptr->muta2);
1257             muta_which = MUT2_PROD_MANA;
1258             muta_desc = _("制御不能な魔法のエネルギーを発生しなくなった。", "You stop producing magical energy uncontrollably.");
1259
1260             break;
1261         case 90:
1262         case 91:
1263             muta_class = &(creature_ptr->muta2);
1264             muta_which = MUT2_SPEED_FLUX;
1265             muta_desc = _("躁鬱質でなくなった。", "You are no longer manic-depressive.");
1266
1267             break;
1268         case 92:
1269         case 93:
1270             muta_class = &(creature_ptr->muta2);
1271             muta_which = MUT2_BANISH_ALL;
1272             muta_desc = _("背後に恐ろしい力を感じなくなった。", "You no longer feel a terrifying power lurking behind you.");
1273
1274             break;
1275         case 94:
1276             muta_class = &(creature_ptr->muta2);
1277             muta_which = MUT2_EAT_LIGHT;
1278             muta_desc = _("世界が明るいと感じる。", "You feel the world's a brighter place.");
1279
1280             break;
1281         case 95:
1282         case 96:
1283             muta_class = &(creature_ptr->muta2);
1284             muta_which = MUT2_TRUNK;
1285             muta_desc = _("鼻が普通の長さに戻った。", "Your nose returns to a normal length.");
1286
1287             break;
1288         case 97:
1289             muta_class = &(creature_ptr->muta2);
1290             muta_which = MUT2_ATT_ANIMAL;
1291             muta_desc = _("動物を引き寄せなくなった。", "You stop attracting animals.");
1292
1293             break;
1294         case 98:
1295             muta_class = &(creature_ptr->muta2);
1296             muta_which = MUT2_TENTACLES;
1297             muta_desc = _("触手が消えた。", "Your tentacles vanish from your sides.");
1298
1299             break;
1300         case 99:
1301             muta_class = &(creature_ptr->muta2);
1302             muta_which = MUT2_RAW_CHAOS;
1303             muta_desc = _("周囲の空間が安定した気がする。", "You feel the universe is more stable around you.");
1304
1305             break;
1306         case 100:
1307         case 101:
1308         case 102:
1309             muta_class = &(creature_ptr->muta2);
1310             muta_which = MUT2_NORMALITY;
1311             muta_desc = _("普通に奇妙な感じがする。", "You feel normally strange.");
1312
1313             break;
1314         case 103:
1315             muta_class = &(creature_ptr->muta2);
1316             muta_which = MUT2_WRAITH;
1317             muta_desc = _("あなたは物質世界にしっかり存在している。", "You are firmly in the physical world.");
1318
1319             break;
1320         case 104:
1321             muta_class = &(creature_ptr->muta2);
1322             muta_which = MUT2_POLY_WOUND;
1323             muta_desc = _("古い傷からカオスの力が去っていった。", "You feel forces of chaos departing your old scars.");
1324
1325             break;
1326         case 105:
1327             muta_class = &(creature_ptr->muta2);
1328             muta_which = MUT2_WASTING;
1329             muta_desc = _("おぞましい衰弱病が治った!", "You are cured of the horrible wasting disease!");
1330
1331             break;
1332         case 106:
1333             muta_class = &(creature_ptr->muta2);
1334             muta_which = MUT2_ATT_DRAGON;
1335             muta_desc = _("ドラゴンを引き寄せなくなった。", "You stop attracting dragons.");
1336
1337             break;
1338         case 107:
1339         case 108:
1340             muta_class = &(creature_ptr->muta2);
1341             muta_which = MUT2_WEIRD_MIND;
1342             muta_desc = _("思考が退屈な方向に戻った。", "Your thoughts return to boring paths.");
1343
1344             break;
1345         case 109:
1346             muta_class = &(creature_ptr->muta2);
1347             muta_which = MUT2_NAUSEA;
1348             muta_desc = _("胃が痙攣しなくなった。", "Your stomach stops roiling.");
1349
1350             break;
1351         case 110:
1352         case 111:
1353             muta_class = &(creature_ptr->muta2);
1354             muta_which = MUT2_CHAOS_GIFT;
1355             muta_desc = _("混沌の神々の興味を惹かなくなった。", "You lose the attention of the chaos deities.");
1356
1357             break;
1358         case 112:
1359             muta_class = &(creature_ptr->muta2);
1360             muta_which = MUT2_WALK_SHAD;
1361             muta_desc = _("物質世界に捕らわれている気がする。", "You feel like you're trapped in reality.");
1362
1363             break;
1364         case 113:
1365         case 114:
1366             muta_class = &(creature_ptr->muta2);
1367             muta_which = MUT2_WARNING;
1368             muta_desc = _("パラノイアでなくなった。", "You no longer feel paranoid.");
1369
1370             break;
1371         case 115:
1372             muta_class = &(creature_ptr->muta2);
1373             muta_which = MUT2_INVULN;
1374             muta_desc = _("無敵状態の発作を起こさなくなった。", "You are no longer blessed with fits of invulnerability.");
1375
1376             break;
1377         case 116:
1378         case 117:
1379             muta_class = &(creature_ptr->muta2);
1380             muta_which = MUT2_SP_TO_HP;
1381             muta_desc = _("魔法の治癒の発作に襲われなくなった。", "You are no longer subject to fits of magical healing.");
1382
1383             break;
1384         case 118:
1385             muta_class = &(creature_ptr->muta2);
1386             muta_which = MUT2_HP_TO_SP;
1387             muta_desc = _("痛みを伴う精神明瞭化の発作に襲われなくなった。", "You are no longer subject to fits of painful clarity.");
1388
1389             break;
1390         case 119:
1391             muta_class = &(creature_ptr->muta2);
1392             muta_which = MUT2_DISARM;
1393             muta_desc = _("脚が元の大きさに戻った。", "Your feet shrink to their former size.");
1394
1395             break;
1396         case 120:
1397         case 121:
1398         case 122:
1399             muta_class = &(creature_ptr->muta3);
1400             muta_which = MUT3_HYPER_STR;
1401             muta_desc = _("筋肉が普通に戻った。", "Your muscles revert to normal.");
1402
1403             break;
1404         case 123:
1405         case 124:
1406         case 125:
1407             muta_class = &(creature_ptr->muta3);
1408             muta_which = MUT3_PUNY;
1409             muta_desc = _("筋肉が普通に戻った。", "Your muscles revert to normal.");
1410
1411             break;
1412         case 126:
1413         case 127:
1414         case 128:
1415             muta_class = &(creature_ptr->muta3);
1416             muta_which = MUT3_HYPER_INT;
1417             muta_desc = _("脳が普通に戻った。", "Your brain reverts to normal.");
1418
1419             break;
1420         case 129:
1421         case 130:
1422         case 131:
1423             muta_class = &(creature_ptr->muta3);
1424             muta_which = MUT3_MORONIC;
1425             muta_desc = _("脳が普通に戻った。", "Your brain reverts to normal.");
1426
1427             break;
1428         case 132:
1429         case 133:
1430             muta_class = &(creature_ptr->muta3);
1431             muta_which = MUT3_RESILIENT;
1432             muta_desc = _("普通の丈夫さに戻った。", "You become ordinarily resilient again.");
1433
1434             break;
1435         case 134:
1436         case 135:
1437             muta_class = &(creature_ptr->muta3);
1438             muta_which = MUT3_XTRA_FAT;
1439             muta_desc = _("奇跡的なダイエットに成功した!", "You benefit from a miracle diet!");
1440
1441             break;
1442         case 136:
1443         case 137:
1444             muta_class = &(creature_ptr->muta3);
1445             muta_which = MUT3_ALBINO;
1446             muta_desc = _("アルビノでなくなった!", "You are no longer an albino!");
1447
1448             break;
1449         case 138:
1450         case 139:
1451         case 140:
1452             muta_class = &(creature_ptr->muta3);
1453             muta_which = MUT3_FLESH_ROT;
1454             muta_desc = _("肉体を腐敗させる病気が治った!", "Your flesh is no longer afflicted by a rotting disease!");
1455
1456             break;
1457         case 141:
1458         case 142:
1459             muta_class = &(creature_ptr->muta3);
1460             muta_which = MUT3_SILLY_VOI;
1461             muta_desc = _("声質が普通に戻った。", "Your voice returns to normal.");
1462
1463             break;
1464         case 143:
1465         case 144:
1466             muta_class = &(creature_ptr->muta3);
1467             muta_which = MUT3_BLANK_FAC;
1468             muta_desc = _("顔に目鼻が戻った。", "Your facial features return.");
1469
1470             break;
1471         case 145:
1472             muta_class = &(creature_ptr->muta3);
1473             muta_which = MUT3_ILL_NORM;
1474             muta_desc = _("心が安らぐ幻影を映し出さなくなった。", "You stop projecting a reassuring image.");
1475
1476             break;
1477         case 146:
1478         case 147:
1479         case 148:
1480             muta_class = &(creature_ptr->muta3);
1481             muta_which = MUT3_XTRA_EYES;
1482             muta_desc = _("余分な目が消えてしまった!", "Your extra eyes vanish!");
1483
1484             break;
1485         case 149:
1486         case 150:
1487             muta_class = &(creature_ptr->muta3);
1488             muta_which = MUT3_MAGIC_RES;
1489             muta_desc = _("魔法に弱くなった。", "You become susceptible to magic again.");
1490
1491             break;
1492         case 151:
1493         case 152:
1494         case 153:
1495             muta_class = &(creature_ptr->muta3);
1496             muta_which = MUT3_XTRA_NOIS;
1497             muta_desc = _("奇妙な音を立てなくなった!", "You stop making strange noise!");
1498
1499             break;
1500         case 154:
1501         case 155:
1502         case 156:
1503             muta_class = &(creature_ptr->muta3);
1504             muta_which = MUT3_INFRAVIS;
1505             muta_desc = _("赤外線視力が落ちた。", "Your infravision is degraded.");
1506
1507             break;
1508         case 157:
1509         case 158:
1510             muta_class = &(creature_ptr->muta3);
1511             muta_which = MUT3_XTRA_LEGS;
1512             muta_desc = _("余分な脚が消えてしまった!", "Your extra legs disappear!");
1513
1514             break;
1515         case 159:
1516         case 160:
1517             muta_class = &(creature_ptr->muta3);
1518             muta_which = MUT3_SHORT_LEG;
1519             muta_desc = _("脚の長さが普通に戻った。", "Your legs lengthen to normal.");
1520
1521             break;
1522         case 161:
1523         case 162:
1524             muta_class = &(creature_ptr->muta3);
1525             muta_which = MUT3_ELEC_TOUC;
1526             muta_desc = _("体を電流が流れなくなった。", "Electricity stops running through you.");
1527
1528             break;
1529         case 163:
1530         case 164:
1531             muta_class = &(creature_ptr->muta3);
1532             muta_which = MUT3_FIRE_BODY;
1533             muta_desc = _("体が炎に包まれなくなった。", "Your body is no longer enveloped in flames.");
1534
1535             break;
1536         case 165:
1537         case 166:
1538         case 167:
1539             muta_class = &(creature_ptr->muta3);
1540             muta_which = MUT3_WART_SKIN;
1541             muta_desc = _("イボイボが消えた!", "Your warts disappear!");
1542
1543             break;
1544         case 168:
1545         case 169:
1546         case 170:
1547             muta_class = &(creature_ptr->muta3);
1548             muta_which = MUT3_SCALES;
1549             muta_desc = _("鱗が消えた!", "Your scales vanish!");
1550
1551             break;
1552         case 171:
1553         case 172:
1554             muta_class = &(creature_ptr->muta3);
1555             muta_which = MUT3_IRON_SKIN;
1556             muta_desc = _("肌が肉にもどった!", "Your skin reverts to flesh!");
1557
1558             break;
1559         case 173:
1560         case 174:
1561             muta_class = &(creature_ptr->muta3);
1562             muta_which = MUT3_WINGS;
1563             muta_desc = _("背中の羽根が取れ落ちた。", "Your wings fall off.");
1564
1565             break;
1566         case 175:
1567         case 176:
1568         case 177:
1569             muta_class = &(creature_ptr->muta3);
1570             muta_which = MUT3_FEARLESS;
1571             muta_desc = _("再び恐怖を感じるようになった。", "You begin to feel fear again.");
1572
1573             break;
1574         case 178:
1575         case 179:
1576             muta_class = &(creature_ptr->muta3);
1577             muta_which = MUT3_REGEN;
1578             muta_desc = _("急速回復しなくなった。", "You stop regenerating.");
1579
1580             break;
1581         case 180:
1582         case 181:
1583             muta_class = &(creature_ptr->muta3);
1584             muta_which = MUT3_ESP;
1585             muta_desc = _("テレパシーの能力を失った!", "You lose your telepathic ability!");
1586
1587             break;
1588         case 182:
1589         case 183:
1590         case 184:
1591             muta_class = &(creature_ptr->muta3);
1592             muta_which = MUT3_LIMBER;
1593             muta_desc = _("筋肉が硬くなった。", "Your muscles stiffen.");
1594
1595             break;
1596         case 185:
1597         case 186:
1598         case 187:
1599             muta_class = &(creature_ptr->muta3);
1600             muta_which = MUT3_ARTHRITIS;
1601             muta_desc = _("関節が痛くなくなった。", "Your joints stop hurting.");
1602
1603             break;
1604         case 188:
1605             muta_class = &(creature_ptr->muta3);
1606             muta_which = MUT3_BAD_LUCK;
1607             muta_desc = _("黒いオーラは渦巻いて消えた。", "Your black aura swirls and fades.");
1608
1609             break;
1610         case 189:
1611             muta_class = &(creature_ptr->muta3);
1612             muta_which = MUT3_VULN_ELEM;
1613             muta_desc = _("無防備な感じはなくなった。", "You feel less exposed.");
1614
1615             break;
1616         case 190:
1617         case 191:
1618         case 192:
1619             muta_class = &(creature_ptr->muta3);
1620             muta_which = MUT3_MOTION;
1621             muta_desc = _("動作の正確さがなくなった。", "You move with less assurance.");
1622
1623             break;
1624         case 193:
1625             if (creature_ptr->pseikaku == PERSONALITY_LUCKY)
1626                 break;
1627             muta_class = &(creature_ptr->muta3);
1628             muta_which = MUT3_GOOD_LUCK;
1629             muta_desc = _("白いオーラは輝いて消えた。", "Your white aura shimmers and fades.");
1630
1631             break;
1632         default:
1633             muta_class = NULL;
1634             muta_which = 0;
1635         }
1636
1637         if (muta_class && muta_which) {
1638             if (*(muta_class)&muta_which) {
1639                 muta_chosen = TRUE;
1640             }
1641         }
1642         if (muta_chosen == TRUE)
1643             break;
1644     }
1645
1646     if (!muta_chosen) {
1647         return FALSE;
1648     }
1649
1650     msg_print(muta_desc);
1651     *(muta_class) &= ~(muta_which);
1652
1653     creature_ptr->update |= PU_BONUS;
1654     handle_stuff(creature_ptr);
1655     creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
1656     return TRUE;
1657 }
1658
1659 void lose_all_mutations(player_type *creature_ptr)
1660 {
1661     if (creature_ptr->muta1 || creature_ptr->muta2 || creature_ptr->muta3) {
1662         chg_virtue(creature_ptr, V_CHANCE, -5);
1663         msg_print(_("全ての突然変異が治った。", "You are cured of all mutations."));
1664         creature_ptr->muta1 = creature_ptr->muta2 = creature_ptr->muta3 = 0;
1665         creature_ptr->update |= PU_BONUS;
1666         handle_stuff(creature_ptr);
1667         creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr);
1668     }
1669 }
1670
1671 /*!
1672  * @brief 現在プレイヤー得ている突然変異の数を返す。
1673  * @return 現在得ている突然変異の数
1674  */
1675 static int count_mutations(player_type *creature_ptr)
1676 {
1677     return (count_bits(creature_ptr->muta1) + count_bits(creature_ptr->muta2) + count_bits(creature_ptr->muta3));
1678 }
1679
1680 /*!
1681  * @brief 突然変異による自然回復ペナルティをパーセント値で返す /
1682  * Return the modifier to the regeneration rate (in percent)
1683  * @return ペナルティ修正(%)
1684  */
1685 int calc_mutant_regenerate_mod(player_type *creature_ptr)
1686 {
1687     int regen;
1688     int mod = 10;
1689     int count = count_mutations(creature_ptr);
1690
1691     /*
1692      * Beastman get 10 "free" mutations and
1693      * only 5% decrease per additional mutation
1694      */
1695
1696     if (creature_ptr->pseikaku == PERSONALITY_LUCKY)
1697         count--;
1698     if (creature_ptr->prace == RACE_BEASTMAN) {
1699         count -= 10;
1700         mod = 5;
1701     }
1702
1703     /* No negative modifier */
1704     if (count <= 0)
1705         return 100;
1706
1707     regen = 100 - count * mod;
1708
1709     /* Max. 90% decrease in regeneration speed */
1710     if (regen < 10)
1711         regen = 10;
1712
1713     return (regen);
1714 }
1715
1716 /*!
1717  * @brief 突然変異のレイシャル効果実装
1718  * @param creature_ptr プレーヤーへの参照ポインタ
1719  * @param power 発動させる突然変異レイシャルのID
1720  * @return レイシャルを実行した場合TRUE、キャンセルした場合FALSEを返す
1721  */
1722 bool exe_mutation_power(player_type *creature_ptr, int power)
1723 {
1724     DIRECTION dir = 0;
1725     PLAYER_LEVEL lvl = creature_ptr->lev;
1726
1727     switch (power) {
1728     case MUT1_SPIT_ACID:
1729         if (!get_aim_dir(creature_ptr, &dir))
1730             return FALSE;
1731         stop_mouth(creature_ptr);
1732         msg_print(_("酸を吐きかけた...", "You spit acid..."));
1733         fire_ball(creature_ptr, GF_ACID, dir, lvl, 1 + (lvl / 30));
1734         break;
1735
1736     case MUT1_BR_FIRE:
1737         if (!get_aim_dir(creature_ptr, &dir))
1738             return FALSE;
1739         stop_mouth(creature_ptr);
1740         msg_print(_("あなたは火炎のブレスを吐いた...", "You breathe fire..."));
1741         fire_breath(creature_ptr, GF_FIRE, dir, lvl * 2, 1 + (lvl / 20));
1742         break;
1743
1744     case MUT1_HYPN_GAZE:
1745         if (!get_aim_dir(creature_ptr, &dir))
1746             return FALSE;
1747         msg_print(_("あなたの目は幻惑的になった...", "Your eyes look mesmerizing..."));
1748         (void)charm_monster(creature_ptr, dir, lvl);
1749         break;
1750
1751     case MUT1_TELEKINES:
1752         if (!get_aim_dir(creature_ptr, &dir))
1753             return FALSE;
1754         msg_print(_("集中している...", "You concentrate..."));
1755         fetch_item(creature_ptr, dir, lvl * 10, TRUE);
1756         break;
1757
1758     case MUT1_VTELEPORT:
1759         msg_print(_("集中している...", "You concentrate..."));
1760         teleport_player(creature_ptr, 10 + 4 * lvl, TELEPORT_SPONTANEOUS);
1761         break;
1762
1763     case MUT1_MIND_BLST:
1764         if (!get_aim_dir(creature_ptr, &dir))
1765             return FALSE;
1766         msg_print(_("集中している...", "You concentrate..."));
1767         fire_bolt(creature_ptr, GF_PSI, dir, damroll(3 + ((lvl - 1) / 5), 3));
1768         break;
1769
1770     case MUT1_RADIATION:
1771         msg_print(_("体から放射能が発生した!", "Radiation flows from your body!"));
1772         fire_ball(creature_ptr, GF_NUKE, 0, (lvl * 2), 3 + (lvl / 20));
1773         break;
1774
1775     case MUT1_VAMPIRISM:
1776         vampirism(creature_ptr);
1777         break;
1778
1779     case MUT1_SMELL_MET:
1780         stop_mouth(creature_ptr);
1781         (void)detect_treasure(creature_ptr, DETECT_RAD_DEFAULT);
1782         break;
1783
1784     case MUT1_SMELL_MON:
1785         stop_mouth(creature_ptr);
1786         (void)detect_monsters_normal(creature_ptr, DETECT_RAD_DEFAULT);
1787         break;
1788
1789     case MUT1_BLINK:
1790         teleport_player(creature_ptr, 10, TELEPORT_SPONTANEOUS);
1791         break;
1792
1793     case MUT1_EAT_ROCK:
1794         return eat_rock(creature_ptr);
1795         break;
1796
1797     case MUT1_SWAP_POS:
1798         project_length = -1;
1799         if (!get_aim_dir(creature_ptr, &dir)) {
1800             project_length = 0;
1801             return FALSE;
1802         }
1803         (void)teleport_swap(creature_ptr, dir);
1804         project_length = 0;
1805         break;
1806
1807     case MUT1_SHRIEK:
1808         stop_mouth(creature_ptr);
1809         (void)fire_ball(creature_ptr, GF_SOUND, 0, 2 * lvl, 8);
1810         (void)aggravate_monsters(creature_ptr, 0);
1811         break;
1812
1813     case MUT1_ILLUMINE:
1814         (void)lite_area(creature_ptr, damroll(2, (lvl / 2)), (lvl / 10) + 1);
1815         break;
1816
1817     case MUT1_DET_CURSE: {
1818         int i;
1819
1820         for (i = 0; i < INVEN_TOTAL; i++) {
1821             object_type *o_ptr = &creature_ptr->inventory_list[i];
1822
1823             if (!o_ptr->k_idx)
1824                 continue;
1825             if (!object_is_cursed(o_ptr))
1826                 continue;
1827
1828             o_ptr->feeling = FEEL_CURSED;
1829         }
1830     } break;
1831
1832     case MUT1_BERSERK:
1833         (void)berserk(creature_ptr, randint1(25) + 25);
1834         break;
1835
1836     case MUT1_POLYMORPH:
1837         if (!get_check(_("変身します。よろしいですか?", "You will polymorph your self. Are you sure? ")))
1838             return FALSE;
1839         do_poly_self(creature_ptr);
1840         break;
1841
1842     case MUT1_MIDAS_TCH:
1843         if (!alchemy(creature_ptr))
1844             return FALSE;
1845         break;
1846
1847     /* Summon pet molds around the player */
1848     case MUT1_GROW_MOLD: {
1849         DIRECTION i;
1850         for (i = 0; i < 8; i++) {
1851             summon_specific(creature_ptr, -1, creature_ptr->y, creature_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET);
1852         }
1853     } break;
1854
1855     case MUT1_RESIST: {
1856         int num = lvl / 10;
1857         TIME_EFFECT dur = randint1(20) + 20;
1858
1859         if (randint0(5) < num) {
1860             (void)set_oppose_acid(creature_ptr, dur, FALSE);
1861             num--;
1862         }
1863         if (randint0(4) < num) {
1864             (void)set_oppose_elec(creature_ptr, dur, FALSE);
1865             num--;
1866         }
1867         if (randint0(3) < num) {
1868             (void)set_oppose_fire(creature_ptr, dur, FALSE);
1869             num--;
1870         }
1871         if (randint0(2) < num) {
1872             (void)set_oppose_cold(creature_ptr, dur, FALSE);
1873             num--;
1874         }
1875         if (num) {
1876             (void)set_oppose_pois(creature_ptr, dur, FALSE);
1877             num--;
1878         }
1879     } break;
1880
1881     case MUT1_EARTHQUAKE:
1882         (void)earthquake(creature_ptr, creature_ptr->y, creature_ptr->x, 10, 0);
1883         break;
1884
1885     case MUT1_EAT_MAGIC:
1886         if (!eat_magic(creature_ptr, creature_ptr->lev * 2))
1887             return FALSE;
1888         break;
1889
1890     case MUT1_WEIGH_MAG:
1891         report_magics(creature_ptr);
1892         break;
1893
1894     case MUT1_STERILITY:
1895         msg_print(_("突然頭が痛くなった!", "You suddenly have a headache!"));
1896         take_hit(creature_ptr, DAMAGE_LOSELIFE, randint1(17) + 17, _("禁欲を強いた疲労", "the strain of forcing abstinence"), -1);
1897         creature_ptr->current_floor_ptr->num_repro += MAX_REPRO;
1898         break;
1899
1900     case MUT1_HIT_AND_AWAY:
1901         if (!hit_and_away(creature_ptr))
1902             return FALSE;
1903         break;
1904
1905     case MUT1_DAZZLE:
1906         stun_monsters(creature_ptr, lvl * 4);
1907         confuse_monsters(creature_ptr, lvl * 4);
1908         turn_monsters(creature_ptr, lvl * 4);
1909         break;
1910
1911     case MUT1_LASER_EYE:
1912         if (!get_aim_dir(creature_ptr, &dir))
1913             return FALSE;
1914         fire_beam(creature_ptr, GF_LITE, dir, 2 * lvl);
1915         break;
1916
1917     case MUT1_RECALL:
1918         if (!recall_player(creature_ptr, randint0(21) + 15))
1919             return FALSE;
1920         break;
1921
1922     case MUT1_BANISH: {
1923         POSITION x, y;
1924         grid_type *g_ptr;
1925         monster_type *m_ptr;
1926         monster_race *r_ptr;
1927         if (!get_direction(creature_ptr, &dir, FALSE, FALSE))
1928             return FALSE;
1929         y = creature_ptr->y + ddy[dir];
1930         x = creature_ptr->x + ddx[dir];
1931         g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
1932
1933         if (!g_ptr->m_idx) {
1934             msg_print(_("邪悪な存在を感じとれません!", "You sense no evil there!"));
1935
1936             break;
1937         }
1938
1939         m_ptr = &creature_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
1940         r_ptr = &r_info[m_ptr->r_idx];
1941
1942         if ((r_ptr->flags3 & RF3_EVIL) && !(r_ptr->flags1 & RF1_QUESTOR) && !(r_ptr->flags1 & RF1_UNIQUE) && !creature_ptr->current_floor_ptr->inside_arena
1943             && !creature_ptr->current_floor_ptr->inside_quest && (r_ptr->level < randint1(creature_ptr->lev + 50)) && !(m_ptr->mflag2 & MFLAG2_NOGENO)) {
1944             if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) {
1945                 GAME_TEXT m_name[MAX_NLEN];
1946                 monster_desc(creature_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
1947                 exe_write_diary(creature_ptr, DIARY_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
1948             }
1949             /* Delete the monster, rather than killing it. */
1950             delete_monster_idx(creature_ptr, g_ptr->m_idx);
1951             msg_print(_("その邪悪なモンスターは硫黄臭い煙とともに消え去った!", "The evil creature vanishes in a puff of sulfurous smoke!"));
1952
1953         } else {
1954             msg_print(_("祈りは効果がなかった!", "Your invocation is ineffectual!"));
1955             if (one_in_(13))
1956                 m_ptr->mflag2 |= MFLAG2_NOGENO;
1957         }
1958     } break;
1959
1960     case MUT1_COLD_TOUCH: {
1961         POSITION x, y;
1962         grid_type *g_ptr;
1963         if (!get_direction(creature_ptr, &dir, FALSE, FALSE))
1964             return FALSE;
1965         y = creature_ptr->y + ddy[dir];
1966         x = creature_ptr->x + ddx[dir];
1967         g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
1968         if (!g_ptr->m_idx) {
1969             msg_print(_("あなたは何もない場所で手を振った。", "You wave your hands in the air."));
1970
1971             break;
1972         }
1973         fire_bolt(creature_ptr, GF_COLD, dir, 2 * lvl);
1974     } break;
1975
1976     /* XXX_XXX_XXX Hack! MUT1_LAUNCHER is negative, see above */
1977     case 3: /* MUT1_LAUNCHER */
1978         /* Gives a multiplier of 2 at first, up to 3 at 40th */
1979         if (!do_cmd_throw(creature_ptr, 2 + lvl / 40, FALSE, -1))
1980             return FALSE;
1981         break;
1982
1983     default:
1984         free_turn(creature_ptr);
1985         msg_format(_("能力 %s は実装されていません。", "Power %s not implemented. Oops."), power);
1986     }
1987
1988     return TRUE;
1989 }
1990
1991 void become_living_trump(player_type *creature_ptr)
1992 {
1993     MUTATION_IDX mutation;
1994
1995     if (one_in_(7))
1996         mutation = 12; /* Teleport control */
1997     else
1998         mutation = 77; /* Random teleportation (uncontrolled) */
1999
2000     /* Gain the mutation */
2001     if (gain_mutation(creature_ptr, mutation)) {
2002         msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
2003     }
2004 }
2005
2006 void set_mutation_flags(player_type *creature_ptr)
2007 {
2008     if (creature_ptr->muta3) {
2009
2010         if (creature_ptr->muta3 & MUT3_FLESH_ROT) {
2011             creature_ptr->regenerate = FALSE;
2012         }
2013
2014         if (creature_ptr->muta3 & MUT3_ELEC_TOUC) {
2015             creature_ptr->sh_elec = TRUE;
2016         }
2017
2018         if (creature_ptr->muta3 & MUT3_FIRE_BODY) {
2019             creature_ptr->sh_fire = TRUE;
2020             creature_ptr->lite = TRUE;
2021         }
2022
2023         if (creature_ptr->muta3 & MUT3_WINGS) {
2024             creature_ptr->levitation = TRUE;
2025         }
2026
2027         if (creature_ptr->muta3 & MUT3_FEARLESS) {
2028             creature_ptr->resist_fear = TRUE;
2029         }
2030
2031         if (creature_ptr->muta3 & MUT3_REGEN) {
2032             creature_ptr->regenerate = TRUE;
2033         }
2034
2035         if (creature_ptr->muta3 & MUT3_ESP) {
2036             creature_ptr->telepathy = TRUE;
2037         }
2038
2039         if (creature_ptr->muta3 & MUT3_MOTION) {
2040             creature_ptr->free_act = TRUE;
2041         }
2042     }
2043 }