#include "core.h" // 暫定、後で消す.
#include "effect/effect-monster-util.h"
+typedef enum
+{
+ GF_SWITCH_FALSE = 0,
+ GF_SWITCH_TRUE = 1,
+ GF_SWITCH_CONTINUE = 2,
+} gf_switch_result;
+
/*!
* @brief ビーム/ボルト/ボール系魔法によるモンスターへの効果があるかないかを判定する
* @param caster_ptr プレーヤーへの参照ポインタ
/*!
- * @brief 汎用的なビーム/ボルト/ボール系によるモンスターへの効果処理 / Handle a beam/bolt/ball causing damage to a monster.
- * @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 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 効果フラグ
- * @param see_s_msg TRUEならばメッセージを表示する
- * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
+ * todo いずれ分離するが、時期尚早
+ * @brief 魔法の効果によって様々なメッセーを出力したり与えるダメージの増減を行ったりする
+ * @param effect_monster_ptr モンスター効果構造体への参照ポインタ
+ * @return ここのスイッチングで終るならTRUEかFALSE、後続処理を実行するならCONTINUE
*/
-bool affect_monster(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg)
+static gf_switch_result switch_effects_monster(player_type *caster_ptr, effect_monster *effect_monster_ptr)
{
floor_type *floor_ptr = caster_ptr->current_floor_ptr;
- effect_monster tmp_effect;
- effect_monster *effect_monster_ptr = &tmp_effect;
- initialize_effect_monster(caster_ptr, effect_monster_ptr, who, r, y, x, dam, effect_type, flag, see_s_msg);
- if (!is_never_effect(caster_ptr, effect_monster_ptr)) return FALSE;
-
- effect_monster_ptr->dam = (effect_monster_ptr->dam + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
- monster_desc(caster_ptr, effect_monster_ptr->m_name, effect_monster_ptr->m_ptr, 0);
- monster_desc(caster_ptr, effect_monster_ptr->m_poss, effect_monster_ptr->m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
- 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_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)
+ switch (effect_monster_ptr->effect_type)
{
- effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- 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_monster_ptr->effect_type == GF_LITE_WEAK || effect_monster_ptr->effect_type == GF_KILL_WALL) effect_monster_ptr->skipped = TRUE;
+ case GF_MISSILE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
}
- else
+ case GF_ACID:
{
- switch (effect_monster_ptr->effect_type)
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ACID)
{
- case GF_MISSILE:
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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;
+ }
+ case GF_ELEC:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ELEC)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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);
}
- case GF_ACID:
+ break;
+ }
+ case GF_FIRE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_FIRE)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ACID)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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;
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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);
}
- case GF_ELEC:
+ else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_FIRE))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_ELEC)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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;
+ effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
+ 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);
}
- case GF_FIRE:
+ break;
+ }
+ case GF_COLD:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_FIRE)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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.");
- 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;
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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);
}
- case GF_COLD:
+ else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_COLD))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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.");
- 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;
+ effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
+ 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);
}
- case GF_POIS:
+ break;
+ }
+ case GF_POIS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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;
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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);
}
- case GF_NUKE:
+ break;
+ }
+ case GF_NUKE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_POIS)
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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;
- break;
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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;
+ break;
+ }
+ case GF_HELL_FIRE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_GOOD)
+ {
+ effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
+ 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);
}
- case GF_HELL_FIRE:
+ break;
+ }
+ case GF_HOLY_FIRE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_EVIL)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags3 & RF3_GOOD)
- {
- effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
- 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;
+ 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;
}
- case GF_HOLY_FIRE:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags3 & RF3_EVIL)
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
+ }
+ break;
+ }
+ case GF_ARROW:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
+ }
+ case GF_PLASMA:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_PLAS)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
+ }
+
+ break;
+ }
+ case GF_NETHER:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_NETH)
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD)
{
- 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;
+ effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
+ 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.");
effect_monster_ptr->dam *= 3; effect_monster_ptr->dam /= randint1(6) + 6;
}
- break;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_NETH);
}
- case GF_ARROW:
+ else if (effect_monster_ptr->r_ptr->flags3 & RF3_EVIL)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
+ 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);
}
- case GF_PLASMA:
+
+ break;
+ }
+ case GF_WATER:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_WATE)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_PLAS)
+ 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.");
+ effect_monster_ptr->dam = 0;
+ }
+ else
{
effect_monster_ptr->note = _("には耐性がある。", " resists.");
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 (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= (RFR_RES_WATE);
+ }
- break;
+ break;
+ }
+ case GF_CHAOS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_CHAO)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
}
- case GF_NETHER:
+ else if ((effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) && one_in_(3))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_NETH)
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD)
- {
- effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- 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.");
- 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.");
- 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);
- }
-
- break;
+ effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
+ 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);
}
- case GF_WATER:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_WATE)
- {
- 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.");
- effect_monster_ptr->dam = 0;
- }
- else
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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);
- }
-
- break;
+ effect_monster_ptr->do_poly = TRUE;
+ effect_monster_ptr->do_conf = (5 + randint1(11) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
}
- case GF_CHAOS:
+
+ break;
+ }
+ case GF_SHARDS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_CHAO)
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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.");
- 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
- {
- effect_monster_ptr->do_poly = TRUE;
- effect_monster_ptr->do_conf = (5 + randint1(11) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
- }
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
+ }
- break;
+ break;
+ }
+ case GF_ROCKET:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
+ {
+ effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
+ 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);
}
- case GF_SHARDS:
+
+ break;
+ }
+ case GF_SOUND:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SOUN)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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);
- }
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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
+ effect_monster_ptr->do_stun = (10 + randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
- break;
+ break;
+ }
+ case GF_CONFUSION:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
}
- case GF_ROCKET:
+ else
+ effect_monster_ptr->do_conf = (10 + randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
+
+ break;
+ }
+ case GF_DISENCHANT:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DISE)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SHAR)
- {
- effect_monster_ptr->note = _("はいくらか耐性を示した。", " resists somewhat.");
- 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);
- }
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
+ }
- break;
+ break;
+ }
+ case GF_NEXUS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_NEXU)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
}
- case GF_SOUND:
+
+ break;
+ }
+ case GF_FORCE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_WALL)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_SOUN)
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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
- effect_monster_ptr->do_stun = (10 + randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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
+ effect_monster_ptr->do_stun = (randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
- break;
+ break;
+ }
+ case GF_INERTIAL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_INER)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
}
- case GF_CONFUSION:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
+ /* Powerful monsters can resist */
+ if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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);
+ effect_monster_ptr->obvious = FALSE;
}
+ /* Normal monsters slow down */
else
- effect_monster_ptr->do_conf = (10 + randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
-
- break;
- }
- case GF_DISENCHANT:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DISE)
{
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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 (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
+ {
+ effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
+ }
}
+ }
- break;
+ break;
+ }
+ case GF_TIME:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TIME)
+ {
+ effect_monster_ptr->note = _("には耐性がある。", " resists.");
+ 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);
}
- case GF_NEXUS:
+ else
+ effect_monster_ptr->do_time = (effect_monster_ptr->dam + 1) / 2;
+
+ break;
+ }
+ case GF_GRAVITY:
+ {
+ bool resist_tele = FALSE;
+
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_NEXU)
+ if (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE))
{
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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 (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected!");
+ resist_tele = TRUE;
}
+ else if (effect_monster_ptr->r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ resist_tele = TRUE;
+ }
+ }
- break;
+ if (!resist_tele) effect_monster_ptr->do_dist = 10;
+ else effect_monster_ptr->do_dist = 0;
+
+ if (caster_ptr->riding && (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)) effect_monster_ptr->do_dist = 0;
+
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_GRAV)
+ {
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ 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);
}
- case GF_FORCE:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_WALL)
+ /* 1. slowness */
+ /* Powerful monsters can resist */
+ if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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
- effect_monster_ptr->do_stun = (randint1(15) + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
-
- break;
- }
- case GF_INERTIAL:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_INER)
- {
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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);
+ effect_monster_ptr->obvious = FALSE;
}
+ /* Normal monsters slow down */
else
{
- /* Powerful monsters can resist */
- if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (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;
- }
- /* Normal monsters slow down */
- else
+ if (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
{
- if (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
- {
- effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
- }
+ effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
}
}
- break;
- }
- case GF_TIME:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TIME)
+ /* 2. stun */
+ 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- effect_monster_ptr->note = _("には耐性がある。", " resists.");
- 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);
+ /* Resist */
+ effect_monster_ptr->do_stun = 0;
+ /* No effect_monster_ptr->obvious effect */
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected!");
+ effect_monster_ptr->obvious = FALSE;
}
- else
- effect_monster_ptr->do_time = (effect_monster_ptr->dam + 1) / 2;
+ }
+
+ break;
+ }
+ case GF_MANA:
+ case GF_SEEKER:
+ case GF_SUPER_RAY:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
+ }
+ case GF_DISINTEGRATE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_HURT_ROCK)
+ {
+ 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!");
+ effect_monster_ptr->dam *= 2;
+ }
+ break;
+ }
+ case GF_PSI:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!(los(caster_ptr, effect_monster_ptr->m_ptr->fy, effect_monster_ptr->m_ptr->fx, caster_ptr->y, caster_ptr->x)))
+ {
+ if (effect_monster_ptr->seen_msg)
+ msg_format(_("%sはあなたが見えないので影響されない!", "%^s can't see you, and isn't affected!"), effect_monster_ptr->m_name);
+ effect_monster_ptr->skipped = TRUE;
break;
}
- case GF_GRAVITY:
+
+ if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
- bool resist_tele = FALSE;
+ 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);
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
+ }
+ 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 * effect_monster_ptr->dam)))
+ {
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ effect_monster_ptr->dam /= 3;
+
+ /*
+ * Powerful demons & undead can turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
+ one_in_(2))
{
- if (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE))
+ effect_monster_ptr->note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
+
+ if ((randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav) && !CHECK_MULTISHADOW(caster_ptr))
{
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected!");
- resist_tele = TRUE;
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
}
- else if (effect_monster_ptr->r_ptr->level > randint1(100))
+ else
{
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- resist_tele = TRUE;
+ /* Injure +/- confusion */
+ monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_ptr, MD_WRONGDOER_NAME);
+ 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(effect_monster_ptr->dam));
+ break;
+ case 2:
+ 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(effect_monster_ptr->dam));
+ break;
+ }
+ default:
+ if (!caster_ptr->free_act)
+ (void)set_paralyzed(caster_ptr, caster_ptr->paralyzed + randint1(effect_monster_ptr->dam));
+ break;
+ }
+ }
}
- }
-
- if (!resist_tele) effect_monster_ptr->do_dist = 10;
- else effect_monster_ptr->do_dist = 0;
- if (caster_ptr->riding && (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)) effect_monster_ptr->do_dist = 0;
+ effect_monster_ptr->dam = 0;
+ }
+ }
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_GRAV)
+ if ((effect_monster_ptr->dam > 0) && one_in_(4))
+ {
+ switch (randint1(4))
{
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- 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);
+ case 1:
+ effect_monster_ptr->do_conf = 3 + randint1(effect_monster_ptr->dam);
+ break;
+ case 2:
+ effect_monster_ptr->do_stun = 3 + randint1(effect_monster_ptr->dam);
+ break;
+ case 3:
+ 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(effect_monster_ptr->dam);
+ break;
}
- else
- {
- /* 1. slowness */
- /* Powerful monsters can resist */
- if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
- (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
+ }
+
+ effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
+ break;
+ }
+ case GF_PSI_DRAIN:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ 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 * effect_monster_ptr->dam)))
+ {
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ effect_monster_ptr->dam /= 3;
+
+ /*
+ * Powerful demons & undead can turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
+ (one_in_(2)))
+ {
+ effect_monster_ptr->note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
+ if ((randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav) && !CHECK_MULTISHADOW(caster_ptr))
{
- effect_monster_ptr->obvious = FALSE;
+ msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
}
- /* Normal monsters slow down */
else
{
- if (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
+ monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_ptr, MD_WRONGDOER_NAME);
+ if (!CHECK_MULTISHADOW(caster_ptr))
{
- effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
+ msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
+ 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, effect_monster_ptr->dam, effect_monster_ptr->killer, -1); /* has already been /3 */
}
- /* 2. stun */
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
- {
- /* Resist */
- effect_monster_ptr->do_stun = 0;
- /* No effect_monster_ptr->obvious effect */
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected!");
- effect_monster_ptr->obvious = FALSE;
- }
+ effect_monster_ptr->dam = 0;
}
-
- break;
}
- case GF_MANA:
- case GF_SEEKER:
- case GF_SUPER_RAY:
+ else if (effect_monster_ptr->dam > 0)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ 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!" :
+ "You convert %ss pain into %s!"));
+ msg_format(msg, effect_monster_ptr->m_name, str);
+
+ b = MIN(caster_ptr->msp, caster_ptr->csp + b);
+ caster_ptr->csp = b;
+ caster_ptr->redraw |= PR_MANA;
+ caster_ptr->window |= (PW_SPELL);
}
- case GF_DISINTEGRATE:
+
+ effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
+ break;
+ }
+ case GF_TELEKINESIS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (one_in_(4))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags3 & RF3_HURT_ROCK)
- {
- 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!");
- effect_monster_ptr->dam *= 2;
- }
+ if (caster_ptr->riding && (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)) effect_monster_ptr->do_dist = 0;
+ else effect_monster_ptr->do_dist = 7;
+ }
- break;
+ 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(effect_monster_ptr->dam)))
+ {
+ effect_monster_ptr->do_stun = 0;
+ effect_monster_ptr->obvious = FALSE;
}
- case GF_PSI:
+
+ break;
+ }
+ case GF_PSY_SPEAR:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
+ }
+ case GF_METEOR:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
+ }
+ case GF_DOMINATION:
+ {
+ if (!is_hostile(effect_monster_ptr->m_ptr)) break;
+ 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!(los(caster_ptr, effect_monster_ptr->m_ptr->fy, effect_monster_ptr->m_ptr->fx, caster_ptr->y, caster_ptr->x)))
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
{
- if (effect_monster_ptr->seen_msg)
- msg_format(_("%sはあなたが見えないので影響されない!", "%^s can't see you, and isn't affected!"), effect_monster_ptr->m_name);
- effect_monster_ptr->skipped = TRUE;
- break;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
}
- if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- 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);
+ effect_monster_ptr->do_conf = 0;
- }
- 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 * effect_monster_ptr->dam)))
+ /*
+ * Powerful demons & undead can turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
+ (one_in_(2)))
{
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- effect_monster_ptr->dam /= 3;
-
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
- one_in_(2))
- {
- effect_monster_ptr->note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
+ effect_monster_ptr->note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
- if ((randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav) && !CHECK_MULTISHADOW(caster_ptr))
+ /* Saving throw */
+ if (randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav)
+ {
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ }
+ else
+ {
+ /* Confuse, stun, terrify */
+ switch (randint1(4))
{
- msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
- }
- else
+ case 1:
+ set_stun(caster_ptr, caster_ptr->stun + effect_monster_ptr->dam / 2);
+ break;
+ case 2:
+ set_confused(caster_ptr, caster_ptr->confused + effect_monster_ptr->dam / 2);
+ break;
+ default:
{
- /* Injure +/- confusion */
- monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_ptr, MD_WRONGDOER_NAME);
- 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(effect_monster_ptr->dam));
- break;
- case 2:
- 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(effect_monster_ptr->dam));
- break;
- }
- default:
- if (!caster_ptr->free_act)
- (void)set_paralyzed(caster_ptr, caster_ptr->paralyzed + randint1(effect_monster_ptr->dam));
- break;
- }
- }
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_FEAR)
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ else
+ set_afraid(caster_ptr, caster_ptr->afraid + effect_monster_ptr->dam);
+ }
}
-
- effect_monster_ptr->dam = 0;
}
}
-
- if ((effect_monster_ptr->dam > 0) && one_in_(4))
+ else
+ {
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
+ }
+ }
+ else
+ {
+ 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);
+ }
+ else
{
switch (randint1(4))
{
case 1:
- effect_monster_ptr->do_conf = 3 + randint1(effect_monster_ptr->dam);
+ effect_monster_ptr->do_stun = effect_monster_ptr->dam / 2;
break;
case 2:
- effect_monster_ptr->do_stun = 3 + randint1(effect_monster_ptr->dam);
- break;
- case 3:
- effect_monster_ptr->do_fear = 3 + randint1(effect_monster_ptr->dam);
+ effect_monster_ptr->do_conf = effect_monster_ptr->dam / 2;
break;
default:
- effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
- effect_monster_ptr->do_sleep = 3 + randint1(effect_monster_ptr->dam);
- break;
+ effect_monster_ptr->do_fear = effect_monster_ptr->dam;
}
}
+ }
- effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- break;
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_ICE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->do_stun = (randint1(15) + 1) / (effect_monster_ptr->r + 1);
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
+ {
+ effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
+ 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);
}
- case GF_PSI_DRAIN:
+ else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_COLD))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
+ effect_monster_ptr->note = _("はひどい痛手をうけた。", " is hit hard.");
+ 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;
+ }
+ case GF_HYPODYNAMIA:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!monster_living(effect_monster_ptr->m_ptr->r_idx))
+ {
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
{
- effect_monster_ptr->dam = 0;
- effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NONLIVING) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NONLIVING);
}
- 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 * effect_monster_ptr->dam)))
- {
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- effect_monster_ptr->dam /= 3;
-
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
- (one_in_(2)))
- {
- effect_monster_ptr->note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
- if ((randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav) && !CHECK_MULTISHADOW(caster_ptr))
- {
- msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
- }
- else
- {
- monster_desc(caster_ptr, effect_monster_ptr->killer, effect_monster_ptr->m_ptr, MD_WRONGDOER_NAME);
- if (!CHECK_MULTISHADOW(caster_ptr))
- {
- msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
- 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, effect_monster_ptr->dam, effect_monster_ptr->killer, -1); /* has already been /3 */
- }
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
+ effect_monster_ptr->dam = 0;
+ }
+ else
+ effect_monster_ptr->do_time = (effect_monster_ptr->dam + 7) / 8;
- effect_monster_ptr->dam = 0;
- }
- }
- else if (effect_monster_ptr->dam > 0)
+ break;
+ }
+ case GF_DEATH_RAY:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!monster_living(effect_monster_ptr->m_ptr->r_idx))
+ {
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
{
- 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!" :
- "You convert %ss pain into %s!"));
- msg_format(msg, effect_monster_ptr->m_name, str);
-
- b = MIN(caster_ptr->msp, caster_ptr->csp + b);
- caster_ptr->csp = b;
- caster_ptr->redraw |= PR_MANA;
- caster_ptr->window |= (PW_SPELL);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NONLIVING) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NONLIVING);
}
+ effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
+ effect_monster_ptr->obvious = FALSE;
+ effect_monster_ptr->dam = 0;
+ }
+ else if (((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) &&
+ (randint1(888) != 666)) ||
+ (((effect_monster_ptr->r_ptr->level + randint1(20)) > randint1((effect_monster_ptr->caster_lev / 2) + randint1(10))) &&
+ randint1(100) != 66))
+ {
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ effect_monster_ptr->obvious = FALSE;
+ effect_monster_ptr->dam = 0;
+ }
- effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- break;
+ break;
+ }
+ case GF_OLD_POLY:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->do_poly = TRUE;
+
+ /* 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((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;
+ }
+
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_OLD_CLONE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ if ((floor_ptr->inside_arena) || is_pet(effect_monster_ptr->m_ptr) || (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
+ {
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
}
- case GF_TELEKINESIS:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (one_in_(4))
+ effect_monster_ptr->m_ptr->hp = effect_monster_ptr->m_ptr->maxhp;
+ if (multiply_monster(caster_ptr, effect_monster_ptr->g_ptr->m_idx, TRUE, 0L))
{
- if (caster_ptr->riding && (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)) effect_monster_ptr->do_dist = 0;
- else effect_monster_ptr->do_dist = 7;
+ effect_monster_ptr->note = _("が分裂した!", " spawns!");
}
+ }
- 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(effect_monster_ptr->dam)))
- {
- effect_monster_ptr->do_stun = 0;
- effect_monster_ptr->obvious = FALSE;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_STAR_HEAL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ (void)set_monster_csleep(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
+
+ if (effect_monster_ptr->m_ptr->maxhp < effect_monster_ptr->m_ptr->max_maxhp)
+ {
+ if (effect_monster_ptr->seen_msg) msg_format(_("%^sの強さが戻った。", "%^s recovers %s vitality."), effect_monster_ptr->m_name, effect_monster_ptr->m_poss);
+ effect_monster_ptr->m_ptr->maxhp = effect_monster_ptr->m_ptr->max_maxhp;
}
- case GF_PSY_SPEAR:
+
+ if (!effect_monster_ptr->dam)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ 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);
break;
}
- case GF_METEOR:
+ }
+ /* Fall through */
+ case GF_OLD_HEAL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ /* Wake up */
+ (void)set_monster_csleep(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
+ if (MON_STUNNED(effect_monster_ptr->m_ptr))
+ {
+ if (effect_monster_ptr->seen_msg) msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), effect_monster_ptr->m_name);
+ (void)set_monster_stunned(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
+ }
+ if (MON_CONFUSED(effect_monster_ptr->m_ptr))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ if (effect_monster_ptr->seen_msg) msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), effect_monster_ptr->m_name);
+ (void)set_monster_confused(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
}
- case GF_DOMINATION:
+ if (MON_MONFEAR(effect_monster_ptr->m_ptr))
{
- if (!is_hostile(effect_monster_ptr->m_ptr)) break;
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
+ if (effect_monster_ptr->seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), effect_monster_ptr->m_name, effect_monster_ptr->m_poss);
+ (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 += 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)
+ {
+ chg_virtue(caster_ptr, V_VITALITY, 1);
+
+ if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
+ chg_virtue(caster_ptr, V_INDIVIDUALISM, 1);
+
+ if (is_friendly(effect_monster_ptr->m_ptr))
+ chg_virtue(caster_ptr, V_HONOUR, 1);
+ else if (!(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL))
{
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_CONF)
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_GOOD)
+ chg_virtue(caster_ptr, V_COMPASSION, 2);
+ else
+ chg_virtue(caster_ptr, V_COMPASSION, 1);
+ }
- effect_monster_ptr->do_conf = 0;
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(caster_ptr, V_NATURE, 1);
+ }
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (effect_monster_ptr->r_ptr->level > caster_ptr->lev / 2) &&
- (one_in_(2)))
- {
- effect_monster_ptr->note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (effect_monster_ptr->seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), effect_monster_ptr->m_name);
+ if (effect_monster_ptr->m_ptr->r_idx == MON_LEPER)
+ {
+ effect_monster_ptr->heal_leper = TRUE;
+ if (!effect_monster_ptr->who) chg_virtue(caster_ptr, V_COMPASSION, 5);
+ }
- /* Saving throw */
- if (randint0(100 + effect_monster_ptr->r_ptr->level / 2) < caster_ptr->skill_sav)
- {
- msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
- }
- else
- {
- /* Confuse, stun, terrify */
- switch (randint1(4))
- {
- case 1:
- set_stun(caster_ptr, caster_ptr->stun + effect_monster_ptr->dam / 2);
- break;
- case 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 + effect_monster_ptr->dam);
- }
- }
- }
- }
- else
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- }
- }
- else
- {
- 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);
- }
- else
- {
- switch (randint1(4))
- {
- case 1:
- effect_monster_ptr->do_stun = effect_monster_ptr->dam / 2;
- break;
- case 2:
- effect_monster_ptr->do_conf = effect_monster_ptr->dam / 2;
- break;
- default:
- effect_monster_ptr->do_fear = 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);
- effect_monster_ptr->dam = 0;
- break;
- }
- case GF_ICE:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_stun = (randint1(15) + 1) / (effect_monster_ptr->r + 1);
- if (effect_monster_ptr->r_ptr->flagsr & RFR_IM_COLD)
- {
- effect_monster_ptr->note = _("にはかなり耐性がある!", " resists a lot.");
- 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.");
- 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 = _("は体力を回復したようだ。", " looks healthier.");
- break;
- }
- case GF_HYPODYNAMIA:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!monster_living(effect_monster_ptr->m_ptr->r_idx))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NONLIVING) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NONLIVING);
- }
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- effect_monster_ptr->dam = 0;
- }
- else
- effect_monster_ptr->do_time = (effect_monster_ptr->dam + 7) / 8;
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_OLD_SPEED:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
- }
- case GF_DEATH_RAY:
+ if (set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!monster_living(effect_monster_ptr->m_ptr->r_idx))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_DEMON) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_UNDEAD) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_UNDEAD);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NONLIVING) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NONLIVING);
- }
- effect_monster_ptr->note = _("には完全な耐性がある!", " is immune.");
- effect_monster_ptr->obvious = FALSE;
- effect_monster_ptr->dam = 0;
- }
- else if (((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) &&
- (randint1(888) != 666)) ||
- (((effect_monster_ptr->r_ptr->level + randint1(20)) > randint1((effect_monster_ptr->caster_lev / 2) + randint1(10))) &&
- randint1(100) != 66))
- {
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- effect_monster_ptr->obvious = FALSE;
- effect_monster_ptr->dam = 0;
- }
-
- break;
+ effect_monster_ptr->note = _("の動きが速くなった。", " starts moving faster.");
}
- case GF_OLD_POLY:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->do_poly = TRUE;
-
- /* 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((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;
- }
- effect_monster_ptr->dam = 0;
- break;
- }
- case GF_OLD_CLONE:
+ if (!effect_monster_ptr->who)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
-
- if ((floor_ptr->inside_arena) || is_pet(effect_monster_ptr->m_ptr) || (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- }
- else
- {
- effect_monster_ptr->m_ptr->hp = effect_monster_ptr->m_ptr->maxhp;
- if (multiply_monster(caster_ptr, effect_monster_ptr->g_ptr->m_idx, TRUE, 0L))
- {
- effect_monster_ptr->note = _("が分裂した!", " spawns!");
- }
- }
-
- effect_monster_ptr->dam = 0;
- break;
+ if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
+ chg_virtue(caster_ptr, V_INDIVIDUALISM, 1);
+ if (is_friendly(effect_monster_ptr->m_ptr))
+ chg_virtue(caster_ptr, V_HONOUR, 1);
}
- case GF_STAR_HEAL:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- (void)set_monster_csleep(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
-
- if (effect_monster_ptr->m_ptr->maxhp < effect_monster_ptr->m_ptr->max_maxhp)
- {
- if (effect_monster_ptr->seen_msg) msg_format(_("%^sの強さが戻った。", "%^s recovers %s vitality."), effect_monster_ptr->m_name, effect_monster_ptr->m_poss);
- effect_monster_ptr->m_ptr->maxhp = effect_monster_ptr->m_ptr->max_maxhp;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_OLD_SLOW:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- 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);
- break;
- }
- }
- /* Fall through */
- case GF_OLD_HEAL:
+ /* Powerful monsters can resist */
+ if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
-
- /* Wake up */
- (void)set_monster_csleep(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
- if (MON_STUNNED(effect_monster_ptr->m_ptr))
- {
- if (effect_monster_ptr->seen_msg) msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), effect_monster_ptr->m_name);
- (void)set_monster_stunned(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
- }
- if (MON_CONFUSED(effect_monster_ptr->m_ptr))
- {
- if (effect_monster_ptr->seen_msg) msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), effect_monster_ptr->m_name);
- (void)set_monster_confused(caster_ptr, effect_monster_ptr->g_ptr->m_idx, 0);
- }
- if (MON_MONFEAR(effect_monster_ptr->m_ptr))
- {
- if (effect_monster_ptr->seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), effect_monster_ptr->m_name, effect_monster_ptr->m_poss);
- (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 += 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)
- {
- chg_virtue(caster_ptr, V_VITALITY, 1);
-
- if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(caster_ptr, V_INDIVIDUALISM, 1);
-
- if (is_friendly(effect_monster_ptr->m_ptr))
- chg_virtue(caster_ptr, V_HONOUR, 1);
- else if (!(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL))
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_GOOD)
- chg_virtue(caster_ptr, V_COMPASSION, 2);
- else
- chg_virtue(caster_ptr, V_COMPASSION, 1);
- }
-
- if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(caster_ptr, V_NATURE, 1);
- }
-
- if (effect_monster_ptr->m_ptr->r_idx == MON_LEPER)
- {
- effect_monster_ptr->heal_leper = TRUE;
- if (!effect_monster_ptr->who) chg_virtue(caster_ptr, V_COMPASSION, 5);
- }
-
- 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);
-
- effect_monster_ptr->note = _("は体力を回復したようだ。", " looks healthier.");
-
- effect_monster_ptr->dam = 0;
- break;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
}
- case GF_OLD_SPEED:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
-
- if (set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100))
- {
- effect_monster_ptr->note = _("の動きが速くなった。", " starts moving faster.");
- }
-
- if (!effect_monster_ptr->who)
+ if (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
{
- if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(caster_ptr, V_INDIVIDUALISM, 1);
- if (is_friendly(effect_monster_ptr->m_ptr))
- chg_virtue(caster_ptr, V_HONOUR, 1);
+ effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
}
-
- effect_monster_ptr->dam = 0;
- break;
}
- case GF_OLD_SLOW:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- /* Powerful monsters can resist */
- if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (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 (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
- {
- effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
- }
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_OLD_SLEEP:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
-
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_SLEEP);
- }
-
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- }
- else
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
{
- effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
- effect_monster_ptr->do_sleep = 500;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_SLEEP);
}
- effect_monster_ptr->dam = 0;
- break;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
}
- case GF_STASIS_EVIL:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
+ effect_monster_ptr->do_sleep = 500;
+ }
- if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- !(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL) ||
- (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
- {
- effect_monster_ptr->note = _("は動けなくなった!", " is suspended!");
- effect_monster_ptr->do_sleep = 500;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_STASIS_EVIL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->dam = 0;
- break;
+ if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
+ !(effect_monster_ptr->r_ptr->flags3 & RF3_EVIL) ||
+ (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;
}
- case GF_STASIS:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("は動けなくなった!", " is suspended!");
+ effect_monster_ptr->do_sleep = 500;
+ }
- if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (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
- {
- effect_monster_ptr->note = _("は動けなくなった!", " is suspended!");
- effect_monster_ptr->do_sleep = 500;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_STASIS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->dam = 0;
- break;
+ if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
+ (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;
}
- case GF_CHARM:
+ else
{
- int vir;
- vir = virtue_number(caster_ptr, V_HARMONY);
- if (vir)
- {
- effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
- }
-
- vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
- if (vir)
- {
- 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, effect_monster_ptr->dam, effect_monster_ptr->m_ptr))
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
-
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (caster_ptr->cursed & TRC_AGGRAVATE)
- {
- effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
- set_pet(caster_ptr, effect_monster_ptr->m_ptr);
-
- chg_virtue(caster_ptr, V_INDIVIDUALISM, -1);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(caster_ptr, V_NATURE, 1);
- }
-
- effect_monster_ptr->dam = 0;
- break;
+ effect_monster_ptr->note = _("は動けなくなった!", " is suspended!");
+ effect_monster_ptr->do_sleep = 500;
}
- case GF_CONTROL_UNDEAD:
+
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_CHARM:
+ {
+ int vir;
+ vir = virtue_number(caster_ptr, V_HARMONY);
+ if (vir)
{
- int vir;
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
+ }
- vir = virtue_number(caster_ptr, V_UNLIFE);
- if (vir)
- {
- effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
- }
+ vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
+ }
- vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
- if (vir)
- {
- effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
- }
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- 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.");
- effect_monster_ptr->obvious = FALSE;
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (caster_ptr->cursed & TRC_AGGRAVATE)
- {
- effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(caster_ptr, 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;
- effect_monster_ptr->dam = 0;
- break;
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
- case GF_CONTROL_DEMON:
+ else if (caster_ptr->cursed & TRC_AGGRAVATE)
{
- int vir;
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
-
- vir = virtue_number(caster_ptr, V_UNLIFE);
- if (vir)
- {
- effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
- }
-
- vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
- if (vir)
- {
- effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
- }
-
- 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.");
- effect_monster_ptr->obvious = FALSE;
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (caster_ptr->cursed & TRC_AGGRAVATE)
- {
- effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(caster_ptr, effect_monster_ptr->m_ptr);
- }
-
- effect_monster_ptr->dam = 0;
- break;
+ effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
- case GF_CONTROL_ANIMAL:
+ else
{
- int vir;
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
+ set_pet(caster_ptr, effect_monster_ptr->m_ptr);
- vir = virtue_number(caster_ptr, V_NATURE);
- if (vir)
- {
- effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
- }
+ chg_virtue(caster_ptr, V_INDIVIDUALISM, -1);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(caster_ptr, V_NATURE, 1);
+ }
- vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
- if (vir)
- {
- effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_CONTROL_UNDEAD:
+ {
+ int vir;
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- 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.");
- effect_monster_ptr->obvious = FALSE;
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (caster_ptr->cursed & TRC_AGGRAVATE)
- {
- effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("はなついた。", " is tamed!");
- set_pet(caster_ptr, effect_monster_ptr->m_ptr);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(caster_ptr, V_NATURE, 1);
- }
+ vir = virtue_number(caster_ptr, V_UNLIFE);
+ if (vir)
+ {
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
+ }
- effect_monster_ptr->dam = 0;
- break;
+ vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
+ }
+
+ 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.");
+ effect_monster_ptr->obvious = FALSE;
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (caster_ptr->cursed & TRC_AGGRAVATE)
+ {
+ effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
- case GF_CHARM_LIVING:
+ else
{
- int vir;
+ effect_monster_ptr->note = _("は既にあなたの奴隷だ!", " is in your thrall!");
+ set_pet(caster_ptr, effect_monster_ptr->m_ptr);
+ }
- vir = virtue_number(caster_ptr, V_UNLIFE);
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_CONTROL_DEMON:
+ {
+ int vir;
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- vir = virtue_number(caster_ptr, V_UNLIFE);
- if (vir)
- {
- effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 10;
- }
+ vir = virtue_number(caster_ptr, V_UNLIFE);
+ if (vir)
+ {
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
+ }
- vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
- if (vir)
- {
- effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
- }
+ vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ 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_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.");
+ effect_monster_ptr->obvious = FALSE;
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (caster_ptr->cursed & TRC_AGGRAVATE)
+ {
+ effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ effect_monster_ptr->note = _("は既にあなたの奴隷だ!", " is in your thrall!");
+ set_pet(caster_ptr, 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.");
- effect_monster_ptr->obvious = FALSE;
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (caster_ptr->cursed & TRC_AGGRAVATE)
- {
- effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("を支配した。", " is tamed!");
- set_pet(caster_ptr, effect_monster_ptr->m_ptr);
- if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(caster_ptr, V_NATURE, 1);
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_CONTROL_ANIMAL:
+ {
+ int vir;
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->dam = 0;
- break;
+ vir = virtue_number(caster_ptr, V_NATURE);
+ if (vir)
+ {
+ effect_monster_ptr->dam += caster_ptr->virtues[vir - 1] / 10;
}
- case GF_OLD_CONF:
+
+ vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
+ if (vir)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
+ }
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
- {
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
+ 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.");
+ effect_monster_ptr->obvious = FALSE;
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (caster_ptr->cursed & TRC_AGGRAVATE)
+ {
+ effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ effect_monster_ptr->note = _("はなついた。", " is tamed!");
+ set_pet(caster_ptr, effect_monster_ptr->m_ptr);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(caster_ptr, V_NATURE, 1);
+ }
- effect_monster_ptr->do_conf = 0;
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_CHARM_LIVING:
+ {
+ int vir;
- effect_monster_ptr->dam = 0;
- break;
+ vir = virtue_number(caster_ptr, V_UNLIFE);
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ vir = virtue_number(caster_ptr, V_UNLIFE);
+ if (vir)
+ {
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 10;
}
- case GF_STUN:
+
+ vir = virtue_number(caster_ptr, V_INDIVIDUALISM);
+ if (vir)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->dam -= caster_ptr->virtues[vir - 1] / 20;
+ }
- 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((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;
- }
+ msg_format(_("%sを見つめた。", "You stare into %s."), effect_monster_ptr->m_name);
- effect_monster_ptr->dam = 0;
- break;
+ 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.");
+ effect_monster_ptr->obvious = FALSE;
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
- case GF_LITE_WEAK:
+ else if (caster_ptr->cursed & TRC_AGGRAVATE)
{
- if (!effect_monster_ptr->dam)
- {
- effect_monster_ptr->skipped = TRUE;
- break;
- }
-
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ effect_monster_ptr->note = _("を支配した。", " is tamed!");
+ set_pet(caster_ptr, effect_monster_ptr->m_ptr);
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(caster_ptr, V_NATURE, 1);
+ }
- 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->dam = 0;
+ break;
+ }
+ case GF_OLD_CONF:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->note = _("は光に身をすくめた!", " cringes from the light!");
- effect_monster_ptr->note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- }
- else
+ 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((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->dam = 0;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
}
- break;
+ effect_monster_ptr->do_conf = 0;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
}
- case GF_LITE:
+
+ 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, (effect_monster_ptr->dam)) + 1;
+ if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (effect_monster_ptr->r_ptr->level > randint1((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->do_stun = 0;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
+ }
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_LITE)
- {
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- 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!");
- effect_monster_ptr->dam *= 2;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_LITE_WEAK:
+ {
+ if (!effect_monster_ptr->dam)
+ {
+ effect_monster_ptr->skipped = TRUE;
break;
}
- case GF_DARK:
+
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DARK)
- {
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- 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);
- }
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_LITE);
- break;
+ effect_monster_ptr->note = _("は光に身をすくめた!", " cringes from the light!");
+ effect_monster_ptr->note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
}
- case GF_KILL_WALL:
+ else
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_ROCK))
- {
- 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_HURT_ROCK);
+ effect_monster_ptr->dam = 0;
+ }
- effect_monster_ptr->note = _("の皮膚がただれた!", " loses some skin!");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
- {
- effect_monster_ptr->dam = 0;
- }
+ break;
+ }
+ case GF_LITE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_LITE)
+ {
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ 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);
}
- case GF_AWAY_UNDEAD:
+ else if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
- {
- bool resists_tele = FALSE;
-
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
- {
- if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- resists_tele = TRUE;
- }
- else if (effect_monster_ptr->r_ptr->level > randint1(100))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- resists_tele = TRUE;
- }
- }
-
- if (!resists_tele)
- {
- 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 = effect_monster_ptr->dam;
- }
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- }
-
- effect_monster_ptr->dam = 0;
- break;
+ 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!");
+ effect_monster_ptr->dam *= 2;
}
- case GF_AWAY_EVIL:
+ break;
+ }
+ case GF_DARK:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_DARK)
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_EVIL))
- {
- bool resists_tele = FALSE;
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ 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);
+ }
- if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
- {
- if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- resists_tele = TRUE;
- }
- else if (effect_monster_ptr->r_ptr->level > randint1(100))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
- effect_monster_ptr->note = _("には耐性がある!", " resists!");
- resists_tele = TRUE;
- }
- }
+ break;
+ }
+ case GF_KILL_WALL:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_ROCK))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!resists_tele)
- {
- 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 = effect_monster_ptr->dam;
- }
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- }
+ 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 = _("はドロドロに溶けた!", " dissolves!");
+ }
+ else
+ {
effect_monster_ptr->dam = 0;
- break;
}
- case GF_AWAY_ALL:
+
+ break;
+ }
+ case GF_AWAY_UNDEAD:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
{
bool resists_tele = FALSE;
+
if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
{
if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL))
if (!resists_tele)
{
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 = effect_monster_ptr->dam;
}
-
- effect_monster_ptr->dam = 0;
- break;
}
- case GF_TURN_UNDEAD:
+ else
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->skipped = 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->dam = 0;
+ break;
+ }
+ case GF_AWAY_EVIL:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_EVIL))
+ {
+ bool resists_tele = FALSE;
- 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)
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
+ {
+ if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL))
{
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- effect_monster_ptr->do_fear = 0;
+ resists_tele = TRUE;
+ }
+ else if (effect_monster_ptr->r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ resists_tele = TRUE;
}
}
- else
+
+ if (!resists_tele)
{
- effect_monster_ptr->skipped = TRUE;
+ 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 = effect_monster_ptr->dam;
}
-
- effect_monster_ptr->dam = 0;
- break;
}
- case GF_TURN_EVIL:
+ else
+ {
+ effect_monster_ptr->skipped = TRUE;
+ }
+
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_AWAY_ALL:
+ {
+ bool resists_tele = FALSE;
+ if (effect_monster_ptr->r_ptr->flagsr & RFR_RES_TELE)
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_EVIL))
+ if ((effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flagsr & RFR_RES_ALL))
{
- 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_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->do_fear = 0;
- }
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ resists_tele = TRUE;
}
- else
+ else if (effect_monster_ptr->r_ptr->level > randint1(100))
{
- effect_monster_ptr->skipped = TRUE;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flagsr |= RFR_RES_TELE;
+ effect_monster_ptr->note = _("には耐性がある!", " resists!");
+ resists_tele = TRUE;
}
+ }
- effect_monster_ptr->dam = 0;
- break;
+ if (!resists_tele)
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ effect_monster_ptr->do_dist = effect_monster_ptr->dam;
}
- case GF_TURN_ALL:
+
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_TURN_UNDEAD:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
{
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_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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
+ 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->do_fear = 0;
}
-
- effect_monster_ptr->dam = 0;
- break;
}
- case GF_DISP_UNDEAD:
+ else
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->skipped = TRUE;
+ }
- /* 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->dam = 0;
+ break;
+ }
+ case GF_TURN_EVIL:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_EVIL))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->note = _("は身震いした。", " shudders.");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
+ 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, (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->skipped = TRUE;
- effect_monster_ptr->dam = 0;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
+ effect_monster_ptr->do_fear = 0;
}
-
- break;
}
- case GF_DISP_EVIL:
+ else
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_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->skipped = TRUE;
+ }
- effect_monster_ptr->note = _("は身震いした。", " shudders.");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- effect_monster_ptr->dam = 0;
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_TURN_ALL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
- }
- case GF_DISP_GOOD:
+ 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_GOOD))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
+ effect_monster_ptr->do_fear = 0;
+ }
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_GOOD);
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_DISP_UNDEAD:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_UNDEAD))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->note = _("は身震いした。", " shudders.");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- effect_monster_ptr->dam = 0;
- }
+ /* 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);
- break;
+ effect_monster_ptr->note = _("は身震いした。", " shudders.");
+ effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
}
- case GF_DISP_LIVING:
+ else
{
- if (monster_living(effect_monster_ptr->m_ptr->r_idx))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->dam = 0;
+ }
- effect_monster_ptr->note = _("は身震いした。", " shudders.");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- effect_monster_ptr->dam = 0;
- }
+ break;
+ }
+ case GF_DISP_EVIL:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_EVIL))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ 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->note = _("は身震いした。", " shudders.");
+ effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
}
- case GF_DISP_DEMON:
+ else
{
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_DEMON))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->skipped = TRUE;
+ 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_DEMON);
+ break;
+ }
+ case GF_DISP_GOOD:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_GOOD))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->note = _("は身震いした。", " shudders.");
- effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- else
- {
- effect_monster_ptr->skipped = TRUE;
- 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_GOOD);
- break;
+ effect_monster_ptr->note = _("は身震いした。", " shudders.");
+ effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
}
- case GF_DISP_ALL:
+ else
+ {
+ effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->dam = 0;
+ }
+
+ break;
+ }
+ case GF_DISP_LIVING:
+ {
+ if (monster_living(effect_monster_ptr->m_ptr->r_idx))
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
effect_monster_ptr->note = _("は身震いした。", " shudders.");
effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
- break;
}
- case GF_DRAIN_MANA:
+ else
+ {
+ effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->dam = 0;
+ }
+
+ break;
+ }
+ case GF_DISP_DEMON:
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_DEMON))
{
if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if ((effect_monster_ptr->r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (effect_monster_ptr->r_ptr->a_ability_flags1 & ~(RF5_NOMAGIC_MASK)) || (effect_monster_ptr->r_ptr->a_ability_flags2 & ~(RF6_NOMAGIC_MASK)))
+
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_DEMON);
+
+ effect_monster_ptr->note = _("は身震いした。", " shudders.");
+ effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
+ }
+ else
+ {
+ effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->dam = 0;
+ }
+
+ break;
+ }
+ case GF_DISP_ALL:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->note = _("は身震いした。", " shudders.");
+ effect_monster_ptr->note_dies = _("はドロドロに溶けた!", " dissolves!");
+ break;
+ }
+ case GF_DRAIN_MANA:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if ((effect_monster_ptr->r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (effect_monster_ptr->r_ptr->a_ability_flags1 & ~(RF5_NOMAGIC_MASK)) || (effect_monster_ptr->r_ptr->a_ability_flags2 & ~(RF6_NOMAGIC_MASK)))
+ {
+ if (effect_monster_ptr->who > 0)
{
- if (effect_monster_ptr->who > 0)
+ if (effect_monster_ptr->m_caster_ptr->hp < effect_monster_ptr->m_caster_ptr->maxhp)
{
- 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->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);
+ 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 (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);
- }
+ 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, effect_monster_ptr->dam);
- }
}
else
{
- if (effect_monster_ptr->see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
+ msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), effect_monster_ptr->m_name);
+ (void)hp_player(caster_ptr, effect_monster_ptr->dam);
}
-
- effect_monster_ptr->dam = 0;
- break;
}
- case GF_MIND_BLAST:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), effect_monster_ptr->m_name);
+ if (effect_monster_ptr->see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
+ }
- 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((effect_monster_ptr->caster_lev - 10) < 1 ? 1 : (effect_monster_ptr->caster_lev - 10)) + 10))
- {
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_MIND_BLAST:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), effect_monster_ptr->m_name);
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- 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.");
- 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.");
- effect_monster_ptr->dam /= 3;
- }
- else
+ 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((effect_monster_ptr->caster_lev - 10) < 1 ? 1 : (effect_monster_ptr->caster_lev - 10)) + 10))
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
{
- effect_monster_ptr->note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
- effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
-
- if (effect_monster_ptr->who > 0) effect_monster_ptr->do_conf = randint0(4) + 4;
- else effect_monster_ptr->do_conf = randint0(8) + 8;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
}
- break;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
}
- case GF_BRAIN_SMASH:
+ else if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), effect_monster_ptr->m_name);
+ 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.");
+ 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.");
+ effect_monster_ptr->dam /= 3;
+ }
+ else
+ {
+ effect_monster_ptr->note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
+ effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- 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((effect_monster_ptr->caster_lev - 10) < 1 ? 1 : (effect_monster_ptr->caster_lev - 10)) + 10))
- {
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
+ if (effect_monster_ptr->who > 0) effect_monster_ptr->do_conf = randint0(4) + 4;
+ else effect_monster_ptr->do_conf = randint0(8) + 8;
+ }
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
- }
- else if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
+ break;
+ }
+ case GF_BRAIN_SMASH:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), effect_monster_ptr->m_name);
+
+ 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((effect_monster_ptr->caster_lev - 10) < 1 ? 1 : (effect_monster_ptr->caster_lev - 10)) + 10))
+ {
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_NO_CONF))
{
- 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.");
- 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_NO_CONF);
}
- else if (effect_monster_ptr->r_ptr->flags2 & RF2_WEIRD_MIND)
+
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ 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.");
+ 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!");
+ effect_monster_ptr->dam /= 3;
+ }
+ else
+ {
+ effect_monster_ptr->note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
+ effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
+ if (effect_monster_ptr->who > 0)
{
- 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!");
- effect_monster_ptr->dam /= 3;
+ effect_monster_ptr->do_conf = randint0(4) + 4;
+ effect_monster_ptr->do_stun = randint0(4) + 4;
}
else
{
- effect_monster_ptr->note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
- effect_monster_ptr->note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- if (effect_monster_ptr->who > 0)
- {
- effect_monster_ptr->do_conf = randint0(4) + 4;
- effect_monster_ptr->do_stun = randint0(4) + 4;
- }
- else
- {
- effect_monster_ptr->do_conf = randint0(8) + 8;
- effect_monster_ptr->do_stun = randint0(8) + 8;
- }
- (void)set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 10);
+ effect_monster_ptr->do_conf = randint0(8) + 8;
+ effect_monster_ptr->do_stun = randint0(8) + 8;
}
-
- break;
+ (void)set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 10);
}
- case GF_CAUSE_1:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who) msg_format(_("%sを指差して呪いをかけた。", "You point at %s and curse."), effect_monster_ptr->m_name);
- if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
- }
- break;
+ break;
+ }
+ case GF_CAUSE_1:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who) msg_format(_("%sを指差して呪いをかけた。", "You point at %s and curse."), effect_monster_ptr->m_name);
+ if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
+ {
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
}
- case GF_CAUSE_2:
+
+ break;
+ }
+ case GF_CAUSE_2:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who) msg_format(_("%sを指差して恐ろしげに呪いをかけた。", "You point at %s and curse horribly."), effect_monster_ptr->m_name);
+
+ if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who) msg_format(_("%sを指差して恐ろしげに呪いをかけた。", "You point at %s and curse horribly."), effect_monster_ptr->m_name);
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
+ }
- if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
- }
+ break;
+ }
+ case GF_CAUSE_3:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who) msg_format(_("%sを指差し、恐ろしげに呪文を唱えた!", "You point at %s, incanting terribly!"), effect_monster_ptr->m_name);
- break;
- }
- case GF_CAUSE_3:
+ if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who) msg_format(_("%sを指差し、恐ろしげに呪文を唱えた!", "You point at %s, incanting terribly!"), effect_monster_ptr->m_name);
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
+ }
- if (randint0(100 + (effect_monster_ptr->caster_lev / 2)) < (effect_monster_ptr->r_ptr->level + 35))
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
- }
+ break;
+ }
+ case GF_CAUSE_4:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (!effect_monster_ptr->who)
+ msg_format(_("%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
+ "You point at %s, screaming the word, 'DIE!'."), effect_monster_ptr->m_name);
- 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.");
+ effect_monster_ptr->dam = 0;
}
- case GF_CAUSE_4:
+ break;
+ }
+ case GF_HAND_DOOM:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (!effect_monster_ptr->who)
- msg_format(_("%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
- "You point at %s, screaming the word, 'DIE!'."), effect_monster_ptr->m_name);
-
- 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.");
- effect_monster_ptr->dam = 0;
- }
- break;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
}
- case GF_HAND_DOOM:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE)
+ 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))))
{
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
+ effect_monster_ptr->dam = ((40 + randint1(20)) * effect_monster_ptr->m_ptr->hp) / 100;
+
+ if (effect_monster_ptr->m_ptr->hp < effect_monster_ptr->dam) effect_monster_ptr->dam = effect_monster_ptr->m_ptr->hp - 1;
}
else
{
- 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))))
- {
- effect_monster_ptr->dam = ((40 + randint1(20)) * effect_monster_ptr->m_ptr->hp) / 100;
-
- 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!");
- effect_monster_ptr->dam = 0;
- }
+ /* todo 乱数で破滅のを弾いた結果が「耐性を持っている」ことになるのはおかしい */
+ effect_monster_ptr->note = _("は耐性を持っている!", "resists!");
+ effect_monster_ptr->dam = 0;
}
+ }
+ break;
+ }
+ case GF_CAPTURE:
+ {
+ int nokori_hp;
+ if ((floor_ptr->inside_quest && (quest[floor_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(effect_monster_ptr->m_ptr)) ||
+ (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_NAZGUL)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_UNIQUE2)) || (effect_monster_ptr->r_ptr->flags1 & RF1_QUESTOR) || effect_monster_ptr->m_ptr->parent_m_idx)
+ {
+ msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
+ effect_monster_ptr->skipped = TRUE;
break;
}
- case GF_CAPTURE:
- {
- int nokori_hp;
- if ((floor_ptr->inside_quest && (quest[floor_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(effect_monster_ptr->m_ptr)) ||
- (effect_monster_ptr->r_ptr->flags1 & (RF1_UNIQUE)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_NAZGUL)) || (effect_monster_ptr->r_ptr->flags7 & (RF7_UNIQUE2)) || (effect_monster_ptr->r_ptr->flags1 & RF1_QUESTOR) || effect_monster_ptr->m_ptr->parent_m_idx)
- {
- msg_format(_("%sには効果がなかった。", "%s is unaffected."), effect_monster_ptr->m_name);
- effect_monster_ptr->skipped = TRUE;
- break;
- }
- if (is_pet(effect_monster_ptr->m_ptr)) nokori_hp = effect_monster_ptr->m_ptr->maxhp * 4L;
- else if ((caster_ptr->pclass == CLASS_BEASTMASTER) && monster_living(effect_monster_ptr->m_ptr->r_idx))
- nokori_hp = effect_monster_ptr->m_ptr->maxhp * 3 / 10;
- else
- nokori_hp = effect_monster_ptr->m_ptr->maxhp * 3 / 20;
+ if (is_pet(effect_monster_ptr->m_ptr)) nokori_hp = effect_monster_ptr->m_ptr->maxhp * 4L;
+ else if ((caster_ptr->pclass == CLASS_BEASTMASTER) && monster_living(effect_monster_ptr->m_ptr->r_idx))
+ nokori_hp = effect_monster_ptr->m_ptr->maxhp * 3 / 10;
+ else
+ nokori_hp = effect_monster_ptr->m_ptr->maxhp * 3 / 20;
- if (effect_monster_ptr->m_ptr->hp >= nokori_hp)
- {
- msg_format(_("もっと弱らせないと。", "You need to weaken %s more."), effect_monster_ptr->m_name);
- effect_monster_ptr->skipped = TRUE;
- }
- else if (effect_monster_ptr->m_ptr->hp < randint0(nokori_hp))
+ if (effect_monster_ptr->m_ptr->hp >= nokori_hp)
+ {
+ msg_format(_("もっと弱らせないと。", "You need to weaken %s more."), effect_monster_ptr->m_name);
+ effect_monster_ptr->skipped = TRUE;
+ }
+ else if (effect_monster_ptr->m_ptr->hp < randint0(nokori_hp))
+ {
+ if (effect_monster_ptr->m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(caster_ptr, effect_monster_ptr->g_ptr->m_idx, FALSE, MON_CHAMELEON);
+ msg_format(_("%sを捕えた!", "You capture %^s!"), effect_monster_ptr->m_name);
+ cap_mon = effect_monster_ptr->m_ptr->r_idx;
+ cap_mspeed = effect_monster_ptr->m_ptr->mspeed;
+ cap_hp = effect_monster_ptr->m_ptr->hp;
+ cap_maxhp = effect_monster_ptr->m_ptr->max_maxhp;
+ cap_nickname = effect_monster_ptr->m_ptr->nickname;
+ if (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)
{
- if (effect_monster_ptr->m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(caster_ptr, effect_monster_ptr->g_ptr->m_idx, FALSE, MON_CHAMELEON);
- msg_format(_("%sを捕えた!", "You capture %^s!"), effect_monster_ptr->m_name);
- cap_mon = effect_monster_ptr->m_ptr->r_idx;
- cap_mspeed = effect_monster_ptr->m_ptr->mspeed;
- cap_hp = effect_monster_ptr->m_ptr->hp;
- cap_maxhp = effect_monster_ptr->m_ptr->max_maxhp;
- cap_nickname = effect_monster_ptr->m_ptr->nickname;
- if (effect_monster_ptr->g_ptr->m_idx == caster_ptr->riding)
+ if (rakuba(caster_ptr, -1, FALSE))
{
- if (rakuba(caster_ptr, -1, FALSE))
- {
- msg_format(_("地面に落とされた。", "You have fallen from %s."), effect_monster_ptr->m_name);
- }
+ msg_format(_("地面に落とされた。", "You have fallen from %s."), effect_monster_ptr->m_name);
}
+ }
- delete_monster_idx(caster_ptr, effect_monster_ptr->g_ptr->m_idx);
+ delete_monster_idx(caster_ptr, effect_monster_ptr->g_ptr->m_idx);
- return TRUE;
- }
- else
- {
- msg_format(_("うまく捕まえられなかった。", "You failed to capture %s."), effect_monster_ptr->m_name);
- effect_monster_ptr->skipped = TRUE;
- }
+ return GF_SWITCH_TRUE;
+ }
+ else
+ {
+ msg_format(_("うまく捕まえられなかった。", "You failed to capture %s."), effect_monster_ptr->m_name);
+ effect_monster_ptr->skipped = TRUE;
+ }
+
+ break;
+ }
+ case GF_ATTACK:
+ {
+ return (gf_switch_result)py_attack(caster_ptr, effect_monster_ptr->y, effect_monster_ptr->x, effect_monster_ptr->dam);
+ }
+ case GF_ENGETSU:
+ {
+ int effect = 0;
+ bool done = TRUE;
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ 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;
}
- case GF_ATTACK:
+ if (MON_CSLEEP(effect_monster_ptr->m_ptr))
{
- return py_attack(caster_ptr, effect_monster_ptr->y, effect_monster_ptr->x, effect_monster_ptr->dam);
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->dam = 0;
+ effect_monster_ptr->skipped = TRUE;
+ break;
}
- case GF_ENGETSU:
- {
- int effect = 0;
- bool done = TRUE;
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (effect_monster_ptr->r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- 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))
+ if (one_in_(5)) effect = 1;
+ else if (one_in_(4)) effect = 2;
+ else if (one_in_(3)) effect = 3;
+ else done = FALSE;
+
+ if (effect == 1)
+ {
+ if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
+ (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->dam = 0;
- effect_monster_ptr->skipped = TRUE;
- break;
+ effect_monster_ptr->obvious = FALSE;
}
-
- if (one_in_(5)) effect = 1;
- else if (one_in_(4)) effect = 2;
- else if (one_in_(3)) effect = 3;
- else done = FALSE;
-
- if (effect == 1)
+ else
{
- if ((effect_monster_ptr->r_ptr->flags1 & RF1_UNIQUE) ||
- (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 (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
{
- if (set_monster_slow(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_SLOW(effect_monster_ptr->m_ptr) + 50))
- {
- effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
- }
+ effect_monster_ptr->note = _("の動きが遅くなった。", " starts moving slower.");
}
}
- else if (effect == 2)
+ }
+ else if (effect == 2)
+ {
+ 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- 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((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;
- }
+ effect_monster_ptr->do_stun = 0;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
}
- else if (effect == 3)
+ }
+ else if (effect == 3)
+ {
+ 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
{
- 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((effect_monster_ptr->dam - 10) < 1 ? 1 : (effect_monster_ptr->dam - 10)) + 10))
- {
- if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
- {
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_SLEEP);
- }
-
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->obvious = FALSE;
- }
- else
+ if (effect_monster_ptr->r_ptr->flags3 & RF3_NO_SLEEP)
{
- /* Go to sleep (much) later */
- effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
- effect_monster_ptr->do_sleep = 500;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_SLEEP);
}
- }
- if (!done)
- {
effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
+ effect_monster_ptr->obvious = FALSE;
}
-
- 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, effect_monster_ptr->dam, !effect_monster_ptr->who, (effect_monster_ptr->r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
+ else
{
- if (effect_monster_ptr->seen_msg) msg_format(_("%sは消滅した!", "%^s disappeared!"), effect_monster_ptr->m_name);
- chg_virtue(caster_ptr, V_VITALITY, -1);
- return TRUE;
+ /* Go to sleep (much) later */
+ effect_monster_ptr->note = _("は眠り込んでしまった!", " falls asleep!");
+ effect_monster_ptr->do_sleep = 500;
}
+ }
- effect_monster_ptr->skipped = TRUE;
- break;
+ if (!done)
+ {
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
}
- case GF_PHOTO:
+
+ 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, effect_monster_ptr->dam, !effect_monster_ptr->who, (effect_monster_ptr->r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
{
- if (!effect_monster_ptr->who)
- msg_format(_("%sを写真に撮った。", "You take a photograph of %s."), effect_monster_ptr->m_name);
+ if (effect_monster_ptr->seen_msg) msg_format(_("%sは消滅した!", "%^s disappeared!"), effect_monster_ptr->m_name);
+ chg_virtue(caster_ptr, V_VITALITY, -1);
+ return GF_SWITCH_TRUE;
+ }
- if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ effect_monster_ptr->skipped = TRUE;
+ break;
+ }
+ case GF_PHOTO:
+ {
+ if (!effect_monster_ptr->who)
+ msg_format(_("%sを写真に撮った。", "You take a photograph of %s."), effect_monster_ptr->m_name);
- if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_HURT_LITE);
+ if (effect_monster_ptr->r_ptr->flags3 & (RF3_HURT_LITE))
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- effect_monster_ptr->note = _("は光に身をすくめた!", " cringes from the light!");
- effect_monster_ptr->note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- }
- else
- {
- 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_HURT_LITE);
- effect_monster_ptr->photo = effect_monster_ptr->m_ptr->r_idx;
- break;
+ effect_monster_ptr->note = _("は光に身をすくめた!", " cringes from the light!");
+ effect_monster_ptr->note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
}
- case GF_BLOOD_CURSE:
+ else
{
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- break;
+ effect_monster_ptr->dam = 0;
}
- case GF_CRUSADE:
- {
- bool success = FALSE;
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if ((effect_monster_ptr->r_ptr->flags3 & (RF3_GOOD)) && !floor_ptr->inside_arena)
- {
- 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;
+ effect_monster_ptr->photo = effect_monster_ptr->m_ptr->r_idx;
+ break;
+ }
+ case GF_BLOOD_CURSE:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+ break;
+ }
+ case GF_CRUSADE:
+ {
+ bool success = FALSE;
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (is_pet(effect_monster_ptr->m_ptr))
- {
- effect_monster_ptr->note = _("の動きが速くなった。", " starts moving faster.");
- (void)set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100);
- success = TRUE;
- }
- else if ((effect_monster_ptr->r_ptr->flags1 & (RF1_QUESTOR)) ||
- (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(effect_monster_ptr->dam)))
- {
- if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- effect_monster_ptr->note = _("を支配した。", " is tamed!");
- set_pet(caster_ptr, effect_monster_ptr->m_ptr);
- (void)set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100);
+ if ((effect_monster_ptr->r_ptr->flags3 & (RF3_GOOD)) && !floor_ptr->inside_arena)
+ {
+ 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_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_GOOD);
- success = TRUE;
- }
+ if (is_pet(effect_monster_ptr->m_ptr))
+ {
+ effect_monster_ptr->note = _("の動きが速くなった。", " starts moving faster.");
+ (void)set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100);
+ success = TRUE;
}
-
- if (!success)
+ else if ((effect_monster_ptr->r_ptr->flags1 & (RF1_QUESTOR)) ||
+ (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(effect_monster_ptr->dam)))
{
- if (!(effect_monster_ptr->r_ptr->flags3 & RF3_NO_FEAR))
- {
- effect_monster_ptr->do_fear = randint1(90) + 10;
- }
- else if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
- effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_FEAR);
+ if (one_in_(4)) effect_monster_ptr->m_ptr->mflag2 |= MFLAG2_NOPET;
}
+ else
+ {
+ effect_monster_ptr->note = _("を支配した。", " is tamed!");
+ set_pet(caster_ptr, effect_monster_ptr->m_ptr);
+ (void)set_monster_fast(caster_ptr, effect_monster_ptr->g_ptr->m_idx, MON_FAST(effect_monster_ptr->m_ptr) + 100);
- effect_monster_ptr->dam = 0;
- break;
+ if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr)) effect_monster_ptr->r_ptr->r_flags3 |= (RF3_GOOD);
+ success = TRUE;
+ }
}
- case GF_WOUNDS:
- {
- if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
- if (randint0(100 + effect_monster_ptr->dam) < (effect_monster_ptr->r_ptr->level + 50))
+ if (!success)
+ {
+ if (!(effect_monster_ptr->r_ptr->flags3 & RF3_NO_FEAR))
{
- effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
- effect_monster_ptr->dam = 0;
+ effect_monster_ptr->do_fear = randint1(90) + 10;
}
- break;
+ else if (is_original_ap_and_seen(caster_ptr, effect_monster_ptr->m_ptr))
+ effect_monster_ptr->r_ptr->r_flags3 |= (RF3_NO_FEAR);
}
- default:
+
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ case GF_WOUNDS:
+ {
+ if (effect_monster_ptr->seen) effect_monster_ptr->obvious = TRUE;
+
+ if (randint0(100 + effect_monster_ptr->dam) < (effect_monster_ptr->r_ptr->level + 50))
{
- effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->note = _("には効果がなかった。", " is unaffected.");
effect_monster_ptr->dam = 0;
- break;
- }
}
+ break;
+ }
+ default:
+ {
+ effect_monster_ptr->skipped = TRUE;
+ effect_monster_ptr->dam = 0;
+ break;
+ }
+ }
+
+ return GF_SWITCH_CONTINUE;
+}
+
+
+/*!
+ * @brief 汎用的なビーム/ボルト/ボール系によるモンスターへの効果処理 / Handle a beam/bolt/ball causing damage to a monster.
+ * @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 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 効果フラグ
+ * @param see_s_msg TRUEならばメッセージを表示する
+ * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
+ */
+bool affect_monster(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID effect_type, BIT_FLAGS flag, bool see_s_msg)
+{
+ floor_type *floor_ptr = caster_ptr->current_floor_ptr;
+ effect_monster tmp_effect;
+ effect_monster *effect_monster_ptr = &tmp_effect;
+ initialize_effect_monster(caster_ptr, effect_monster_ptr, who, r, y, x, dam, effect_type, flag, see_s_msg);
+ if (!is_never_effect(caster_ptr, effect_monster_ptr)) return FALSE;
+
+ effect_monster_ptr->dam = (effect_monster_ptr->dam + effect_monster_ptr->r) / (effect_monster_ptr->r + 1);
+ monster_desc(caster_ptr, effect_monster_ptr->m_name, effect_monster_ptr->m_ptr, 0);
+ monster_desc(caster_ptr, effect_monster_ptr->m_poss, effect_monster_ptr->m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
+ 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_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.");
+ 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_monster_ptr->effect_type == GF_LITE_WEAK || effect_monster_ptr->effect_type == GF_KILL_WALL) effect_monster_ptr->skipped = TRUE;
+ }
+ else
+ {
+ gf_switch_result result = switch_effects_monster(caster_ptr, effect_monster_ptr);
+ if (result != GF_SWITCH_CONTINUE) return (bool)result;
}
if (effect_monster_ptr->skipped) return FALSE;