* @param caster_ptr プレーヤーへの参照ポインタ
* @param who 魔法を発動したモンスター(0ならばプレイヤー) / Index of "source" monster (zero for "player")
* @param r 効果半径(ビーム/ボルト = 0 / ボール = 1以上) / Radius of explosion (0 = beam/bolt, 1 to 9 = ball)
- * @param y 目標Y座標 / Target y location (or location to travel "towards")
- * @param x 目標X座標 / Target x location (or location to travel "towards")
+ * @param y 目標y座標 / Target y location (or location to travel "towards")
+ * @param x 目標x座標 / Target x location (or location to travel "towards")
* @param dam 基本威力 / Base damage roll to apply to affected monsters (or player)
* @param effect_type 効果属性 / Type of damage to apply to monsters (and objects)
* @param flag 効果フラグ
/* Never affect projector */
if (effect_monster_ptr->who && (effect_monster_ptr->g_ptr->m_idx == effect_monster_ptr->who)) return FALSE;
- if ((effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding) && !effect_monster_ptr->who && !(effect_type == GF_OLD_HEAL) && !(effect_type == GF_OLD_SPEED) && !(effect_type == GF_STAR_HEAL)) return FALSE;
+ if ((effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding) &&
+ !effect_monster_ptr->who &&
+ !(effect_monster_ptr->effect_type == GF_OLD_HEAL) &&
+ !(effect_monster_ptr->effect_type == GF_OLD_SPEED) &&
+ !(effect_monster_ptr->effect_type == GF_STAR_HEAL))
+ return FALSE;
if (sukekaku && ((effect_monster_ptr->m_ptr->r_idx == MON_SUKE) || (effect_monster_ptr->m_ptr->r_idx == MON_KAKU))) return FALSE;
/* Don't affect already death monsters */
/* Prevents problems with chain reactions of exploding monsters */
if (effect_monster_ptr->m_ptr->hp < 0) return FALSE;
- dam = (dam + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
+ effect_monster_ptr->dam = (effect_monster_ptr->dam + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
/* Get the monster name (BEFORE polymorphing) */
monster_desc(caster_ptr, effect_monster_ptr->m_name, effect_monster_ptr->m_ptr, 0);
if (caster_ptr->riding && (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)) disturb(caster_ptr, TRUE, TRUE);
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL &&
- effect_type != GF_OLD_CLONE && effect_type != GF_STAR_HEAL && effect_type != GF_OLD_HEAL
- && effect_type != GF_OLD_SPEED && effect_type != GF_CAPTURE && effect_type != GF_PHOTO)
+ effect_monster_ptr->effect_type != GF_OLD_CLONE && effect_monster_ptr->effect_type != GF_STAR_HEAL && effect_monster_ptr->effect_type != GF_OLD_HEAL
+ && effect_monster_ptr->effect_type != GF_OLD_SPEED && effect_monster_ptr->effect_type != GF_CAPTURE && effect_monster_ptr->effect_type != GF_PHOTO)
{
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_ALL);
- if (effect_type == GF_LITE_WEAK || effect_type == GF_KILL_WALL) effect_monster_ptr->skipped = TRUE;
+ if (effect_monster_ptr->effect_type == GF_LITE_WEAK || effect_monster_ptr->effect_type == GF_KILL_WALL) effect_monster_ptr->skipped = TRUE;
}
else
{
- switch (effect_type)
+ switch (effect_monster_ptr->effect_type)
{
case GF_MISSILE:
{
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ACID)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_ACID);
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ELEC)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_ELEC);
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_FIRE)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_FIRE);
}
else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_FIRE))
{
effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_FIRE);
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_COLD);
}
else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_COLD))
{
effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_COLD);
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_POIS);
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_POIS);
}
else if (one_in_(3)) effect_monster_ptr->do_poly = TRUE;
if (effect_monster_ptr->r_ptr->flags3 & RF3_GOOD)
{
effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_GOOD);
}
break;
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if (effect_monster_ptr->r_ptr->flags3 & RF3_EVIL)
{
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= RF3_EVIL;
}
else
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
}
break;
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_PLAS)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_PLAS);
}
if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD)
{
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
}
else
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
}
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_NETH);
}
else if (effect_monster_ptr->r_ptr->flags3 & RF3_EVIL)
{
effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam /= 2;
+ effect_monster_ptr->dam /= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_EVIL);
}
if ((effect_monster_ptr->m_ptr->r_idx == MON_WATER_ELEM) || (effect_monster_ptr->m_ptr->r_idx == MON_UNMAKER))
{
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
}
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_WATE);
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_CHAO)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_CHAO);
}
else if ((effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) && one_in_(3))
{
effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
}
else
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_SHAR);
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
{
effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam /= 2;
+ effect_monster_ptr->dam /= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_SHAR);
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SOUN)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 2; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 2; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_SOUN);
}
else
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
}
else
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DISE)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_DISE);
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_NEXU)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_NEXU);
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_WALL)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_WALL);
}
else
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_INER)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_INER);
}
else
{
/* Powerful monsters can resist */
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->obvious = FALSE;
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TIME)
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_TIME);
}
else
- effect_monster_ptr->do_time = (dam + 1) / 2;
+ effect_monster_ptr->do_time = (effect_monster_ptr->dam + 1) / 2;
break;
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_GRAV)
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam *= 3; dam /= randint1(6) + 6;
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
effect_monster_ptr->do_dist = 0;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_GRAV);
}
/* 1. slowness */
/* Powerful monsters can resist */
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->obvious = FALSE;
}
}
/* 2. stun */
- effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, (dam)) + 1;
+ effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, (effect_monster_ptr->dam)) + 1;
/* Attempt a saving throw */
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
/* Resist */
effect_monster_ptr->do_stun = 0;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_ROCK);
effect_monster_ptr->note = _("の皮膚がただれた!", " loses some skin!");
effect_monster_ptr->note_dies = _("は蒸発した!", " evaporates!");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
}
break;
if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
- dam = 0;
+ effect_monster_ptr->dam = 0;
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
}
else if ((effect_monster_ptr->r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
(effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL) ||
- (effect_monster_ptr->r_ptr->level > randint1(3 * dam)))
+ (effect_monster_ptr->r_ptr->level > randint1(3 * effect_monster_ptr->dam)))
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam /= 3;
+ effect_monster_ptr->dam /= 3;
/*
* Powerful demons & undead can turn a mindcrafter's
{
/* Injure +/- confusion */
monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_ptr, MD_WRONGDOER_NAME);
- take_hit(caster_ptr, DAMAGE_ATTACK, dam, effect_monster_ptr->killer, -1); /* has already been /3 */
+ take_hit(caster_ptr, DAMAGE_ATTACK, effect_monster_ptr->dam, effect_monster_ptr->killer, -1); /* has already been /3 */
if (one_in_(4) && !CHECK_MULTISHADOW(caster_ptr))
{
switch (randint1(4))
{
case 1:
- set_confused(caster_ptr, caster_ptr->confused + 3 + randint1(dam));
+ set_confused(caster_ptr, caster_ptr->confused + 3 + randint1(effect_monster_ptr->dam));
break;
case 2:
- set_stun(caster_ptr, caster_ptr->stun + randint1(dam));
+ set_stun(caster_ptr, caster_ptr->stun + randint1(effect_monster_ptr->dam));
break;
case 3:
{
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_FEAR)
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(caster_ptr, caster_ptr->afraid + 3 + randint1(dam));
+ set_afraid(caster_ptr, caster_ptr->afraid + 3 + randint1(effect_monster_ptr->dam));
break;
}
default:
if (!caster_ptr->free_act)
- (void)set_paralyzed(caster_ptr, caster_ptr->paralyzed + randint1(dam));
+ (void)set_paralyzed(caster_ptr, caster_ptr->paralyzed + randint1(effect_monster_ptr->dam));
break;
}
}
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
}
- if ((dam > 0) && one_in_(4))
+ if ((effect_monster_ptr->dam > 0) && one_in_(4))
{
switch (randint1(4))
{
case 1:
- effect_monster_ptr->do_conf = 3 + randint1(dam);
+ effect_monster_ptr->do_conf = 3 + randint1(effect_monster_ptr->dam);
break;
case 2:
- effect_monster_ptr->do_stun = 3 + randint1(dam);
+ effect_monster_ptr->do_stun = 3 + randint1(effect_monster_ptr->dam);
break;
case 3:
- effect_monster_ptr->do_fear = 3 + randint1(dam);
+ effect_monster_ptr->do_fear = 3 + randint1(effect_monster_ptr->dam);
break;
default:
effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
- effect_monster_ptr->do_sleep = 3 + randint1(dam);
+ effect_monster_ptr->do_sleep = 3 + randint1(effect_monster_ptr->dam);
break;
}
}
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
- dam = 0;
+ effect_monster_ptr->dam = 0;
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
}
else if ((effect_monster_ptr->r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
(effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL) ||
- (effect_monster_ptr->r_ptr->level > randint1(3 * dam)))
+ (effect_monster_ptr->r_ptr->level > randint1(3 * effect_monster_ptr->dam)))
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam /= 3;
+ effect_monster_ptr->dam /= 3;
/*
* Powerful demons & undead can turn a mindcrafter's
if (!CHECK_MULTISHADOW(caster_ptr))
{
msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
- caster_ptr->csp -= damroll(5, dam) / 2;
+ caster_ptr->csp -= damroll(5, effect_monster_ptr->dam) / 2;
if (caster_ptr->csp < 0) caster_ptr->csp = 0;
caster_ptr->redraw |= PR_MANA;
caster_ptr->window |= (PW_SPELL);
}
- take_hit(caster_ptr, DAMAGE_ATTACK, dam, effect_monster_ptr->killer, -1); /* has already been /3 */
+ take_hit(caster_ptr, DAMAGE_ATTACK, effect_monster_ptr->dam, effect_monster_ptr->killer, -1); /* has already been /3 */
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
}
- else if (dam > 0)
+ else if (effect_monster_ptr->dam > 0)
{
- int b = damroll(5, dam) / 4;
+ int b = damroll(5, effect_monster_ptr->dam) / 4;
concptr str = (caster_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
concptr msg = _("あなたは%sの苦痛を%sに変換した!",
(effect_monster_ptr->seen ? "You convert %s's pain into %s!" :
else effect_monster_ptr->do_dist = 7;
}
- effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, dam) + 1;
+ effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, effect_monster_ptr->dam) + 1;
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (effect_monster_ptr->r_ptr->level > 5 + randint1(dam)))
+ (effect_monster_ptr->r_ptr->level > 5 + randint1(effect_monster_ptr->dam)))
{
effect_monster_ptr->do_stun = 0;
effect_monster_ptr->obvious = FALSE;
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) ||
(effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
{
switch (randint1(4))
{
case 1:
- set_stun(caster_ptr, caster_ptr->stun + dam / 2);
+ set_stun(caster_ptr, caster_ptr->stun + effect_monster_ptr->dam / 2);
break;
case 2:
- set_confused(caster_ptr, caster_ptr->confused + dam / 2);
+ set_confused(caster_ptr, caster_ptr->confused + effect_monster_ptr->dam / 2);
break;
default:
{
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_FEAR)
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(caster_ptr, caster_ptr->afraid + dam);
+ set_afraid(caster_ptr, caster_ptr->afraid + effect_monster_ptr->dam);
}
}
}
}
else
{
- if (!common_saving_throw_charm(caster_ptr, dam, effect_monster_ptr->m_ptr))
+ if (!common_saving_throw_charm(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr))
{
effect_monster_ptr->note = _("があなたに隷属した。", " is in your thrall!");
set_pet(caster_ptr, effect_monster_ptr->m_ptr);
switch (randint1(4))
{
case 1:
- effect_monster_ptr->do_stun = dam / 2;
+ effect_monster_ptr->do_stun = effect_monster_ptr->dam / 2;
break;
case 2:
- effect_monster_ptr->do_conf = dam / 2;
+ effect_monster_ptr->do_conf = effect_monster_ptr->dam / 2;
break;
default:
- effect_monster_ptr->do_fear = dam;
+ effect_monster_ptr->do_fear = effect_monster_ptr->dam;
}
}
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_ICE:
if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
{
effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
+ effect_monster_ptr->dam /= 9;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_IM_COLD);
}
else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_COLD))
{
effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_COLD);
}
}
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else
- effect_monster_ptr->do_time = (dam + 7) / 8;
+ effect_monster_ptr->do_time = (effect_monster_ptr->dam + 7) / 8;
break;
}
}
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
effect_monster_ptr->obvious = FALSE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else if (((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) &&
(randint1(888) != 666)) ||
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
effect_monster_ptr->obvious = FALSE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
/* Powerful monsters can resist */
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
(effect_monster_ptr->r_ptr->flags1 & RF1_QUESTOR) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->do_poly = FALSE;
effect_monster_ptr->obvious = FALSE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_OLD_CLONE:
}
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_STAR_HEAL:
effect_monster_ptr->m_ptr->maxhp = effect_monster_ptr->m_ptr->max_maxhp;
}
- if (!dam)
+ if (!effect_monster_ptr->dam)
{
if (caster_ptr->health_who == effect_monster_ptr->g_ptr->m_idx) caster_ptr->redraw |= (PR_HEALTH);
if (caster_ptr->riding == effect_monster_ptr->g_ptr->m_idx) caster_ptr->redraw |= (PR_UHEALTH);
(void)set_monster_monfear(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
}
- if (effect_monster_ptr->m_ptr->hp < 30000) effect_monster_ptr->m_ptr->hp += dam;
+ if (effect_monster_ptr->m_ptr->hp < 30000) effect_monster_ptr->m_ptr->hp += effect_monster_ptr->dam;
if (effect_monster_ptr->m_ptr->hp > effect_monster_ptr->m_ptr->maxhp) effect_monster_ptr->m_ptr->hp = effect_monster_ptr->m_ptr->maxhp;
if (!effect_monster_ptr->who)
effect_monster_ptr->note = _("は体力を回復したようだ。", " looks healthier.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_OLD_SPEED:
chg_virtue(caster_ptr, V_HONOUR, 1);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_OLD_SLOW:
/* Powerful monsters can resist */
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
}
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_OLD_SLEEP:
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
(effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
{
effect_monster_ptr->do_sleep = 500;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_STASIS_EVIL:
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
!(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
effect_monster_ptr->do_sleep = 500;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_STASIS:
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
effect_monster_ptr->do_sleep = 500;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_CHARM:
vir = virtue_number(caster_ptr, V_HARMONY);
if (vir)
{
- dam += caster_ptr->virtues[vir - 1] / 10;
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
}
vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 20;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
}
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (common_saving_throw_charm(caster_ptr, dam, effect_monster_ptr->m_ptr))
+ if (common_saving_throw_charm(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
chg_virtue(caster_ptr, V_NATURE, 1);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_CONTROL_UNDEAD:
vir = virtue_number(caster_ptr, V_UNLIFE);
if (vir)
{
- dam += caster_ptr->virtues[vir - 1] / 10;
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
}
vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 20;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
}
- if (common_saving_throw_control(caster_ptr, dam, effect_monster_ptr->m_ptr) ||
+ if (common_saving_throw_control(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr) ||
!(effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
set_pet(caster_ptr, effect_monster_ptr->m_ptr);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_CONTROL_DEMON:
vir = virtue_number(caster_ptr, V_UNLIFE);
if (vir)
{
- dam += caster_ptr->virtues[vir - 1] / 10;
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
}
vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 20;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
}
- if (common_saving_throw_control(caster_ptr, dam, effect_monster_ptr->m_ptr) ||
+ if (common_saving_throw_control(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr) ||
!(effect_monster_ptr->r_ptr->flags3 & RF3_DEMON))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
set_pet(caster_ptr, effect_monster_ptr->m_ptr);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_CONTROL_ANIMAL:
vir = virtue_number(caster_ptr, V_NATURE);
if (vir)
{
- dam += caster_ptr->virtues[vir - 1] / 10;
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
}
vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 20;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
}
- if (common_saving_throw_control(caster_ptr, dam, effect_monster_ptr->m_ptr) ||
+ if (common_saving_throw_control(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr) ||
!(effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
chg_virtue(caster_ptr, V_NATURE, 1);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_CHARM_LIVING:
vir = virtue_number(caster_ptr, V_UNLIFE);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 10;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 10;
}
vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
if (vir)
{
- dam -= caster_ptr->virtues[vir - 1] / 20;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
}
msg_format(_("%sを見つめた。", "You stare into %s."), effect_monster_ptr->m_name);
- if (common_saving_throw_charm(caster_ptr, dam, effect_monster_ptr->m_ptr) ||
+ if (common_saving_throw_charm(caster_ptr, effect_monster_ptr->dam, effect_monster_ptr->m_ptr) ||
!monster_living(effect_monster_ptr->m_ptr->r_idx))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
chg_virtue(caster_ptr, V_NATURE, 1);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_OLD_CONF:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_conf = damroll(3, (dam / 2)) + 1;
+ effect_monster_ptr->do_conf = damroll(3, (effect_monster_ptr->dam / 2)) + 1;
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
(effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
{
effect_monster_ptr->obvious = FALSE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_STUN:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, (dam)) + 1;
+ effect_monster_ptr->do_stun = damroll((effect_monster_ptr->caster_lev / 20) + 3, (effect_monster_ptr->dam)) + 1;
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->do_stun = 0;
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_LITE_WEAK:
{
- if (!dam)
+ if (!effect_monster_ptr->dam)
{
effect_monster_ptr->skipped = TRUE;
break;
}
else
{
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_LITE)
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam *= 2; dam /= (randint1(6) + 6);
+ effect_monster_ptr->dam *= 2; effect_monster_ptr->dam /= (randint1(6) + 6);
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_LITE);
}
else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_LITE);
effect_monster_ptr->note = _("は光に身をすくめた!", " cringes from the light!");
effect_monster_ptr->note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- dam *= 2;
+ effect_monster_ptr->dam *= 2;
}
break;
}
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DARK)
{
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam *= 2; dam /= (randint1(6) + 6);
+ effect_monster_ptr->dam *= 2; effect_monster_ptr->dam /= (randint1(6) + 6);
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_DARK);
}
}
else
{
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
- effect_monster_ptr->do_dist = dam;
+ effect_monster_ptr->do_dist = effect_monster_ptr->dam;
}
}
else
effect_monster_ptr->skipped = TRUE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_AWAY_EVIL:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_EVIL);
- effect_monster_ptr->do_dist = dam;
+ effect_monster_ptr->do_dist = effect_monster_ptr->dam;
}
}
else
effect_monster_ptr->skipped = TRUE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_AWAY_ALL:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_dist = dam;
+ effect_monster_ptr->do_dist = effect_monster_ptr->dam;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_TURN_UNDEAD:
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
- effect_monster_ptr->do_fear = damroll(3, (dam / 2)) + 1;
- if (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ effect_monster_ptr->do_fear = damroll(3, (effect_monster_ptr->dam / 2)) + 1;
+ if (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10)
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
effect_monster_ptr->skipped = TRUE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_TURN_EVIL:
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_EVIL);
- effect_monster_ptr->do_fear = damroll(3, (dam / 2)) + 1;
- if (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ effect_monster_ptr->do_fear = damroll(3, (effect_monster_ptr->dam / 2)) + 1;
+ if (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10)
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
effect_monster_ptr->skipped = TRUE;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_TURN_ALL:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_fear = damroll(3, (dam / 2)) + 1;
+ effect_monster_ptr->do_fear = damroll(3, (effect_monster_ptr->dam / 2)) + 1;
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
(effect_monster_ptr->r_ptr->flags3 & (RF3_NO_FEAR)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
effect_monster_ptr->do_fear = 0;
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_DISP_UNDEAD:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- /* Learn about effect_type */
+ /* Learn about effect_monster_ptr->effect_type */
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
effect_monster_ptr->note = _("は身震いした。", " shudders.");
else
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
else
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
else
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
else
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
else
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
{
if (effect_monster_ptr->m_caster_ptr->hp < effect_monster_ptr->m_caster_ptr->maxhp)
{
- effect_monster_ptr->m_caster_ptr->hp += dam;
+ effect_monster_ptr->m_caster_ptr->hp += effect_monster_ptr->dam;
if (effect_monster_ptr->m_caster_ptr->hp > effect_monster_ptr->m_caster_ptr->maxhp) effect_monster_ptr->m_caster_ptr->hp = effect_monster_ptr->m_caster_ptr->maxhp;
if (caster_ptr->health_who == effect_monster_ptr->who) caster_ptr->redraw |= (PR_HEALTH);
if (caster_ptr->riding == effect_monster_ptr->who) caster_ptr->redraw |= (PR_UHEALTH);
- if (see_s_msg)
+ if (effect_monster_ptr->see_s_msg)
{
monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_caster_ptr, 0);
msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), effect_monster_ptr->killer);
else
{
msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), effect_monster_ptr->m_name);
- (void)hp_player(caster_ptr, dam);
+ (void)hp_player(caster_ptr, effect_monster_ptr->dam);
}
}
else
{
- if (see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
+ if (effect_monster_ptr->see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_MIND_BLAST:
}
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else if (effect_monster_ptr->r_ptr->flags2 & RF2_WEIRD_MIND)
{
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
effect_monster_ptr->note = _("には耐性がある。", " resists.");
- dam /= 3;
+ effect_monster_ptr->dam /= 3;
}
else
{
}
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else if (effect_monster_ptr->r_ptr->flags2 & RF2_WEIRD_MIND)
{
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
effect_monster_ptr->note = _("には耐性がある!", " resists!");
- dam /= 3;
+ effect_monster_ptr->dam /= 3;
}
else
{
if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
if ((randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35)) && ((effect_monster_ptr->who <= 0) || (effect_monster_ptr->m_caster_ptr->r_idx != MON_KENSHIROU)))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
}
if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
else
{
- if ((effect_monster_ptr->who > 0) ? ((effect_monster_ptr->caster_lev + randint1(dam)) > (effect_monster_ptr->r_ptr->level + 10 + randint1(20))) :
- (((effect_monster_ptr->caster_lev / 2) + randint1(dam)) > (effect_monster_ptr->r_ptr->level + randint1(200))))
+ if ((effect_monster_ptr->who > 0) ? ((effect_monster_ptr->caster_lev + randint1(effect_monster_ptr->dam)) > (effect_monster_ptr->r_ptr->level + 10 + randint1(20))) :
+ (((effect_monster_ptr->caster_lev / 2) + randint1(effect_monster_ptr->dam)) > (effect_monster_ptr->r_ptr->level + randint1(200))))
{
- dam = ((40 + randint1(20)) * effect_monster_ptr->m_ptr->hp) / 100;
+ effect_monster_ptr->dam = ((40 + randint1(20)) * effect_monster_ptr->m_ptr->hp) / 100;
- if (effect_monster_ptr->m_ptr->hp < dam) dam = effect_monster_ptr->m_ptr->hp - 1;
+ if (effect_monster_ptr->m_ptr->hp < effect_monster_ptr->dam) effect_monster_ptr->dam = effect_monster_ptr->m_ptr->hp - 1;
}
else
{
/* todo 乱数で破滅のを弾いた結果が「耐性を持っている」ことになるのはおかしい */
effect_monster_ptr->note = _("は耐性を持っている!", "resists!");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
}
}
case GF_ATTACK:
{
- return py_attack(caster_ptr, y, x, dam);
+ return py_attack(caster_ptr, effect_monster_ptr->y, effect_monster_ptr->x, effect_monster_ptr->dam);
}
case GF_ENGETSU:
{
if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
effect_monster_ptr->skipped = TRUE;
if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
break;
if (MON_CSLEEP(effect_monster_ptr->m_ptr))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
effect_monster_ptr->skipped = TRUE;
break;
}
if (effect == 1)
{
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->obvious = FALSE;
}
else if (effect == 2)
{
- effect_monster_ptr->do_stun = damroll((caster_ptr->lev / 10) + 3, (dam)) + 1;
+ effect_monster_ptr->do_stun = damroll((caster_ptr->lev / 10) + 3, (effect_monster_ptr->dam)) + 1;
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
effect_monster_ptr->do_stun = 0;
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
{
if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
(effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP) ||
- (effect_monster_ptr->r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_GENOCIDE:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (genocide_aux(caster_ptr, effect_monster_ptr->g_ptr->m_idx, dam, !effect_monster_ptr->who, (effect_monster_ptr->r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
+ if (genocide_aux(caster_ptr, effect_monster_ptr->g_ptr->m_idx, effect_monster_ptr->dam, !effect_monster_ptr->who, (effect_monster_ptr->r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
{
if (effect_monster_ptr->seen_msg) msg_format(_("%sは消滅した!", "%^s disappeared!"), effect_monster_ptr->m_name);
chg_virtue(caster_ptr, V_VITALITY, -1);
}
else
{
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
effect_monster_ptr->photo = effect_monster_ptr->m_ptr->r_idx;
if ((effect_monster_ptr->r_ptr->flags3 & (RF3_GOOD)) && !floor_ptr->inside_arena)
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF)) dam -= 50;
- if (dam < 1) dam = 1;
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF)) effect_monster_ptr->dam -= 50;
+ if (effect_monster_ptr->dam < 1) effect_monster_ptr->dam = 1;
if (is_pet(effect_monster_ptr->m_ptr))
{
(effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
(effect_monster_ptr->m_ptr->mflag2 & MFLAG2_NOPET) ||
(caster_ptr->cursed & TRC_AGGRAVATE) ||
- ((effect_monster_ptr->r_ptr->level + 10) > randint1(dam)))
+ ((effect_monster_ptr->r_ptr->level + 10) > randint1(effect_monster_ptr->dam)))
{
if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_FEAR);
}
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
case GF_WOUNDS:
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (randint0(100 + dam) < (effect_monster_ptr->r_ptr->level + 50))
+ if (randint0(100 + effect_monster_ptr->dam) < (effect_monster_ptr->r_ptr->level + 50))
{
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
break;
}
default:
{
effect_monster_ptr->skipped = TRUE;
- dam = 0;
+ effect_monster_ptr->dam = 0;
break;
}
}
if (((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (effect_monster_ptr->r_ptr->flags7 & RF7_NAZGUL)) && !caster_ptr->phase_out)
{
- if (effect_monster_ptr->who && (dam > effect_monster_ptr->m_ptr->hp)) dam = effect_monster_ptr->m_ptr->hp;
+ if (effect_monster_ptr->who && (effect_monster_ptr->dam > effect_monster_ptr->m_ptr->hp)) effect_monster_ptr->dam = effect_monster_ptr->m_ptr->hp;
}
if (!effect_monster_ptr->who && effect_monster_ptr->slept)
if (!(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(caster_ptr, V_HONOUR, -1);
}
- int tmp = dam;
- dam = mon_damage_mod(caster_ptr, effect_monster_ptr->m_ptr, dam, (bool)(effect_type == GF_PSY_SPEAR));
- if ((tmp > 0) && (dam == 0)) effect_monster_ptr->note = _("はダメージを受けていない。", " is unharmed.");
+ int tmp = effect_monster_ptr->dam;
+ effect_monster_ptr->dam = mon_damage_mod(caster_ptr, effect_monster_ptr->m_ptr, effect_monster_ptr->dam, (bool)(effect_monster_ptr->effect_type == GF_PSY_SPEAR));
+ if ((tmp > 0) && (effect_monster_ptr->dam == 0)) effect_monster_ptr->note = _("はダメージを受けていない。", " is unharmed.");
- if (dam > effect_monster_ptr->m_ptr->hp)
+ if (effect_monster_ptr->dam > effect_monster_ptr->m_ptr->hp)
{
effect_monster_ptr->note = effect_monster_ptr->note_dies;
}
{
effect_monster_ptr->note = _("は弱くなったようだ。", " seems weakened.");
effect_monster_ptr->m_ptr->maxhp -= effect_monster_ptr->do_time;
- if ((effect_monster_ptr->m_ptr->hp - dam) > effect_monster_ptr->m_ptr->maxhp) dam = effect_monster_ptr->m_ptr->hp - effect_monster_ptr->m_ptr->maxhp;
+ if ((effect_monster_ptr->m_ptr->hp - effect_monster_ptr->dam) > effect_monster_ptr->m_ptr->maxhp) effect_monster_ptr->dam = effect_monster_ptr->m_ptr->hp - effect_monster_ptr->m_ptr->maxhp;
}
effect_monster_ptr->get_angry = TRUE;
if (effect_monster_ptr->do_poly && (randint1(90) > effect_monster_ptr->r_ptr->level))
{
- if (polymorph_monster(caster_ptr, y, x))
+ if (polymorph_monster(caster_ptr, effect_monster_ptr->y, effect_monster_ptr->x))
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
effect_monster_ptr->note = _("が変身した!", " changes!");
- dam = 0;
+ effect_monster_ptr->dam = 0;
}
effect_monster_ptr->m_ptr = &floor_ptr->m_list[effect_monster_ptr->g_ptr->m_idx];
teleport_away(caster_ptr, effect_monster_ptr->g_ptr->m_idx, effect_monster_ptr->do_dist,
(!effect_monster_ptr->who ? TELEPORT_DEC_VALOUR : 0L) | TELEPORT_PASSIVE);
- y = effect_monster_ptr->m_ptr->fy;
- x = effect_monster_ptr->m_ptr->fx;
- effect_monster_ptr->g_ptr = &floor_ptr->grid_array[y][x];
+ effect_monster_ptr->y = effect_monster_ptr->m_ptr->fy;
+ effect_monster_ptr->x = effect_monster_ptr->m_ptr->fx;
+ effect_monster_ptr->g_ptr = &floor_ptr->grid_array[effect_monster_ptr->y][effect_monster_ptr->x];
}
if (effect_monster_ptr->do_fear)
}
}
- if (effect_type == GF_DRAIN_MANA)
+ if (effect_monster_ptr->effect_type == GF_DRAIN_MANA)
{
/* Drain mana does nothing */
}
if (caster_ptr->riding == effect_monster_ptr->g_ptr->m_idx) caster_ptr->redraw |= (PR_UHEALTH);
(void)set_monster_csleep(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
- effect_monster_ptr->m_ptr->hp -= dam;
+ effect_monster_ptr->m_ptr->hp -= effect_monster_ptr->dam;
if (effect_monster_ptr->m_ptr->hp < 0)
{
bool sad = FALSE;
if (effect_monster_ptr->known && effect_monster_ptr->note)
{
monster_desc(caster_ptr, effect_monster_ptr->m_name, effect_monster_ptr->m_ptr, MD_TRUE_NAME);
- if (see_s_msg)
+ if (effect_monster_ptr->see_s_msg)
{
msg_format("%^s%s", effect_monster_ptr->m_name, effect_monster_ptr->note);
}
{
if (effect_monster_ptr->note && effect_monster_ptr->seen_msg)
msg_format("%^s%s", effect_monster_ptr->m_name, effect_monster_ptr->note);
- else if (see_s_msg)
+ else if (effect_monster_ptr->see_s_msg)
{
- message_pain(caster_ptr, effect_monster_ptr->g_ptr->m_idx, dam);
+ message_pain(caster_ptr, effect_monster_ptr->g_ptr->m_idx, effect_monster_ptr->dam);
}
else
{
else
{
bool fear = FALSE;
- if (mon_take_hit(caster_ptr, effect_monster_ptr->g_ptr->m_idx, dam, &fear, effect_monster_ptr->note_dies))
+ if (mon_take_hit(caster_ptr, effect_monster_ptr->g_ptr->m_idx, effect_monster_ptr->dam, &fear, effect_monster_ptr->note_dies))
{
/* Dead monster */
}
if (effect_monster_ptr->note && effect_monster_ptr->seen_msg)
msg_format(_("%s%s", "%^s%s"), effect_monster_ptr->m_name, effect_monster_ptr->note);
- else if (effect_monster_ptr->known && (dam || !effect_monster_ptr->do_fear))
+ else if (effect_monster_ptr->known && (effect_monster_ptr->dam || !effect_monster_ptr->do_fear))
{
- message_pain(caster_ptr, effect_monster_ptr->g_ptr->m_idx, dam);
+ message_pain(caster_ptr, effect_monster_ptr->g_ptr->m_idx, effect_monster_ptr->dam);
}
- if (((dam > 0) || effect_monster_ptr->get_angry) && !effect_monster_ptr->do_sleep)
+ if (((effect_monster_ptr->dam > 0) || effect_monster_ptr->get_angry) && !effect_monster_ptr->do_sleep)
anger_monster(caster_ptr, effect_monster_ptr->m_ptr);
if ((fear || effect_monster_ptr->do_fear) && effect_monster_ptr->seen)
}
}
- if ((effect_type == GF_BLOOD_CURSE) && one_in_(4))
+ if ((effect_monster_ptr->effect_type == GF_BLOOD_CURSE) && one_in_(4))
{
blood_curse_to_enemy(caster_ptr, effect_monster_ptr->who);
}
if (effect_monster_ptr->m_ptr->r_idx) update_monster(caster_ptr, effect_monster_ptr->g_ptr->m_idx, FALSE);
- lite_spot(caster_ptr, y, x);
+ lite_spot(caster_ptr, effect_monster_ptr->y, effect_monster_ptr->x);
if ((caster_ptr->monster_race_idx == effect_monster_ptr->m_ptr->r_idx) && (effect_monster_ptr->seen || !effect_monster_ptr->m_ptr->r_idx))
{
caster_ptr->window |= (PW_MONSTER);
}
- if ((dam > 0) && !is_pet(effect_monster_ptr->m_ptr) && !is_friendly(effect_monster_ptr->m_ptr))
+ if ((effect_monster_ptr->dam > 0) && !is_pet(effect_monster_ptr->m_ptr) && !is_friendly(effect_monster_ptr->m_ptr))
{
if (!effect_monster_ptr->who)
{
- if (!(flag & PROJECT_NO_HANGEKI))
+ if (!(effect_monster_ptr->flag & PROJECT_NO_HANGEKI))
{
set_target(effect_monster_ptr->m_ptr, monster_target_y, monster_target_x);
}
}
}
- if (caster_ptr->riding && (caster_ptr->riding == effect_monster_ptr->g_ptr->m_idx) && (dam > 0))
+ if (caster_ptr->riding && (caster_ptr->riding == effect_monster_ptr->g_ptr->m_idx) && (effect_monster_ptr->dam > 0))
{
- if (effect_monster_ptr->m_ptr->hp > effect_monster_ptr->m_ptr->maxhp / 3) dam = (dam + 1) / 2;
- rakubadam_m = (dam > 200) ? 200 : dam;
+ if (effect_monster_ptr->m_ptr->hp > effect_monster_ptr->m_ptr->maxhp / 3) effect_monster_ptr->dam = (effect_monster_ptr->dam + 1) / 2;
+ rakubadam_m = (effect_monster_ptr->dam > 200) ? 200 : effect_monster_ptr->dam;
}
if (effect_monster_ptr->photo)
}
project_m_n++;
- project_m_x = x;
- project_m_y = y;
+ project_m_x = effect_monster_ptr->x;
+ project_m_y = effect_monster_ptr->y;
return (effect_monster_ptr->obvious);
}