OSDN Git Service

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