• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision14ae63c95fb8915a7019a56bc12e449535667a65 (tree)
Time2019-02-28 21:25:38
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 gain_random_mutation() を gain_mutation() に改名しつつ引数追加。 / Rename gain_random_mutation() to gain_mutation() and add a player_type * argument.

Change Summary

Incremental Difference

--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -489,7 +489,7 @@ void do_cmd_quaff_potion_aux(INVENTORY_IDX item)
489489 {
490490 if (one_in_(2))
491491 {
492- if(gain_random_mutation(0)) ident = TRUE;
492+ if(gain_mutation(p_ptr, 0)) ident = TRUE;
493493 }
494494 else if (lose_mutation(0)) ident = TRUE;
495495 } while(!ident || one_in_(2));
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -4731,7 +4731,7 @@ static void process_player(void)
47314731 {
47324732 msg_print(_("何か変わった気がする!", "You feel different!"));
47334733
4734- (void)gain_random_mutation(0);
4734+ (void)gain_mutation(p_ptr, 0);
47354735 hack_mutation = FALSE;
47364736 }
47374737
--- a/src/effects.c
+++ b/src/effects.c
@@ -3826,7 +3826,7 @@ void do_poly_self(void)
38263826 while ((power > randint0(15)) && one_in_(3))
38273827 {
38283828 power -= 7;
3829- (void)gain_random_mutation(0);
3829+ (void)gain_mutation(p_ptr, 0);
38303830 }
38313831
38323832 if (power > randint0(5))
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -25,7 +25,7 @@
2525 * @param choose_mut 与えたい突然変異のID、0ならばランダムに選択
2626 * @return なし
2727 */
28-bool gain_random_mutation(MUTATION_IDX choose_mut)
28+bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut)
2929 {
3030 int attempts_left = 20;
3131 concptr muta_desc = "";
@@ -37,584 +37,584 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
3737
3838 while (attempts_left--)
3939 {
40- switch (choose_mut ? choose_mut : (p_ptr->pclass == CLASS_BERSERKER ? 74+randint1(119) : randint1(193)))
40+ switch (choose_mut ? choose_mut : (creature_ptr->pclass == CLASS_BERSERKER ? 74+randint1(119) : randint1(193)))
4141 {
4242 case 1: case 2: case 3: case 4:
43- muta_class = &(p_ptr->muta1);
43+ muta_class = &(creature_ptr->muta1);
4444 muta_which = MUT1_SPIT_ACID;
4545 muta_desc = _("酸を吐く能力を得た。", "You gain the ability to spit acid.");
4646 break;
4747
4848 case 5: case 6: case 7:
49- muta_class = &(p_ptr->muta1);
49+ muta_class = &(creature_ptr->muta1);
5050 muta_which = MUT1_BR_FIRE;
5151 muta_desc = _("火を吐く能力を得た。", "You gain the ability to breathe fire.");
5252 break;
5353
5454 case 8: case 9:
55- muta_class = &(p_ptr->muta1);
55+ muta_class = &(creature_ptr->muta1);
5656 muta_which = MUT1_HYPN_GAZE;
5757 muta_desc = _("催眠眼の能力を得た。", "Your eyes look mesmerizing...");
5858 break;
5959
6060 case 10: case 11:
61- muta_class = &(p_ptr->muta1);
61+ muta_class = &(creature_ptr->muta1);
6262 muta_which = MUT1_TELEKINES;
6363 muta_desc = _("物体を念動力で動かす能力を得た。", "You gain the ability to move objects telekinetically.");
6464 break;
6565
6666 case 12: case 13: case 14:
67- muta_class = &(p_ptr->muta1);
67+ muta_class = &(creature_ptr->muta1);
6868 muta_which = MUT1_VTELEPORT;
6969 muta_desc = _("自分の意思でテレポートする能力を得た。", "You gain the power of teleportation at will.");
7070 break;
7171
7272 case 15: case 16:
73- muta_class = &(p_ptr->muta1);
73+ muta_class = &(creature_ptr->muta1);
7474 muta_which = MUT1_MIND_BLST;
7575 muta_desc = _("精神攻撃の能力を得た。", "You gain the power of Mind Blast.");
7676 break;
7777
7878 case 17: case 18:
79- muta_class = &(p_ptr->muta1);
79+ muta_class = &(creature_ptr->muta1);
8080 muta_which = MUT1_RADIATION;
8181 muta_desc = _("あなたは強い放射線を発生し始めた。", "You start emitting hard radiation.");
8282 break;
8383
8484 case 19: case 20:
85- muta_class = &(p_ptr->muta1);
85+ muta_class = &(creature_ptr->muta1);
8686 muta_which = MUT1_VAMPIRISM;
8787 muta_desc = _("生命力を吸収できるようになった。", "You become vampiric.");
8888 break;
8989
9090 case 21: case 22: case 23:
91- muta_class = &(p_ptr->muta1);
91+ muta_class = &(creature_ptr->muta1);
9292 muta_which = MUT1_SMELL_MET;
9393 muta_desc = _("金属の匂いを嗅ぎ分けられるようになった。", "You smell a metallic odor.");
9494 break;
9595
9696 case 24: case 25: case 26: case 27:
97- muta_class = &(p_ptr->muta1);
97+ muta_class = &(creature_ptr->muta1);
9898 muta_which = MUT1_SMELL_MON;
9999 muta_desc = _("モンスターの臭いを嗅ぎ分けられるようになった。", "You smell filthy monsters.");
100100 break;
101101
102102 case 28: case 29: case 30:
103- muta_class = &(p_ptr->muta1);
103+ muta_class = &(creature_ptr->muta1);
104104 muta_which = MUT1_BLINK;
105105 muta_desc = _("近距離テレポートの能力を得た。", "You gain the power of minor teleportation.");
106106 break;
107107
108108 case 31: case 32:
109- muta_class = &(p_ptr->muta1);
109+ muta_class = &(creature_ptr->muta1);
110110 muta_which = MUT1_EAT_ROCK;
111111 muta_desc = _("壁が美味しそうに見える。", "The walls look delicious.");
112112 break;
113113
114114 case 33: case 34:
115- muta_class = &(p_ptr->muta1);
115+ muta_class = &(creature_ptr->muta1);
116116 muta_which = MUT1_SWAP_POS;
117117 muta_desc = _("他人の靴で一マイル歩くような気分がする。", "You feel like walking a mile in someone else's shoes.");
118118 break;
119119
120120 case 35: case 36: case 37:
121- muta_class = &(p_ptr->muta1);
121+ muta_class = &(creature_ptr->muta1);
122122 muta_which = MUT1_SHRIEK;
123123 muta_desc = _("あなたの声は相当強くなった。", "Your vocal cords get much tougher.");
124124 break;
125125
126126 case 38: case 39: case 40:
127- muta_class = &(p_ptr->muta1);
127+ muta_class = &(creature_ptr->muta1);
128128 muta_which = MUT1_ILLUMINE;
129129 muta_desc = _("あなたは光り輝いて部屋を明るくするようになった。", "You can light up rooms with your presence.");
130130 break;
131131
132132 case 41: case 42:
133- muta_class = &(p_ptr->muta1);
133+ muta_class = &(creature_ptr->muta1);
134134 muta_which = MUT1_DET_CURSE;
135135 muta_desc = _("邪悪な魔法を感知できるようになった。", "You can feel evil magics.");
136136 break;
137137
138138 case 43: case 44: case 45:
139- muta_class = &(p_ptr->muta1);
139+ muta_class = &(creature_ptr->muta1);
140140 muta_which = MUT1_BERSERK;
141141 muta_desc = _("制御できる激情を感じる。", "You feel a controlled rage.");
142142 break;
143143
144144 case 46:
145- muta_class = &(p_ptr->muta1);
145+ muta_class = &(creature_ptr->muta1);
146146 muta_which = MUT1_POLYMORPH;
147147 muta_desc = _("体が変異しやすくなった。", "Your body seems mutable.");
148148 break;
149149
150150 case 47: case 48:
151- muta_class = &(p_ptr->muta1);
151+ muta_class = &(creature_ptr->muta1);
152152 muta_which = MUT1_MIDAS_TCH;
153153 muta_desc = _("「ミダス王の手」の能力を得た。", "You gain the Midas touch.");/*トゥームレイダースにありましたね。 */
154154 break;
155155
156156 case 49:
157- muta_class = &(p_ptr->muta1);
157+ muta_class = &(creature_ptr->muta1);
158158 muta_which = MUT1_GROW_MOLD;
159159 muta_desc = _("突然カビに親しみを覚えた。", "You feel a sudden affinity for mold.");
160160 break;
161161
162162 case 50: case 51: case 52:
163- muta_class = &(p_ptr->muta1);
163+ muta_class = &(creature_ptr->muta1);
164164 muta_which = MUT1_RESIST;
165165 muta_desc = _("あなたは自分自身を守れる気がする。", "You feel like you can protect yourself.");
166166 break;
167167
168168 case 53: case 54: case 55:
169- muta_class = &(p_ptr->muta1);
169+ muta_class = &(creature_ptr->muta1);
170170 muta_which = MUT1_EARTHQUAKE;
171171 muta_desc = _("ダンジョンを破壊する能力を得た。", "You gain the ability to wreck the dungeon.");
172172 break;
173173
174174 case 56:
175- muta_class = &(p_ptr->muta1);
175+ muta_class = &(creature_ptr->muta1);
176176 muta_which = MUT1_EAT_MAGIC;
177177 muta_desc = _("魔法のアイテムが美味そうに見える。", "Your magic items look delicious.");
178178 break;
179179
180180 case 57: case 58:
181- muta_class = &(p_ptr->muta1);
181+ muta_class = &(creature_ptr->muta1);
182182 muta_which = MUT1_WEIGH_MAG;
183183 muta_desc = _("あなたは周囲にある魔法をより良く理解できる気がする。", "You feel you can better understand the magic around you.");
184184 break;
185185
186186 case 59:
187- muta_class = &(p_ptr->muta1);
187+ muta_class = &(creature_ptr->muta1);
188188 muta_which = MUT1_STERILITY;
189189 muta_desc = _("周りの全ての者に頭痛を起こすことができる。", "You can give everything around you a headache.");
190190 break;
191191 case 60: case 61:
192- muta_class = &(p_ptr->muta1);
192+ muta_class = &(creature_ptr->muta1);
193193 muta_which = MUT1_PANIC_HIT;
194194 muta_desc = _("突然、泥棒の気分が分かるようになった。", "You suddenly understand how thieves feel.");
195195 break;
196196
197197 case 62: case 63: case 64:
198- muta_class = &(p_ptr->muta1);
198+ muta_class = &(creature_ptr->muta1);
199199 muta_which = MUT1_DAZZLE;
200200 muta_desc = _("眩い閃光を発する能力を得た。", "You gain the ability to emit dazzling lights.");
201201 break;
202202
203203 case 65: case 66: case 67:
204- muta_class = &(p_ptr->muta1);
204+ muta_class = &(creature_ptr->muta1);
205205 muta_which = MUT1_LASER_EYE;
206206 muta_desc = _("あなたの目は一瞬焼け付いた。", "Your eyes burn for a moment.");
207207 break;
208208
209209 case 68: case 69:
210- muta_class = &(p_ptr->muta1);
210+ muta_class = &(creature_ptr->muta1);
211211 muta_which = MUT1_RECALL;
212212 muta_desc = _("少しだけホームシックになったが、すぐ直った。", "You feel briefly homesick, but it passes.");
213213 break;
214214
215215 case 70:
216- muta_class = &(p_ptr->muta1);
216+ muta_class = &(creature_ptr->muta1);
217217 muta_which = MUT1_BANISH;
218218 muta_desc = _("神聖な怒りの力に満たされた。", "You feel a holy wrath fill you.");
219219 break;
220220
221221 case 71: case 72:
222- muta_class = &(p_ptr->muta1);
222+ muta_class = &(creature_ptr->muta1);
223223 muta_which = MUT1_COLD_TOUCH;
224224 muta_desc = _("あなたの両手はとても冷たくなった。", "Your hands get very cold.");
225225 break;
226226
227227 case 73: case 74:
228- muta_class = &(p_ptr->muta1);
228+ muta_class = &(creature_ptr->muta1);
229229 muta_which = MUT1_LAUNCHER;
230230 muta_desc = _("あなたの物を投げる手はかなり強くなった気がする。", "Your throwing arm feels much stronger.");
231231 break;
232232
233233 case 75:
234- muta_class = &(p_ptr->muta2);
234+ muta_class = &(creature_ptr->muta2);
235235 muta_which = MUT2_BERS_RAGE;
236236 muta_desc = _("あなたは狂暴化の発作を起こすようになった!", "You become subject to fits of berserk rage!");
237237 break;
238238
239239 case 76:
240- muta_class = &(p_ptr->muta2);
240+ muta_class = &(creature_ptr->muta2);
241241 muta_which = MUT2_COWARDICE;
242242 muta_desc = _("信じられないくらい臆病になった!", "You become an incredible coward!");
243243 break;
244244
245245 case 77:
246- muta_class = &(p_ptr->muta2);
246+ muta_class = &(creature_ptr->muta2);
247247 muta_which = MUT2_RTELEPORT;
248248 muta_desc = _("あなたの位置は非常に不確定になった。", "Your position seems very uncertain...");
249249 break;
250250
251251 case 78:
252- muta_class = &(p_ptr->muta2);
252+ muta_class = &(creature_ptr->muta2);
253253 muta_which = MUT2_ALCOHOL;
254254 muta_desc = _("あなたはアルコールを分泌するようになった。", "Your body starts producing alcohol!");
255255 break;
256256
257257 case 79:
258- muta_class = &(p_ptr->muta2);
258+ muta_class = &(creature_ptr->muta2);
259259 muta_which = MUT2_HALLU;
260260 muta_desc = _("あなたは幻覚を引き起こす精神錯乱に侵された。", "You are afflicted by a hallucinatory insanity!");
261261 break;
262262
263263 case 80:
264- muta_class = &(p_ptr->muta2);
264+ muta_class = &(creature_ptr->muta2);
265265 muta_which = MUT2_FLATULENT;
266266 muta_desc = _( "あなたは制御不能な強烈な屁をこくようになった。", "You become subject to uncontrollable flatulence.");
267267
268268 break;
269269 case 81: case 82:
270- muta_class = &(p_ptr->muta2);
270+ muta_class = &(creature_ptr->muta2);
271271 muta_which = MUT2_SCOR_TAIL;
272272 muta_desc = _( "サソリの尻尾が生えてきた!", "You grow a scorpion tail!");
273273
274274 break;
275275 case 83: case 84:
276- muta_class = &(p_ptr->muta2);
276+ muta_class = &(creature_ptr->muta2);
277277 muta_which = MUT2_HORNS;
278278 muta_desc = _( "額に角が生えた!", "Horns pop forth into your forehead!");
279279
280280 break;
281281 case 85: case 86:
282- muta_class = &(p_ptr->muta2);
282+ muta_class = &(creature_ptr->muta2);
283283 muta_which = MUT2_BEAK;
284284 muta_desc = _( "口が鋭く強いクチバシに変化した!", "Your mouth turns into a sharp, powerful beak!");
285285
286286 break;
287287 case 87: case 88:
288- muta_class = &(p_ptr->muta2);
288+ muta_class = &(creature_ptr->muta2);
289289 muta_which = MUT2_ATT_DEMON;
290290 muta_desc = _( "悪魔を引き付けるようになった。", "You start attracting demons.");
291291
292292 break;
293293 case 89:
294- muta_class = &(p_ptr->muta2);
294+ muta_class = &(creature_ptr->muta2);
295295 muta_which = MUT2_PROD_MANA;
296296 muta_desc = _( "あなたは制御不能な魔法のエネルギーを発生するようになった。", "You start producing magical energy uncontrollably.");
297297
298298 break;
299299 case 90: case 91:
300- muta_class = &(p_ptr->muta2);
300+ muta_class = &(creature_ptr->muta2);
301301 muta_which = MUT2_SPEED_FLUX;
302302 muta_desc = _( "あなたは躁鬱質になった。", "You become manic-depressive.");
303303
304304 break;
305305 case 92: case 93:
306- muta_class = &(p_ptr->muta2);
306+ muta_class = &(creature_ptr->muta2);
307307 muta_which = MUT2_BANISH_ALL;
308308 muta_desc = _( "恐ろしい力があなたの背後に潜んでいる気がする。", "You feel a terrifying power lurking behind you.");
309309
310310 break;
311311 case 94:
312- muta_class = &(p_ptr->muta2);
312+ muta_class = &(creature_ptr->muta2);
313313 muta_which = MUT2_EAT_LIGHT;
314314 muta_desc = _( "あなたはウンゴリアントに奇妙な親しみを覚えるようになった。", "You feel a strange kinship with Ungoliant.");
315315
316316 break;
317317 case 95: case 96:
318- muta_class = &(p_ptr->muta2);
318+ muta_class = &(creature_ptr->muta2);
319319 muta_which = MUT2_TRUNK;
320320 muta_desc = _( "あなたの鼻は伸びて象の鼻のようになった。", "Your nose grows into an elephant-like trunk.");
321321
322322 break;
323323 case 97:
324- muta_class = &(p_ptr->muta2);
324+ muta_class = &(creature_ptr->muta2);
325325 muta_which = MUT2_ATT_ANIMAL;
326326 muta_desc = _( "動物を引き付けるようになった。", "You start attracting animals.");
327327
328328 break;
329329 case 98:
330- muta_class = &(p_ptr->muta2);
330+ muta_class = &(creature_ptr->muta2);
331331 muta_which = MUT2_TENTACLES;
332332 muta_desc = _( "邪悪な触手が体の両側に生えてきた。", "Evil-looking tentacles sprout from your sides.");
333333
334334 break;
335335 case 99:
336- muta_class = &(p_ptr->muta2);
336+ muta_class = &(creature_ptr->muta2);
337337 muta_which = MUT2_RAW_CHAOS;
338338 muta_desc = _( "周囲の空間が不安定になった気がする。", "You feel the universe is less stable around you.");
339339
340340 break;
341341 case 100: case 101: case 102:
342- muta_class = &(p_ptr->muta2);
342+ muta_class = &(creature_ptr->muta2);
343343 muta_which = MUT2_NORMALITY;
344344 muta_desc = _( "あなたは奇妙なほど普通になった気がする。", "You feel strangely normal.");
345345
346346 break;
347347 case 103:
348- muta_class = &(p_ptr->muta2);
348+ muta_class = &(creature_ptr->muta2);
349349 muta_which = MUT2_WRAITH;
350350 muta_desc = _( "あなたは幽体化したり実体化したりするようになった。", "You start to fade in and out of the physical world.");
351351
352352 break;
353353 case 104:
354- muta_class = &(p_ptr->muta2);
354+ muta_class = &(creature_ptr->muta2);
355355 muta_which = MUT2_POLY_WOUND;
356356 muta_desc = _( "あなたはカオスの力が古い傷に入り込んでくるのを感じた。", "You feel forces of chaos entering your old scars.");
357357
358358 break;
359359 case 105:
360- muta_class = &(p_ptr->muta2);
360+ muta_class = &(creature_ptr->muta2);
361361 muta_which = MUT2_WASTING;
362362 muta_desc = _( "あなたは突然おぞましい衰弱病にかかった。", "You suddenly contract a horrible wasting disease.");
363363
364364 break;
365365 case 106:
366- muta_class = &(p_ptr->muta2);
366+ muta_class = &(creature_ptr->muta2);
367367 muta_which = MUT2_ATT_DRAGON;
368368 muta_desc = _( "あなたはドラゴンを引きつけるようになった。", "You start attracting dragons.");
369369
370370 break;
371371 case 107: case 108:
372- muta_class = &(p_ptr->muta2);
372+ muta_class = &(creature_ptr->muta2);
373373 muta_which = MUT2_WEIRD_MIND;
374374 muta_desc = _( "あなたの思考は突然おかしな方向に向き始めた。", "Your thoughts suddenly take off in strange directions.");
375375
376376 break;
377377 case 109:
378- muta_class = &(p_ptr->muta2);
378+ muta_class = &(creature_ptr->muta2);
379379 muta_which = MUT2_NAUSEA;
380380 muta_desc = _( "胃袋がピクピクしはじめた。", "Your stomach starts to roil nauseously.");
381381
382382 break;
383383 case 110: case 111:
384384 /* Chaos warriors already have a chaos deity */
385- if (p_ptr->pclass != CLASS_CHAOS_WARRIOR)
385+ if (creature_ptr->pclass != CLASS_CHAOS_WARRIOR)
386386 {
387- muta_class = &(p_ptr->muta2);
387+ muta_class = &(creature_ptr->muta2);
388388 muta_which = MUT2_CHAOS_GIFT;
389389 muta_desc = _( "あなたはカオスの守護悪魔の注意を惹くようになった。", "You attract the notice of a chaos deity!");
390390
391391 }
392392 break;
393393 case 112:
394- muta_class = &(p_ptr->muta2);
394+ muta_class = &(creature_ptr->muta2);
395395 muta_which = MUT2_WALK_SHAD;
396396 muta_desc = _( "あなたは現実が紙のように薄いと感じるようになった。", "You feel like reality is as thin as paper.");
397397
398398 break;
399399 case 113: case 114:
400- muta_class = &(p_ptr->muta2);
400+ muta_class = &(creature_ptr->muta2);
401401 muta_which = MUT2_WARNING;
402402 muta_desc = _( "あなたは突然パラノイアになった気がする。", "You suddenly feel paranoid.");
403403
404404 break;
405405 case 115:
406- muta_class = &(p_ptr->muta2);
406+ muta_class = &(creature_ptr->muta2);
407407 muta_which = MUT2_INVULN;
408408 muta_desc = _( "あなたは祝福され、無敵状態になる発作を起こすようになった。", "You are blessed with fits of invulnerability.");
409409
410410 break;
411411 case 116: case 117:
412- muta_class = &(p_ptr->muta2);
412+ muta_class = &(creature_ptr->muta2);
413413 muta_which = MUT2_SP_TO_HP;
414414 muta_desc = _( "魔法の治癒の発作を起こすようになった。", "You are subject to fits of magical healing.");
415415
416416 break;
417417 case 118:
418- muta_class = &(p_ptr->muta2);
418+ muta_class = &(creature_ptr->muta2);
419419 muta_which = MUT2_HP_TO_SP;
420420 muta_desc = _( "痛みを伴う精神明瞭化の発作を起こすようになった。", "You are subject to fits of painful clarity.");
421421
422422 break;
423423 case 119:
424- muta_class = &(p_ptr->muta2);
424+ muta_class = &(creature_ptr->muta2);
425425 muta_which = MUT2_DISARM;
426426 muta_desc = _( "あなたの脚は長さが四倍になった。", "Your feet grow to four times their former size.");
427427
428428 break;
429429 case 120: case 121: case 122:
430- muta_class = &(p_ptr->muta3);
430+ muta_class = &(creature_ptr->muta3);
431431 muta_which = MUT3_HYPER_STR;
432432 muta_desc = _( "超人的に強くなった!", "You current_world_ptr->game_turn into a superhuman he-man!");
433433
434434 break;
435435 case 123: case 124: case 125:
436- muta_class = &(p_ptr->muta3);
436+ muta_class = &(creature_ptr->muta3);
437437 muta_which = MUT3_PUNY;
438438 muta_desc = _( "筋肉が弱ってしまった...", "Your muscles wither away...");
439439
440440 break;
441441 case 126: case 127: case 128:
442- muta_class = &(p_ptr->muta3);
442+ muta_class = &(creature_ptr->muta3);
443443 muta_which = MUT3_HYPER_INT;
444444 muta_desc = _( "あなたの脳は生体コンピュータに進化した!", "Your brain evolves into a living computer!");
445445
446446 break;
447447 case 129: case 130: case 131:
448- muta_class = &(p_ptr->muta3);
448+ muta_class = &(creature_ptr->muta3);
449449 muta_which = MUT3_MORONIC;
450450 muta_desc = _( "脳が萎縮してしまった...", "Your brain withers away...");
451451
452452 break;
453453 case 132: case 133:
454- muta_class = &(p_ptr->muta3);
454+ muta_class = &(creature_ptr->muta3);
455455 muta_which = MUT3_RESILIENT;
456456 muta_desc = _( "並外れてタフになった。", "You become extraordinarily resilient.");
457457
458458 break;
459459 case 134: case 135:
460- muta_class = &(p_ptr->muta3);
460+ muta_class = &(creature_ptr->muta3);
461461 muta_which = MUT3_XTRA_FAT;
462462 muta_desc = _( "あなたは気持ち悪いくらい太った!", "You become sickeningly fat!");
463463
464464 break;
465465 case 136: case 137:
466- muta_class = &(p_ptr->muta3);
466+ muta_class = &(creature_ptr->muta3);
467467 muta_which = MUT3_ALBINO;
468468 muta_desc = _( "アルビノになった!弱くなった気がする...", "You current_world_ptr->game_turn into an albino! You feel frail...");
469469
470470 break;
471471 case 138: case 139: case 140:
472- muta_class = &(p_ptr->muta3);
472+ muta_class = &(creature_ptr->muta3);
473473 muta_which = MUT3_FLESH_ROT;
474474 muta_desc = _( "あなたの肉体は腐敗する病気に侵された!", "Your flesh is afflicted by a rotting disease!");
475475
476476 break;
477477 case 141: case 142:
478- muta_class = &(p_ptr->muta3);
478+ muta_class = &(creature_ptr->muta3);
479479 muta_which = MUT3_SILLY_VOI;
480480 muta_desc = _( "声が間抜けなキーキー声になった!", "Your voice turns into a ridiculous squeak!");
481481
482482 break;
483483 case 143: case 144:
484- muta_class = &(p_ptr->muta3);
484+ muta_class = &(creature_ptr->muta3);
485485 muta_which = MUT3_BLANK_FAC;
486486 muta_desc = _( "のっぺらぼうになった!", "Your face becomes completely featureless!");
487487
488488 break;
489489 case 145:
490- muta_class = &(p_ptr->muta3);
490+ muta_class = &(creature_ptr->muta3);
491491 muta_which = MUT3_ILL_NORM;
492492 muta_desc = _( "心の安らぐ幻影を映し出すようになった。", "You start projecting a reassuring image.");
493493
494494 break;
495495 case 146: case 147: case 148:
496- muta_class = &(p_ptr->muta3);
496+ muta_class = &(creature_ptr->muta3);
497497 muta_which = MUT3_XTRA_EYES;
498498 muta_desc = _( "新たに二つの目が出来た!", "You grow an extra pair of eyes!");
499499
500500 break;
501501 case 149: case 150:
502- muta_class = &(p_ptr->muta3);
502+ muta_class = &(creature_ptr->muta3);
503503 muta_which = MUT3_MAGIC_RES;
504504 muta_desc = _( "魔法への耐性がついた。", "You become resistant to magic.");
505505
506506 break;
507507 case 151: case 152: case 153:
508- muta_class = &(p_ptr->muta3);
508+ muta_class = &(creature_ptr->muta3);
509509 muta_which = MUT3_XTRA_NOIS;
510510 muta_desc = _( "あなたは奇妙な音を立て始めた!", "You start making strange noise!");
511511
512512 break;
513513 case 154: case 155: case 156:
514- muta_class = &(p_ptr->muta3);
514+ muta_class = &(creature_ptr->muta3);
515515 muta_which = MUT3_INFRAVIS;
516516 muta_desc = _( "赤外線視力が増した。", "Your infravision is improved.");
517517
518518 break;
519519 case 157: case 158:
520- muta_class = &(p_ptr->muta3);
520+ muta_class = &(creature_ptr->muta3);
521521 muta_which = MUT3_XTRA_LEGS;
522522 muta_desc = _( "新たに二本の足が生えてきた!", "You grow an extra pair of legs!");
523523
524524 break;
525525 case 159: case 160:
526- muta_class = &(p_ptr->muta3);
526+ muta_class = &(creature_ptr->muta3);
527527 muta_which = MUT3_SHORT_LEG;
528528 muta_desc = _( "足が短い突起になってしまった!", "Your legs current_world_ptr->game_turn into short stubs!");
529529
530530 break;
531531 case 161: case 162:
532- muta_class = &(p_ptr->muta3);
532+ muta_class = &(creature_ptr->muta3);
533533 muta_which = MUT3_ELEC_TOUC;
534534 muta_desc = _( "血管を電流が流れ始めた!", "Electricity starts running through you!");
535535
536536 break;
537537 case 163: case 164:
538- muta_class = &(p_ptr->muta3);
538+ muta_class = &(creature_ptr->muta3);
539539 muta_which = MUT3_FIRE_BODY;
540540 muta_desc = _( "あなたの体は炎につつまれている。", "Your body is enveloped in flames!");
541541
542542 break;
543543 case 165: case 166: case 167:
544- muta_class = &(p_ptr->muta3);
544+ muta_class = &(creature_ptr->muta3);
545545 muta_which = MUT3_WART_SKIN;
546546 muta_desc = _( "気持ち悪いイボイボが体中にできた!", "Disgusting warts appear everywhere on you!");
547547
548548 break;
549549 case 168: case 169: case 170:
550- muta_class = &(p_ptr->muta3);
550+ muta_class = &(creature_ptr->muta3);
551551 muta_which = MUT3_SCALES;
552552 muta_desc = _( "肌が黒い鱗に変わった!", "Your skin turns into black scales!");
553553
554554 break;
555555 case 171: case 172:
556- muta_class = &(p_ptr->muta3);
556+ muta_class = &(creature_ptr->muta3);
557557 muta_which = MUT3_IRON_SKIN;
558558 muta_desc = _( "あなたの肌は鉄になった!", "Your skin turns to steel!");
559559
560560 break;
561561 case 173: case 174:
562- muta_class = &(p_ptr->muta3);
562+ muta_class = &(creature_ptr->muta3);
563563 muta_which = MUT3_WINGS;
564564 muta_desc = _( "背中に羽が生えた。", "You grow a pair of wings.");
565565
566566 break;
567567 case 175: case 176: case 177:
568- muta_class = &(p_ptr->muta3);
568+ muta_class = &(creature_ptr->muta3);
569569 muta_which = MUT3_FEARLESS;
570570 muta_desc = _( "完全に怖れ知らずになった。", "You become completely fearless.");
571571
572572 break;
573573 case 178: case 179:
574- muta_class = &(p_ptr->muta3);
574+ muta_class = &(creature_ptr->muta3);
575575 muta_which = MUT3_REGEN;
576576 muta_desc = _( "急速に回復し始めた。", "You start regenerating.");
577577
578578 break;
579579 case 180: case 181:
580- muta_class = &(p_ptr->muta3);
580+ muta_class = &(creature_ptr->muta3);
581581 muta_which = MUT3_ESP;
582582 muta_desc = _( "テレパシーの能力を得た!", "You develop a telepathic ability!");
583583
584584 break;
585585 case 182: case 183: case 184:
586- muta_class = &(p_ptr->muta3);
586+ muta_class = &(creature_ptr->muta3);
587587 muta_which = MUT3_LIMBER;
588588 muta_desc = _( "筋肉がしなやかになった。", "Your muscles become limber.");
589589
590590 break;
591591 case 185: case 186: case 187:
592- muta_class = &(p_ptr->muta3);
592+ muta_class = &(creature_ptr->muta3);
593593 muta_which = MUT3_ARTHRITIS;
594594 muta_desc = _( "関節が突然痛み出した。", "Your joints suddenly hurt.");
595595
596596 break;
597597 case 188:
598- if (p_ptr->pseikaku == SEIKAKU_LUCKY) break;
599- muta_class = &(p_ptr->muta3);
598+ if (creature_ptr->pseikaku == SEIKAKU_LUCKY) break;
599+ muta_class = &(creature_ptr->muta3);
600600 muta_which = MUT3_BAD_LUCK;
601601 muta_desc = _( "悪意に満ちた黒いオーラがあなたをとりまいた...", "There is a malignant black aura surrounding you...");
602602
603603 break;
604604 case 189:
605- muta_class = &(p_ptr->muta3);
605+ muta_class = &(creature_ptr->muta3);
606606 muta_which = MUT3_VULN_ELEM;
607607 muta_desc = _( "妙に無防備になった気がする。", "You feel strangely exposed.");
608608
609609 break;
610610 case 190: case 191: case 192:
611- muta_class = &(p_ptr->muta3);
611+ muta_class = &(creature_ptr->muta3);
612612 muta_which = MUT3_MOTION;
613613 muta_desc = _( "体の動作がより正確になった。", "You move with new assurance.");
614614
615615 break;
616616 case 193:
617- muta_class = &(p_ptr->muta3);
617+ muta_class = &(creature_ptr->muta3);
618618 muta_which = MUT3_GOOD_LUCK;
619619 muta_desc = _( "慈悲深い白いオーラがあなたをとりまいた...", "There is a benevolent white aura surrounding you...");
620620
@@ -650,51 +650,51 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
650650 --- henkma
651651 */
652652 if(!choose_mut){
653- if (p_ptr->prace == RACE_VAMPIRE &&
654- !(p_ptr->muta1 & MUT1_HYPN_GAZE) &&
653+ if (creature_ptr->prace == RACE_VAMPIRE &&
654+ !(creature_ptr->muta1 & MUT1_HYPN_GAZE) &&
655655 (randint1(10) < 7))
656656 {
657- muta_class = &(p_ptr->muta1);
657+ muta_class = &(creature_ptr->muta1);
658658 muta_which = MUT1_HYPN_GAZE;
659659 muta_desc = _( "眼が幻惑的になった...", "Your eyes look mesmerizing...");
660660
661661 }
662662
663- else if (p_ptr->prace == RACE_IMP &&
664- !(p_ptr->muta2 & MUT2_HORNS) &&
663+ else if (creature_ptr->prace == RACE_IMP &&
664+ !(creature_ptr->muta2 & MUT2_HORNS) &&
665665 (randint1(10) < 7))
666666 {
667- muta_class = &(p_ptr->muta2);
667+ muta_class = &(creature_ptr->muta2);
668668 muta_which = MUT2_HORNS;
669669 muta_desc = _( "角が額から生えてきた!", "Horns pop forth into your forehead!");
670670
671671 }
672672
673- else if (p_ptr->prace == RACE_YEEK &&
674- !(p_ptr->muta1 & MUT1_SHRIEK) &&
673+ else if (creature_ptr->prace == RACE_YEEK &&
674+ !(creature_ptr->muta1 & MUT1_SHRIEK) &&
675675 (randint1(10) < 7))
676676 {
677- muta_class = &(p_ptr->muta1);
677+ muta_class = &(creature_ptr->muta1);
678678 muta_which = MUT1_SHRIEK;
679679 muta_desc = _( "声質がかなり強くなった。", "Your vocal cords get much tougher.");
680680
681681 }
682682
683- else if (p_ptr->prace == RACE_BEASTMAN &&
684- !(p_ptr->muta1 & MUT1_POLYMORPH) &&
683+ else if (creature_ptr->prace == RACE_BEASTMAN &&
684+ !(creature_ptr->muta1 & MUT1_POLYMORPH) &&
685685 (randint1(10) < 2))
686686 {
687- muta_class = &(p_ptr->muta1);
687+ muta_class = &(creature_ptr->muta1);
688688 muta_which = MUT1_POLYMORPH;
689689 muta_desc = _( "あなたの肉体は変化できるようになった、", "Your body seems mutable.");
690690
691691 }
692692
693- else if (p_ptr->prace == RACE_MIND_FLAYER &&
694- !(p_ptr->muta2 & MUT2_TENTACLES) &&
693+ else if (creature_ptr->prace == RACE_MIND_FLAYER &&
694+ !(creature_ptr->muta2 & MUT2_TENTACLES) &&
695695 (randint1(10) < 7))
696696 {
697- muta_class = &(p_ptr->muta2);
697+ muta_class = &(creature_ptr->muta2);
698698 muta_which = MUT2_TENTACLES;
699699 muta_desc = _( "邪悪な触手が口の周りに生えた。", "Evil-looking tentacles sprout from your mouth.");
700700
@@ -705,154 +705,154 @@ bool gain_random_mutation(MUTATION_IDX choose_mut)
705705 msg_print(muta_desc);
706706 *muta_class |= muta_which;
707707
708- if (muta_class == &(p_ptr->muta3))
708+ if (muta_class == &(creature_ptr->muta3))
709709 {
710710 if (muta_which == MUT3_PUNY)
711711 {
712- if (p_ptr->muta3 & MUT3_HYPER_STR)
712+ if (creature_ptr->muta3 & MUT3_HYPER_STR)
713713 {
714714 msg_print(_("あなたはもう超人的に強くはない!", "You no longer feel super-strong!"));
715715
716- p_ptr->muta3 &= ~(MUT3_HYPER_STR);
716+ creature_ptr->muta3 &= ~(MUT3_HYPER_STR);
717717 }
718718 }
719719 else if (muta_which == MUT3_HYPER_STR)
720720 {
721- if (p_ptr->muta3 & MUT3_PUNY)
721+ if (creature_ptr->muta3 & MUT3_PUNY)
722722 {
723723 msg_print(_("あなたはもう虚弱ではない!", "You no longer feel puny!"));
724724
725- p_ptr->muta3 &= ~(MUT3_PUNY);
725+ creature_ptr->muta3 &= ~(MUT3_PUNY);
726726 }
727727 }
728728 else if (muta_which == MUT3_MORONIC)
729729 {
730- if (p_ptr->muta3 & MUT3_HYPER_INT)
730+ if (creature_ptr->muta3 & MUT3_HYPER_INT)
731731 {
732732 msg_print(_("あなたの脳はもう生体コンピュータではない。", "Your brain is no longer a living computer."));
733733
734- p_ptr->muta3 &= ~(MUT3_HYPER_INT);
734+ creature_ptr->muta3 &= ~(MUT3_HYPER_INT);
735735 }
736736 }
737737 else if (muta_which == MUT3_HYPER_INT)
738738 {
739- if (p_ptr->muta3 & MUT3_MORONIC)
739+ if (creature_ptr->muta3 & MUT3_MORONIC)
740740 {
741741 msg_print(_("あなたはもう精神薄弱ではない。", "You are no longer moronic."));
742742
743- p_ptr->muta3 &= ~(MUT3_MORONIC);
743+ creature_ptr->muta3 &= ~(MUT3_MORONIC);
744744 }
745745 }
746746 else if (muta_which == MUT3_IRON_SKIN)
747747 {
748- if (p_ptr->muta3 & MUT3_SCALES)
748+ if (creature_ptr->muta3 & MUT3_SCALES)
749749 {
750750 msg_print(_("鱗がなくなった。", "You lose your scales."));
751751
752- p_ptr->muta3 &= ~(MUT3_SCALES);
752+ creature_ptr->muta3 &= ~(MUT3_SCALES);
753753 }
754- if (p_ptr->muta3 & MUT3_FLESH_ROT)
754+ if (creature_ptr->muta3 & MUT3_FLESH_ROT)
755755 {
756756 msg_print(_("肉体が腐乱しなくなった。", "Your flesh rots no longer."));
757757
758- p_ptr->muta3 &= ~(MUT3_FLESH_ROT);
758+ creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
759759 }
760- if (p_ptr->muta3 & MUT3_WART_SKIN)
760+ if (creature_ptr->muta3 & MUT3_WART_SKIN)
761761 {
762762 msg_print(_("肌のイボイボがなくなった。", "You lose your warts."));
763763
764- p_ptr->muta3 &= ~(MUT3_WART_SKIN);
764+ creature_ptr->muta3 &= ~(MUT3_WART_SKIN);
765765 }
766766 }
767767 else if (muta_which == MUT3_WART_SKIN || muta_which == MUT3_SCALES
768768 || muta_which == MUT3_FLESH_ROT)
769769 {
770- if (p_ptr->muta3 & MUT3_IRON_SKIN)
770+ if (creature_ptr->muta3 & MUT3_IRON_SKIN)
771771 {
772772 msg_print(_("あなたの肌はもう鉄ではない。", "Your skin is no longer made of steel."));
773773
774- p_ptr->muta3 &= ~(MUT3_IRON_SKIN);
774+ creature_ptr->muta3 &= ~(MUT3_IRON_SKIN);
775775 }
776776 }
777777 else if (muta_which == MUT3_FEARLESS)
778778 {
779- if (p_ptr->muta2 & MUT2_COWARDICE)
779+ if (creature_ptr->muta2 & MUT2_COWARDICE)
780780 {
781781 msg_print(_("臆病でなくなった。", "You are no longer cowardly."));
782782
783- p_ptr->muta2 &= ~(MUT2_COWARDICE);
783+ creature_ptr->muta2 &= ~(MUT2_COWARDICE);
784784 }
785785 }
786786 else if (muta_which == MUT3_FLESH_ROT)
787787 {
788- if (p_ptr->muta3 & MUT3_REGEN)
788+ if (creature_ptr->muta3 & MUT3_REGEN)
789789 {
790790 msg_print(_("急速に回復しなくなった。", "You stop regenerating."));
791791
792- p_ptr->muta3 &= ~(MUT3_REGEN);
792+ creature_ptr->muta3 &= ~(MUT3_REGEN);
793793 }
794794 }
795795 else if (muta_which == MUT3_REGEN)
796796 {
797- if (p_ptr->muta3 & MUT3_FLESH_ROT)
797+ if (creature_ptr->muta3 & MUT3_FLESH_ROT)
798798 {
799799 msg_print(_("肉体が腐乱しなくなった。", "Your flesh stops rotting."));
800800
801- p_ptr->muta3 &= ~(MUT3_FLESH_ROT);
801+ creature_ptr->muta3 &= ~(MUT3_FLESH_ROT);
802802 }
803803 }
804804 else if (muta_which == MUT3_LIMBER)
805805 {
806- if (p_ptr->muta3 & MUT3_ARTHRITIS)
806+ if (creature_ptr->muta3 & MUT3_ARTHRITIS)
807807 {
808808 msg_print(_("関節が痛くなくなった。", "Your joints stop hurting."));
809809
810- p_ptr->muta3 &= ~(MUT3_ARTHRITIS);
810+ creature_ptr->muta3 &= ~(MUT3_ARTHRITIS);
811811 }
812812 }
813813 else if (muta_which == MUT3_ARTHRITIS)
814814 {
815- if (p_ptr->muta3 & MUT3_LIMBER)
815+ if (creature_ptr->muta3 & MUT3_LIMBER)
816816 {
817817 msg_print(_("あなたはしなやかでなくなった。", "You no longer feel limber."));
818818
819- p_ptr->muta3 &= ~(MUT3_LIMBER);
819+ creature_ptr->muta3 &= ~(MUT3_LIMBER);
820820 }
821821 }
822822 }
823- else if (muta_class == &(p_ptr->muta2))
823+ else if (muta_class == &(creature_ptr->muta2))
824824 {
825825 if (muta_which == MUT2_COWARDICE)
826826 {
827- if (p_ptr->muta3 & MUT3_FEARLESS)
827+ if (creature_ptr->muta3 & MUT3_FEARLESS)
828828 {
829829 msg_print(_("恐れ知らずでなくなった。", "You no longer feel fearless."));
830830
831- p_ptr->muta3 &= ~(MUT3_FEARLESS);
831+ creature_ptr->muta3 &= ~(MUT3_FEARLESS);
832832 }
833833 }
834834 if (muta_which == MUT2_BEAK)
835835 {
836- if (p_ptr->muta2 & MUT2_TRUNK)
836+ if (creature_ptr->muta2 & MUT2_TRUNK)
837837 {
838838 msg_print(_("あなたの鼻はもう象の鼻のようではなくなった。", "Your nose is no longer elephantine."));
839839
840- p_ptr->muta2 &= ~(MUT2_TRUNK);
840+ creature_ptr->muta2 &= ~(MUT2_TRUNK);
841841 }
842842 }
843843 if (muta_which == MUT2_TRUNK)
844844 {
845- if (p_ptr->muta2 & MUT2_BEAK)
845+ if (creature_ptr->muta2 & MUT2_BEAK)
846846 {
847847 msg_print(_("硬いクチバシがなくなった。", "You no longer have a hard beak."));
848848
849- p_ptr->muta2 &= ~(MUT2_BEAK);
849+ creature_ptr->muta2 &= ~(MUT2_BEAK);
850850 }
851851 }
852852 }
853853
854854 mutant_regenerate_mod = calc_mutant_regenerate_mod();
855- p_ptr->update |= PU_BONUS;
855+ creature_ptr->update |= PU_BONUS;
856856 handle_stuff();
857857 return TRUE;
858858 }
--- a/src/mutation.h
+++ b/src/mutation.h
@@ -1,5 +1,5 @@
11 /* mutation.c */
2-extern bool gain_random_mutation(MUTATION_IDX choose_mut);
2+extern bool gain_mutation(player_type *creature_ptr, MUTATION_IDX choose_mut);
33 extern bool lose_mutation(MUTATION_IDX choose_mut);
44 extern void lose_all_mutations(void);
55 extern void dump_mutations(FILE *OutFile);
--- a/src/patron.c
+++ b/src/patron.c
@@ -266,7 +266,7 @@ void gain_level_reward(int chosen_reward)
266266 if (one_in_(6) && !chosen_reward)
267267 {
268268 msg_format(_("%^sは褒美としてあなたを突然変異させた。", "%^s rewards you with a mutation!"), chaos_patrons[p_ptr->chaos_patron]);
269- (void)gain_random_mutation(0);
269+ (void)gain_mutation(p_ptr, 0);
270270 reward = _("変異した。", "mutation");
271271 }
272272 else
--- a/src/realm-craft.c
+++ b/src/realm-craft.c
@@ -493,7 +493,7 @@ concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
493493 mutation = 77;
494494
495495 /* Gain the mutation */
496- if (gain_random_mutation(mutation))
496+ if (gain_mutation(p_ptr, mutation))
497497 {
498498 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
499499 }
--- a/src/realm-trump.c
+++ b/src/realm-trump.c
@@ -459,7 +459,7 @@ concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
459459 mutation = 77;
460460
461461 /* Gain the mutation */
462- if (gain_random_mutation(mutation))
462+ if (gain_mutation(p_ptr, mutation))
463463 {
464464 msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
465465 }
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -4204,7 +4204,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
42044204 if (one_in_(3))
42054205 {
42064206 msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
4207- (void)gain_random_mutation(0);
4207+ (void)gain_mutation(p_ptr, 0);
42084208 }
42094209 }
42104210 if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -4003,7 +4003,7 @@ void wild_magic(int spell)
40034003 break;
40044004 case 27:
40054005 case 28:
4006- (void)gain_random_mutation(0);
4006+ (void)gain_mutation(p_ptr, 0);
40074007 break;
40084008 case 29:
40094009 case 30:
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -1834,7 +1834,7 @@ void do_cmd_debug(void)
18341834
18351835 /* Mutation */
18361836 case 'M':
1837- (void)gain_random_mutation(command_arg);
1837+ (void)gain_mutation(p_ptr, command_arg);
18381838 break;
18391839
18401840 /* Reset Class */
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -161,7 +161,7 @@ void check_experience(void)
161161 if (level_mutation)
162162 {
163163 msg_print(_("あなたは変わった気がする...", "You feel different..."));
164- (void)gain_random_mutation(0);
164+ (void)gain_mutation(p_ptr, 0);
165165 level_mutation = FALSE;
166166 }
167167
Show on old repository browser