From 1dc5552de03bf8c1aea9f8be70551284b2bb43a0 Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 1 Jul 2019 00:05:56 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20lose=5Fmutation()=20?= =?utf8?q?=E3=81=AB=20player=5Ftype=20*=20=E5=BC=95=E6=95=B0=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/bldg.c | 2 +- src/cmd-quaff.c | 2 +- src/core.c | 2 +- src/mutation.c | 200 +++++++++++++++++++++++++-------------------------- src/mutation.h | 2 +- src/player-effects.c | 2 +- 6 files changed, 105 insertions(+), 105 deletions(-) diff --git a/src/bldg.c b/src/bldg.c index 498191b01..fcac9d78a 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -3996,7 +3996,7 @@ static void bldg_process_command(building_type *bldg, int i) if (p_ptr->muta1 || p_ptr->muta2 || (p_ptr->muta3 & ~MUT3_GOOD_LUCK) || (p_ptr->pseikaku != SEIKAKU_LUCKY && (p_ptr->muta3 & MUT3_GOOD_LUCK))) { - while(!lose_mutation(0)); + while(!lose_mutation(p_ptr, 0)); paid = TRUE; } else diff --git a/src/cmd-quaff.c b/src/cmd-quaff.c index 50111d377..51cfafc70 100644 --- a/src/cmd-quaff.c +++ b/src/cmd-quaff.c @@ -505,7 +505,7 @@ void exe_quaff_potion(INVENTORY_IDX item) { if(gain_mutation(p_ptr, 0)) ident = TRUE; } - else if (lose_mutation(0)) ident = TRUE; + else if (lose_mutation(p_ptr, 0)) ident = TRUE; } while(!ident || one_in_(2)); } break; diff --git a/src/core.c b/src/core.c index 1cc079946..a9ca51789 100644 --- a/src/core.c +++ b/src/core.c @@ -2388,7 +2388,7 @@ static void process_world_aux_mutation(void) } if ((p_ptr->muta2 & MUT2_NORMALITY) && one_in_(5000)) { - if (!lose_mutation(0)) + if (!lose_mutation(p_ptr, 0)) msg_print(_("奇妙なくらい普通になった気がする。", "You feel oddly normal.")); } if ((p_ptr->muta2 & MUT2_WRAITH) && !p_ptr->anti_magic && one_in_(3000)) diff --git a/src/mutation.c b/src/mutation.c index 3ab01c303..076f05aef 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -879,7 +879,7 @@ bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut) * @param choose_mut 取り除きたい突然変異のID、0ならばランダムに消去 * @return なし */ -bool lose_mutation(MUTATION_IDX choose_mut) +bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut) { int attempts_left = 20; concptr muta_desc = ""; @@ -894,578 +894,578 @@ bool lose_mutation(MUTATION_IDX choose_mut) switch (choose_mut ? choose_mut : 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 lose 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 lose 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 uninteresting."); break; case 10: case 11: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_TELEKINES; muta_desc = _( "念動力で物を動かす能力を失った。", "You lose 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 lose 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 lose 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 stop 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 are no longer 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 no longer 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 no longer 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 lose 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 unappetizing."); 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 staying in your own 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 weaker."); 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 no longer 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 no longer 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 no longer 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 stable."); break; case 47: case 48: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_MIDAS_TCH; muta_desc = _( "ミダスの手の能力を失った。", "You lose 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 dislike 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 might be vulnerable."); break; case 53: case 54: case 55: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_EARTHQUAKE; muta_desc = _( "ダンジョンを壊す能力を失った。", "You lose 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 no longer 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 no longer sense magic."); break; case 59: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_STERILITY; muta_desc = _( "たくさんの安堵の吐息が聞こえた。", "You hear a massed sigh of relief."); break; case 60: case 61: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_PANIC_HIT; muta_desc = _( "あちこちへ跳べる気分がなくなった。", "You no longer feel jumpy."); break; case 62: case 63: case 64: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_DAZZLE; muta_desc = _( "まばゆい閃光を発する能力を失った。", "You lose 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, then feel soothed."); 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."); break; case 70: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_BANISH; muta_desc = _( "神聖な怒りの力を感じなくなった。", "You no longer feel a holy wrath."); break; case 71: case 72: - muta_class = &(p_ptr->muta1); + muta_class = &(creature_ptr->muta1); muta_which = MUT1_COLD_TOUCH; muta_desc = _( "手が暖かくなった。", "Your hands warm up."); 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 weaker."); break; case 75: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_BERS_RAGE; muta_desc = _( "凶暴化の発作にさらされなくなった!", "You are no longer 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 are no longer 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 more certain."); break; case 78: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_ALCOHOL; muta_desc = _( "あなたはアルコールを分泌しなくなった!", "Your body stops producing alcohol!"); break; case 79: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_HALLU; muta_desc = _( "幻覚をひき起こす精神障害を起こさなくなった!", "You are no longer 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 are no longer 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 lose your scorpion tail!"); break; case 83: case 84: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_HORNS; muta_desc = _( "額から角が消えた!", "Your horns vanish from 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 reverts to normal!"); break; case 87: case 88: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_ATT_DEMON; muta_desc = _( "デーモンを引き寄せなくなった。", "You stop attracting demons."); break; case 89: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_PROD_MANA; muta_desc = _( "制御不能な魔法のエネルギーを発生しなくなった。", "You stop 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 are no longer 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 no longer 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 the world's a brighter place."); break; case 95: case 96: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_TRUNK; muta_desc = _( "鼻が普通の長さに戻った。", "Your nose returns to a normal length."); break; case 97: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_ATT_ANIMAL; muta_desc = _( "動物を引き寄せなくなった。", "You stop attracting animals."); break; case 98: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_TENTACLES; muta_desc = _( "触手が消えた。", "Your tentacles vanish 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 more 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 normally strange."); break; case 103: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_WRAITH; muta_desc = _( "あなたは物質世界にしっかり存在している。", "You are firmly in 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 departing your old scars."); break; case 105: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_WASTING; muta_desc = _( "おぞましい衰弱病が治った!", "You are cured of the horrible wasting disease!"); break; case 106: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_ATT_DRAGON; muta_desc = _( "ドラゴンを引き寄せなくなった。", "You stop 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 return to boring paths."); break; case 109: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_NAUSEA; muta_desc = _( "胃が痙攣しなくなった。", "Your stomach stops roiling."); break; case 110: case 111: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_CHAOS_GIFT; muta_desc = _( "混沌の神々の興味を惹かなくなった。", "You lose the attention of the chaos deities."); break; case 112: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_WALK_SHAD; muta_desc = _( "物質世界に捕らわれている気がする。", "You feel like you're trapped in reality."); break; case 113: case 114: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_WARNING; muta_desc = _( "パラノイアでなくなった。", "You no longer feel paranoid."); break; case 115: - muta_class = &(p_ptr->muta2); + muta_class = &(creature_ptr->muta2); muta_which = MUT2_INVULN; muta_desc = _( "無敵状態の発作を起こさなくなった。", "You are no longer 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 no longer 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 no longer 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 shrink to 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 = _( "筋肉が普通に戻った。", "Your muscles revert to normal."); 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 revert to normal."); 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 reverts to normal."); 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 reverts to normal."); break; case 132: case 133: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_RESILIENT; muta_desc = _( "普通の丈夫さに戻った。", "You become ordinarily resilient again."); break; case 134: case 135: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_XTRA_FAT; muta_desc = _( "奇跡的なダイエットに成功した!", "You benefit from a miracle diet!"); break; case 136: case 137: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_ALBINO; muta_desc = _( "アルビノでなくなった!", "You are no longer an albino!"); 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 no longer 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 returns to normal."); break; case 143: case 144: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_BLANK_FAC; muta_desc = _( "顔に目鼻が戻った。", "Your facial features return."); break; case 145: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_ILL_NORM; muta_desc = _( "心が安らぐ幻影を映し出さなくなった。", "You stop 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 = _( "余分な目が消えてしまった!", "Your extra eyes vanish!"); break; case 149: case 150: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_MAGIC_RES; muta_desc = _( "魔法に弱くなった。", "You become susceptible to magic again."); 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 stop 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 degraded."); break; case 157: case 158: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_XTRA_LEGS; muta_desc = _( "余分な脚が消えてしまった!", "Your extra legs disappear!"); break; case 159: case 160: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_SHORT_LEG; muta_desc = _( "脚の長さが普通に戻った。", "Your legs lengthen to normal."); break; case 161: case 162: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_ELEC_TOUC; muta_desc = _( "体を電流が流れなくなった。", "Electricity stops 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 no longer 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 = _( "イボイボが消えた!", "Your warts disappear!"); break; case 168: case 169: case 170: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_SCALES; muta_desc = _( "鱗が消えた!", "Your scales vanish!"); break; case 171: case 172: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_IRON_SKIN; muta_desc = _( "肌が肉にもどった!", "Your skin reverts to flesh!"); break; case 173: case 174: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_WINGS; muta_desc = _( "背中の羽根が取れ落ちた。", "Your wings fall off."); break; case 175: case 176: case 177: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_FEARLESS; muta_desc = _( "再び恐怖を感じるようになった。", "You begin to feel fear again."); break; case 178: case 179: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_REGEN; muta_desc = _( "急速回復しなくなった。", "You stop regenerating."); break; case 180: case 181: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_ESP; muta_desc = _( "テレパシーの能力を失った!", "You lose your 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 stiffen."); 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 stop hurting."); break; case 188: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_BAD_LUCK; muta_desc = _( "黒いオーラは渦巻いて消えた。", "Your black aura swirls and fades."); break; case 189: - muta_class = &(p_ptr->muta3); + muta_class = &(creature_ptr->muta3); muta_which = MUT3_VULN_ELEM; muta_desc = _( "無防備な感じはなくなった。", "You feel less 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 less assurance."); break; case 193: - 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_GOOD_LUCK; muta_desc = _( "白いオーラは輝いて消えた。", "Your white aura shimmers and fades."); @@ -1494,9 +1494,9 @@ bool lose_mutation(MUTATION_IDX choose_mut) msg_print(muta_desc); *(muta_class) &= ~(muta_which); - p_ptr->update |= PU_BONUS; + creature_ptr->update |= PU_BONUS; handle_stuff(); - p_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(p_ptr); + creature_ptr->mutant_regenerate_mod = calc_mutant_regenerate_mod(creature_ptr); return TRUE; } } diff --git a/src/mutation.h b/src/mutation.h index 7039395a0..3d93f6bb2 100644 --- a/src/mutation.h +++ b/src/mutation.h @@ -1,6 +1,6 @@ /* mutation.c */ extern bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut); -extern bool lose_mutation(MUTATION_IDX choose_mut); +extern bool lose_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut); extern void lose_all_mutations(player_type *creature_ptr); extern void dump_mutations(player_type *creature_ptr, FILE *OutFile); extern void do_cmd_knowledge_mutations(void); diff --git a/src/player-effects.c b/src/player-effects.c index 3c544d179..af057924a 100644 --- a/src/player-effects.c +++ b/src/player-effects.c @@ -3840,7 +3840,7 @@ void do_poly_self(player_type *creature_ptr) /* Polymorph into a less mutated form */ power -= 10; - if (!lose_mutation(0)) + if (!lose_mutation(p_ptr, 0)) msg_print(_("奇妙なくらい普通になった気がする。", "You feel oddly normal.")); } -- 2.11.0