OSDN Git Service

[Refactor] #38997 gain_random_mutation() を gain_mutation() に改名しつつ引数追加。 / Rename gain_...
authordeskull <deskull@users.sourceforge.jp>
Thu, 28 Feb 2019 12:25:38 +0000 (21:25 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 28 Feb 2019 12:25:38 +0000 (21:25 +0900)
12 files changed:
src/cmd-quaff.c
src/dungeon.c
src/effects.c
src/mutation.c
src/mutation.h
src/patron.c
src/realm-craft.c
src/realm-trump.c
src/spells1.c
src/spells2.c
src/wizard2.c
src/xtra2.c

index f8b4822..42957bf 100644 (file)
@@ -489,7 +489,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
                                {
                                        if (one_in_(2))
                                        {
-                                               if(gain_random_mutation(0)) ident = TRUE;
+                                               if(gain_mutation(p_ptr, 0)) ident = TRUE;
                                        }
                                        else if (lose_mutation(0)) ident = TRUE;
                                } while(!ident || one_in_(2));
index 474b903..3a1642d 100644 (file)
@@ -4731,7 +4731,7 @@ static void process_player(void)
        {
                msg_print(_("何か変わった気がする!", "You feel different!"));
 
-               (void)gain_random_mutation(0);
+               (void)gain_mutation(p_ptr, 0);
                hack_mutation = FALSE;
        }
 
index 75395ec..a89c5c0 100644 (file)
@@ -3826,7 +3826,7 @@ void do_poly_self(void)
        while ((power > randint0(15)) && one_in_(3))
        {
                power -= 7;
-               (void)gain_random_mutation(0);
+               (void)gain_mutation(p_ptr, 0);
        }
 
        if (power > randint0(5))
index 7370ed1..c230065 100644 (file)
@@ -25,7 +25,7 @@
  * @param choose_mut 与えたい突然変異のID、0ならばランダムに選択
  * @return なし
  */
-bool gain_random_mutation(MUTATION_IDX choose_mut)
+bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
 {
        int attempts_left = 20;
        concptr muta_desc = "";
@@ -37,584 +37,584 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
 
        while (attempts_left--)
        {
-               switch (choose_mut ? choose_mut : (p_ptr->pclass == CLASS_BERSERKER ? 74+randint1(119) : randint1(193)))
+               switch (choose_mut ? choose_mut : (creature_ptr->pclass == CLASS_BERSERKER ? 74+randint1(119) : randint1(193)))
                {
                case 1: case 2: case 3: case 4:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_SPIT_ACID;
                        muta_desc = _("酸を吐く能力を得た。", "You gain the ability to spit acid.");
                        break;
                        
                case 5: case 6: case 7:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_BR_FIRE;
                        muta_desc = _("火を吐く能力を得た。", "You gain the ability to breathe fire.");
                        break;
                        
                case 8: case 9:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_HYPN_GAZE;
                        muta_desc = _("催眠眼の能力を得た。", "Your eyes look mesmerizing...");
                        break;
                        
                case 10: case 11:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_TELEKINES;
                        muta_desc = _("物体を念動力で動かす能力を得た。", "You gain the ability to move objects telekinetically.");
                        break;
                        
                case 12: case 13: case 14:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_VTELEPORT;
                        muta_desc = _("自分の意思でテレポートする能力を得た。", "You gain the power of teleportation at will.");
                        break;
                        
                case 15: case 16:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_MIND_BLST;
                        muta_desc = _("精神攻撃の能力を得た。", "You gain the power of Mind Blast.");
                        break;
                        
                case 17: case 18:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_RADIATION;
                        muta_desc = _("あなたは強い放射線を発生し始めた。", "You start emitting hard radiation.");
                        break;
                        
                case 19: case 20:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_VAMPIRISM;
                        muta_desc = _("生命力を吸収できるようになった。", "You become vampiric.");
                        break;
                        
                case 21: case 22: case 23:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_SMELL_MET;
                        muta_desc = _("金属の匂いを嗅ぎ分けられるようになった。", "You smell a metallic odor.");
                        break;
                        
                case 24: case 25: case 26: case 27:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_SMELL_MON;
                        muta_desc = _("モンスターの臭いを嗅ぎ分けられるようになった。", "You smell filthy monsters.");
                        break;
                        
                case 28: case 29: case 30:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_BLINK;
                        muta_desc = _("近距離テレポートの能力を得た。", "You gain the power of minor teleportation.");
                        break;
                        
                case 31: case 32:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_EAT_ROCK;
                        muta_desc = _("壁が美味しそうに見える。", "The walls look delicious.");
                        break;
                        
                case 33: case 34:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_SWAP_POS;
                        muta_desc = _("他人の靴で一マイル歩くような気分がする。", "You feel like walking a mile in someone else's shoes.");
                        break;
                        
                case 35: case 36: case 37:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_SHRIEK;
                        muta_desc = _("あなたの声は相当強くなった。", "Your vocal cords get much tougher.");
                        break;
                        
                case 38: case 39: case 40:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_ILLUMINE;
                        muta_desc = _("あなたは光り輝いて部屋を明るくするようになった。", "You can light up rooms with your presence.");
                        break;
                        
                case 41: case 42:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_DET_CURSE;
                        muta_desc = _("邪悪な魔法を感知できるようになった。", "You can feel evil magics.");
                        break;
                        
                case 43: case 44: case 45:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_BERSERK;
                        muta_desc = _("制御できる激情を感じる。", "You feel a controlled rage.");
                        break;
                        
                case 46:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_POLYMORPH;
                        muta_desc = _("体が変異しやすくなった。", "Your body seems mutable.");
                        break;
                        
                case 47: case 48:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_MIDAS_TCH;
                        muta_desc = _("「ミダス王の手」の能力を得た。", "You gain the Midas touch.");/*トゥームレイダースにありましたね。 */
                        break;
                        
                case 49:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_GROW_MOLD;
                        muta_desc = _("突然カビに親しみを覚えた。", "You feel a sudden affinity for mold.");
                        break;
                        
                case 50: case 51: case 52:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_RESIST;
                        muta_desc = _("あなたは自分自身を守れる気がする。", "You feel like you can protect yourself.");
                        break;
                        
                case 53: case 54: case 55:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_EARTHQUAKE;
                        muta_desc = _("ダンジョンを破壊する能力を得た。", "You gain the ability to wreck the dungeon.");
                        break;
                        
                case 56:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_EAT_MAGIC;
                        muta_desc = _("魔法のアイテムが美味そうに見える。", "Your magic items look delicious.");
                        break;
                        
                case 57: case 58:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_WEIGH_MAG;
                        muta_desc = _("あなたは周囲にある魔法をより良く理解できる気がする。", "You feel you can better understand the magic around you.");
                        break;
                        
                case 59:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_STERILITY;
                        muta_desc = _("周りの全ての者に頭痛を起こすことができる。", "You can give everything around you a headache.");
                        break;
                case 60: case 61:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_PANIC_HIT;
                        muta_desc = _("突然、泥棒の気分が分かるようになった。", "You suddenly understand how thieves feel.");
                        break;
                        
                case 62: case 63: case 64:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_DAZZLE;
                        muta_desc = _("眩い閃光を発する能力を得た。", "You gain the ability to emit dazzling lights.");
                        break;
                        
                case 65: case 66: case 67:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_LASER_EYE;
                        muta_desc = _("あなたの目は一瞬焼け付いた。", "Your eyes burn for a moment.");
                        break;
                        
                case 68: case 69:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_RECALL;
                        muta_desc = _("少しだけホームシックになったが、すぐ直った。", "You feel briefly homesick, but it passes.");
                        break;
                        
                case 70:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_BANISH;
                        muta_desc = _("神聖な怒りの力に満たされた。", "You feel a holy wrath fill you.");
                        break;
                        
                case 71: case 72:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_COLD_TOUCH;
                        muta_desc = _("あなたの両手はとても冷たくなった。", "Your hands get very cold.");
                        break;
                        
                case 73: case 74:
-                       muta_class = &(p_ptr->muta1);
+                       muta_class = &(creature_ptr->muta1);
                        muta_which = MUT1_LAUNCHER;
                        muta_desc = _("あなたの物を投げる手はかなり強くなった気がする。", "Your throwing arm feels much stronger.");
                        break;
                        
                case 75:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_BERS_RAGE;
                        muta_desc = _("あなたは狂暴化の発作を起こすようになった!", "You become subject to fits of berserk rage!");
                        break;
                        
                case 76:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_COWARDICE;
                        muta_desc = _("信じられないくらい臆病になった!", "You become an incredible coward!");
                        break;
                        
                case 77:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_RTELEPORT;
                        muta_desc = _("あなたの位置は非常に不確定になった。", "Your position seems very uncertain...");
                        break;
                        
                case 78:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_ALCOHOL;
                        muta_desc = _("あなたはアルコールを分泌するようになった。", "Your body starts producing alcohol!");
                        break;
                        
                case 79:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_HALLU;
                        muta_desc = _("あなたは幻覚を引き起こす精神錯乱に侵された。", "You are afflicted by a hallucinatory insanity!");
                        break;
                        
                case 80:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_FLATULENT;
                        muta_desc = _( "あなたは制御不能な強烈な屁をこくようになった。",  "You become subject to uncontrollable flatulence.");
 
                        break;
                case 81: case 82:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_SCOR_TAIL;
                        muta_desc = _( "サソリの尻尾が生えてきた!",  "You grow a scorpion tail!");
 
                        break;
                case 83: case 84:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_HORNS;
                        muta_desc = _( "額に角が生えた!",  "Horns pop forth into your forehead!");
 
                        break;
                case 85: case 86:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_BEAK;
                        muta_desc = _( "口が鋭く強いクチバシに変化した!",  "Your mouth turns into a sharp, powerful beak!");
 
                        break;
                case 87: case 88:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_ATT_DEMON;
                        muta_desc = _( "悪魔を引き付けるようになった。",  "You start attracting demons.");
 
                        break;
                case 89:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_PROD_MANA;
                        muta_desc = _( "あなたは制御不能な魔法のエネルギーを発生するようになった。",  "You start producing magical energy uncontrollably.");
 
                        break;
                case 90: case 91:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_SPEED_FLUX;
                        muta_desc = _( "あなたは躁鬱質になった。",  "You become manic-depressive.");
 
                        break;
                case 92: case 93:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_BANISH_ALL;
                        muta_desc = _( "恐ろしい力があなたの背後に潜んでいる気がする。",  "You feel a terrifying power lurking behind you.");
 
                        break;
                case 94:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_EAT_LIGHT;
                        muta_desc = _( "あなたはウンゴリアントに奇妙な親しみを覚えるようになった。",  "You feel a strange kinship with Ungoliant.");
 
                        break;
                case 95: case 96:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_TRUNK;
                        muta_desc = _( "あなたの鼻は伸びて象の鼻のようになった。",  "Your nose grows into an elephant-like trunk.");
 
                        break;
                case 97:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_ATT_ANIMAL;
                        muta_desc = _( "動物を引き付けるようになった。",  "You start attracting animals.");
 
                        break;
                case 98:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_TENTACLES;
                        muta_desc = _( "邪悪な触手が体の両側に生えてきた。",  "Evil-looking tentacles sprout from your sides.");
 
                        break;
                case 99:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_RAW_CHAOS;
                        muta_desc = _( "周囲の空間が不安定になった気がする。",  "You feel the universe is less stable around you.");
 
                        break;
                case 100: case 101: case 102:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_NORMALITY;
                        muta_desc = _( "あなたは奇妙なほど普通になった気がする。",  "You feel strangely normal.");
 
                        break;
                case 103:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_WRAITH;
                        muta_desc = _( "あなたは幽体化したり実体化したりするようになった。",  "You start to fade in and out of the physical world.");
 
                        break;
                case 104:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_POLY_WOUND;
                        muta_desc = _( "あなたはカオスの力が古い傷に入り込んでくるのを感じた。",  "You feel forces of chaos entering your old scars.");
 
                        break;
                case 105:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_WASTING;
                        muta_desc = _( "あなたは突然おぞましい衰弱病にかかった。",  "You suddenly contract a horrible wasting disease.");
 
                        break;
                case 106:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_ATT_DRAGON;
                        muta_desc = _( "あなたはドラゴンを引きつけるようになった。",  "You start attracting dragons.");
 
                        break;
                case 107: case 108:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_WEIRD_MIND;
                        muta_desc = _( "あなたの思考は突然おかしな方向に向き始めた。",  "Your thoughts suddenly take off in strange directions.");
 
                        break;
                case 109:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_NAUSEA;
                        muta_desc = _( "胃袋がピクピクしはじめた。",  "Your stomach starts to roil nauseously.");
 
                        break;
                case 110: case 111:
                        /* Chaos warriors already have a chaos deity */
-                       if (p_ptr->pclass != CLASS_CHAOS_WARRIOR)
+                       if (creature_ptr->pclass != CLASS_CHAOS_WARRIOR)
                        {
-                               muta_class = &(p_ptr->muta2);
+                               muta_class = &(creature_ptr->muta2);
                                muta_which = MUT2_CHAOS_GIFT;
                        muta_desc = _( "あなたはカオスの守護悪魔の注意を惹くようになった。",  "You attract the notice of a chaos deity!");
 
                        }
                        break;
                case 112:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_WALK_SHAD;
                        muta_desc = _( "あなたは現実が紙のように薄いと感じるようになった。",  "You feel like reality is as thin as paper.");
 
                        break;
                case 113: case 114:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_WARNING;
                        muta_desc = _( "あなたは突然パラノイアになった気がする。",  "You suddenly feel paranoid.");
 
                        break;
                case 115:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_INVULN;
                        muta_desc = _( "あなたは祝福され、無敵状態になる発作を起こすようになった。",  "You are blessed with fits of invulnerability.");
 
                        break;
                case 116: case 117:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_SP_TO_HP;
                        muta_desc = _( "魔法の治癒の発作を起こすようになった。",  "You are subject to fits of magical healing.");
 
                        break;
                case 118:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_HP_TO_SP;
                        muta_desc = _( "痛みを伴う精神明瞭化の発作を起こすようになった。",  "You are subject to fits of painful clarity.");
 
                        break;
                case 119:
-                       muta_class = &(p_ptr->muta2);
+                       muta_class = &(creature_ptr->muta2);
                        muta_which = MUT2_DISARM;
                        muta_desc = _( "あなたの脚は長さが四倍になった。",  "Your feet grow to four times their former size.");
 
                        break;
                case 120: case 121: case 122:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_HYPER_STR;
                        muta_desc = _( "超人的に強くなった!",  "You current_world_ptr->game_turn into a superhuman he-man!");
 
                        break;
                case 123: case 124: case 125:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_PUNY;
                        muta_desc = _( "筋肉が弱ってしまった...",  "Your muscles wither away...");
 
                        break;
                case 126: case 127: case 128:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_HYPER_INT;
                        muta_desc = _( "あなたの脳は生体コンピュータに進化した!",  "Your brain evolves into a living computer!");
 
                        break;
                case 129: case 130: case 131:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_MORONIC;
                        muta_desc = _( "脳が萎縮してしまった...",  "Your brain withers away...");
 
                        break;
                case 132: case 133:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_RESILIENT;
                        muta_desc = _( "並外れてタフになった。",  "You become extraordinarily resilient.");
 
                        break;
                case 134: case 135:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_XTRA_FAT;
                        muta_desc = _( "あなたは気持ち悪いくらい太った!",  "You become sickeningly fat!");
 
                        break;
                case 136: case 137:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_ALBINO;
                        muta_desc = _( "アルビノになった!弱くなった気がする...",  "You current_world_ptr->game_turn into an albino! You feel frail...");
 
                        break;
                case 138: case 139: case 140:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_FLESH_ROT;
                        muta_desc = _( "あなたの肉体は腐敗する病気に侵された!",  "Your flesh is afflicted by a rotting disease!");
 
                        break;
                case 141: case 142:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_SILLY_VOI;
                        muta_desc = _( "声が間抜けなキーキー声になった!",  "Your voice turns into a ridiculous squeak!");
 
                        break;
                case 143: case 144:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_BLANK_FAC;
                        muta_desc = _( "のっぺらぼうになった!",  "Your face becomes completely featureless!");
 
                        break;
                case 145:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_ILL_NORM;
                        muta_desc = _( "心の安らぐ幻影を映し出すようになった。",  "You start projecting a reassuring image.");
 
                        break;
                case 146: case 147: case 148:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_XTRA_EYES;
                        muta_desc = _( "新たに二つの目が出来た!",  "You grow an extra pair of eyes!");
 
                        break;
                case 149: case 150:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_MAGIC_RES;
                        muta_desc = _( "魔法への耐性がついた。",  "You become resistant to magic.");
 
                        break;
                case 151: case 152: case 153:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_XTRA_NOIS;
                        muta_desc = _( "あなたは奇妙な音を立て始めた!",  "You start making strange noise!");
 
                        break;
                case 154: case 155: case 156:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_INFRAVIS;
                        muta_desc = _( "赤外線視力が増した。",  "Your infravision is improved.");
 
                        break;
                case 157: case 158:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_XTRA_LEGS;
                        muta_desc = _( "新たに二本の足が生えてきた!",  "You grow an extra pair of legs!");
 
                        break;
                case 159: case 160:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_SHORT_LEG;
                        muta_desc = _( "足が短い突起になってしまった!",  "Your legs current_world_ptr->game_turn into short stubs!");
 
                        break;
                case 161: case 162:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_ELEC_TOUC;
                        muta_desc = _( "血管を電流が流れ始めた!",  "Electricity starts running through you!");
 
                        break;
                case 163: case 164:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_FIRE_BODY;
                        muta_desc = _( "あなたの体は炎につつまれている。",  "Your body is enveloped in flames!");
 
                        break;
                case 165: case 166: case 167:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_WART_SKIN;
                        muta_desc = _( "気持ち悪いイボイボが体中にできた!",  "Disgusting warts appear everywhere on you!");
 
                        break;
                case 168: case 169: case 170:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_SCALES;
                        muta_desc = _( "肌が黒い鱗に変わった!",  "Your skin turns into black scales!");
 
                        break;
                case 171: case 172:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_IRON_SKIN;
                        muta_desc = _( "あなたの肌は鉄になった!",  "Your skin turns to steel!");
 
                        break;
                case 173: case 174:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_WINGS;
                        muta_desc = _( "背中に羽が生えた。",  "You grow a pair of wings.");
 
                        break;
                case 175: case 176: case 177:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_FEARLESS;
                        muta_desc = _( "完全に怖れ知らずになった。",  "You become completely fearless.");
 
                        break;
                case 178: case 179:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_REGEN;
                        muta_desc = _( "急速に回復し始めた。",  "You start regenerating.");
 
                        break;
                case 180: case 181:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_ESP;
                        muta_desc = _( "テレパシーの能力を得た!",  "You develop a telepathic ability!");
 
                        break;
                case 182: case 183: case 184:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_LIMBER;
                        muta_desc = _( "筋肉がしなやかになった。",  "Your muscles become limber.");
 
                        break;
                case 185: case 186: case 187:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_ARTHRITIS;
                        muta_desc = _( "関節が突然痛み出した。",  "Your joints suddenly hurt.");
 
                        break;
                case 188:
-                       if (p_ptr->pseikaku == SEIKAKU_LUCKY) break;
-                       muta_class = &(p_ptr->muta3);
+                       if (creature_ptr->pseikaku == SEIKAKU_LUCKY) break;
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_BAD_LUCK;
                        muta_desc = _( "悪意に満ちた黒いオーラがあなたをとりまいた...",  "There is a malignant black aura surrounding you...");
 
                        break;
                case 189:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_VULN_ELEM;
                        muta_desc = _( "妙に無防備になった気がする。",  "You feel strangely exposed.");
 
                        break;
                case 190: case 191: case 192:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_MOTION;
                        muta_desc = _( "体の動作がより正確になった。",  "You move with new assurance.");
 
                        break;
                case 193:
-                       muta_class = &(p_ptr->muta3);
+                       muta_class = &(creature_ptr->muta3);
                        muta_which = MUT3_GOOD_LUCK;
                        muta_desc = _( "慈悲深い白いオーラがあなたをとりまいた...",  "There is a benevolent white aura surrounding you...");
 
@@ -650,51 +650,51 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
                                                        --- henkma
                */
                if(!choose_mut){
-                       if (p_ptr->prace == RACE_VAMPIRE &&
-                         !(p_ptr->muta1 & MUT1_HYPN_GAZE) &&
+                       if (creature_ptr->prace == RACE_VAMPIRE &&
+                         !(creature_ptr->muta1 & MUT1_HYPN_GAZE) &&
                           (randint1(10) < 7))
                        {
-                               muta_class = &(p_ptr->muta1);
+                               muta_class = &(creature_ptr->muta1);
                                muta_which = MUT1_HYPN_GAZE;
                        muta_desc = _( "眼が幻惑的になった...",  "Your eyes look mesmerizing...");
 
                        }
 
-                       else if (p_ptr->prace == RACE_IMP &&
-                                !(p_ptr->muta2 & MUT2_HORNS) &&
+                       else if (creature_ptr->prace == RACE_IMP &&
+                                !(creature_ptr->muta2 & MUT2_HORNS) &&
                                 (randint1(10) < 7))
                          {
-                               muta_class = &(p_ptr->muta2);
+                               muta_class = &(creature_ptr->muta2);
                                muta_which = MUT2_HORNS;
                        muta_desc = _( "角が額から生えてきた!",  "Horns pop forth into your forehead!");
 
                        }
 
-                       else if (p_ptr->prace == RACE_YEEK &&
-                               !(p_ptr->muta1 & MUT1_SHRIEK) &&
+                       else if (creature_ptr->prace == RACE_YEEK &&
+                               !(creature_ptr->muta1 & MUT1_SHRIEK) &&
                                (randint1(10) < 7))
                        {
-                               muta_class = &(p_ptr->muta1);
+                               muta_class = &(creature_ptr->muta1);
                                muta_which = MUT1_SHRIEK;
                        muta_desc = _( "声質がかなり強くなった。",  "Your vocal cords get much tougher.");
 
                        }
 
-                       else if (p_ptr->prace == RACE_BEASTMAN &&
-                               !(p_ptr->muta1 & MUT1_POLYMORPH) &&
+                       else if (creature_ptr->prace == RACE_BEASTMAN &&
+                               !(creature_ptr->muta1 & MUT1_POLYMORPH) &&
                                (randint1(10) < 2))
                        {
-                               muta_class = &(p_ptr->muta1);
+                               muta_class = &(creature_ptr->muta1);
                                muta_which = MUT1_POLYMORPH;
                        muta_desc = _( "あなたの肉体は変化できるようになった、",  "Your body seems mutable.");
 
                        }
 
-                       else if (p_ptr->prace == RACE_MIND_FLAYER &&
-                               !(p_ptr->muta2 & MUT2_TENTACLES) &&
+                       else if (creature_ptr->prace == RACE_MIND_FLAYER &&
+                               !(creature_ptr->muta2 & MUT2_TENTACLES) &&
                                (randint1(10) < 7))
                        {
-                               muta_class = &(p_ptr->muta2);
+                               muta_class = &(creature_ptr->muta2);
                                muta_which = MUT2_TENTACLES;
                        muta_desc = _( "邪悪な触手が口の周りに生えた。",  "Evil-looking tentacles sprout from your mouth.");
 
@@ -705,154 +705,154 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
                msg_print(muta_desc);
                *muta_class |= muta_which;
 
-               if (muta_class == &(p_ptr->muta3))
+               if (muta_class == &(creature_ptr->muta3))
                {
                        if (muta_which == MUT3_PUNY)
                        {
-                               if (p_ptr->muta3 & MUT3_HYPER_STR)
+                               if (creature_ptr->muta3 & MUT3_HYPER_STR)
                                {
                                        msg_print(_("あなたはもう超人的に強くはない!", "You no longer feel super-strong!"));
 
-                                       p_ptr->muta3 &= ~(MUT3_HYPER_STR);
+                                       creature_ptr->muta3 &= ~(MUT3_HYPER_STR);
                                }
                        }
                        else if (muta_which == MUT3_HYPER_STR)
                        {
-                               if (p_ptr->muta3 & MUT3_PUNY)
+                               if (creature_ptr->muta3 & MUT3_PUNY)
                                {
                                        msg_print(_("あなたはもう虚弱ではない!", "You no longer feel puny!"));
 
-                                       p_ptr->muta3 &= ~(MUT3_PUNY);
+                                       creature_ptr->muta3 &= ~(MUT3_PUNY);
                                }
                        }
                        else if (muta_which == MUT3_MORONIC)
                        {
-                               if (p_ptr->muta3 & MUT3_HYPER_INT)
+                               if (creature_ptr->muta3 & MUT3_HYPER_INT)
                                {
                                        msg_print(_("あなたの脳はもう生体コンピュータではない。", "Your brain is no longer a living computer."));
 
-                                       p_ptr->muta3 &= ~(MUT3_HYPER_INT);
+                                       creature_ptr->muta3 &= ~(MUT3_HYPER_INT);
                                }
                        }
                        else if (muta_which == MUT3_HYPER_INT)
                        {
-                               if (p_ptr->muta3 & MUT3_MORONIC)
+                               if (creature_ptr->muta3 & MUT3_MORONIC)
                                {
                                        msg_print(_("あなたはもう精神薄弱ではない。", "You are no longer moronic."));
 
-                                       p_ptr->muta3 &= ~(MUT3_MORONIC);
+                                       creature_ptr->muta3 &= ~(MUT3_MORONIC);
                                }
                        }
                        else if (muta_which == MUT3_IRON_SKIN)
                        {
-                               if (p_ptr->muta3 & MUT3_SCALES)
+                               if (creature_ptr->muta3 & MUT3_SCALES)
                                {
                                        msg_print(_("鱗がなくなった。", "You lose your scales."));
 
-                                       p_ptr->muta3 &= ~(MUT3_SCALES);
+                                       creature_ptr->muta3 &= ~(MUT3_SCALES);
                                }
-                               if (p_ptr->muta3 & MUT3_FLESH_ROT)
+                               if (creature_ptr->muta3 & MUT3_FLESH_ROT)
                                {
                                        msg_print(_("肉体が腐乱しなくなった。", "Your flesh rots no longer."));
 
-                                       p_ptr->muta3 &= ~(MUT3_FLESH_ROT);
+                                       creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
                                }
-                               if (p_ptr->muta3 & MUT3_WART_SKIN)
+                               if (creature_ptr->muta3 & MUT3_WART_SKIN)
                                {
                                        msg_print(_("肌のイボイボがなくなった。", "You lose your warts."));
 
-                                       p_ptr->muta3 &= ~(MUT3_WART_SKIN);
+                                       creature_ptr->muta3 &= ~(MUT3_WART_SKIN);
                                }
                        }
                        else if (muta_which == MUT3_WART_SKIN || muta_which == MUT3_SCALES
                                || muta_which == MUT3_FLESH_ROT)
                        {
-                               if (p_ptr->muta3 & MUT3_IRON_SKIN)
+                               if (creature_ptr->muta3 & MUT3_IRON_SKIN)
                                {
                                        msg_print(_("あなたの肌はもう鉄ではない。", "Your skin is no longer made of steel."));
 
-                                       p_ptr->muta3 &= ~(MUT3_IRON_SKIN);
+                                       creature_ptr->muta3 &= ~(MUT3_IRON_SKIN);
                                }
                        }
                        else if (muta_which == MUT3_FEARLESS)
                        {
-                               if (p_ptr->muta2 & MUT2_COWARDICE)
+                               if (creature_ptr->muta2 & MUT2_COWARDICE)
                                {
                                        msg_print(_("臆病でなくなった。", "You are no longer cowardly."));
 
-                                       p_ptr->muta2 &= ~(MUT2_COWARDICE);
+                                       creature_ptr->muta2 &= ~(MUT2_COWARDICE);
                                }
                        }
                        else if (muta_which == MUT3_FLESH_ROT)
                        {
-                               if (p_ptr->muta3 & MUT3_REGEN)
+                               if (creature_ptr->muta3 & MUT3_REGEN)
                                {
                                        msg_print(_("急速に回復しなくなった。", "You stop regenerating."));
 
-                                       p_ptr->muta3 &= ~(MUT3_REGEN);
+                                       creature_ptr->muta3 &= ~(MUT3_REGEN);
                                }
                        }
                        else if (muta_which == MUT3_REGEN)
                        {
-                               if (p_ptr->muta3 & MUT3_FLESH_ROT)
+                               if (creature_ptr->muta3 & MUT3_FLESH_ROT)
                                {
                                        msg_print(_("肉体が腐乱しなくなった。", "Your flesh stops rotting."));
 
-                                       p_ptr->muta3 &= ~(MUT3_FLESH_ROT);
+                                       creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
                                }
                        }
                        else if (muta_which == MUT3_LIMBER)
                        {
-                               if (p_ptr->muta3 & MUT3_ARTHRITIS)
+                               if (creature_ptr->muta3 & MUT3_ARTHRITIS)
                                {
                                        msg_print(_("関節が痛くなくなった。", "Your joints stop hurting."));
 
-                                       p_ptr->muta3 &= ~(MUT3_ARTHRITIS);
+                                       creature_ptr->muta3 &= ~(MUT3_ARTHRITIS);
                                }
                        }
                        else if (muta_which == MUT3_ARTHRITIS)
                        {
-                               if (p_ptr->muta3 & MUT3_LIMBER)
+                               if (creature_ptr->muta3 & MUT3_LIMBER)
                                {
                                        msg_print(_("あなたはしなやかでなくなった。", "You no longer feel limber."));
 
-                                       p_ptr->muta3 &= ~(MUT3_LIMBER);
+                                       creature_ptr->muta3 &= ~(MUT3_LIMBER);
                                }
                        }
                }
-               else if (muta_class == &(p_ptr->muta2))
+               else if (muta_class == &(creature_ptr->muta2))
                {
                        if (muta_which == MUT2_COWARDICE)
                        {
-                               if (p_ptr->muta3 & MUT3_FEARLESS)
+                               if (creature_ptr->muta3 & MUT3_FEARLESS)
                                {
                                        msg_print(_("恐れ知らずでなくなった。", "You no longer feel fearless."));
 
-                                       p_ptr->muta3 &= ~(MUT3_FEARLESS);
+                                       creature_ptr->muta3 &= ~(MUT3_FEARLESS);
                                }
                        }
                        if (muta_which == MUT2_BEAK)
                        {
-                               if (p_ptr->muta2 & MUT2_TRUNK)
+                               if (creature_ptr->muta2 & MUT2_TRUNK)
                                {
                                        msg_print(_("あなたの鼻はもう象の鼻のようではなくなった。", "Your nose is no longer elephantine."));
 
-                                       p_ptr->muta2 &= ~(MUT2_TRUNK);
+                                       creature_ptr->muta2 &= ~(MUT2_TRUNK);
                                }
                        }
                        if (muta_which == MUT2_TRUNK)
                        {
-                               if (p_ptr->muta2 & MUT2_BEAK)
+                               if (creature_ptr->muta2 & MUT2_BEAK)
                                {
                                        msg_print(_("硬いクチバシがなくなった。", "You no longer have a hard beak."));
 
-                                       p_ptr->muta2 &= ~(MUT2_BEAK);
+                                       creature_ptr->muta2 &= ~(MUT2_BEAK);
                                }
                        }
                }
 
                mutant_regenerate_mod = calc_mutant_regenerate_mod();
-               p_ptr->update |= PU_BONUS;
+               creature_ptr->update |= PU_BONUS;
                handle_stuff();
                return TRUE;
        }
index 99b8f79..023fc30 100644 (file)
@@ -1,5 +1,5 @@
 /* mutation.c */
-extern bool gain_random_mutation(MUTATION_IDX choose_mut);
+extern bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
 extern bool lose_mutation(MUTATION_IDX choose_mut);
 extern void lose_all_mutations(void);
 extern void dump_mutations(FILE *OutFile);
index 356588f..4d55baa 100644 (file)
@@ -266,7 +266,7 @@ void gain_level_reward(int chosen_reward)
        if (one_in_(6) && !chosen_reward)
        {
                msg_format(_("%^sは褒美としてあなたを突然変異させた。", "%^s rewards you with a mutation!"), chaos_patrons[p_ptr->chaos_patron]);
-               (void)gain_random_mutation(0);
+               (void)gain_mutation(p_ptr, 0);
                reward = _("変異した。", "mutation");
        }
        else
index 106a184..0d9778c 100644 (file)
@@ -493,7 +493,7 @@ concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                        mutation = 77;
 
                                /* Gain the mutation */
-                               if (gain_random_mutation(mutation))
+                               if (gain_mutation(p_ptr, mutation))
                                {
                                        msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
                                }
index 53c42f9..4736321 100644 (file)
@@ -459,7 +459,7 @@ concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                        mutation = 77;
 
                                /* Gain the mutation */
-                               if (gain_random_mutation(mutation))
+                               if (gain_mutation(p_ptr, mutation))
                                {
                                        msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
                                }
index 8d159c6..1f9087b 100644 (file)
@@ -4204,7 +4204,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        if (one_in_(3))
                                        {
                                                msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
-                                               (void)gain_random_mutation(0);
+                                               (void)gain_mutation(p_ptr, 0);
                                        }
                                }
                                if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
index a66e6e1..90eccf0 100644 (file)
@@ -4003,7 +4003,7 @@ void wild_magic(int spell)
                break;
        case 27:
        case 28:
-               (void)gain_random_mutation(0);
+               (void)gain_mutation(p_ptr, 0);
                break;
        case 29:
        case 30:
index d2f600d..fba66b0 100644 (file)
@@ -1834,7 +1834,7 @@ void do_cmd_debug(void)
 
        /* Mutation */
        case 'M':
-               (void)gain_random_mutation(command_arg);
+               (void)gain_mutation(p_ptr, command_arg);
                break;
 
        /* Reset Class */
index 01037d8..2a3b51b 100644 (file)
@@ -161,7 +161,7 @@ void check_experience(void)
                if (level_mutation)
                {
                        msg_print(_("あなたは変わった気がする...", "You feel different..."));
-                       (void)gain_random_mutation(0);
+                       (void)gain_mutation(p_ptr, 0);
                        level_mutation = FALSE;
                }