g_ptr->info |= (CAVE_GLOW);
note_spot(y, x);
lite_spot(y, x);
- update_local_illumination(y, x);
+ update_local_illumination(p_ptr, y, x);
/* Observe */
if (player_can_see_bold(y, x)) obvious = TRUE;
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (player_bold(y, x)) set_superstealth(FALSE);
+ if (player_bold(y, x)) set_superstealth(p_ptr, FALSE);
}
}
lite_spot(y, x);
- update_local_illumination(y, x);
+ update_local_illumination(p_ptr, y, x);
if (player_can_see_bold(y, x)) obvious = TRUE;
/* Get the monster possessive ("his"/"her"/"its") */
monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
- if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(p_ptr, TRUE, TRUE);
if (r_ptr->flagsr & RFR_RES_ALL &&
typ != GF_OLD_CLONE && typ != GF_STAR_HEAL && typ != GF_OLD_HEAL
"%^ss corrupted mind backlashes your attack!")), m_name);
/* Saving throw */
- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
{
/* Injure +/- confusion */
monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
- take_hit(DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
- if (one_in_(4) && !CHECK_MULTISHADOW())
+ take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
+ if (one_in_(4) && !CHECK_MULTISHADOW(p_ptr))
{
switch (randint1(4))
{
set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
break;
case 2:
- set_stun(p_ptr->stun + randint1(dam));
+ set_stun(p_ptr, p_ptr->stun + randint1(dam));
break;
case 3:
{
if (r_ptr->flags3 & RF3_NO_FEAR)
note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(p_ptr->afraid + 3 + randint1(dam));
+ set_afraid(p_ptr, p_ptr->afraid + 3 + randint1(dam));
break;
}
default:
if (!p_ptr->free_act)
- (void)set_paralyzed(p_ptr->paralyzed + randint1(dam));
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint1(dam));
break;
}
}
(seen ? "%^s's corrupted mind backlashes your attack!" :
"%^ss corrupted mind backlashes your attack!")), m_name);
/* Saving throw */
- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
}
{
/* Injure + mana drain */
monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
p_ptr->csp -= damroll(5, dam) / 2;
p_ptr->redraw |= PR_MANA;
p_ptr->window |= (PW_SPELL);
}
- take_hit(DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
+ take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
}
dam = 0;
}
switch (randint1(4))
{
case 1:
- set_stun(p_ptr->stun + dam / 2);
+ set_stun(p_ptr, p_ptr->stun + dam / 2);
break;
case 2:
set_confused(p_ptr, p_ptr->confused + dam / 2);
if (r_ptr->flags3 & RF3_NO_FEAR)
note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(p_ptr->afraid + dam);
+ set_afraid(p_ptr, p_ptr->afraid + dam);
}
}
}
if (!who)
{
- chg_virtue(V_VITALITY, 1);
+ chg_virtue(p_ptr, V_VITALITY, 1);
if (r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(V_INDIVIDUALISM, 1);
+ chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
if (is_friendly(m_ptr))
- chg_virtue(V_HONOUR, 1);
+ chg_virtue(p_ptr, V_HONOUR, 1);
else if (!(r_ptr->flags3 & RF3_EVIL))
{
if (r_ptr->flags3 & RF3_GOOD)
- chg_virtue(V_COMPASSION, 2);
+ chg_virtue(p_ptr, V_COMPASSION, 2);
else
- chg_virtue(V_COMPASSION, 1);
+ chg_virtue(p_ptr, V_COMPASSION, 1);
}
if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ chg_virtue(p_ptr, V_NATURE, 1);
}
if (m_ptr->r_idx == MON_LEPER)
{
heal_leper = TRUE;
- if (!who) chg_virtue(V_COMPASSION, 5);
+ if (!who) chg_virtue(p_ptr, V_COMPASSION, 5);
}
/* Redraw (later) if needed */
if (!who)
{
if (r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(V_INDIVIDUALISM, 1);
+ chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
if (is_friendly(m_ptr))
- chg_virtue(V_HONOUR, 1);
+ chg_virtue(p_ptr, V_HONOUR, 1);
}
/* No "real" damage */
case GF_CHARM:
{
int vir;
- vir = virtue_number(V_HARMONY);
+ vir = virtue_number(p_ptr, V_HARMONY);
if (vir)
{
dam += p_ptr->virtues[vir-1]/10;
}
- vir = virtue_number(V_INDIVIDUALISM);
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/20;
note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
set_pet(m_ptr);
- chg_virtue(V_INDIVIDUALISM, -1);
+ chg_virtue(p_ptr, V_INDIVIDUALISM, -1);
if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ chg_virtue(p_ptr, V_NATURE, 1);
}
/* No "real" damage */
int vir;
if (seen) obvious = TRUE;
- vir = virtue_number(V_UNLIFE);
+ vir = virtue_number(p_ptr, V_UNLIFE);
if (vir)
{
dam += p_ptr->virtues[vir-1]/10;
}
- vir = virtue_number(V_INDIVIDUALISM);
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/20;
int vir;
if (seen) obvious = TRUE;
- vir = virtue_number(V_UNLIFE);
+ vir = virtue_number(p_ptr, V_UNLIFE);
if (vir)
{
dam += p_ptr->virtues[vir-1]/10;
}
- vir = virtue_number(V_INDIVIDUALISM);
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/20;
int vir;
if (seen) obvious = TRUE;
- vir = virtue_number(V_NATURE);
+ vir = virtue_number(p_ptr, V_NATURE);
if (vir)
{
dam += p_ptr->virtues[vir-1]/10;
}
- vir = virtue_number(V_INDIVIDUALISM);
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/20;
note = _("はなついた。", " is tamed!");
set_pet(m_ptr);
if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ chg_virtue(p_ptr, V_NATURE, 1);
}
/* No "real" damage */
{
int vir;
- vir = virtue_number(V_UNLIFE);
+ vir = virtue_number(p_ptr, V_UNLIFE);
if (seen) obvious = TRUE;
- vir = virtue_number(V_UNLIFE);
+ vir = virtue_number(p_ptr, V_UNLIFE);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/10;
}
- vir = virtue_number(V_INDIVIDUALISM);
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
if (vir)
{
dam -= p_ptr->virtues[vir-1]/20;
note = _("を支配した。", " is tamed!");
set_pet(m_ptr);
if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ chg_virtue(p_ptr, V_NATURE, 1);
}
/* No "real" damage */
cap_nickname = m_ptr->nickname; /* Quark transfer */
if (g_ptr->m_idx == p_ptr->riding)
{
- if (rakuba(-1, FALSE))
+ if (rakuba(p_ptr, -1, FALSE))
{
msg_format(_("地面に落とされた。", "You have fallen from %s."), m_name);
}
case GF_ATTACK:
{
/* Return this monster's death */
- return py_attack(y, x, dam);
+ return py_attack(p_ptr, y, x, dam);
}
/* Sleep (Use "dam" as "power") */
if (genocide_aux(g_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
{
if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappered!"), m_name);
- chg_virtue(V_VITALITY, -1);
+ chg_virtue(p_ptr, V_VITALITY, -1);
return TRUE;
}
if (!who && slept)
{
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_COMPASSION, -1);
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_HONOUR, -1);
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_COMPASSION, -1);
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_HONOUR, -1);
}
/* Modify the damage */
note = _("が消え去った!", " disappears!");
- if (!who) chg_virtue(V_VALOUR, -1);
+ if (!who) chg_virtue(p_ptr, V_VALOUR, -1);
/* Teleport */
teleport_away(g_ptr->m_idx, do_dist,
char m2_name[MAX_NLEN];
monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
+ exe_write_diary(p_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
}
delete_monster_idx(g_ptr->m_idx);
project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
- disturb(TRUE, TRUE);
+ disturb(p_ptr, TRUE, TRUE);
return TRUE;
}
if (p_ptr->resist_pois) dam = (dam + 2) / 3;
if (double_resist) dam = (dam + 2) / 3;
- if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW())
+ if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(p_ptr))
{
do_dec_stat(p_ptr, A_CON);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
{
set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
}
if (p_ptr->resist_pois) dam = (2 * dam + 2) / 5;
if (double_resist) dam = (2 * dam + 2) / 5;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
{
set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
{
msg_print(_("奇形的な変身を遂げた!", "You undergo a freakish metamorphosis!"));
if (one_in_(4)) /* 4 */
- do_poly_self();
+ do_poly_self(p_ptr);
else
- status_shuffle();
+ status_shuffle(p_ptr);
}
if (one_in_(6))
case GF_MISSILE:
{
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam /= 2;
else if (p_ptr->align < -10)
dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
if (p_ptr->align > 10)
dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
break;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_PLASMA:
{
if (fuzzy) msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!(p_ptr->resist_fire || IS_OPPOSE_FIRE() || p_ptr->immune_fire))
dam *= 6; dam /= (randint1(4) + 7);
}
}
- else if (!CHECK_MULTISHADOW()) drain_exp(200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
+ else if (!CHECK_MULTISHADOW(p_ptr)) drain_exp(p_ptr, 200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
- if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW())
+ if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("気分がよくなった。", "You feel invigorated!"));
hp_player(p_ptr, dam / 4);
}
else
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
case GF_WATER:
{
if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_sound && !p_ptr->resist_water)
{
- set_stun(p_ptr->stun + randint1(40));
+ set_stun(p_ptr, p_ptr->stun + randint1(40));
}
if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
if (p_ptr->resist_water) get_damage /= 4;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam *= 6; dam /= (randint1(4) + 7);
}
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_conf)
{
}
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint1(10));
+ (void)set_image(p_ptr, p_ptr->image + randint1(10));
if (one_in_(3))
{
msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
}
if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
{
- drain_exp(5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
+ drain_exp(p_ptr, 5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
}
if (!p_ptr->resist_chaos || one_in_(9))
}
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
- (void)set_cut(p_ptr->cut + dam);
+ (void)set_cut(p_ptr,p_ptr->cut + dam);
}
if (!p_ptr->resist_shard || one_in_(13))
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 5; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!p_ptr->resist_sound || one_in_(13))
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 5; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
(void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
(void)apply_disenchant(0);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
apply_nexus(m_ptr);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_FORCE:
{
if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_ROCKET:
{
if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
if (p_ptr->resist_shard)
{
dam /= 2;
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
- (void)set_cut(p_ptr->cut + (dam / 2));
+ (void)set_cut(p_ptr,p_ptr->cut + (dam / 2));
}
if (!p_ptr->resist_shard || one_in_(12))
inven_damage(set_cold_destroy, 3);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_INERTIAL:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 4; dam /= (randint1(4) + 7);
}
- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
{
(void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
{
- if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
+ if (!CHECK_MULTISHADOW(p_ptr)) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
dam *= 2;
}
else if (PRACE_IS_(p_ptr, RACE_S_FAIRY))
}
if (p_ptr->wraith_form) dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (p_ptr->wraith_form && !CHECK_MULTISHADOW())
+ if (p_ptr->wraith_form && !CHECK_MULTISHADOW(p_ptr))
{
p_ptr->wraith_form = 0;
msg_print(_("閃光のため非物質的な影の存在でいられなくなった。",
if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
}
- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
{
(void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam /= (randint1(4) + 7);
msg_print(_("時間が通り過ぎていく気がする。", "You feel as if time is passing you by."));
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
switch (randint1(10))
{
{
if (p_ptr->prace == RACE_ANDROID) break;
msg_print(_("人生が逆戻りした気がする。", "You feel life has clocked back."));
- lose_exp(100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
+ lose_exp(p_ptr, 100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
break;
}
}
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
if (fuzzy) msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
teleport_player(5, TELEPORT_PASSIVE);
if (!p_ptr->levitation)
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
if (!(p_ptr->resist_sound || p_ptr->levitation))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
}
if (p_ptr->levitation)
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
if (fuzzy) msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_OLD_SPEED:
{
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
- (void)set_fast(p_ptr->fast + randint1(5), FALSE);
+ (void)set_fast(p_ptr, p_ptr->fast + randint1(5), FALSE);
dam = 0;
break;
}
case GF_OLD_SLOW:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
break;
}
{
msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
/* Have some nightmares */
- sanity_blast(NULL, FALSE);
+ sanity_blast(p_ptr, NULL, FALSE);
}
- set_paralyzed(p_ptr->paralyzed + dam);
+ set_paralyzed(p_ptr, p_ptr->paralyzed + dam);
dam = 0;
break;
}
case GF_SUPER_RAY:
{
if (fuzzy) msg_print(_("魔法のオーラで攻撃された!", "You are hit by an aura of magic!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_PSY_SPEAR:
{
if (fuzzy) msg_print(_("エネルギーの塊で攻撃された!", "You are hit by an energy!"));
- get_damage = take_hit(DAMAGE_FORCE, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_FORCE, dam, killer, monspell);
break;
}
{
if (fuzzy) msg_print(_("何かが空からあなたの頭上に落ちてきた!", "Something falls from the sky on you!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
if (!p_ptr->resist_shard || one_in_(13))
{
if (!p_ptr->immune_fire) inven_damage(set_fire_destroy, 2);
{
if (fuzzy) msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
get_damage = cold_dam(dam, killer, monspell, FALSE);
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_shard)
{
- (void)set_cut(p_ptr->cut + damroll(5, 8));
+ (void)set_cut(p_ptr,p_ptr->cut + damroll(5, 8));
}
if (!p_ptr->resist_sound)
{
- (void)set_stun(p_ptr->stun + randint1(15));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(15));
}
if ((!(p_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
if (p_ptr->mimic_form)
{
if (!(mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
else
{
/* Hurt a lot */
default:
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
}
/* Drain mana */
case GF_DRAIN_MANA:
{
- if (CHECK_MULTISHADOW())
+ if (CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
}
/* Mind blast */
case GF_MIND_BLAST:
{
- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
if (!p_ptr->resist_chaos && one_in_(3))
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
p_ptr->csp -= 50;
p_ptr->redraw |= PR_MANA;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* Brain smash */
case GF_BRAIN_SMASH:
{
- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
p_ptr->redraw |= PR_MANA;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!CHECK_MULTISHADOW())
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_blind)
{
}
if (!p_ptr->free_act)
{
- (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4);
}
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
(void)do_dec_stat(p_ptr, A_INT);
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
}
}
/* cause 1 */
case GF_CAUSE_1:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(15, 0);
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(15, 0);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 2 */
case GF_CAUSE_2:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(25, MIN(rlev / 2 - 15, 5));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(25, MIN(rlev / 2 - 15, 5));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 3 */
case GF_CAUSE_3:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(33, MIN(rlev / 2 - 15, 15));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(33, MIN(rlev / 2 - 15, 15));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 4 */
case GF_CAUSE_4:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし秘孔を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!CHECK_MULTISHADOW()) (void)set_cut(p_ptr->cut + damroll(10, 10));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_cut(p_ptr,p_ptr->cut + damroll(10, 10));
}
break;
}
/* Hand of Doom */
case GF_HAND_DOOM:
{
- if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("あなたは命が薄まっていくように感じた!", "You feel your life fade away!"));
curse_equipment(40, 20);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, m_name, monspell);
if (p_ptr->chp < 1) p_ptr->chp = 1;
}
msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
- if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
+ if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
}
if (p_ptr->riding && dam > 0)
}
- disturb(TRUE, TRUE);
+ disturb(p_ptr, TRUE, TRUE);
if ((p_ptr->special_defense & NINJA_KAWARIMI) && dam && who && (who != p_ptr->riding))
if ((ax < 2) && (ay < 2)) return (TRUE);
/* Paranoia -- require "safe" origin */
- /* if (!in_bounds(y1, x1)) return (FALSE); */
+ /* if (!in_bounds(current_floor_ptr, y1, x1)) return (FALSE); */
/* Directly South/North */
if (!dx)
for (x = bx - cdis; x <= bx + cdis; x++)
{
/* Ignore "illegal" locations */
- if (!in_bounds(y, x)) continue;
+ if (!in_bounds(current_floor_ptr, y, x)) continue;
/* Enforce a circular "ripple" */
if (distance(y1, x1, y, x) != bdis) continue;
if (rakubadam_m > 0)
{
- if (rakuba(rakubadam_m, FALSE))
+ if (rakuba(p_ptr, rakubadam_m, FALSE))
{
msg_format(_("%^sに振り落とされた!", "%^s has thrown you off!"), m_name);
}
}
if (p_ptr->riding && rakubadam_p > 0)
{
- if(rakuba(rakubadam_p, FALSE))
+ if(rakuba(p_ptr, rakubadam_p, FALSE))
{
msg_format(_("%^sから落ちてしまった!", "You have fallen from %s."), m_name);
}