• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision7c31cf802eef1da4ae1cc3aa9cf86ffc6ca1f45f (tree)
Time2019-07-08 22:48:05
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 CHECK_MULTISHADOW() マクロに player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/melee1.c
+++ b/src/melee1.c
@@ -2792,7 +2792,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
27922792
27932793 case RBE_SUPERHURT: /* AC軽減あり / Player armor reduces total damage */
27942794 {
2795- if (((randint1(rlev*2+300) > (ac+200)) || one_in_(13)) && !CHECK_MULTISHADOW())
2795+ if (((randint1(rlev*2+300) > (ac+200)) || one_in_(13)) && !CHECK_MULTISHADOW(p_ptr))
27962796 {
27972797 int tmp_damage = damage - (damage * ((ac < 150) ? ac : 150) / 250);
27982798 msg_print(_("痛恨の一撃!", "It was a critical hit!"));
@@ -2815,7 +2815,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
28152815 if (explode) break;
28162816
28172817 /* Take "poison" effect */
2818- if (!(p_ptr->resist_pois || IS_OPPOSE_POIS()) && !CHECK_MULTISHADOW())
2818+ if (!(p_ptr->resist_pois || IS_OPPOSE_POIS()) && !CHECK_MULTISHADOW(p_ptr))
28192819 {
28202820 if (set_poisoned(p_ptr, p_ptr->poisoned + randint1(rlev) + 5))
28212821 {
@@ -2836,7 +2836,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
28362836 if (explode) break;
28372837
28382838 /* Allow complete resist */
2839- if (!p_ptr->resist_disen && !CHECK_MULTISHADOW())
2839+ if (!p_ptr->resist_disen && !CHECK_MULTISHADOW(p_ptr))
28402840 {
28412841 /* Apply disenchantment */
28422842 if (apply_disenchant(0))
@@ -2859,7 +2859,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
28592859 {
28602860 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
28612861
2862- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
2862+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
28632863
28642864 /* Find an item */
28652865 for (k = 0; k < 10; k++)
@@ -2916,7 +2916,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
29162916 /* Confused monsters cannot steal successfully. -LM-*/
29172917 if (MON_CONFUSED(m_ptr)) break;
29182918
2919- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
2919+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
29202920
29212921 obvious = TRUE;
29222922
@@ -2976,12 +2976,10 @@ bool make_attack_normal(MONSTER_IDX m_idx)
29762976 /* Confused monsters cannot steal successfully. -LM-*/
29772977 if (MON_CONFUSED(m_ptr)) break;
29782978
2979- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
2979+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
29802980
29812981 /* Saving throw (unless paralyzed) based on dex and level */
2982- if (!p_ptr->paralyzed &&
2983- (randint0(100) < (adj_dex_safe[p_ptr->stat_ind[A_DEX]] +
2984- p_ptr->lev)))
2982+ if (!p_ptr->paralyzed && (randint0(100) < (adj_dex_safe[p_ptr->stat_ind[A_DEX]] + p_ptr->lev)))
29852983 {
29862984 /* Saving throw message */
29872985 msg_print(_("しかしあわててザックを取り返した!", "You grab hold of your backpack!"));
@@ -3069,7 +3067,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
30693067 {
30703068 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
30713069
3072- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3070+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
30733071
30743072 /* Steal some food */
30753073 for (k = 0; k < 10; k++)
@@ -3109,7 +3107,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
31093107 o_ptr = &p_ptr->inventory_list[INVEN_LITE];
31103108 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
31113109
3112- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3110+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
31133111
31143112 /* Drain fuel */
31153113 if ((o_ptr->xtra4 > 0) && (!object_is_fixed_artifact(o_ptr)))
@@ -3177,7 +3175,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
31773175 if (p_ptr->is_dead) break;
31783176
31793177 /* Increase "blind" */
3180- if (!p_ptr->resist_blind && !CHECK_MULTISHADOW())
3178+ if (!p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
31813179 {
31823180 if (set_blind(p_ptr, p_ptr->blind + 10 + randint1(rlev)))
31833181 {
@@ -3204,7 +3202,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
32043202 if (p_ptr->is_dead) break;
32053203
32063204 /* Increase "confused" */
3207- if (!p_ptr->resist_conf && !CHECK_MULTISHADOW())
3205+ if (!p_ptr->resist_conf && !CHECK_MULTISHADOW(p_ptr))
32083206 {
32093207 if (set_confused(p_ptr, p_ptr->confused + 3 + randint1(rlev)))
32103208 {
@@ -3225,7 +3223,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
32253223 if (p_ptr->is_dead) break;
32263224
32273225 /* Increase "afraid" */
3228- if (CHECK_MULTISHADOW())
3226+ if (CHECK_MULTISHADOW(p_ptr))
32293227 {
32303228 /* Do nothing */
32313229 }
@@ -3260,7 +3258,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
32603258 if (p_ptr->is_dead) break;
32613259
32623260 /* Increase "paralyzed" */
3263- if (CHECK_MULTISHADOW())
3261+ if (CHECK_MULTISHADOW(p_ptr))
32643262 {
32653263 /* Do nothing */
32663264 }
@@ -3295,7 +3293,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
32953293 {
32963294 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
32973295
3298- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3296+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
32993297 if (do_dec_stat(p_ptr, A_STR)) obvious = TRUE;
33003298
33013299 break;
@@ -3305,7 +3303,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33053303 {
33063304 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33073305
3308- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3306+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33093307 if (do_dec_stat(p_ptr, A_INT)) obvious = TRUE;
33103308
33113309 break;
@@ -3315,7 +3313,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33153313 {
33163314 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33173315
3318- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3316+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33193317 if (do_dec_stat(p_ptr, A_WIS)) obvious = TRUE;
33203318
33213319 break;
@@ -3325,7 +3323,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33253323 {
33263324 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33273325
3328- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3326+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33293327 if (do_dec_stat(p_ptr, A_DEX)) obvious = TRUE;
33303328
33313329 break;
@@ -3335,7 +3333,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33353333 {
33363334 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33373335
3338- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3336+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33393337 if (do_dec_stat(p_ptr, A_CON)) obvious = TRUE;
33403338
33413339 break;
@@ -3345,7 +3343,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33453343 {
33463344 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33473345
3348- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3346+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33493347 if (do_dec_stat(p_ptr, A_CHR)) obvious = TRUE;
33503348
33513349 break;
@@ -3355,7 +3353,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33553353 {
33563354 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33573355
3358- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3356+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33593357
33603358 /* Damage (stats) */
33613359 if (do_dec_stat(p_ptr, A_STR)) obvious = TRUE;
@@ -3394,7 +3392,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33943392
33953393 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
33963394
3397- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3395+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
33983396
33993397 (void)drain_exp(p_ptr, d, d / 10, 95);
34003398 break;
@@ -3408,7 +3406,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
34083406
34093407 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
34103408
3411- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3409+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
34123410
34133411 (void)drain_exp(p_ptr, d, d / 10, 90);
34143412 break;
@@ -3422,7 +3420,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
34223420
34233421 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
34243422
3425- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3423+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
34263424
34273425 (void)drain_exp(p_ptr, d, d / 10, 75);
34283426 break;
@@ -3436,7 +3434,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
34363434
34373435 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
34383436
3439- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3437+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
34403438
34413439 (void)drain_exp(p_ptr, d, d / 10, 50);
34423440 break;
@@ -3446,7 +3444,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
34463444 {
34473445 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
34483446
3449- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3447+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
34503448
34513449 /* Take "poison" effect */
34523450 if (!(p_ptr->resist_pois || IS_OPPOSE_POIS()))
@@ -3474,7 +3472,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
34743472 case RBE_TIME:
34753473 {
34763474 if (explode) break;
3477- if (!p_ptr->resist_time && !CHECK_MULTISHADOW())
3475+ if (!p_ptr->resist_time && !CHECK_MULTISHADOW(p_ptr))
34783476 {
34793477 switch (randint1(10))
34803478 {
@@ -3544,7 +3542,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
35443542
35453543 get_damage += take_hit(p_ptr, DAMAGE_ATTACK, damage, ddesc, -1);
35463544
3547- if (p_ptr->is_dead || CHECK_MULTISHADOW()) break;
3545+ if (p_ptr->is_dead || CHECK_MULTISHADOW(p_ptr)) break;
35483546
35493547 resist_drain = !drain_exp(p_ptr, d, d / 10, 50);
35503548
@@ -3597,7 +3595,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
35973595 {
35983596 obvious = TRUE;
35993597
3600- if (CHECK_MULTISHADOW())
3598+ if (CHECK_MULTISHADOW(p_ptr))
36013599 {
36023600 msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
36033601 }
@@ -3627,7 +3625,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
36273625 if (p_ptr->is_dead) break;
36283626
36293627 /* Decrease speed */
3630- if (CHECK_MULTISHADOW())
3628+ if (CHECK_MULTISHADOW(p_ptr))
36313629 {
36323630 /* Do nothing */
36333631 }
@@ -3648,7 +3646,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
36483646 if (p_ptr->is_dead) break;
36493647
36503648 /* Decrease speed */
3651- if (p_ptr->resist_sound || CHECK_MULTISHADOW())
3649+ if (p_ptr->resist_sound || CHECK_MULTISHADOW(p_ptr))
36523650 {
36533651 /* Do nothing */
36543652 }
--- a/src/player-damage.c
+++ b/src/player-damage.c
@@ -47,7 +47,7 @@ int inven_damage(inven_func typ, int perc)
4747 object_type *o_ptr;
4848 GAME_TEXT o_name[MAX_NLEN];
4949
50- if (CHECK_MULTISHADOW()) return 0;
50+ if (CHECK_MULTISHADOW(p_ptr)) return 0;
5151
5252 if (p_ptr->inside_arena) return 0;
5353
@@ -211,7 +211,7 @@ HIT_POINT acid_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
211211 if (p_ptr->resist_acid) dam = (dam + 2) / 3;
212212 if (double_resist) dam = (dam + 2) / 3;
213213
214- if (aura || !CHECK_MULTISHADOW())
214+ if (aura || !CHECK_MULTISHADOW(p_ptr))
215215 {
216216 if ((!(double_resist || p_ptr->resist_acid)) &&
217217 one_in_(HURT_CHANCE))
@@ -261,7 +261,7 @@ HIT_POINT elec_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
261261 if (p_ptr->resist_elec) dam = (dam + 2) / 3;
262262 if (double_resist) dam = (dam + 2) / 3;
263263
264- if (aura || !CHECK_MULTISHADOW())
264+ if (aura || !CHECK_MULTISHADOW(p_ptr))
265265 {
266266 if ((!(double_resist || p_ptr->resist_elec)) &&
267267 one_in_(HURT_CHANCE))
@@ -309,7 +309,7 @@ HIT_POINT fire_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
309309 if (p_ptr->resist_fire) dam = (dam + 2) / 3;
310310 if (double_resist) dam = (dam + 2) / 3;
311311
312- if (aura || !CHECK_MULTISHADOW())
312+ if (aura || !CHECK_MULTISHADOW(p_ptr))
313313 {
314314 if ((!(double_resist || p_ptr->resist_fire)) &&
315315 one_in_(HURT_CHANCE))
@@ -356,7 +356,7 @@ HIT_POINT cold_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
356356 if (p_ptr->resist_cold) dam = (dam + 2) / 3;
357357 if (double_resist) dam = (dam + 2) / 3;
358358
359- if (aura || !CHECK_MULTISHADOW())
359+ if (aura || !CHECK_MULTISHADOW(p_ptr))
360360 {
361361 if ((!(double_resist || p_ptr->resist_cold)) &&
362362 one_in_(HURT_CHANCE))
@@ -428,7 +428,7 @@ int take_hit(player_type *creature_ptr, int damage_type, HIT_POINT damage, concp
428428 }
429429 }
430430
431- if (CHECK_MULTISHADOW())
431+ if (CHECK_MULTISHADOW(p_ptr))
432432 {
433433 if (damage_type == DAMAGE_FORCE)
434434 {
--- a/src/player-damage.h
+++ b/src/player-damage.h
@@ -1,7 +1,7 @@
11 #pragma once
22
33 /* Multishadow effects is determined by current_world_ptr->game_turn */
4-#define CHECK_MULTISHADOW() (p_ptr->multishadow && (current_world_ptr->game_turn & 1))
4+#define CHECK_MULTISHADOW(CRE_PTR) ((CRE_PTR)->multishadow && (current_world_ptr->game_turn & 1))
55
66 #define DAMAGE_FORCE 1
77 #define DAMAGE_GENO 2
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -1730,7 +1730,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
17301730 "%^ss corrupted mind backlashes your attack!")), m_name);
17311731
17321732 /* Saving throw */
1733- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
1733+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
17341734 {
17351735 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
17361736 }
@@ -1739,7 +1739,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
17391739 /* Injure +/- confusion */
17401740 monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
17411741 take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
1742- if (one_in_(4) && !CHECK_MULTISHADOW())
1742+ if (one_in_(4) && !CHECK_MULTISHADOW(p_ptr))
17431743 {
17441744 switch (randint1(4))
17451745 {
@@ -1820,7 +1820,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
18201820 (seen ? "%^s's corrupted mind backlashes your attack!" :
18211821 "%^ss corrupted mind backlashes your attack!")), m_name);
18221822 /* Saving throw */
1823- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
1823+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
18241824 {
18251825 msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
18261826 }
@@ -1828,7 +1828,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
18281828 {
18291829 /* Injure + mana drain */
18301830 monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
1831- if (!CHECK_MULTISHADOW())
1831+ if (!CHECK_MULTISHADOW(p_ptr))
18321832 {
18331833 msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
18341834 p_ptr->csp -= damroll(5, dam) / 2;
@@ -4158,14 +4158,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
41584158 if (p_ptr->resist_pois) dam = (dam + 2) / 3;
41594159 if (double_resist) dam = (dam + 2) / 3;
41604160
4161- if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW())
4161+ if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(p_ptr))
41624162 {
41634163 do_dec_stat(p_ptr, A_CON);
41644164 }
41654165
41664166 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
41674167
4168- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
4168+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
41694169 {
41704170 set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
41714171 }
@@ -4181,7 +4181,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
41814181 if (p_ptr->resist_pois) dam = (2 * dam + 2) / 5;
41824182 if (double_resist) dam = (2 * dam + 2) / 5;
41834183 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
4184- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
4184+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
41854185 {
41864186 set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
41874187
@@ -4253,7 +4253,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
42534253 if (fuzzy) msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
42544254 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
42554255
4256- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
4256+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
42574257 {
42584258 int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
42594259 (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
@@ -4278,9 +4278,9 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
42784278 dam *= 6; dam /= (randint1(4) + 7);
42794279 }
42804280 }
4281- else if (!CHECK_MULTISHADOW()) drain_exp(p_ptr, 200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
4281+ else if (!CHECK_MULTISHADOW(p_ptr)) drain_exp(p_ptr, 200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
42824282
4283- if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW())
4283+ if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW(p_ptr))
42844284 {
42854285 msg_print(_("気分がよくなった。", "You feel invigorated!"));
42864286 hp_player(p_ptr, dam / 4);
@@ -4298,7 +4298,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
42984298 case GF_WATER:
42994299 {
43004300 if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
4301- if (!CHECK_MULTISHADOW())
4301+ if (!CHECK_MULTISHADOW(p_ptr))
43024302 {
43034303 if (!p_ptr->resist_sound && !p_ptr->resist_water)
43044304 {
@@ -4330,7 +4330,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
43304330 dam *= 6; dam /= (randint1(4) + 7);
43314331 }
43324332
4333- if (!CHECK_MULTISHADOW())
4333+ if (!CHECK_MULTISHADOW(p_ptr))
43344334 {
43354335 if (!p_ptr->resist_conf)
43364336 {
@@ -4369,7 +4369,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
43694369 {
43704370 dam *= 6; dam /= (randint1(4) + 7);
43714371 }
4372- else if (!CHECK_MULTISHADOW())
4372+ else if (!CHECK_MULTISHADOW(p_ptr))
43734373 {
43744374 (void)set_cut(p_ptr,p_ptr->cut + dam);
43754375 }
@@ -4391,7 +4391,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
43914391 {
43924392 dam *= 5; dam /= (randint1(4) + 7);
43934393 }
4394- else if (!CHECK_MULTISHADOW())
4394+ else if (!CHECK_MULTISHADOW(p_ptr))
43954395 {
43964396 int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
43974397 (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
@@ -4414,7 +4414,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44144414 {
44154415 dam *= 5; dam /= (randint1(4) + 7);
44164416 }
4417- else if (!CHECK_MULTISHADOW())
4417+ else if (!CHECK_MULTISHADOW(p_ptr))
44184418 {
44194419 (void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
44204420 }
@@ -4430,7 +4430,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44304430 {
44314431 dam *= 6; dam /= (randint1(4) + 7);
44324432 }
4433- else if (!CHECK_MULTISHADOW())
4433+ else if (!CHECK_MULTISHADOW(p_ptr))
44344434 {
44354435 (void)apply_disenchant(0);
44364436 }
@@ -4446,7 +4446,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44464446 {
44474447 dam *= 6; dam /= (randint1(4) + 7);
44484448 }
4449- else if (!CHECK_MULTISHADOW())
4449+ else if (!CHECK_MULTISHADOW(p_ptr))
44504450 {
44514451 apply_nexus(m_ptr);
44524452 }
@@ -4458,7 +4458,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44584458 case GF_FORCE:
44594459 {
44604460 if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
4461- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
4461+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
44624462 {
44634463 (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
44644464 }
@@ -4471,7 +4471,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44714471 case GF_ROCKET:
44724472 {
44734473 if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
4474- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
4474+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
44754475 {
44764476 (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
44774477 }
@@ -4480,7 +4480,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44804480 {
44814481 dam /= 2;
44824482 }
4483- else if (!CHECK_MULTISHADOW())
4483+ else if (!CHECK_MULTISHADOW(p_ptr))
44844484 {
44854485 (void)set_cut(p_ptr,p_ptr->cut + (dam / 2));
44864486 }
@@ -4498,7 +4498,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
44984498 case GF_INERTIAL:
44994499 {
45004500 if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
4501- if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
4501+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
45024502 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
45034503 break;
45044504 }
@@ -4511,14 +4511,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45114511 {
45124512 dam *= 4; dam /= (randint1(4) + 7);
45134513 }
4514- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
4514+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
45154515 {
45164516 (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
45174517 }
45184518
45194519 if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
45204520 {
4521- if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
4521+ if (!CHECK_MULTISHADOW(p_ptr)) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
45224522 dam *= 2;
45234523 }
45244524 else if (PRACE_IS_(p_ptr, RACE_S_FAIRY))
@@ -4529,7 +4529,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45294529 if (p_ptr->wraith_form) dam *= 2;
45304530 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
45314531
4532- if (p_ptr->wraith_form && !CHECK_MULTISHADOW())
4532+ if (p_ptr->wraith_form && !CHECK_MULTISHADOW(p_ptr))
45334533 {
45344534 p_ptr->wraith_form = 0;
45354535 msg_print(_("閃光のため非物質的な影の存在でいられなくなった。",
@@ -4553,7 +4553,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45534553
45544554 if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
45554555 }
4556- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
4556+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
45574557 {
45584558 (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
45594559 }
@@ -4571,7 +4571,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
45714571 dam /= (randint1(4) + 7);
45724572 msg_print(_("時間が通り過ぎていく気がする。", "You feel as if time is passing you by."));
45734573 }
4574- else if (!CHECK_MULTISHADOW())
4574+ else if (!CHECK_MULTISHADOW(p_ptr))
45754575 {
45764576 switch (randint1(10))
45774577 {
@@ -4630,7 +4630,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
46304630 if (fuzzy) msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
46314631 msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
46324632
4633- if (!CHECK_MULTISHADOW())
4633+ if (!CHECK_MULTISHADOW(p_ptr))
46344634 {
46354635 teleport_player(5, TELEPORT_PASSIVE);
46364636 if (!p_ptr->levitation)
@@ -4743,7 +4743,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
47434743 {
47444744 if (fuzzy) msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
47454745 get_damage = cold_dam(dam, killer, monspell, FALSE);
4746- if (!CHECK_MULTISHADOW())
4746+ if (!CHECK_MULTISHADOW(p_ptr))
47474747 {
47484748 if (!p_ptr->resist_shard)
47494749 {
@@ -4804,7 +4804,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
48044804 /* Drain mana */
48054805 case GF_DRAIN_MANA:
48064806 {
4807- if (CHECK_MULTISHADOW())
4807+ if (CHECK_MULTISHADOW(p_ptr))
48084808 {
48094809 msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
48104810 }
@@ -4863,14 +4863,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
48634863 /* Mind blast */
48644864 case GF_MIND_BLAST:
48654865 {
4866- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
4866+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
48674867 {
48684868 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
48694869 learn_spell(monspell);
48704870 }
48714871 else
48724872 {
4873- if (!CHECK_MULTISHADOW())
4873+ if (!CHECK_MULTISHADOW(p_ptr))
48744874 {
48754875 msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
48764876
@@ -4901,14 +4901,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
49014901 /* Brain smash */
49024902 case GF_BRAIN_SMASH:
49034903 {
4904- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
4904+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
49054905 {
49064906 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
49074907 learn_spell(monspell);
49084908 }
49094909 else
49104910 {
4911- if (!CHECK_MULTISHADOW())
4911+ if (!CHECK_MULTISHADOW(p_ptr))
49124912 {
49134913 msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
49144914
@@ -4922,7 +4922,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
49224922 }
49234923
49244924 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
4925- if (!CHECK_MULTISHADOW())
4925+ if (!CHECK_MULTISHADOW(p_ptr))
49264926 {
49274927 if (!p_ptr->resist_blind)
49284928 {
@@ -4955,14 +4955,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
49554955 /* cause 1 */
49564956 case GF_CAUSE_1:
49574957 {
4958- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
4958+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
49594959 {
49604960 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
49614961 learn_spell(monspell);
49624962 }
49634963 else
49644964 {
4965- if (!CHECK_MULTISHADOW()) curse_equipment(15, 0);
4965+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(15, 0);
49664966 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
49674967 }
49684968 break;
@@ -4971,14 +4971,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
49714971 /* cause 2 */
49724972 case GF_CAUSE_2:
49734973 {
4974- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
4974+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
49754975 {
49764976 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
49774977 learn_spell(monspell);
49784978 }
49794979 else
49804980 {
4981- if (!CHECK_MULTISHADOW()) curse_equipment(25, MIN(rlev / 2 - 15, 5));
4981+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(25, MIN(rlev / 2 - 15, 5));
49824982 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
49834983 }
49844984 break;
@@ -4987,14 +4987,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
49874987 /* cause 3 */
49884988 case GF_CAUSE_3:
49894989 {
4990- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
4990+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
49914991 {
49924992 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
49934993 learn_spell(monspell);
49944994 }
49954995 else
49964996 {
4997- if (!CHECK_MULTISHADOW()) curse_equipment(33, MIN(rlev / 2 - 15, 15));
4997+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(33, MIN(rlev / 2 - 15, 15));
49984998 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
49994999 }
50005000 break;
@@ -5003,7 +5003,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
50035003 /* cause 4 */
50045004 case GF_CAUSE_4:
50055005 {
5006- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW())
5006+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(p_ptr))
50075007 {
50085008 msg_print(_("しかし秘孔を跳ね返した!", "You resist the effects!"));
50095009 learn_spell(monspell);
@@ -5011,7 +5011,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
50115011 else
50125012 {
50135013 get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
5014- if (!CHECK_MULTISHADOW()) (void)set_cut(p_ptr,p_ptr->cut + damroll(10, 10));
5014+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_cut(p_ptr,p_ptr->cut + damroll(10, 10));
50155015 }
50165016 break;
50175017 }
@@ -5019,14 +5019,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
50195019 /* Hand of Doom */
50205020 case GF_HAND_DOOM:
50215021 {
5022- if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
5022+ if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
50235023 {
50245024 msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
50255025 learn_spell(monspell);
50265026 }
50275027 else
50285028 {
5029- if (!CHECK_MULTISHADOW())
5029+ if (!CHECK_MULTISHADOW(p_ptr))
50305030 {
50315031 msg_print(_("あなたは命が薄まっていくように感じた!", "You feel your life fade away!"));
50325032 curse_equipment(40, 20);
--- a/src/trap.c
+++ b/src/trap.c
@@ -335,7 +335,7 @@ static bool hit_trap_dart(void)
335335 {
336336 msg_print(_("小さなダーツが飛んできて刺さった!", "A small dart hits you!"));
337337 take_hit(p_ptr, DAMAGE_ATTACK, damroll(1, 4), _("ダーツの罠", "a dart trap"), -1);
338- if (!CHECK_MULTISHADOW()) hit = TRUE;
338+ if (!CHECK_MULTISHADOW(p_ptr)) hit = TRUE;
339339 }
340340 else
341341 {
Show on old repository browser