*/
#include "angband.h"
+#include "core.h"
+#include "util.h"
+
#include "cmd-pet.h"
+#include "cmd-dump.h"
+#include "floor.h"
#include "trap.h"
+#include "autopick.h"
#include "object-curse.h"
#include "player-damage.h"
+#include "player-effects.h"
+#include "player-race.h"
+#include "player-class.h"
#include "monster.h"
#include "monster-status.h"
+#include "monster-spell.h"
+#include "spells.h"
+#include "spells-status.h"
#include "spells-diceroll.h"
#include "spells-summon.h"
#include "monsterrace-hook.h"
#include "melee.h"
#include "world.h"
-#include "projection.h"
#include "mutation.h"
#include "rooms.h"
#include "artifact.h"
#include "avatar.h"
#include "player-status.h"
+#include "player-move.h"
#include "realm-hex.h"
+#include "realm-song.h"
#include "object-hook.h"
+#include "object-broken.h"
+#include "object-flavor.h"
+#include "quest.h"
+#include "term.h"
+#include "grid.h"
+#include "feature.h"
+#include "view-mainwindow.h"
+#include "dungeon.h"
static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
static int rakubadam_p; /*!< 落馬した際のダメージ量 */
+bool sukekaku;
int project_length = 0; /*!< 投射の射程距離 */
+int cap_mon;
+int cap_mspeed;
+HIT_POINT cap_hp;
+HIT_POINT cap_maxhp;
+STR_OFFSET cap_nickname;
+
+/*!
+ * @brief 歌、剣術、呪術領域情報テーブル
+ */
+const magic_type technic_info[NUM_TECHNIC][32] =
+{
+ {
+ /* Music */
+ { 1, 1, 10, 2},
+ { 2, 1, 10, 2},
+ { 3, 2, 20, 3},
+ { 4, 2, 20, 4},
+ { 5, 2, 20, 6},
+ { 7, 4, 30, 8},
+ { 9, 3, 30, 10},
+ { 10, 2, 30, 12},
+
+ { 12, 3, 40, 20},
+ { 15, 16, 42, 35},
+ { 17, 18, 40, 25},
+ { 18, 2, 45, 30},
+ { 23, 8, 50, 38},
+ { 28, 30, 50, 41},
+ { 33, 35, 60, 42},
+ { 38, 35, 70, 46},
+
+ { 10, 4, 20, 13},
+ { 22, 5, 30, 26},
+ { 23, 3, 35, 27},
+ { 26, 28, 37, 29},
+ { 32, 37, 41, 36},
+ { 33, 22, 43, 40},
+ { 37, 35, 46, 42},
+ { 45, 60, 50, 56},
+
+ { 23, 18, 20, 23},
+ { 30, 30, 30, 26},
+ { 33, 65, 41, 30},
+ { 37, 35, 43, 35},
+ { 40, 30, 46, 50},
+ { 42, 75, 50, 68},
+ { 45, 58, 62, 73},
+ { 49, 48, 70, 200}
+ },
+
+ {
+ /* Hissatsu */
+ { 1, 15, 0, 0},
+ { 3, 10, 0, 0},
+ { 6, 15, 0, 0},
+ { 9, 8, 0, 0},
+ { 10, 12, 0, 0},
+ { 12, 25, 0, 0},
+ { 14, 7, 0, 0},
+ { 17, 20, 0, 0},
+
+ { 19, 10, 0, 0},
+ { 22, 20, 0, 0},
+ { 24, 30, 0, 0},
+ { 25, 10, 0, 0},
+ { 27, 15, 0, 0},
+ { 29, 45, 0, 0},
+ { 32, 70, 0, 0},
+ { 35, 50, 0, 0},
+
+ { 18, 40, 0, 0},
+ { 22, 22, 0, 0},
+ { 24, 30, 0, 0},
+ { 26, 35, 0, 0},
+ { 30, 30, 0, 0},
+ { 32, 60, 0, 0},
+ { 36, 40, 0, 0},
+ { 39, 80, 0, 0},
+
+ { 26, 20, 0, 0},
+ { 29, 40, 0, 0},
+ { 31, 35, 0, 0},
+ { 36, 80, 0, 0},
+ { 39, 100, 0, 0},
+ { 42, 110, 0, 0},
+ { 45, 130, 0, 0},
+ { 50, 255, 0, 0}
+ },
+
+ {
+ /* Hex */
+ { 1, 2, 20, 2},
+ { 1, 2, 20, 2},
+ { 3, 2, 30, 3},
+ { 5, 3, 30, 4},
+ { 7, 3, 40, 6},
+ { 8, 10, 60, 8},
+ { 9, 3, 30, 10},
+ { 10, 5, 40, 12},
+
+ { 12, 8, 40, 15},
+ { 12, 9, 35, 15},
+ { 15, 10, 50, 20},
+ { 20, 12, 45, 35},
+ { 25, 15, 50, 50},
+ { 30, 12, 60, 70},
+ { 35, 10, 60, 80},
+ { 40, 16, 70, 100},
+
+ { 15, 8, 20, 20},
+ { 18, 15, 50, 20},
+ { 22, 10, 65, 35},
+ { 25, 28, 70, 50},
+ { 28, 10, 70, 60},
+ { 30, 20, 60, 60},
+ { 36, 22, 70, 80},
+ { 40, 28, 70, 100},
+
+ { 5, 6, 35, 5},
+ { 22, 24, 70, 40},
+ { 25, 2, 65, 50},
+ { 32, 20, 50, 70},
+ { 35, 35, 70, 80},
+ { 38, 32, 70, 90},
+ { 42, 24, 70, 120},
+ { 46, 45, 80, 200}
+ },
+};
+
/*!
POSITION x, y;
int num;
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- if (is_mirror_grid(&grid_array[y][x])) {
+ if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x])) {
mirror_y[mirror_num] = y;
mirror_x[mirror_num] = x;
mirror_num++;
*next_x = curx + randint0(5) - 2;
return;
}
-
-/*!
- * @brief 万色表現用にランダムな色を選択する関数 /
- * Get a legal "multi-hued" color for drawing "spells"
- * @param max 色IDの最大値
- * @return 選択した色ID
- */
-static TERM_COLOR mh_attr(int max)
-{
- switch (randint1(max))
- {
- case 1: return (TERM_RED);
- case 2: return (TERM_GREEN);
- case 3: return (TERM_BLUE);
- case 4: return (TERM_YELLOW);
- case 5: return (TERM_ORANGE);
- case 6: return (TERM_VIOLET);
- case 7: return (TERM_L_RED);
- case 8: return (TERM_L_GREEN);
- case 9: return (TERM_L_BLUE);
- case 10: return (TERM_UMBER);
- case 11: return (TERM_L_UMBER);
- case 12: return (TERM_SLATE);
- case 13: return (TERM_WHITE);
- case 14: return (TERM_L_WHITE);
- case 15: return (TERM_L_DARK);
- }
-
- return (TERM_WHITE);
-}
-
-
-/*!
- * @brief 魔法属性に応じたエフェクトの色を返す /
- * Return a color to use for the bolt/ball spells
- * @param type 魔法属性
- * @return 対応する色ID
- */
-static TERM_COLOR spell_color(int type)
-{
- /* Check if A.B.'s new graphics should be used (rr9) */
- if (streq(ANGBAND_GRAF, "new") || streq(ANGBAND_GRAF, "ne2"))
- {
- /* Analyze */
- switch (type)
- {
- case GF_PSY_SPEAR: return (0x06);
- case GF_MISSILE: return (0x0F);
- case GF_ACID: return (0x04);
- case GF_ELEC: return (0x02);
- case GF_FIRE: return (0x00);
- case GF_COLD: return (0x01);
- case GF_POIS: return (0x03);
- case GF_HOLY_FIRE: return (0x00);
- case GF_HELL_FIRE: return (0x00);
- case GF_MANA: return (0x0E);
- /* by henkma */
- case GF_SEEKER: return (0x0E);
- case GF_SUPER_RAY: return (0x0E);
-
- case GF_ARROW: return (0x0F);
- case GF_WATER: return (0x04);
- case GF_NETHER: return (0x07);
- case GF_CHAOS: return (mh_attr(15));
- case GF_DISENCHANT: return (0x05);
- case GF_NEXUS: return (0x0C);
- case GF_CONFUSION: return (mh_attr(4));
- case GF_SOUND: return (0x09);
- case GF_SHARDS: return (0x08);
- case GF_FORCE: return (0x09);
- case GF_INERTIAL: return (0x09);
- case GF_GRAVITY: return (0x09);
- case GF_TIME: return (0x09);
- case GF_LITE_WEAK: return (0x06);
- case GF_LITE: return (0x06);
- case GF_DARK_WEAK: return (0x07);
- case GF_DARK: return (0x07);
- case GF_PLASMA: return (0x0B);
- case GF_METEOR: return (0x00);
- case GF_ICE: return (0x01);
- case GF_ROCKET: return (0x0F);
- case GF_DEATH_RAY: return (0x07);
- case GF_NUKE: return (mh_attr(2));
- case GF_DISINTEGRATE: return (0x05);
- case GF_PSI:
- case GF_PSI_DRAIN:
- case GF_TELEKINESIS:
- case GF_DOMINATION:
- case GF_DRAIN_MANA:
- case GF_MIND_BLAST:
- case GF_BRAIN_SMASH:
- return (0x09);
- case GF_CAUSE_1:
- case GF_CAUSE_2:
- case GF_CAUSE_3:
- case GF_CAUSE_4: return (0x0E);
- case GF_HAND_DOOM: return (0x07);
- case GF_CAPTURE : return (0x0E);
- case GF_IDENTIFY: return (0x01);
- case GF_ATTACK: return (0x0F);
- case GF_PHOTO : return (0x06);
- }
- }
- /* Normal tiles or ASCII */
- else
- {
- TERM_COLOR a;
- SYMBOL_CODE c;
-
- /* Lookup the default colors for this type */
- concptr s = quark_str(gf_color[type]);
-
- if (!s) return (TERM_WHITE);
-
- /* Pick a random color */
- c = s[randint0(strlen(s))];
-
- /* Lookup this color */
- a = my_strchr(color_char, c) - color_char;
-
- /* Invalid color (note check for < 0 removed, gave a silly
- * warning because bytes are always >= 0 -- RG) */
- if (a > 15) return (TERM_WHITE);
-
- /* Use this color */
- return (a);
- }
-
- /* Standard "color" */
- return (TERM_WHITE);
-}
-
-
-/*!
- * @brief 始点から終点にかけた方向毎にボルトのキャラクタを返す /
- * Find the attr/char pair to use for a spell effect
- * @param y 始点Y座標
- * @param x 始点X座標
- * @param ny 終点Y座標
- * @param nx 終点X座標
- * @param typ 魔法の効果属性
- * @return 方向キャラID
- * @details
- * <pre>
- * It is moving (or has moved) from (x,y) to (nx,ny).
- * If the distance is not "one", we (may) return "*".
- * </pre>
- */
-u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ)
-{
- int base;
-
- byte k;
-
- TERM_COLOR a;
- SYMBOL_CODE c;
-
- /* No motion (*) */
- if ((ny == y) && (nx == x)) base = 0x30;
-
- /* Vertical (|) */
- else if (nx == x) base = 0x40;
-
- /* Horizontal (-) */
- else if (ny == y) base = 0x50;
-
- /* Diagonal (/) */
- else if ((ny - y) == (x - nx)) base = 0x60;
-
- /* Diagonal (\) */
- else if ((ny - y) == (nx - x)) base = 0x70;
-
- /* Weird (*) */
- else base = 0x30;
-
- /* Basic spell color */
- k = spell_color(typ);
-
- /* Obtain attr/char */
- a = misc_to_attr[base + k];
- c = misc_to_char[base + k];
-
- /* Create pict */
- return (PICT(a, c));
-}
-
/*
*/
static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
{
- grid_type *g_ptr = &grid_array[y][x];
+ grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
bool obvious = FALSE;
/* Locked doors are unlocked */
if (is_closed_door(g_ptr->feat) && f_ptr->power && have_flag(f_ptr->flags, FF_OPEN))
{
- s16b old_feat = g_ptr->feat;
+ FEAT_IDX old_feat = g_ptr->feat;
/* Unlock the door */
cave_alter_feat(y, x, FF_DISARM);
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (player_bold(y, x)) set_superstealth(FALSE);
+ if (player_bold(y, x)) set_superstealth(p_ptr, FALSE);
}
}
case GF_DARK_WEAK:
case GF_DARK:
{
- bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(g_ptr);
+ bool do_dark = !p_ptr->phase_out && !is_mirror_grid(g_ptr);
int j;
/* Turn off the light. */
if (do_dark)
{
- if (dun_level || !is_daytime())
+ if (current_floor_ptr->dun_level || !is_daytime())
{
for (j = 0; j < 9; j++)
{
if (in_bounds2(by, bx))
{
- grid_type *cc_ptr = &grid_array[by][bx];
+ grid_type *cc_ptr = ¤t_floor_ptr->grid_array[by][bx];
if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
{
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
break;
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
break;
*/
static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
{
- grid_type *g_ptr = &grid_array[y][x];
+ grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
OBJECT_IDX this_o_idx, next_o_idx = 0;
/* Scan all objects in the grid */
for (this_o_idx = g_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
- object_type *o_ptr = &o_list[this_o_idx];
+ object_type *o_ptr = ¤t_floor_ptr->o_list[this_o_idx];
bool is_art = FALSE;
bool ignore = FALSE;
/* Get the "plural"-ness */
bool plural = (o_ptr->number > 1);
#endif
-
- /* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
object_flags(o_ptr, flgs);
int i;
BIT_FLAGS mode = 0L;
- if (!who || is_pet(&m_list[who]))
+ if (!who || is_pet(¤t_floor_ptr->m_list[who]))
mode |= PM_FORCE_PET;
for (i = 0; i < o_ptr->number ; i++)
{
int tmp;
- grid_type *g_ptr = &grid_array[y][x];
+ grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
- monster_type *m_ptr = &m_list[g_ptr->m_idx];
- monster_type *caster_ptr = (who > 0) ? &m_list[who] : NULL;
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[g_ptr->m_idx];
+ monster_type *caster_ptr = (who > 0) ? ¤t_floor_ptr->m_list[who] : NULL;
monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool obvious = FALSE;
/* Can the player know about this effect? */
- bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->inside_battle);
+ bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->phase_out);
/* Were the effects "irrelevant"? */
bool skipped = FALSE;
/* Assume a default death */
concptr note_dies = extract_note_dies(real_r_idx(m_ptr));
- POSITION ty = m_ptr->fy;
- POSITION tx = m_ptr->fx;
-
DEPTH caster_lev = (who > 0) ? r_info[caster_ptr->r_idx].level : (p_ptr->lev * 2);
/* Nobody here */
if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
- /* Analyze the damage type */
- switch (typ)
+ if (r_ptr->flagsr & RFR_RES_ALL &&
+ typ != GF_OLD_CLONE && typ != GF_STAR_HEAL && typ != GF_OLD_HEAL
+ && typ != GF_OLD_SPEED && typ != GF_CAPTURE && typ != GF_PHOTO)
{
- /* Magic Missile -- pure damage */
- case GF_MISSILE:
+ note = _("には完全な耐性がある!", " is immune.");
+ dam = 0;
+ if(is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if(typ == GF_LITE_WEAK || typ == GF_KILL_WALL) skipped = TRUE;
+ }
+ else
+ {
+ /* Analyze the damage type */
+ switch (typ)
{
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Magic Missile -- pure damage */
+ case GF_MISSILE:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
break;
}
- break;
- }
-
- /* Acid */
- case GF_ACID:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Acid */
+ case GF_ACID:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_ACID)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_ACID);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_ACID)
- {
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_ACID);
- }
- break;
- }
-
- /* Electricity */
- case GF_ELEC:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Electricity */
+ case GF_ELEC:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_ELEC)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_ELEC);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_ELEC)
+
+ /* Fire damage */
+ case GF_FIRE:
{
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_ELEC);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_FIRE)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_FIRE);
+ }
+ else if (r_ptr->flags3 & (RF3_HURT_FIRE))
+ {
+ note = _("はひどい痛手をうけた。", " is hit hard.");
+ dam *= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_FIRE);
+ }
+ break;
}
- break;
- }
-
- /* Fire damage */
- case GF_FIRE:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Cold */
+ case GF_COLD:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_COLD)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_COLD);
+ }
+ else if (r_ptr->flags3 & (RF3_HURT_COLD))
+ {
+ note = _("はひどい痛手をうけた。", " is hit hard.");
+ dam *= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_COLD);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_FIRE)
+
+ /* Poison */
+ case GF_POIS:
{
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_FIRE);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_POIS)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_POIS);
+ }
+ break;
}
- else if (r_ptr->flags3 & (RF3_HURT_FIRE))
+
+ /* Nuclear waste */
+ case GF_NUKE:
{
- note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_FIRE);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_IM_POIS)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_POIS);
+ }
+ else if (one_in_(3)) do_poly = TRUE;
+ break;
}
- break;
- }
- /* Cold */
- case GF_COLD:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Hellfire -- hurts Evil */
+ case GF_HELL_FIRE:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags3 & RF3_GOOD)
+ {
+ note = _("はひどい痛手をうけた。", " is hit hard.");
+ dam *= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_COLD)
+
+ /* Holy Fire -- hurts Evil, Good are immune, others _resist_ */
+ case GF_HOLY_FIRE:
{
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_COLD);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags3 & RF3_EVIL)
+ {
+ dam *= 2;
+ note = _("はひどい痛手をうけた。", " is hit hard.");
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_EVIL;
+ }
+ else
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ }
+ break;
}
- else if (r_ptr->flags3 & (RF3_HURT_COLD))
+
+ /* Arrow -- XXX no defense */
+ case GF_ARROW:
{
- note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_COLD);
+ if (seen) obvious = TRUE;
+ break;
}
- break;
- }
-
- /* Poison */
- case GF_POIS:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Plasma -- XXX perhaps check ELEC or FIRE */
+ case GF_PLASMA:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_PLAS)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_PLAS);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_POIS)
+
+ /* Nether -- see above */
+ case GF_NETHER:
{
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_POIS);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_NETH)
+ {
+ if (r_ptr->flags3 & RF3_UNDEAD)
+ {
+ note = _("には完全な耐性がある!", " is immune.");
+ dam = 0;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ }
+ else
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ }
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_NETH);
+ }
+ else if (r_ptr->flags3 & RF3_EVIL)
+ {
+ note = _("はいくらか耐性を示した。", " resists somewhat.");
+ dam /= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
+ }
+ break;
}
- break;
- }
-
- /* Nuclear waste */
- case GF_NUKE:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Water (acid) damage -- Water spirits/elementals are immune */
+ case GF_WATER:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_WATE)
+ {
+ if ((m_ptr->r_idx == MON_WATER_ELEM) || (m_ptr->r_idx == MON_UNMAKER))
+ {
+ note = _("には完全な耐性がある!", " is immune.");
+ dam = 0;
+ }
+ else
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ }
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_WATE);
+ }
break;
}
- if (r_ptr->flagsr & RFR_IM_POIS)
+
+ /* Chaos -- Chaos breathers resist */
+ case GF_CHAOS:
{
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_POIS);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_CHAO)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_CHAO);
+ }
+ else if ((r_ptr->flags3 & RF3_DEMON) && one_in_(3))
+ {
+ note = _("はいくらか耐性を示した。", " resists somewhat.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_DEMON);
+ }
+ else
+ {
+ do_poly = TRUE;
+ do_conf = (5 + randint1(11) + r) / (r + 1);
+ }
+ break;
}
- else if (one_in_(3)) do_poly = TRUE;
- break;
- }
-
- /* Hellfire -- hurts Evil */
- case GF_HELL_FIRE:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Shards -- Shard breathers resist */
+ case GF_SHARDS:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_SHAR)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SHAR);
+ }
break;
}
- if (r_ptr->flags3 & RF3_GOOD)
+
+ /* Rocket: Shard resistance helps */
+ case GF_ROCKET:
{
- note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_SHAR)
+ {
+ note = _("はいくらか耐性を示した。", " resists somewhat.");
+ dam /= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SHAR);
+ }
+ break;
}
- break;
- }
- /* Holy Fire -- hurts Evil, Good are immune, others _resist_ */
- case GF_HOLY_FIRE:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Sound -- Sound breathers resist */
+ case GF_SOUND:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_SOUN)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 2; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SOUN);
+ }
+ else do_stun = (10 + randint1(15) + r) / (r + 1);
break;
}
- if (r_ptr->flags3 & RF3_GOOD)
+
+ /* Confusion */
+ case GF_CONFUSION:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_GOOD;
- }
- else if (r_ptr->flags3 & RF3_EVIL)
- {
- dam *= 2;
- note = _("はひどい痛手をうけた。", " is hit hard.");
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= RF3_EVIL;
- }
- else
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags3 & RF3_NO_CONF)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
+ }
+ else do_conf = (10 + randint1(15) + r) / (r + 1);
+ break;
}
- break;
- }
- /* Arrow -- XXX no defense */
- case GF_ARROW:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Disenchantment -- Breathers and Disenchanters resist */
+ case GF_DISENCHANT:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_DISE)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_DISE);
+ }
break;
}
- break;
- }
-
- /* Plasma -- XXX perhaps check ELEC or FIRE */
- case GF_PLASMA:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Nexus -- Breathers and Existers resist */
+ case GF_NEXUS:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_NEXU)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_NEXU);
+ }
break;
}
- if (r_ptr->flagsr & RFR_RES_PLAS)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_PLAS);
- }
- break;
- }
-
- /* Nether -- see above */
- case GF_NETHER:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Force */
+ case GF_FORCE:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_WALL)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_WALL);
+ }
+ else do_stun = (randint1(15) + r) / (r + 1);
break;
}
- if (r_ptr->flagsr & RFR_RES_NETH)
+
+ /* Inertia -- breathers resist */
+ case GF_INERTIAL:
{
- if (r_ptr->flags3 & RF3_UNDEAD)
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_INER)
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_INER);
}
else
{
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
+ /* Powerful monsters can resist */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ obvious = FALSE;
+ }
+ /* Normal monsters slow down */
+ else
+ {
+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
+ {
+ note = _("の動きが遅くなった。", " starts moving slower.");
+ }
+ }
}
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_NETH);
- }
- else if (r_ptr->flags3 & RF3_EVIL)
- {
- note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam /= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
+ break;
}
- break;
- }
-
- /* Water (acid) damage -- Water spirits/elementals are immune */
- case GF_WATER:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Time -- breathers resist */
+ case GF_TIME:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_TIME)
+ {
+ note = _("には耐性がある。", " resists.");
+ dam *= 3; dam /= randint1(6) + 6;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_TIME);
+ }
+ else do_time = (dam + 1) / 2;
break;
}
- if (r_ptr->flagsr & RFR_RES_WATE)
+
+ /* Gravity -- breathers resist */
+ case GF_GRAVITY:
{
- if ((m_ptr->r_idx == MON_WATER_ELEM) || (m_ptr->r_idx == MON_UNMAKER))
+ bool resist_tele = FALSE;
+
+ if (seen) obvious = TRUE;
+ if (r_ptr->flagsr & RFR_RES_TELE)
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
+ if (r_ptr->flags1 & (RF1_UNIQUE))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には効果がなかった。", " is unaffected!");
+ resist_tele = TRUE;
+ }
+ else if (r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には耐性がある!", " resists!");
+ resist_tele = TRUE;
+ }
}
- else
+
+ if (!resist_tele) do_dist = 10;
+ else do_dist = 0;
+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
+
+ if (r_ptr->flagsr & RFR_RES_GRAV)
{
- note = _("には耐性がある。", " resists.");
+ note = _("には耐性がある!", " resists!");
dam *= 3; dam /= randint1(6) + 6;
+ do_dist = 0;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_GRAV);
}
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_WATE);
- }
- break;
- }
+ else
+ {
+ /* 1. slowness */
+ /* Powerful monsters can resist */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ obvious = FALSE;
+ }
+ /* Normal monsters slow down */
+ else
+ {
+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
+ {
+ note = _("の動きが遅くなった。", " starts moving slower.");
+ }
+ }
- /* Chaos -- Chaos breathers resist */
- case GF_CHAOS:
- {
- if (seen) obvious = TRUE;
+ /* 2. stun */
+ do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Resist */
+ do_stun = 0;
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected!");
+ obvious = FALSE;
+ }
+ }
break;
}
- if (r_ptr->flagsr & RFR_RES_CHAO)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_CHAO);
- }
- else if ((r_ptr->flags3 & RF3_DEMON) && one_in_(3))
- {
- note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_DEMON);
- }
- else
- {
- do_poly = TRUE;
- do_conf = (5 + randint1(11) + r) / (r + 1);
- }
- break;
- }
-
- /* Shards -- Shard breathers resist */
- case GF_SHARDS:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Pure damage */
+ case GF_MANA:
+ case GF_SEEKER:
+ case GF_SUPER_RAY:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
break;
}
- if (r_ptr->flagsr & RFR_RES_SHAR)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SHAR);
- }
- break;
- }
- /* Rocket: Shard resistance helps */
- case GF_ROCKET:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Pure damage */
+ case GF_DISINTEGRATE:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags3 & RF3_HURT_ROCK)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
+ note = _("の皮膚がただれた!", " loses some skin!");
+ note_dies = _("は蒸発した!", " evaporates!");
+ dam *= 2;
+ }
break;
}
- if (r_ptr->flagsr & RFR_RES_SHAR)
+
+ case GF_PSI:
{
- note = _("はいくらか耐性を示した。", " resists somewhat.");
- dam /= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SHAR);
- }
- break;
- }
+ if (seen) obvious = TRUE;
+ /* PSI only works if the monster can see you! -- RG */
+ if (!(los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)))
+ {
+ if (seen_msg)
+ msg_format(_("%sはあなたが見えないので影響されない!", "%^s can't see you, and isn't affected!"), m_name);
+ skipped = TRUE;
+ break;
+ }
+ if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ dam = 0;
+ note = _("には完全な耐性がある!", " is immune.");
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- /* Sound -- Sound breathers resist */
- case GF_SOUND:
- {
- if (seen) obvious = TRUE;
+ }
+ else if ((r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
+ (r_ptr->flags3 & RF3_ANIMAL) ||
+ (r_ptr->level > randint1(3 * dam)))
+ {
+ note = _("には耐性がある!", " resists!");
+ dam /= 3;
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_SOUN)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 2; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_SOUN);
- }
- else do_stun = (10 + randint1(15) + r) / (r + 1);
- break;
- }
+ /*
+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (r_ptr->level > p_ptr->lev / 2) &&
+ one_in_(2))
+ {
+ note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), m_name);
- /* Confusion */
- case GF_CONFUSION:
- {
- if (seen) obvious = TRUE;
+ /* Saving throw */
+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
+ {
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ }
+ else
+ {
+ /* Injure +/- confusion */
+ monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
+ take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
+ if (one_in_(4) && !CHECK_MULTISHADOW(p_ptr))
+ {
+ switch (randint1(4))
+ {
+ case 1:
+ set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
+ break;
+ case 2:
+ set_stun(p_ptr, p_ptr->stun + randint1(dam));
+ break;
+ case 3:
+ {
+ if (r_ptr->flags3 & RF3_NO_FEAR)
+ note = _("には効果がなかった。", " is unaffected.");
+ else
+ set_afraid(p_ptr, p_ptr->afraid + 3 + randint1(dam));
+ break;
+ }
+ default:
+ if (!p_ptr->free_act)
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint1(dam));
+ break;
+ }
+ }
+ }
+ dam = 0;
+ }
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if ((dam > 0) && one_in_(4))
+ {
+ switch (randint1(4))
+ {
+ case 1:
+ do_conf = 3 + randint1(dam);
+ break;
+ case 2:
+ do_stun = 3 + randint1(dam);
+ break;
+ case 3:
+ do_fear = 3 + randint1(dam);
+ break;
+ default:
+ note = _("は眠り込んでしまった!", " falls asleep!");
+ do_sleep = 3 + randint1(dam);
+ break;
+ }
+ }
+
+ note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
break;
}
- if (r_ptr->flags3 & RF3_NO_CONF)
+
+ case GF_PSI_DRAIN:
{
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
- else do_conf = (10 + randint1(15) + r) / (r + 1);
- break;
- }
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ dam = 0;
+ note = _("には完全な耐性がある!", " is immune.");
+ }
+ else if ((r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
+ (r_ptr->flags3 & RF3_ANIMAL) ||
+ (r_ptr->level > randint1(3 * dam)))
+ {
+ note = _("には耐性がある!", " resists!");
+ dam /= 3;
- /* Disenchantment -- Breathers and Disenchanters resist */
- case GF_DISENCHANT:
- {
- if (seen) obvious = TRUE;
+ /*
+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (r_ptr->level > p_ptr->lev / 2) &&
+ (one_in_(2)))
+ {
+ note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), m_name);
+ /* Saving throw */
+ if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
+ {
+ msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
+ }
+ else
+ {
+ /* Injure + mana drain */
+ monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
+ if (!CHECK_MULTISHADOW(p_ptr))
+ {
+ msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
+ p_ptr->csp -= damroll(5, dam) / 2;
+ if (p_ptr->csp < 0) p_ptr->csp = 0;
+ p_ptr->redraw |= PR_MANA;
+ p_ptr->window |= (PW_SPELL);
+ }
+ take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
+ }
+ dam = 0;
+ }
+ }
+ else if (dam > 0)
+ {
+ int b = damroll(5, dam) / 4;
+ concptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
+ concptr msg = _("あなたは%sの苦痛を%sに変換した!",
+ (seen ? "You convert %s's pain into %s!" :
+ "You convert %ss pain into %s!"));
+ msg_format(msg, m_name, str);
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ b = MIN(p_ptr->msp, p_ptr->csp + b);
+ p_ptr->csp = b;
+ p_ptr->redraw |= PR_MANA;
+ p_ptr->window |= (PW_SPELL);
+ }
+ note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
break;
}
- if (r_ptr->flagsr & RFR_RES_DISE)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_DISE);
- }
- break;
- }
-
- /* Nexus -- Breathers and Existers resist */
- case GF_NEXUS:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ case GF_TELEKINESIS:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_NEXU)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_NEXU);
- }
- break;
- }
-
- /* Force */
- case GF_FORCE:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_WALL)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_WALL);
- }
- else do_stun = (randint1(15) + r) / (r + 1);
- break;
- }
-
- /* Inertia -- breathers resist */
- case GF_INERTIAL:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_INER)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_INER);
- }
- else
- {
- /* Powerful monsters can resist */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- obvious = FALSE;
- }
- /* Normal monsters slow down */
- else
- {
- if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
- {
- note = _("の動きが遅くなった。", " starts moving slower.");
- }
- }
- }
- break;
- }
-
- /* Time -- breathers resist */
- case GF_TIME:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_TIME)
- {
- note = _("には耐性がある。", " resists.");
- dam *= 3; dam /= randint1(6) + 6;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_TIME);
- }
- else do_time = (dam + 1) / 2;
- break;
- }
-
- /* Gravity -- breathers resist */
- case GF_GRAVITY:
- {
- bool resist_tele = FALSE;
-
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flagsr & RFR_RES_TELE)
- {
- if (r_ptr->flags1 & (RF1_UNIQUE))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には効果がなかった。", " is unaffected!");
- resist_tele = TRUE;
- }
- else if (r_ptr->level > randint1(100))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には耐性がある!", " resists!");
- resist_tele = TRUE;
- }
- }
-
- if (!resist_tele) do_dist = 10;
- else do_dist = 0;
- if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
-
- if (r_ptr->flagsr & RFR_RES_GRAV)
- {
- note = _("には耐性がある!", " resists!");
- dam *= 3; dam /= randint1(6) + 6;
- do_dist = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_GRAV);
- }
- else
- {
- /* 1. slowness */
- /* Powerful monsters can resist */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- obvious = FALSE;
- }
- /* Normal monsters slow down */
- else
+ if (seen) obvious = TRUE;
+ if (one_in_(4))
{
- if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
- {
- note = _("の動きが遅くなった。", " starts moving slower.");
- }
+ if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
+ else do_dist = 7;
}
- /* 2. stun */
- do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
+ /* 1. stun */
+ do_stun = damroll((caster_lev / 20) + 3 , dam) + 1;
/* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->level > 5 + randint1(dam)))
{
/* Resist */
do_stun = 0;
/* No obvious effect */
- note = _("には効果がなかった。", " is unaffected!");
obvious = FALSE;
}
- }
- break;
- }
-
- /* Pure damage */
- case GF_MANA:
- case GF_SEEKER:
- case GF_SUPER_RAY:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- break;
- }
-
-
- /* Pure damage */
- case GF_DISINTEGRATE:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- if (r_ptr->flags3 & RF3_HURT_ROCK)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
- note = _("の皮膚がただれた!", " loses some skin!");
- note_dies = _("は蒸発した!", " evaporates!");
- dam *= 2;
- }
- break;
- }
-
- case GF_PSI:
- {
- if (seen) obvious = TRUE;
- /* PSI only works if the monster can see you! -- RG */
- if (!(los(m_ptr->fy, m_ptr->fx, p_ptr->y, p_ptr->x)))
+ /* Psycho-spear -- powerful magic missile */
+ case GF_PSY_SPEAR:
{
- if (seen_msg)
- msg_format(_("%sはあなたが見えないので影響されない!", "%^s can't see you, and isn't affected!"), m_name);
- skipped = TRUE;
+ if (seen) obvious = TRUE;
break;
}
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Meteor -- powerful magic missile */
+ case GF_METEOR:
{
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
break;
}
- if (r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- dam = 0;
- note = _("には完全な耐性がある!", " is immune.");
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- }
- else if ((r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
- (r_ptr->flags3 & RF3_ANIMAL) ||
- (r_ptr->level > randint1(3 * dam)))
+ case GF_DOMINATION:
{
- note = _("には耐性がある!", " resists!");
- dam /= 3;
-
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (r_ptr->level > p_ptr->lev / 2) &&
- one_in_(2))
+ if (!is_hostile(m_ptr)) break;
+ if (seen) obvious = TRUE;
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) ||
+ (r_ptr->flags3 & RF3_NO_CONF) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
{
- note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), m_name);
-
- /* Saving throw */
- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ /* Memorize a flag */
+ if (r_ptr->flags3 & RF3_NO_CONF)
{
- msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
- else
+
+ /* Resist */
+ do_conf = 0;
+
+ /*
+ * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
+ * attacks back on them
+ */
+ if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
+ (r_ptr->level > p_ptr->lev / 2) &&
+ (one_in_(2)))
{
- /* Injure +/- confusion */
- monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
- take_hit(DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
- if (one_in_(4) && !CHECK_MULTISHADOW())
+ note = NULL;
+ msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
+ (seen ? "%^s's corrupted mind backlashes your attack!" :
+ "%^ss corrupted mind backlashes your attack!")), m_name);
+
+ /* Saving throw */
+ if (randint0(100 + r_ptr->level/2) < p_ptr->skill_sav)
+ {
+ msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
+ }
+ else
{
+ /* Confuse, stun, terrify */
switch (randint1(4))
{
case 1:
- set_confused(p_ptr->confused + 3 + randint1(dam));
+ set_stun(p_ptr, p_ptr->stun + dam / 2);
break;
case 2:
- set_stun(p_ptr->stun + randint1(dam));
+ set_confused(p_ptr, p_ptr->confused + dam / 2);
break;
- case 3:
+ default:
{
if (r_ptr->flags3 & RF3_NO_FEAR)
note = _("には効果がなかった。", " is unaffected.");
else
- set_afraid(p_ptr->afraid + 3 + randint1(dam));
- break;
+ set_afraid(p_ptr, p_ptr->afraid + dam);
}
- default:
- if (!p_ptr->free_act)
- (void)set_paralyzed(p_ptr->paralyzed + randint1(dam));
- break;
}
}
}
- dam = 0;
+ else
+ {
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
}
- }
-
- if ((dam > 0) && one_in_(4))
- {
- switch (randint1(4))
+ else
{
- case 1:
- do_conf = 3 + randint1(dam);
- break;
- case 2:
- do_stun = 3 + randint1(dam);
- break;
- case 3:
- do_fear = 3 + randint1(dam);
- break;
- default:
- note = _("は眠り込んでしまった!", " falls asleep!");
- do_sleep = 3 + randint1(dam);
- break;
- }
- }
-
- note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- break;
- }
-
- case GF_PSI_DRAIN:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- dam = 0;
- note = _("には完全な耐性がある!", " is immune.");
- }
- else if ((r_ptr->flags2 & (RF2_STUPID | RF2_WEIRD_MIND)) ||
- (r_ptr->flags3 & RF3_ANIMAL) ||
- (r_ptr->level > randint1(3 * dam)))
- {
- note = _("には耐性がある!", " resists!");
- dam /= 3;
-
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (r_ptr->level > p_ptr->lev / 2) &&
- (one_in_(2)))
- {
- note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), m_name);
- /* Saving throw */
- if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if (!common_saving_throw_charm(p_ptr, dam, m_ptr))
{
- msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
+ note = _("があなたに隷属した。", " is in your thrall!");
+ set_pet(m_ptr);
}
else
{
- /* Injure + mana drain */
- monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
- if (!CHECK_MULTISHADOW())
+ switch (randint1(4))
{
- msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
- p_ptr->csp -= damroll(5, dam) / 2;
- if (p_ptr->csp < 0) p_ptr->csp = 0;
- p_ptr->redraw |= PR_MANA;
- p_ptr->window |= (PW_SPELL);
+ case 1:
+ do_stun = dam / 2;
+ break;
+ case 2:
+ do_conf = dam / 2;
+ break;
+ default:
+ do_fear = dam;
}
- take_hit(DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
}
- dam = 0;
- }
- }
- else if (dam > 0)
- {
- int b = damroll(5, dam) / 4;
- concptr str = (p_ptr->pclass == CLASS_MINDCRAFTER) ? _("超能力パワー", "psychic energy") : _("魔力", "mana");
- concptr msg = _("あなたは%sの苦痛を%sに変換した!",
- (seen ? "You convert %s's pain into %s!" :
- "You convert %ss pain into %s!"));
- msg_format(msg, m_name, str);
-
- b = MIN(p_ptr->msp, p_ptr->csp + b);
- p_ptr->csp = b;
- p_ptr->redraw |= PR_MANA;
- p_ptr->window |= (PW_SPELL);
- }
- note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- break;
- }
-
- case GF_TELEKINESIS:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (one_in_(4))
- {
- if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_dist = 0;
- else do_dist = 7;
- }
-
- /* 1. stun */
- do_stun = damroll((caster_lev / 20) + 3 , dam) + 1;
-
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->level > 5 + randint1(dam)))
- {
- /* Resist */
- do_stun = 0;
- /* No obvious effect */
- obvious = FALSE;
- }
- break;
- }
-
- /* Psycho-spear -- powerful magic missile */
- case GF_PSY_SPEAR:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- break;
- }
-
- /* Meteor -- powerful magic missile */
- case GF_METEOR:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- break;
- }
-
- case GF_DOMINATION:
- {
- if (!is_hostile(m_ptr)) break;
-
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) ||
- (r_ptr->flags3 & RF3_NO_CONF) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- /* Memorize a flag */
- if (r_ptr->flags3 & RF3_NO_CONF)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
-
- /* Resist */
- do_conf = 0;
-
- /*
- * Powerful demons & undead can turn a mindcrafter's
- * attacks back on them
- */
- if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
- (r_ptr->level > p_ptr->lev / 2) &&
- (one_in_(2)))
- {
- note = NULL;
- msg_format(_("%^sの堕落した精神は攻撃を跳ね返した!",
- (seen ? "%^s's corrupted mind backlashes your attack!" :
- "%^ss corrupted mind backlashes your attack!")), m_name);
-
- /* Saving throw */
- if (randint0(100 + r_ptr->level/2) < p_ptr->skill_sav)
- {
- msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
- }
- else
- {
- /* Confuse, stun, terrify */
- switch (randint1(4))
- {
- case 1:
- set_stun(p_ptr->stun + dam / 2);
- break;
- case 2:
- set_confused(p_ptr->confused + dam / 2);
- break;
- default:
- {
- if (r_ptr->flags3 & RF3_NO_FEAR)
- note = _("には効果がなかった。", " is unaffected.");
- else
- set_afraid(p_ptr->afraid + dam);
- }
- }
- }
- }
- else
- {
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
- }
- else
- {
- if (!common_saving_throw_charm(p_ptr, dam, m_ptr))
- {
- note = _("があなたに隷属した。", " is in your thrall!");
- set_pet(m_ptr);
- }
- else
- {
- switch (randint1(4))
- {
- case 1:
- do_stun = dam / 2;
- break;
- case 2:
- do_conf = dam / 2;
- break;
- default:
- do_fear = dam;
- }
- }
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
-
- /* Ice -- Cold + Cuts + Stun */
- case GF_ICE:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- do_stun = (randint1(15) + 1) / (r + 1);
- if (r_ptr->flagsr & RFR_IM_COLD)
- {
- note = _("にはかなり耐性がある!", " resists a lot.");
- dam /= 9;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_COLD);
- }
- else if (r_ptr->flags3 & (RF3_HURT_COLD))
- {
- note = _("はひどい痛手をうけた。", " is hit hard.");
- dam *= 2;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_COLD);
- }
- break;
- }
-
-
- /* Drain Life */
- case GF_HYPODYNAMIA:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (!monster_living(m_ptr->r_idx))
- {
- if (is_original_ap_and_seen(m_ptr))
- {
- if (r_ptr->flags3 & RF3_DEMON) r_ptr->r_flags3 |= (RF3_DEMON);
- if (r_ptr->flags3 & RF3_UNDEAD) r_ptr->r_flags3 |= (RF3_UNDEAD);
- if (r_ptr->flags3 & RF3_NONLIVING) r_ptr->r_flags3 |= (RF3_NONLIVING);
- }
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- dam = 0;
- }
- else do_time = (dam+7)/8;
-
- break;
- }
-
- /* Death Ray */
- case GF_DEATH_RAY:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- if (!monster_living(m_ptr->r_idx))
- {
- if (is_original_ap_and_seen(m_ptr))
- {
- if (r_ptr->flags3 & RF3_DEMON) r_ptr->r_flags3 |= (RF3_DEMON);
- if (r_ptr->flags3 & RF3_UNDEAD) r_ptr->r_flags3 |= (RF3_UNDEAD);
- if (r_ptr->flags3 & RF3_NONLIVING) r_ptr->r_flags3 |= (RF3_NONLIVING);
- }
- note = _("には完全な耐性がある!", " is immune.");
- obvious = FALSE;
- dam = 0;
- }
- else if (((r_ptr->flags1 & RF1_UNIQUE) &&
- (randint1(888) != 666)) ||
- (((r_ptr->level + randint1(20)) > randint1((caster_lev / 2) + randint1(10))) &&
- randint1(100) != 66))
- {
- note = _("には耐性がある!", " resists!");
- obvious = FALSE;
- dam = 0;
- }
-
- break;
- }
-
- /* Polymorph monster (Use "dam" as "power") */
- case GF_OLD_POLY:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Attempt to polymorph (see below) */
- do_poly = TRUE;
-
- /* Powerful monsters can resist */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->flags1 & RF1_QUESTOR) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- note = _("には効果がなかった。", " is unaffected.");
- do_poly = FALSE;
- obvious = FALSE;
- }
-
- /* No "real" damage */
- dam = 0;
-
- break;
- }
-
-
- /* Clone monsters (Ignore "dam") */
- case GF_OLD_CLONE:
- {
- if (seen) obvious = TRUE;
-
- if ((p_ptr->inside_arena) || is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
- {
- note = _("には効果がなかった。", " is unaffected.");
- }
- else
- {
- /* Heal fully */
- m_ptr->hp = m_ptr->maxhp;
-
- /* Attempt to clone. */
- if (multiply_monster(g_ptr->m_idx, TRUE, 0L))
- {
- note = _("が分裂した!", " spawns!");
- }
- }
-
- /* No "real" damage */
- dam = 0;
-
- break;
- }
-
-
- /* Heal Monster (use "dam" as amount of healing) */
- case GF_STAR_HEAL:
- {
- if (seen) obvious = TRUE;
-
- /* Wake up */
- (void)set_monster_csleep(g_ptr->m_idx, 0);
-
- if (m_ptr->maxhp < m_ptr->max_maxhp)
- {
- if (seen_msg) msg_format(_("%^sの強さが戻った。", "%^s recovers %s vitality."), m_name, m_poss);
- m_ptr->maxhp = m_ptr->max_maxhp;
- }
-
- if (!dam)
- {
- /* Redraw (later) if needed */
- if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
- break;
- }
-
- /* Fall through */
- }
- case GF_OLD_HEAL:
- {
- if (seen) obvious = TRUE;
-
- /* Wake up */
- (void)set_monster_csleep(g_ptr->m_idx, 0);
- if (MON_STUNNED(m_ptr))
- {
- if (seen_msg) msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), m_name);
- (void)set_monster_stunned(g_ptr->m_idx, 0);
- }
- if (MON_CONFUSED(m_ptr))
- {
- if (seen_msg) msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), m_name);
- (void)set_monster_confused(g_ptr->m_idx, 0);
- }
- if (MON_MONFEAR(m_ptr))
- {
- if (seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
- (void)set_monster_monfear(g_ptr->m_idx, 0);
- }
-
- /* Heal */
- if (m_ptr->hp < 30000) m_ptr->hp += dam;
-
- /* No overflow */
- if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
-
- if (!who)
- {
- chg_virtue(V_VITALITY, 1);
-
- if (r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(V_INDIVIDUALISM, 1);
-
- if (is_friendly(m_ptr))
- chg_virtue(V_HONOUR, 1);
- else if (!(r_ptr->flags3 & RF3_EVIL))
- {
- if (r_ptr->flags3 & RF3_GOOD)
- chg_virtue(V_COMPASSION, 2);
- else
- chg_virtue(V_COMPASSION, 1);
- }
-
- if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
- }
-
- if (m_ptr->r_idx == MON_LEPER)
- {
- heal_leper = TRUE;
- if (!who) chg_virtue(V_COMPASSION, 5);
- }
-
- /* Redraw (later) if needed */
- if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
-
- note = _("は体力を回復したようだ。", " looks healthier.");
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
- /* Speed Monster (Ignore "dam") */
- case GF_OLD_SPEED:
- {
- if (seen) obvious = TRUE;
-
- /* Speed up */
- if (set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100))
- {
- note = _("の動きが速くなった。", " starts moving faster.");
- }
-
- if (!who)
- {
- if (r_ptr->flags1 & RF1_UNIQUE)
- chg_virtue(V_INDIVIDUALISM, 1);
- if (is_friendly(m_ptr))
- chg_virtue(V_HONOUR, 1);
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
- /* Slow Monster (Use "dam" as "power") */
- case GF_OLD_SLOW:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Powerful monsters can resist */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
-
- /* Normal monsters slow down */
- else
- {
- if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
- {
- note = _("の動きが遅くなった。", " starts moving slower.");
- }
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
- /* Sleep (Use "dam" as "power") */
- case GF_OLD_SLEEP:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->flags3 & RF3_NO_SLEEP) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- /* Memorize a flag */
- if (r_ptr->flags3 & RF3_NO_SLEEP)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_SLEEP);
- }
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
- else
- {
- /* Go to sleep (much) later */
- note = _("は眠り込んでしまった!", " falls asleep!");
- do_sleep = 500;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
- /* Sleep (Use "dam" as "power") */
- case GF_STASIS_EVIL:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった!", " is immune.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- !(r_ptr->flags3 & RF3_EVIL) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
- else
- {
- /* Go to sleep (much) later */
- note = _("は動けなくなった!", " is suspended!");
- do_sleep = 500;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
- /* Sleep (Use "dam" as "power") */
- case GF_STASIS:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
- else
- {
- /* Go to sleep (much) later */
- note = _("は動けなくなった!", " is suspended!");
- do_sleep = 500;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
+ }
- /* Charm monster */
- case GF_CHARM:
- {
- int vir;
- vir = virtue_number(V_HARMONY);
- if (vir)
- {
- dam += p_ptr->virtues[vir-1]/10;
+ /* No "real" damage */
+ dam = 0;
+ break;
}
- vir = virtue_number(V_INDIVIDUALISM);
- if (vir)
+ /* Ice -- Cold + Cuts + Stun */
+ case GF_ICE:
{
- dam -= p_ptr->virtues[vir-1]/20;
+ if (seen) obvious = TRUE;
+ do_stun = (randint1(15) + 1) / (r + 1);
+ if (r_ptr->flagsr & RFR_IM_COLD)
+ {
+ note = _("にはかなり耐性がある!", " resists a lot.");
+ dam /= 9;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_IM_COLD);
+ }
+ else if (r_ptr->flags3 & (RF3_HURT_COLD))
+ {
+ note = _("はひどい痛手をうけた。", " is hit hard.");
+ dam *= 2;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_COLD);
+ }
+ break;
}
- if (seen) obvious = TRUE;
-
- /* Attempt a saving throw */
- if (common_saving_throw_charm(p_ptr, dam, m_ptr))
- {
-
- /* Resist */
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (p_ptr->cursed & TRC_AGGRAVATE)
- {
- note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
+ /* Drain Life */
+ case GF_HYPODYNAMIA:
{
- note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
- set_pet(m_ptr);
+ if (seen) obvious = TRUE;
+ if (!monster_living(m_ptr->r_idx))
+ {
+ if (is_original_ap_and_seen(m_ptr))
+ {
+ if (r_ptr->flags3 & RF3_DEMON) r_ptr->r_flags3 |= (RF3_DEMON);
+ if (r_ptr->flags3 & RF3_UNDEAD) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ if (r_ptr->flags3 & RF3_NONLIVING) r_ptr->r_flags3 |= (RF3_NONLIVING);
+ }
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ dam = 0;
+ }
+ else do_time = (dam+7)/8;
- chg_virtue(V_INDIVIDUALISM, -1);
- if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ break;
}
- /* No "real" damage */
- dam = 0;
- break;
- }
-
- /* Control undead */
- case GF_CONTROL_UNDEAD:
- {
- int vir;
- if (seen) obvious = TRUE;
-
- vir = virtue_number(V_UNLIFE);
- if (vir)
+ /* Death Ray */
+ case GF_DEATH_RAY:
{
- dam += p_ptr->virtues[vir-1]/10;
- }
+ if (seen) obvious = TRUE;
+ if (!monster_living(m_ptr->r_idx))
+ {
+ if (is_original_ap_and_seen(m_ptr))
+ {
+ if (r_ptr->flags3 & RF3_DEMON) r_ptr->r_flags3 |= (RF3_DEMON);
+ if (r_ptr->flags3 & RF3_UNDEAD) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ if (r_ptr->flags3 & RF3_NONLIVING) r_ptr->r_flags3 |= (RF3_NONLIVING);
+ }
+ note = _("には完全な耐性がある!", " is immune.");
+ obvious = FALSE;
+ dam = 0;
+ }
+ else if (((r_ptr->flags1 & RF1_UNIQUE) &&
+ (randint1(888) != 666)) ||
+ (((r_ptr->level + randint1(20)) > randint1((caster_lev / 2) + randint1(10))) &&
+ randint1(100) != 66))
+ {
+ note = _("には耐性がある!", " resists!");
+ obvious = FALSE;
+ dam = 0;
+ }
- vir = virtue_number(V_INDIVIDUALISM);
- if (vir)
- {
- dam -= p_ptr->virtues[vir-1]/20;
+ break;
}
- /* Attempt a saving throw */
- if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
- !(r_ptr->flags3 & RF3_UNDEAD))
- {
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (p_ptr->cursed & TRC_AGGRAVATE)
+ /* Polymorph monster (Use "dam" as "power") */
+ case GF_OLD_POLY:
{
- note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(m_ptr);
- }
+ if (seen) obvious = TRUE;
+ /* Attempt to polymorph (see below) */
+ do_poly = TRUE;
- /* No "real" damage */
- dam = 0;
- break;
- }
+ /* Powerful monsters can resist */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags1 & RF1_QUESTOR) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ do_poly = FALSE;
+ obvious = FALSE;
+ }
- /* Control demon */
- case GF_CONTROL_DEMON:
- {
- int vir;
- if (seen) obvious = TRUE;
+ /* No "real" damage */
+ dam = 0;
- vir = virtue_number(V_UNLIFE);
- if (vir)
- {
- dam += p_ptr->virtues[vir-1]/10;
+ break;
}
- vir = virtue_number(V_INDIVIDUALISM);
- if (vir)
- {
- dam -= p_ptr->virtues[vir-1]/20;
- }
- /* Attempt a saving throw */
- if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
- !(r_ptr->flags3 & RF3_DEMON))
- {
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (p_ptr->cursed & TRC_AGGRAVATE)
- {
- note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
+ /* Clone monsters (Ignore "dam") */
+ case GF_OLD_CLONE:
{
- note = _("は既にあなたの奴隷だ!", " is in your thrall!");
- set_pet(m_ptr);
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
+ if (seen) obvious = TRUE;
- /* Tame animal */
- case GF_CONTROL_ANIMAL:
- {
- int vir;
- if (seen) obvious = TRUE;
+ if ((p_ptr->inside_arena) || is_pet(m_ptr) || (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & (RF7_NAZGUL | RF7_UNIQUE2)))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ }
+ else
+ {
+ /* Heal fully */
+ m_ptr->hp = m_ptr->maxhp;
- vir = virtue_number(V_NATURE);
- if (vir)
- {
- dam += p_ptr->virtues[vir-1]/10;
- }
+ /* Attempt to clone. */
+ if (multiply_monster(g_ptr->m_idx, TRUE, 0L))
+ {
+ note = _("が分裂した!", " spawns!");
+ }
+ }
- vir = virtue_number(V_INDIVIDUALISM);
- if (vir)
- {
- dam -= p_ptr->virtues[vir-1]/20;
- }
+ /* No "real" damage */
+ dam = 0;
- /* Attempt a saving throw */
- if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
- !(r_ptr->flags3 & RF3_ANIMAL))
- {
- /* Resist */
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (p_ptr->cursed & TRC_AGGRAVATE)
- {
- note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- note = _("はなついた。", " is tamed!");
- set_pet(m_ptr);
- if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
+ break;
}
- /* No "real" damage */
- dam = 0;
- break;
- }
-
- /* Tame animal */
- case GF_CHARM_LIVING:
- {
- int vir;
-
- vir = virtue_number(V_UNLIFE);
- if (seen) obvious = TRUE;
-
- vir = virtue_number(V_UNLIFE);
- if (vir)
- {
- dam -= p_ptr->virtues[vir-1]/10;
- }
- vir = virtue_number(V_INDIVIDUALISM);
- if (vir)
+ /* Heal Monster (use "dam" as amount of healing) */
+ case GF_STAR_HEAL:
{
- dam -= p_ptr->virtues[vir-1]/20;
- }
-
- msg_format(_("%sを見つめた。", "You stare into %s."), m_name);
+ if (seen) obvious = TRUE;
- /* Attempt a saving throw */
- if (common_saving_throw_charm(p_ptr, dam, m_ptr) ||
- !monster_living(m_ptr->r_idx))
- {
- /* Resist */
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else if (p_ptr->cursed & TRC_AGGRAVATE)
- {
- note = _("はあなたに敵意を抱いている!", " hates you too much!");
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
- }
- else
- {
- note = _("を支配した。", " is tamed!");
- set_pet(m_ptr);
- if (r_ptr->flags3 & RF3_ANIMAL)
- chg_virtue(V_NATURE, 1);
- }
+ /* Wake up */
+ (void)set_monster_csleep(g_ptr->m_idx, 0);
- /* No "real" damage */
- dam = 0;
- break;
- }
+ if (m_ptr->maxhp < m_ptr->max_maxhp)
+ {
+ if (seen_msg) msg_format(_("%^sの強さが戻った。", "%^s recovers %s vitality."), m_name, m_poss);
+ m_ptr->maxhp = m_ptr->max_maxhp;
+ }
- /* Confusion (Use "dam" as "power") */
- case GF_OLD_CONF:
- {
- if (seen) obvious = TRUE;
+ if (!dam)
+ {
+ /* Redraw (later) if needed */
+ if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+ if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
+ break;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
+ /* Fall through */
}
- /* Get confused later */
- do_conf = damroll(3, (dam / 2)) + 1;
-
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags3 & (RF3_NO_CONF)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ case GF_OLD_HEAL:
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
+ if (seen) obvious = TRUE;
+
+ /* Wake up */
+ (void)set_monster_csleep(g_ptr->m_idx, 0);
+ if (MON_STUNNED(m_ptr))
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
+ if (seen_msg) msg_format(_("%^sは朦朧状態から立ち直った。", "%^s is no longer stunned."), m_name);
+ (void)set_monster_stunned(g_ptr->m_idx, 0);
+ }
+ if (MON_CONFUSED(m_ptr))
+ {
+ if (seen_msg) msg_format(_("%^sは混乱から立ち直った。", "%^s is no longer confused."), m_name);
+ (void)set_monster_confused(g_ptr->m_idx, 0);
+ }
+ if (MON_MONFEAR(m_ptr))
+ {
+ if (seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
+ (void)set_monster_monfear(g_ptr->m_idx, 0);
}
- /* Resist */
- do_conf = 0;
-
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
+ /* Heal */
+ if (m_ptr->hp < 30000) m_ptr->hp += dam;
- case GF_STUN:
- {
- if (seen) obvious = TRUE;
+ /* No overflow */
+ if (m_ptr->hp > m_ptr->maxhp) m_ptr->hp = m_ptr->maxhp;
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
- do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
+ if (!who)
+ {
+ chg_virtue(p_ptr, V_VITALITY, 1);
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- /* Resist */
- do_stun = 0;
+ if (r_ptr->flags1 & RF1_UNIQUE)
+ chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- }
+ if (is_friendly(m_ptr))
+ chg_virtue(p_ptr, V_HONOUR, 1);
+ else if (!(r_ptr->flags3 & RF3_EVIL))
+ {
+ if (r_ptr->flags3 & RF3_GOOD)
+ chg_virtue(p_ptr, V_COMPASSION, 2);
+ else
+ chg_virtue(p_ptr, V_COMPASSION, 1);
+ }
- /* No "real" damage */
- dam = 0;
- break;
- }
+ if (r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(p_ptr, V_NATURE, 1);
+ }
+ if (m_ptr->r_idx == MON_LEPER)
+ {
+ heal_leper = TRUE;
+ if (!who) chg_virtue(p_ptr, V_COMPASSION, 5);
+ }
+ /* Redraw (later) if needed */
+ if (p_ptr->health_who == g_ptr->m_idx) p_ptr->redraw |= (PR_HEALTH);
+ if (p_ptr->riding == g_ptr->m_idx) p_ptr->redraw |= (PR_UHEALTH);
+ note = _("は体力を回復したようだ。", " looks healthier.");
- /* Lite, but only hurts susceptible creatures */
- case GF_LITE_WEAK:
- {
- if (!dam)
- {
- skipped = TRUE;
- break;
- }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
+ /* No "real" damage */
dam = 0;
break;
}
- /* Hurt by light */
- if (r_ptr->flags3 & (RF3_HURT_LITE))
+
+
+ /* Speed Monster (Ignore "dam") */
+ case GF_OLD_SPEED:
{
- /* Obvious effect */
if (seen) obvious = TRUE;
- /* Memorize the effects */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
+ /* Speed up */
+ if (set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100))
+ {
+ note = _("の動きが速くなった。", " starts moving faster.");
+ }
- /* Special effect */
- note = _("は光に身をすくめた!", " cringes from the light!");
- note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- }
+ if (!who)
+ {
+ if (r_ptr->flags1 & RF1_UNIQUE)
+ chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
+ if (is_friendly(m_ptr))
+ chg_virtue(p_ptr, V_HONOUR, 1);
+ }
- /* Normally no damage */
- else
- {
- /* No damage */
+ /* No "real" damage */
dam = 0;
+ break;
}
- break;
- }
+ /* Slow Monster (Use "dam" as "power") */
+ case GF_OLD_SLOW:
+ {
+ if (seen) obvious = TRUE;
+ /* Powerful monsters can resist */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
- /* Lite -- opposite of Dark */
- case GF_LITE:
- {
- if (seen) obvious = TRUE;
+ /* Normal monsters slow down */
+ else
+ {
+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
+ {
+ note = _("の動きが遅くなった。", " starts moving slower.");
+ }
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
+ /* No "real" damage */
dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- if (r_ptr->flagsr & RFR_RES_LITE)
- {
- note = _("には耐性がある!", " resists!");
- dam *= 2; dam /= (randint1(6)+6);
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_LITE);
- }
- else if (r_ptr->flags3 & (RF3_HURT_LITE))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
- note = _("は光に身をすくめた!", " cringes from the light!");
- note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- dam *= 2;
- }
- break;
- }
- /* Dark -- opposite of Lite */
- case GF_DARK:
- {
- if (seen) obvious = TRUE;
+ /* Sleep (Use "dam" as "power") */
+ case GF_OLD_SLEEP:
+ {
+ if (seen) obvious = TRUE;
+
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_SLEEP) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Memorize a flag */
+ if (r_ptr->flags3 & RF3_NO_SLEEP)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_SLEEP);
+ }
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
+ else
+ {
+ /* Go to sleep (much) later */
+ note = _("は眠り込んでしまった!", " falls asleep!");
+ do_sleep = 500;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
+ /* No "real" damage */
dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- if (r_ptr->flagsr & RFR_RES_DARK)
- {
- note = _("には耐性がある!", " resists!");
- dam *= 2; dam /= (randint1(6)+6);
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_DARK);
- }
- break;
- }
- /* Stone to Mud */
- case GF_KILL_WALL:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Sleep (Use "dam" as "power") */
+ case GF_STASIS_EVIL:
{
+ if (seen) obvious = TRUE;
+
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ !(r_ptr->flags3 & RF3_EVIL) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
+ else
+ {
+ /* Go to sleep (much) later */
+ note = _("は動けなくなった!", " is suspended!");
+ do_sleep = 500;
+ }
+
+ /* No "real" damage */
dam = 0;
break;
}
- /* Hurt by rock remover */
- if (r_ptr->flags3 & (RF3_HURT_ROCK))
+
+ /* Sleep (Use "dam" as "power") */
+ case GF_STASIS:
{
- /* Notice effect */
if (seen) obvious = TRUE;
- /* Memorize the effects */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
-
- /* Cute little message */
- note = _("の皮膚がただれた!", " loses some skin!");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
+ else
+ {
+ /* Go to sleep (much) later */
+ note = _("は動けなくなった!", " is suspended!");
+ do_sleep = 500;
+ }
- /* Usually, ignore the effects */
- else
- {
- /* No damage */
+ /* No "real" damage */
dam = 0;
+ break;
}
- break;
- }
-
-
- /* Teleport undead (Use "dam" as "power") */
- case GF_AWAY_UNDEAD:
- {
- /* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+ /* Charm monster */
+ case GF_CHARM:
{
- bool resists_tele = FALSE;
-
- if (r_ptr->flagsr & RFR_RES_TELE)
+ int vir;
+ vir = virtue_number(p_ptr, V_HARMONY);
+ if (vir)
{
- if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には効果がなかった。", " is unaffected.");
- resists_tele = TRUE;
- }
- else if (r_ptr->level > randint1(100))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には耐性がある!", " resists!");
- resists_tele = TRUE;
- }
+ dam += p_ptr->virtues[vir-1]/10;
}
- if (!resists_tele)
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
+ if (vir)
{
- if (seen) obvious = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
- do_dist = dam;
+ dam -= p_ptr->virtues[vir-1]/20;
}
- }
- /* Others ignore */
- else
- {
- /* Irrelevant */
- skipped = TRUE;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
+ if (seen) obvious = TRUE;
+ /* Attempt a saving throw */
+ if (common_saving_throw_charm(p_ptr, dam, m_ptr))
+ {
- /* Teleport evil (Use "dam" as "power") */
- case GF_AWAY_EVIL:
- {
- /* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
- {
- bool resists_tele = FALSE;
+ /* Resist */
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
- if (r_ptr->flagsr & RFR_RES_TELE)
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (p_ptr->cursed & TRC_AGGRAVATE)
{
- if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には効果がなかった。", " is unaffected.");
- resists_tele = TRUE;
- }
- else if (r_ptr->level > randint1(100))
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には耐性がある!", " resists!");
- resists_tele = TRUE;
- }
+ note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
}
-
- if (!resists_tele)
+ else
{
- if (seen) obvious = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
- do_dist = dam;
+ note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
+ set_pet(m_ptr);
+
+ chg_virtue(p_ptr, V_INDIVIDUALISM, -1);
+ if (r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(p_ptr, V_NATURE, 1);
}
+
+ /* No "real" damage */
+ dam = 0;
+ break;
}
- /* Others ignore */
- else
+ /* Control undead */
+ case GF_CONTROL_UNDEAD:
{
- /* Irrelevant */
- skipped = TRUE;
- }
+ int vir;
+ if (seen) obvious = TRUE;
- /* No "real" damage */
- dam = 0;
- break;
- }
+ vir = virtue_number(p_ptr, V_UNLIFE);
+ if (vir)
+ {
+ dam += p_ptr->virtues[vir-1]/10;
+ }
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ dam -= p_ptr->virtues[vir-1]/20;
+ }
- /* Teleport monster (Use "dam" as "power") */
- case GF_AWAY_ALL:
- {
- bool resists_tele = FALSE;
- if (r_ptr->flagsr & RFR_RES_TELE)
- {
- if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
+ /* Attempt a saving throw */
+ if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
+ !(r_ptr->flags3 & RF3_UNDEAD))
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ /* No obvious effect */
note = _("には効果がなかった。", " is unaffected.");
- resists_tele = TRUE;
+ obvious = FALSE;
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
}
- else if (r_ptr->level > randint1(100))
+ else if (p_ptr->cursed & TRC_AGGRAVATE)
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- note = _("には耐性がある!", " resists!");
- resists_tele = TRUE;
+ note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ note = _("は既にあなたの奴隷だ!", " is in your thrall!");
+ set_pet(m_ptr);
}
+
+ /* No "real" damage */
+ dam = 0;
+ break;
}
- if (!resists_tele)
+ /* Control demon */
+ case GF_CONTROL_DEMON:
{
+ int vir;
if (seen) obvious = TRUE;
- /* Prepare to teleport */
- do_dist = dam;
- }
+ vir = virtue_number(p_ptr, V_UNLIFE);
+ if (vir)
+ {
+ dam += p_ptr->virtues[vir-1]/10;
+ }
- /* No "real" damage */
- dam = 0;
- break;
- }
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ dam -= p_ptr->virtues[vir-1]/20;
+ }
+ /* Attempt a saving throw */
+ if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
+ !(r_ptr->flags3 & RF3_DEMON))
+ {
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (p_ptr->cursed & TRC_AGGRAVATE)
+ {
+ note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ note = _("は既にあなたの奴隷だ!", " is in your thrall!");
+ set_pet(m_ptr);
+ }
- /* Turn undead (Use "dam" as "power") */
- case GF_TURN_UNDEAD:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
+ /* No "real" damage */
+ dam = 0;
break;
}
- /* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+
+ /* Tame animal */
+ case GF_CONTROL_ANIMAL:
{
+ int vir;
if (seen) obvious = TRUE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ vir = virtue_number(p_ptr, V_NATURE);
+ if (vir)
+ {
+ dam += p_ptr->virtues[vir-1]/10;
+ }
- /* Apply some fear */
- do_fear = damroll(3, (dam / 2)) + 1;
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ dam -= p_ptr->virtues[vir-1]/20;
+ }
/* Attempt a saving throw */
- if (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ if (common_saving_throw_control(p_ptr, dam, m_ptr) ||
+ !(r_ptr->flags3 & RF3_ANIMAL))
{
+ /* Resist */
/* No obvious effect */
note = _("には効果がなかった。", " is unaffected.");
obvious = FALSE;
- do_fear = 0;
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (p_ptr->cursed & TRC_AGGRAVATE)
+ {
+ note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ note = _("はなついた。", " is tamed!");
+ set_pet(m_ptr);
+ if (r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(p_ptr, V_NATURE, 1);
}
- }
-
- /* Others ignore */
- else
- {
- /* Irrelevant */
- skipped = TRUE;
- }
-
- /* No "real" damage */
- dam = 0;
- break;
- }
-
- /* Turn evil (Use "dam" as "power") */
- case GF_TURN_EVIL:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
+ /* No "real" damage */
+ dam = 0;
break;
}
- /* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
+
+ /* Tame animal */
+ case GF_CHARM_LIVING:
{
+ int vir;
+
+ vir = virtue_number(p_ptr, V_UNLIFE);
if (seen) obvious = TRUE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
+ vir = virtue_number(p_ptr, V_UNLIFE);
+ if (vir)
+ {
+ dam -= p_ptr->virtues[vir-1]/10;
+ }
+
+ vir = virtue_number(p_ptr, V_INDIVIDUALISM);
+ if (vir)
+ {
+ dam -= p_ptr->virtues[vir-1]/20;
+ }
- /* Apply some fear */
- do_fear = damroll(3, (dam / 2)) + 1;
+ msg_format(_("%sを見つめた。", "You stare into %s."), m_name);
/* Attempt a saving throw */
- if (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ if (common_saving_throw_charm(p_ptr, dam, m_ptr) ||
+ !monster_living(m_ptr->r_idx))
{
+ /* Resist */
/* No obvious effect */
note = _("には効果がなかった。", " is unaffected.");
obvious = FALSE;
- do_fear = 0;
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else if (p_ptr->cursed & TRC_AGGRAVATE)
+ {
+ note = _("はあなたに敵意を抱いている!", " hates you too much!");
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ note = _("を支配した。", " is tamed!");
+ set_pet(m_ptr);
+ if (r_ptr->flags3 & RF3_ANIMAL)
+ chg_virtue(p_ptr, V_NATURE, 1);
}
- }
- /* Others ignore */
- else
- {
- /* Irrelevant */
- skipped = TRUE;
+ /* No "real" damage */
+ dam = 0;
+ break;
}
- /* No "real" damage */
- dam = 0;
- break;
- }
-
-
- /* Turn monster (Use "dam" as "power") */
- case GF_TURN_ALL:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Confusion (Use "dam" as "power") */
+ case GF_OLD_CONF:
{
- skipped = TRUE;
- break;
- }
- if (seen) obvious = TRUE;
+ if (seen) obvious = TRUE;
- /* Apply some fear */
- do_fear = damroll(3, (dam / 2)) + 1;
+ /* Get confused later */
+ do_conf = damroll(3, (dam / 2)) + 1;
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->flags3 & (RF3_NO_FEAR)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
- {
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
- do_fear = 0;
- }
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->flags3 & (RF3_NO_CONF)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Memorize a flag */
+ if (r_ptr->flags3 & (RF3_NO_CONF))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
+ }
- /* No "real" damage */
- dam = 0;
- break;
- }
+ /* Resist */
+ do_conf = 0;
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
- /* Dispel undead */
- case GF_DISP_UNDEAD:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
+ /* No "real" damage */
dam = 0;
break;
}
- /* Only affect undead */
- if (r_ptr->flags3 & (RF3_UNDEAD))
+
+ case GF_STUN:
{
if (seen) obvious = TRUE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ do_stun = damroll((caster_lev / 20) + 3 , (dam)) + 1;
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Resist */
+ do_stun = 0;
- /* Others ignore */
- else
- {
- /* Irrelevant */
- skipped = TRUE;
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
- /* No damage */
+ /* No "real" damage */
dam = 0;
+ break;
}
- break;
- }
+ /* Lite, but only hurts susceptible creatures */
+ case GF_LITE_WEAK:
+ {
+ if (!dam)
+ {
+ skipped = TRUE;
+ break;
+ }
+ /* Hurt by light */
+ if (r_ptr->flags3 & (RF3_HURT_LITE))
+ {
+ /* Obvious effect */
+ if (seen) obvious = TRUE;
+ /* Memorize the effects */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
+
+ /* Special effect */
+ note = _("は光に身をすくめた!", " cringes from the light!");
+ note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
+ }
+
+ /* Normally no damage */
+ else
+ {
+ /* No damage */
+ dam = 0;
+ }
- /* Dispel evil */
- case GF_DISP_EVIL:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
- dam = 0;
break;
}
- /* Only affect evil */
- if (r_ptr->flags3 & (RF3_EVIL))
- {
- if (seen) obvious = TRUE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- /* Others ignore */
- else
+ /* Lite -- opposite of Dark */
+ case GF_LITE:
{
- /* Irrelevant */
- skipped = TRUE;
+ if (seen) obvious = TRUE;
- /* No damage */
- dam = 0;
+ if (r_ptr->flagsr & RFR_RES_LITE)
+ {
+ note = _("には耐性がある!", " resists!");
+ dam *= 2; dam /= (randint1(6)+6);
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_LITE);
+ }
+ else if (r_ptr->flags3 & (RF3_HURT_LITE))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
+ note = _("は光に身をすくめた!", " cringes from the light!");
+ note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
+ dam *= 2;
+ }
+ break;
}
- break;
- }
- /* Dispel good */
- case GF_DISP_GOOD:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
- dam = 0;
- break;
- }
- /* Only affect good */
- if (r_ptr->flags3 & (RF3_GOOD))
+ /* Dark -- opposite of Lite */
+ case GF_DARK:
{
if (seen) obvious = TRUE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
-
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
+ if (r_ptr->flagsr & RFR_RES_DARK)
+ {
+ note = _("には耐性がある!", " resists!");
+ dam *= 2; dam /= (randint1(6)+6);
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_DARK);
+ }
+ break;
}
- /* Others ignore */
- else
+
+ /* Stone to Mud */
+ case GF_KILL_WALL:
{
- /* Irrelevant */
- skipped = TRUE;
+ /* Hurt by rock remover */
+ if (r_ptr->flags3 & (RF3_HURT_ROCK))
+ {
+ /* Notice effect */
+ if (seen) obvious = TRUE;
- /* No damage */
- dam = 0;
- }
+ /* Memorize the effects */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_ROCK);
- break;
- }
+ /* Cute little message */
+ note = _("の皮膚がただれた!", " loses some skin!");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
+ }
+
+ /* Usually, ignore the effects */
+ else
+ {
+ /* No damage */
+ dam = 0;
+ }
- /* Dispel living */
- case GF_DISP_LIVING:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
- dam = 0;
break;
}
- /* Only affect non-undead */
- if (monster_living(m_ptr->r_idx))
- {
- if (seen) obvious = TRUE;
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
- /* Others ignore */
- else
+ /* Teleport undead (Use "dam" as "power") */
+ case GF_AWAY_UNDEAD:
{
- /* Irrelevant */
- skipped = TRUE;
+ /* Only affect undead */
+ if (r_ptr->flags3 & (RF3_UNDEAD))
+ {
+ bool resists_tele = FALSE;
- /* No damage */
- dam = 0;
- }
+ if (r_ptr->flagsr & RFR_RES_TELE)
+ {
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には効果がなかった。", " is unaffected.");
+ resists_tele = TRUE;
+ }
+ else if (r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には耐性がある!", " resists!");
+ resists_tele = TRUE;
+ }
+ }
- break;
- }
+ if (!resists_tele)
+ {
+ if (seen) obvious = TRUE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+ do_dist = dam;
+ }
+ }
- /* Dispel demons */
- case GF_DISP_DEMON:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- skipped = TRUE;
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
+ }
+
+ /* No "real" damage */
dam = 0;
break;
}
- /* Only affect demons */
- if (r_ptr->flags3 & (RF3_DEMON))
+
+
+ /* Teleport evil (Use "dam" as "power") */
+ case GF_AWAY_EVIL:
{
- if (seen) obvious = TRUE;
+ /* Only affect evil */
+ if (r_ptr->flags3 & (RF3_EVIL))
+ {
+ bool resists_tele = FALSE;
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_DEMON);
+ if (r_ptr->flagsr & RFR_RES_TELE)
+ {
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には効果がなかった。", " is unaffected.");
+ resists_tele = TRUE;
+ }
+ else if (r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には耐性がある!", " resists!");
+ resists_tele = TRUE;
+ }
+ }
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- }
+ if (!resists_tele)
+ {
+ if (seen) obvious = TRUE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
+ do_dist = dam;
+ }
+ }
- /* Others ignore */
- else
- {
- /* Irrelevant */
- skipped = TRUE;
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
+ }
- /* No damage */
+ /* No "real" damage */
dam = 0;
+ break;
}
- break;
- }
- /* Dispel monster */
- case GF_DISP_ALL:
- {
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Teleport monster (Use "dam" as "power") */
+ case GF_AWAY_ALL:
{
- skipped = TRUE;
+ bool resists_tele = FALSE;
+ if (r_ptr->flagsr & RFR_RES_TELE)
+ {
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には効果がなかった。", " is unaffected.");
+ resists_tele = TRUE;
+ }
+ else if (r_ptr->level > randint1(100))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
+ note = _("には耐性がある!", " resists!");
+ resists_tele = TRUE;
+ }
+ }
+
+ if (!resists_tele)
+ {
+ if (seen) obvious = TRUE;
+
+ /* Prepare to teleport */
+ do_dist = dam;
+ }
+
+ /* No "real" damage */
dam = 0;
break;
}
- if (seen) obvious = TRUE;
- note = _("は身震いした。", " shudders.");
- note_dies = _("はドロドロに溶けた!", " dissolves!");
- break;
- }
-
- /* Drain mana */
- case GF_DRAIN_MANA:
- {
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Turn undead (Use "dam" as "power") */
+ case GF_TURN_UNDEAD:
{
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ /* Only affect undead */
+ if (r_ptr->flags3 & (RF3_UNDEAD))
+ {
+ if (seen) obvious = TRUE;
+
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+
+ /* Apply some fear */
+ do_fear = damroll(3, (dam / 2)) + 1;
+
+ /* Attempt a saving throw */
+ if (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ {
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ do_fear = 0;
+ }
+ }
+
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
+ }
+
+ /* No "real" damage */
+ dam = 0;
break;
}
- if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->a_ability_flags1 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->a_ability_flags2 & ~(RF6_NOMAGIC_MASK)))
+
+ /* Turn evil (Use "dam" as "power") */
+ case GF_TURN_EVIL:
{
- if (who > 0)
+ /* Only affect evil */
+ if (r_ptr->flags3 & (RF3_EVIL))
{
- /* Heal the monster */
- if (caster_ptr->hp < caster_ptr->maxhp)
- {
- /* Heal */
- caster_ptr->hp += dam;
- if (caster_ptr->hp > caster_ptr->maxhp) caster_ptr->hp = caster_ptr->maxhp;
+ if (seen) obvious = TRUE;
- /* Redraw (later) if needed */
- if (p_ptr->health_who == who) p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == who) p_ptr->redraw |= (PR_UHEALTH);
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
- /* Special message */
- if (see_s_msg)
- {
- monster_desc(killer, caster_ptr, 0);
- msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), killer);
- }
+ /* Apply some fear */
+ do_fear = damroll(3, (dam / 2)) + 1;
+
+ /* Attempt a saving throw */
+ if (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10)
+ {
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ do_fear = 0;
}
}
+
+ /* Others ignore */
else
{
- msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), m_name);
- (void)hp_player(dam);
+ /* Irrelevant */
+ skipped = TRUE;
}
+
+ /* No "real" damage */
+ dam = 0;
+ break;
}
- else
- {
- if (see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), m_name);
- }
- dam = 0;
- break;
- }
- /* Mind blast */
- case GF_MIND_BLAST:
- {
- if (seen) obvious = TRUE;
- if (!who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), m_name);
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Turn monster (Use "dam" as "power") */
+ case GF_TURN_ALL:
{
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+
+ /* Apply some fear */
+ do_fear = damroll(3, (dam / 2)) + 1;
+
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->flags3 & (RF3_NO_FEAR)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ do_fear = 0;
+ }
+
+ /* No "real" damage */
+ dam = 0;
break;
}
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->flags3 & RF3_NO_CONF) ||
- (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
+
+ /* Dispel undead */
+ case GF_DISP_UNDEAD:
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
+ /* Only affect undead */
+ if (r_ptr->flags3 & (RF3_UNDEAD))
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
+ if (seen) obvious = TRUE;
+
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_UNDEAD);
+
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
}
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- else if (r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- }
- else if (r_ptr->flags2 & RF2_WEIRD_MIND)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
- note = _("には耐性がある。", " resists.");
- dam /= 3;
- }
- else
- {
- note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
- note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- if (who > 0) do_conf = randint0(4) + 4;
- else do_conf = randint0(8) + 8;
- }
- break;
- }
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
- /* Brain smash */
- case GF_BRAIN_SMASH:
- {
- if (seen) obvious = TRUE;
- if (!who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), m_name);
+ /* No damage */
+ dam = 0;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->flags3 & RF3_NO_CONF) ||
- (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
+
+ /* Dispel evil */
+ case GF_DISP_EVIL:
{
- /* Memorize a flag */
- if (r_ptr->flags3 & (RF3_NO_CONF))
+ /* Only affect evil */
+ if (r_ptr->flags3 & (RF3_EVIL))
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
- }
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- else if (r_ptr->flags2 & RF2_EMPTY_MIND)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
- note = _("には完全な耐性がある!", " is immune.");
- dam = 0;
- }
- else if (r_ptr->flags2 & RF2_WEIRD_MIND)
- {
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
- note = _("には耐性がある!", " resists!");
- dam /= 3;
- }
- else
- {
- note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
- note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
+ if (seen) obvious = TRUE;
- if (who > 0)
- {
- do_conf = randint0(4) + 4;
- do_stun = randint0(4) + 4;
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_EVIL);
+
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
}
+
+ /* Others ignore */
else
{
- do_conf = randint0(8) + 8;
- do_stun = randint0(8) + 8;
- }
- (void)set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 10);
- }
- break;
- }
+ /* Irrelevant */
+ skipped = TRUE;
- /* CAUSE_1 */
- case GF_CAUSE_1:
- {
- if (seen) obvious = TRUE;
- if (!who) msg_format(_("%sを指差して呪いをかけた。", "You point at %s and curse."), m_name);
+ /* No damage */
+ dam = 0;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- /* Attempt a saving throw */
- if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
+ /* Dispel good */
+ case GF_DISP_GOOD:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- break;
- }
+ /* Only affect good */
+ if (r_ptr->flags3 & (RF3_GOOD))
+ {
+ if (seen) obvious = TRUE;
- /* CAUSE_2 */
- case GF_CAUSE_2:
- {
- if (seen) obvious = TRUE;
- if (!who) msg_format(_("%sを指差して恐ろしげに呪いをかけた。", "You point at %s and curse horribly."), m_name);
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
+ }
- /* Attempt a saving throw */
- if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
- {
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- break;
- }
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
- /* CAUSE_3 */
- case GF_CAUSE_3:
- {
- if (seen) obvious = TRUE;
- if (!who) msg_format(_("%sを指差し、恐ろしげに呪文を唱えた!", "You point at %s, incanting terribly!"), m_name);
+ /* No damage */
+ dam = 0;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- /* Attempt a saving throw */
- if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
+ /* Dispel living */
+ case GF_DISP_LIVING:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- break;
- }
+ /* Only affect non-undead */
+ if (monster_living(m_ptr->r_idx))
+ {
+ if (seen) obvious = TRUE;
- /* CAUSE_4 */
- case GF_CAUSE_4:
- {
- if (seen) obvious = TRUE;
- if (!who)
- msg_format(_("%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
- "You point at %s, screaming the word, 'DIE!'."), m_name);
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
+ }
+
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
+
+ /* No damage */
+ dam = 0;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- /* Attempt a saving throw */
- if ((randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35)) && ((who <= 0) || (caster_ptr->r_idx != MON_KENSHIROU)))
+ /* Dispel demons */
+ case GF_DISP_DEMON:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- }
- break;
- }
+ /* Only affect demons */
+ if (r_ptr->flags3 & (RF3_DEMON))
+ {
+ if (seen) obvious = TRUE;
- /* HAND_DOOM */
- case GF_HAND_DOOM:
- {
- if (seen) obvious = TRUE;
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_DEMON);
+
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
+ }
+
+ /* Others ignore */
+ else
+ {
+ /* Irrelevant */
+ skipped = TRUE;
+
+ /* No damage */
+ dam = 0;
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- if (r_ptr->flags1 & RF1_UNIQUE)
+ /* Dispel monster */
+ case GF_DISP_ALL:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ if (seen) obvious = TRUE;
+ note = _("は身震いした。", " shudders.");
+ note_dies = _("はドロドロに溶けた!", " dissolves!");
+ break;
}
- else
+
+ /* Drain mana */
+ case GF_DRAIN_MANA:
{
- if ((who > 0) ? ((caster_lev + randint1(dam)) > (r_ptr->level + 10 + randint1(20))) :
- (((caster_lev / 2) + randint1(dam)) > (r_ptr->level + randint1(200))))
+ if (seen) obvious = TRUE;
+ if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->a_ability_flags1 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->a_ability_flags2 & ~(RF6_NOMAGIC_MASK)))
{
- dam = ((40 + randint1(20)) * m_ptr->hp) / 100;
+ if (who > 0)
+ {
+ /* Heal the monster */
+ if (caster_ptr->hp < caster_ptr->maxhp)
+ {
+ /* Heal */
+ caster_ptr->hp += dam;
+ if (caster_ptr->hp > caster_ptr->maxhp) caster_ptr->hp = caster_ptr->maxhp;
- if (m_ptr->hp < dam) dam = m_ptr->hp - 1;
+ /* Redraw (later) if needed */
+ if (p_ptr->health_who == who) p_ptr->redraw |= (PR_HEALTH);
+ if (p_ptr->riding == who) p_ptr->redraw |= (PR_UHEALTH);
+
+ /* Special message */
+ if (see_s_msg)
+ {
+ monster_desc(killer, caster_ptr, 0);
+ msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), killer);
+ }
+ }
+ }
+ else
+ {
+ msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), m_name);
+ (void)hp_player(p_ptr, dam);
+ }
}
else
{
- note = _("は耐性を持っている!", "resists!");
- dam = 0;
+ if (see_s_msg) msg_format(_("%sには効果がなかった。", "%s is unaffected."), m_name);
}
+ dam = 0;
+ break;
}
- break;
- }
- /* Capture monster */
- case GF_CAPTURE:
- {
- int nokori_hp;
- if ((p_ptr->inside_quest && (quest[p_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(m_ptr)) ||
- (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_NAZGUL)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR) || m_ptr->parent_m_idx)
+ /* Mind blast */
+ case GF_MIND_BLAST:
{
- msg_format(_("%sには効果がなかった。", "%s is unaffected."), m_name);
- skipped = TRUE;
+ if (seen) obvious = TRUE;
+ if (!who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), m_name);
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_CONF) ||
+ (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
+ {
+ /* Memorize a flag */
+ if (r_ptr->flags3 & (RF3_NO_CONF))
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
+ }
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
+ else if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ note = _("には完全な耐性がある!", " is immune.");
+ dam = 0;
+ }
+ else if (r_ptr->flags2 & RF2_WEIRD_MIND)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+ note = _("には耐性がある。", " resists.");
+ dam /= 3;
+ }
+ else
+ {
+ note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
+ note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
+
+ if (who > 0) do_conf = randint0(4) + 4;
+ else do_conf = randint0(8) + 8;
+ }
break;
}
- if (is_pet(m_ptr)) nokori_hp = m_ptr->maxhp * 4L;
- else if ((p_ptr->pclass == CLASS_BEASTMASTER) && monster_living(m_ptr->r_idx))
- nokori_hp = m_ptr->maxhp * 3 / 10;
- else
- nokori_hp = m_ptr->maxhp * 3 / 20;
-
- if (m_ptr->hp >= nokori_hp)
- {
- msg_format(_("もっと弱らせないと。", "You need to weaken %s more."), m_name);
- skipped = TRUE;
- }
- else if (m_ptr->hp < randint0(nokori_hp))
+ /* Brain smash */
+ case GF_BRAIN_SMASH:
{
- if (m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(g_ptr->m_idx, FALSE, MON_CHAMELEON);
- msg_format(_("%sを捕えた!", "You capture %^s!"), m_name);
- cap_mon = m_ptr->r_idx;
- cap_mspeed = m_ptr->mspeed;
- cap_hp = m_ptr->hp;
- cap_maxhp = m_ptr->max_maxhp;
- cap_nickname = m_ptr->nickname; /* Quark transfer */
- if (g_ptr->m_idx == p_ptr->riding)
+ if (seen) obvious = TRUE;
+ if (!who) msg_format(_("%sをじっと睨んだ。", "You gaze intently at %s."), m_name);
+
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_CONF) ||
+ (r_ptr->level > randint1((caster_lev - 10) < 1 ? 1 : (caster_lev - 10)) + 10))
{
- if (rakuba(-1, FALSE))
+ /* Memorize a flag */
+ if (r_ptr->flags3 & (RF3_NO_CONF))
{
- msg_format(_("地面に落とされた。", "You have fallen from %s."), m_name);
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_CONF);
}
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
}
+ else if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ note = _("には完全な耐性がある!", " is immune.");
+ dam = 0;
+ }
+ else if (r_ptr->flags2 & RF2_WEIRD_MIND)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_WEIRD_MIND);
+ note = _("には耐性がある!", " resists!");
+ dam /= 3;
+ }
+ else
+ {
+ note = _("は精神攻撃を食らった。", " is blasted by psionic energy.");
+ note_dies = _("の精神は崩壊し、肉体は抜け殻となった。", " collapses, a mindless husk.");
- delete_monster_idx(g_ptr->m_idx);
-
- return (TRUE);
+ if (who > 0)
+ {
+ do_conf = randint0(4) + 4;
+ do_stun = randint0(4) + 4;
+ }
+ else
+ {
+ do_conf = randint0(8) + 8;
+ do_stun = randint0(8) + 8;
+ }
+ (void)set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 10);
+ }
+ break;
}
- else
+
+ /* CAUSE_1 */
+ case GF_CAUSE_1:
{
- msg_format(_("うまく捕まえられなかった。", "You failed to capture %s."), m_name);
- skipped = TRUE;
+ if (seen) obvious = TRUE;
+ if (!who) msg_format(_("%sを指差して呪いをかけた。", "You point at %s and curse."), m_name);
+ /* Attempt a saving throw */
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
+ break;
}
- break;
- }
-
- /* Attack (Use "dam" as attack type) */
- case GF_ATTACK:
- {
- /* Return this monster's death */
- return py_attack(y, x, dam);
- }
-
- /* Sleep (Use "dam" as "power") */
- case GF_ENGETSU:
- {
- int effect = 0;
- bool done = TRUE;
-
- if (seen) obvious = TRUE;
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* CAUSE_2 */
+ case GF_CAUSE_2:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ if (seen) obvious = TRUE;
+ if (!who) msg_format(_("%sを指差して恐ろしげに呪いをかけた。", "You point at %s and curse horribly."), m_name);
+ /* Attempt a saving throw */
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
break;
}
- if (r_ptr->flags2 & RF2_EMPTY_MIND)
+
+ /* CAUSE_3 */
+ case GF_CAUSE_3:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ if (seen) obvious = TRUE;
+ if (!who) msg_format(_("%sを指差し、恐ろしげに呪文を唱えた!", "You point at %s, incanting terribly!"), m_name);
+ /* Attempt a saving throw */
+ if (randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
break;
}
- if (MON_CSLEEP(m_ptr))
+
+ /* CAUSE_4 */
+ case GF_CAUSE_4:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
- skipped = TRUE;
+ if (seen) obvious = TRUE;
+ if (!who)
+ msg_format(_("%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
+ "You point at %s, screaming the word, 'DIE!'."), m_name);
+ /* Attempt a saving throw */
+ if ((randint0(100 + (caster_lev / 2)) < (r_ptr->level + 35)) && ((who <= 0) || (caster_ptr->r_idx != MON_KENSHIROU)))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
break;
}
- 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)
+ /* HAND_DOOM */
+ case GF_HAND_DOOM:
{
- /* Powerful monsters can resist */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags1 & RF1_UNIQUE)
{
note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
+ dam = 0;
}
-
- /* Normal monsters slow down */
else
{
- if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
+ if ((who > 0) ? ((caster_lev + randint1(dam)) > (r_ptr->level + 10 + randint1(20))) :
+ (((caster_lev / 2) + randint1(dam)) > (r_ptr->level + randint1(200))))
{
- note = _("の動きが遅くなった。", " starts moving slower.");
+ dam = ((40 + randint1(20)) * m_ptr->hp) / 100;
+
+ if (m_ptr->hp < dam) dam = m_ptr->hp - 1;
+ }
+ else
+ {
+ note = _("は耐性を持っている!", "resists!");
+ dam = 0;
}
}
+ break;
}
- else if (effect == 2)
+ /* Capture monster */
+ case GF_CAPTURE:
{
- do_stun = damroll((p_ptr->lev / 10) + 3 , (dam)) + 1;
-
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ int nokori_hp;
+ if ((p_ptr->inside_quest && (quest[p_ptr->inside_quest].type == QUEST_TYPE_KILL_ALL) && !is_pet(m_ptr)) ||
+ (r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags7 & (RF7_NAZGUL)) || (r_ptr->flags7 & (RF7_UNIQUE2)) || (r_ptr->flags1 & RF1_QUESTOR) || m_ptr->parent_m_idx)
{
- /* Resist */
- do_stun = 0;
-
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
+ msg_format(_("%sには効果がなかった。", "%s is unaffected."), m_name);
+ skipped = TRUE;
+ break;
}
- }
- else if (effect == 3)
- {
- /* Attempt a saving throw */
- if ((r_ptr->flags1 & RF1_UNIQUE) ||
- (r_ptr->flags3 & RF3_NO_SLEEP) ||
- (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ if (is_pet(m_ptr)) nokori_hp = m_ptr->maxhp * 4L;
+ else if ((p_ptr->pclass == CLASS_BEASTMASTER) && monster_living(m_ptr->r_idx))
+ nokori_hp = m_ptr->maxhp * 3 / 10;
+ else
+ nokori_hp = m_ptr->maxhp * 3 / 20;
+
+ if (m_ptr->hp >= nokori_hp)
{
- /* Memorize a flag */
- if (r_ptr->flags3 & RF3_NO_SLEEP)
+ msg_format(_("もっと弱らせないと。", "You need to weaken %s more."), m_name);
+ skipped = TRUE;
+ }
+ else if (m_ptr->hp < randint0(nokori_hp))
+ {
+ if (m_ptr->mflag2 & MFLAG2_CHAMELEON) choose_new_monster(g_ptr->m_idx, FALSE, MON_CHAMELEON);
+ msg_format(_("%sを捕えた!", "You capture %^s!"), m_name);
+ cap_mon = m_ptr->r_idx;
+ cap_mspeed = m_ptr->mspeed;
+ cap_hp = m_ptr->hp;
+ cap_maxhp = m_ptr->max_maxhp;
+ cap_nickname = m_ptr->nickname; /* Quark transfer */
+ if (g_ptr->m_idx == p_ptr->riding)
{
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_SLEEP);
+ if (rakuba(-1, FALSE))
+ {
+ msg_format(_("地面に落とされた。", "You have fallen from %s."), m_name);
+ }
}
- /* No obvious effect */
- note = _("には効果がなかった。", " is unaffected.");
- obvious = FALSE;
+ delete_monster_idx(g_ptr->m_idx);
+
+ return (TRUE);
}
else
{
- /* Go to sleep (much) later */
- note = _("は眠り込んでしまった!", " falls asleep!");
- do_sleep = 500;
+ msg_format(_("うまく捕まえられなかった。", "You failed to capture %s."), m_name);
+ skipped = TRUE;
}
+ break;
}
- if (!done)
+ /* Attack (Use "dam" as attack type) */
+ case GF_ATTACK:
{
- note = _("には効果がなかった。", " is unaffected.");
+ /* Return this monster's death */
+ return py_attack(y, x, dam);
}
- /* No "real" damage */
- dam = 0;
- break;
- }
-
- /* GENOCIDE */
- case GF_GENOCIDE:
- {
- if (seen) obvious = TRUE;
-
- if (r_ptr->flagsr & RFR_RES_ALL)
+ /* Sleep (Use "dam" as "power") */
+ case GF_ENGETSU:
{
- note = _("には効果がなかった。", " is unaffected.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
- break;
- }
+ int effect = 0;
+ bool done = TRUE;
- if (genocide_aux(g_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
- {
- if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappered!"), m_name);
- chg_virtue(V_VITALITY, -1);
- return TRUE;
- }
+ if (seen) obvious = TRUE;
+ if (r_ptr->flags2 & RF2_EMPTY_MIND)
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ skipped = TRUE;
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags2 |= (RF2_EMPTY_MIND);
+ break;
+ }
+ if (MON_CSLEEP(m_ptr))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ skipped = TRUE;
+ break;
+ }
- skipped = TRUE;
- break;
- }
+ if (one_in_(5)) effect = 1;
+ else if (one_in_(4)) effect = 2;
+ else if (one_in_(3)) effect = 3;
+ else done = FALSE;
- case GF_PHOTO:
- {
- if (!who) msg_format(_("%sを写真に撮った。", "You take a photograph of %s."), m_name);
- /* Hurt by light */
- if (r_ptr->flags3 & (RF3_HURT_LITE))
- {
- /* Obvious effect */
- if (seen) obvious = TRUE;
+ if (effect == 1)
+ {
+ /* Powerful monsters can resist */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
- /* Memorize the effects */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
+ /* Normal monsters slow down */
+ else
+ {
+ if (set_monster_slow(g_ptr->m_idx, MON_SLOW(m_ptr) + 50))
+ {
+ note = _("の動きが遅くなった。", " starts moving slower.");
+ }
+ }
+ }
- /* Special effect */
- note = _("は光に身をすくめた!", " cringes from the light!");
- note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
- }
+ else if (effect == 2)
+ {
+ do_stun = damroll((p_ptr->lev / 10) + 3 , (dam)) + 1;
- /* Normally no damage */
- else
- {
- /* No damage */
- dam = 0;
- }
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Resist */
+ do_stun = 0;
- photo = m_ptr->r_idx;
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
+ }
- break;
- }
+ else if (effect == 3)
+ {
+ /* Attempt a saving throw */
+ if ((r_ptr->flags1 & RF1_UNIQUE) ||
+ (r_ptr->flags3 & RF3_NO_SLEEP) ||
+ (r_ptr->level > randint1((dam - 10) < 1 ? 1 : (dam - 10)) + 10))
+ {
+ /* Memorize a flag */
+ if (r_ptr->flags3 & RF3_NO_SLEEP)
+ {
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_SLEEP);
+ }
+ /* No obvious effect */
+ note = _("には効果がなかった。", " is unaffected.");
+ obvious = FALSE;
+ }
+ else
+ {
+ /* Go to sleep (much) later */
+ note = _("は眠り込んでしまった!", " falls asleep!");
+ do_sleep = 500;
+ }
+ }
- /* blood curse */
- case GF_BLOOD_CURSE:
- {
- if (seen) obvious = TRUE;
+ if (!done)
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ }
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
+ /* No "real" damage */
dam = 0;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
break;
}
- break;
- }
-
- case GF_CRUSADE:
- {
- bool success = FALSE;
- if (seen) obvious = TRUE;
- if ((r_ptr->flags3 & (RF3_GOOD)) && !p_ptr->inside_arena)
+ /* GENOCIDE */
+ case GF_GENOCIDE:
{
- if (r_ptr->flags3 & (RF3_NO_CONF)) dam -= 50;
- if (dam < 1) dam = 1;
-
- /* No need to tame your pet */
- if (is_pet(m_ptr))
+ if (seen) obvious = TRUE;
+ if (genocide_aux(g_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
{
- note = _("の動きが速くなった。", " starts moving faster.");
- (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
- success = TRUE;
+ if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappered!"), m_name);
+ chg_virtue(p_ptr, V_VITALITY, -1);
+ return TRUE;
}
- /* Attempt a saving throw */
- else if ((r_ptr->flags1 & (RF1_QUESTOR)) ||
- (r_ptr->flags1 & (RF1_UNIQUE)) ||
- (m_ptr->mflag2 & MFLAG2_NOPET) ||
- (p_ptr->cursed & TRC_AGGRAVATE) ||
- ((r_ptr->level+10) > randint1(dam)))
+ skipped = TRUE;
+ break;
+ }
+
+ case GF_PHOTO:
+ {
+ if (!who) msg_format(_("%sを写真に撮った。", "You take a photograph of %s."), m_name);
+ /* Hurt by light */
+ if (r_ptr->flags3 & (RF3_HURT_LITE))
{
- /* Resist */
- if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ /* Obvious effect */
+ if (seen) obvious = TRUE;
+
+ /* Memorize the effects */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_HURT_LITE);
+
+ /* Special effect */
+ note = _("は光に身をすくめた!", " cringes from the light!");
+ note_dies = _("は光を受けてしぼんでしまった!", " shrivels away in the light!");
}
+
+ /* Normally no damage */
else
{
- note = _("を支配した。", " is tamed!");
- set_pet(m_ptr);
- (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
-
- /* Learn about type */
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
- success = TRUE;
+ /* No damage */
+ dam = 0;
}
+
+ photo = m_ptr->r_idx;
+
+ break;
}
- if (!success)
+
+ /* blood curse */
+ case GF_BLOOD_CURSE:
{
- if (!(r_ptr->flags3 & RF3_NO_FEAR))
- {
- do_fear = randint1(90)+10;
- }
- else if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_FEAR);
+ if (seen) obvious = TRUE;
+ break;
}
- /* No "real" damage */
- dam = 0;
- break;
- }
+ case GF_CRUSADE:
+ {
+ bool success = FALSE;
+ if (seen) obvious = TRUE;
- case GF_WOUNDS:
- {
- if (seen) obvious = TRUE;
+ if ((r_ptr->flags3 & (RF3_GOOD)) && !p_ptr->inside_arena)
+ {
+ if (r_ptr->flags3 & (RF3_NO_CONF)) dam -= 50;
+ if (dam < 1) dam = 1;
- if (r_ptr->flagsr & RFR_RES_ALL)
- {
- note = _("には完全な耐性がある!", " is immune.");
- skipped = TRUE;
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= (RFR_RES_ALL);
+ /* No need to tame your pet */
+ if (is_pet(m_ptr))
+ {
+ note = _("の動きが速くなった。", " starts moving faster.");
+ (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
+ success = TRUE;
+ }
+
+ /* Attempt a saving throw */
+ else if ((r_ptr->flags1 & (RF1_QUESTOR)) ||
+ (r_ptr->flags1 & (RF1_UNIQUE)) ||
+ (m_ptr->mflag2 & MFLAG2_NOPET) ||
+ (p_ptr->cursed & TRC_AGGRAVATE) ||
+ ((r_ptr->level+10) > randint1(dam)))
+ {
+ /* Resist */
+ if (one_in_(4)) m_ptr->mflag2 |= MFLAG2_NOPET;
+ }
+ else
+ {
+ note = _("を支配した。", " is tamed!");
+ set_pet(m_ptr);
+ (void)set_monster_fast(g_ptr->m_idx, MON_FAST(m_ptr) + 100);
+
+ /* Learn about type */
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_GOOD);
+ success = TRUE;
+ }
+ }
+
+ if (!success)
+ {
+ if (!(r_ptr->flags3 & RF3_NO_FEAR))
+ {
+ do_fear = randint1(90)+10;
+ }
+ else if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flags3 |= (RF3_NO_FEAR);
+ }
+
+ /* No "real" damage */
+ dam = 0;
break;
}
- /* Attempt a saving throw */
- if (randint0(100 + dam) < (r_ptr->level + 50))
+ case GF_WOUNDS:
{
- note = _("には効果がなかった。", " is unaffected.");
- dam = 0;
+ if (seen) obvious = TRUE;
+ /* Attempt a saving throw */
+ if (randint0(100 + dam) < (r_ptr->level + 50))
+ {
+ note = _("には効果がなかった。", " is unaffected.");
+ dam = 0;
+ }
+ break;
}
- break;
- }
- /* Default */
- default:
- {
- /* Irrelevant */
- skipped = TRUE;
+ /* Default */
+ default:
+ {
+ /* Irrelevant */
+ skipped = TRUE;
- /* No damage */
- dam = 0;
+ /* No damage */
+ dam = 0;
- break;
+ break;
+ }
}
}
-
/* Absolutely no effect */
if (skipped) return (FALSE);
if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
/* "Unique" and "quest" monsters can only be "killed" by the player. */
- if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
+ if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->phase_out)
{
if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
}
if (!who && slept)
{
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_COMPASSION, -1);
- if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_HONOUR, -1);
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_COMPASSION, -1);
+ if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_HONOUR, -1);
}
/* Modify the damage */
}
/* Hack -- Get new monster */
- m_ptr = &m_list[g_ptr->m_idx];
+ m_ptr = ¤t_floor_ptr->m_list[g_ptr->m_idx];
/* Hack -- Get new race */
r_ptr = &r_info[m_ptr->r_idx];
note = _("が消え去った!", " disappears!");
- if (!who) chg_virtue(V_VALOUR, -1);
+ if (!who) chg_virtue(p_ptr, V_VALOUR, -1);
/* Teleport */
teleport_away(g_ptr->m_idx, do_dist,
x = m_ptr->fx;
/* Hack -- get new grid */
- g_ptr = &grid_array[y][x];
+ g_ptr = ¤t_floor_ptr->grid_array[y][x];
}
/* Fear */
}
else
{
- mon_fight = TRUE;
+ current_floor_ptr->monster_noise = TRUE;
}
}
}
else
{
- mon_fight = TRUE;
+ current_floor_ptr->monster_noise = TRUE;
}
/* Hack -- handle sleep */
char m2_name[MAX_NLEN];
monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
+ do_cmd_write_nikki(p_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
}
delete_monster_idx(g_ptr->m_idx);
if ((typ == GF_BLOOD_CURSE) && one_in_(4))
{
- int curse_flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
- int count = 0;
- do
- {
- switch (randint1(28))
- {
- case 1: case 2:
- if (!count)
- {
- msg_print(_("地面が揺れた...", "The ground trembles..."));
- earthquake(ty, tx, 4 + randint0(4));
- if (!one_in_(6)) break;
- }
- case 3: case 4: case 5: case 6:
- if (!count)
- {
- int extra_dam = damroll(10, 10);
- msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
-
- project(0, 8, ty, tx, extra_dam, GF_MANA, curse_flg, -1);
- if (!one_in_(6)) break;
- }
- case 7: case 8:
- if (!count)
- {
- msg_print(_("空間が歪んだ!", "Space warps about you!"));
-
- if (m_ptr->r_idx) teleport_away(g_ptr->m_idx, damroll(10, 10), TELEPORT_PASSIVE);
- if (one_in_(13)) count += activate_hi_summon(ty, tx, TRUE);
- if (!one_in_(6)) break;
- }
- case 9: case 10: case 11:
- msg_print(_("エネルギーのうねりを感じた!", "You feel a surge of energy!"));
- project(0, 7, ty, tx, 50, GF_DISINTEGRATE, curse_flg, -1);
- if (!one_in_(6)) break;
- case 12: case 13: case 14: case 15: case 16:
- aggravate_monsters(0);
- if (!one_in_(6)) break;
- case 17: case 18:
- count += activate_hi_summon(ty, tx, TRUE);
- if (!one_in_(6)) break;
- case 19: case 20: case 21: case 22:
- {
- bool pet = !one_in_(3);
- BIT_FLAGS mode = PM_ALLOW_GROUP;
-
- if (pet) mode |= PM_FORCE_PET;
- else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
-
- count += summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode, '\0');
- if (!one_in_(6)) break;
- }
- case 23: case 24: case 25:
- if (p_ptr->hold_exp && (randint0(100) < 75)) break;
- msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
-
- if (p_ptr->hold_exp) lose_exp(p_ptr->exp / 160);
- else lose_exp(p_ptr->exp / 16);
- if (!one_in_(6)) break;
- case 26: case 27: case 28:
- {
- int i = 0;
- if (one_in_(13))
- {
- while (i < A_MAX)
- {
- do
- {
- (void)do_dec_stat(i);
- }
- while (one_in_(2));
-
- i++;
- }
- }
- else
- {
- (void)do_dec_stat(randint0(6));
- }
- break;
- }
- }
- }
- while (one_in_(5));
+ blood_curse_to_enemy(who);
}
- if (p_ptr->inside_battle)
+ if (p_ptr->phase_out)
{
p_ptr->health_who = g_ptr->m_idx;
p_ptr->redraw |= (PR_HEALTH);
/* Redraw the monster grid */
lite_spot(y, x);
-
/* Update monster recall window */
if ((p_ptr->monster_race_idx == m_ptr->r_idx) && (seen || !m_ptr->r_idx))
{
{
do
{
- t_y = m_list[who].fy - 1 + randint1(3);
- t_x = m_list[who].fx - 1 + randint1(3);
+ t_y = current_floor_ptr->m_list[who].fy - 1 + randint1(3);
+ t_x = current_floor_ptr->m_list[who].fx - 1 + randint1(3);
max_attempts--;
}
while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
if (max_attempts < 1)
{
- t_y = m_list[who].fy;
- t_x = m_list[who].fx;
+ t_y = current_floor_ptr->m_list[who].fy;
+ t_x = current_floor_ptr->m_list[who].fx;
}
}
else
if (who > 0)
{
- m_ptr = &m_list[who];
+ m_ptr = ¤t_floor_ptr->m_list[who];
rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
monster_desc(m_name, m_ptr, 0);
strcpy(killer, _("罠", "a trap"));
break;
}
-
- /* Paranoia */
strcpy(m_name, killer);
}
/* Analyze the damage */
switch (typ)
{
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_ACID:
{
if (fuzzy) msg_print(_("酸で攻撃された!", "You are hit by acid!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_FIRE:
{
if (fuzzy) msg_print(_("火炎で攻撃された!", "You are hit by fire!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_COLD:
{
if (fuzzy) msg_print(_("冷気で攻撃された!", "You are hit by cold!"));
break;
}
- /* Standard damage -- hurts inventory too */
+ /* Standard damage -- hurts p_ptr->inventory_list too */
case GF_ELEC:
{
if (fuzzy) msg_print(_("電撃で攻撃された!", "You are hit by lightning!"));
if (p_ptr->resist_pois) dam = (dam + 2) / 3;
if (double_resist) dam = (dam + 2) / 3;
- if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW())
+ if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(p_ptr))
{
- do_dec_stat(A_CON);
+ do_dec_stat(p_ptr, A_CON);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
{
- set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+ set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
}
break;
}
if (p_ptr->resist_pois) dam = (2 * dam + 2) / 5;
if (double_resist) dam = (2 * dam + 2) / 5;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
{
- set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+ set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
if (one_in_(5)) /* 6 */
{
msg_print(_("奇形的な変身を遂げた!", "You undergo a freakish metamorphosis!"));
if (one_in_(4)) /* 4 */
- do_poly_self();
+ do_poly_self(p_ptr);
else
- mutate_player();
+ status_shuffle();
}
if (one_in_(6))
case GF_MISSILE:
{
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam /= 2;
else if (p_ptr->align < -10)
dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
if (p_ptr->align > 10)
dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
}
- else if ((inventory[INVEN_RARM].name1 == ART_ZANTETSU) || (inventory[INVEN_LARM].name1 == ART_ZANTETSU))
+ else if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (p_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU))
{
msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
break;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_PLASMA:
{
if (fuzzy) msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!(p_ptr->resist_fire || IS_OPPOSE_FIRE() || p_ptr->immune_fire))
if (fuzzy) msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
if (p_ptr->resist_neth)
{
- if (!prace_is_(RACE_SPECTRE))
+ if (!PRACE_IS_(p_ptr, RACE_SPECTRE))
{
dam *= 6; dam /= (randint1(4) + 7);
}
}
- else if (!CHECK_MULTISHADOW()) drain_exp(200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
+ else if (!CHECK_MULTISHADOW(p_ptr)) drain_exp(p_ptr, 200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
- if (prace_is_(RACE_SPECTRE) && !CHECK_MULTISHADOW())
+ if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("気分がよくなった。", "You feel invigorated!"));
- hp_player(dam / 4);
+ hp_player(p_ptr, dam / 4);
learn_spell(monspell);
}
else
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
case GF_WATER:
{
if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_sound && !p_ptr->resist_water)
{
- set_stun(p_ptr->stun + randint1(40));
+ set_stun(p_ptr, p_ptr->stun + randint1(40));
}
if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
- set_confused(p_ptr->confused + randint1(5) + 5);
+ set_confused(p_ptr, p_ptr->confused + randint1(5) + 5);
}
if (one_in_(5) && !p_ptr->resist_water)
if (p_ptr->resist_water) get_damage /= 4;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam *= 6; dam /= (randint1(4) + 7);
}
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(20) + 10);
}
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint1(10));
+ (void)set_image(p_ptr, p_ptr->image + randint1(10));
if (one_in_(3))
{
msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
- (void)gain_random_mutation(0);
+ (void)gain_mutation(p_ptr, 0);
}
}
if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
{
- drain_exp(5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
+ drain_exp(p_ptr, 5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
}
if (!p_ptr->resist_chaos || one_in_(9))
}
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
- (void)set_cut(p_ptr->cut + dam);
+ (void)set_cut(p_ptr,p_ptr->cut + dam);
}
if (!p_ptr->resist_shard || one_in_(13))
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 5; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!p_ptr->resist_sound || one_in_(13))
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 5; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
- (void)set_confused(p_ptr->confused + randint1(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
(void)apply_disenchant(0);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 6; dam /= (randint1(4) + 7);
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
apply_nexus(m_ptr);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_FORCE:
{
if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_ROCKET:
{
if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
- if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+ if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
if (p_ptr->resist_shard)
{
dam /= 2;
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
- (void)set_cut(p_ptr->cut + (dam / 2));
+ (void)set_cut(p_ptr,p_ptr->cut + (dam / 2));
}
if (!p_ptr->resist_shard || one_in_(12))
inven_damage(set_cold_destroy, 3);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_INERTIAL:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
dam *= 4; dam /= (randint1(4) + 7);
}
- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_blind(p_ptr->blind + randint1(5) + 2);
+ (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
+ if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
{
- if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
+ if (!CHECK_MULTISHADOW(p_ptr)) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
dam *= 2;
}
- else if (prace_is_(RACE_S_FAIRY))
+ else if (PRACE_IS_(p_ptr, RACE_S_FAIRY))
{
dam = dam * 4 / 3;
}
if (p_ptr->wraith_form) dam *= 2;
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
- if (p_ptr->wraith_form && !CHECK_MULTISHADOW())
+ if (p_ptr->wraith_form && !CHECK_MULTISHADOW(p_ptr))
{
p_ptr->wraith_form = 0;
msg_print(_("閃光のため非物質的な影の存在でいられなくなった。",
{
dam *= 4; dam /= (randint1(4) + 7);
- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
+ if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
}
- else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+ else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
{
- (void)set_blind(p_ptr->blind + randint1(5) + 2);
+ (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
dam /= (randint1(4) + 7);
msg_print(_("時間が通り過ぎていく気がする。", "You feel as if time is passing you by."));
}
- else if (!CHECK_MULTISHADOW())
+ else if (!CHECK_MULTISHADOW(p_ptr))
{
switch (randint1(10))
{
{
if (p_ptr->prace == RACE_ANDROID) break;
msg_print(_("人生が逆戻りした気がする。", "You feel life has clocked back."));
- lose_exp(100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
+ lose_exp(p_ptr, 100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
break;
}
}
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
if (fuzzy) msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
teleport_player(5, TELEPORT_PASSIVE);
if (!p_ptr->levitation)
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
if (!(p_ptr->resist_sound || p_ptr->levitation))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
}
if (p_ptr->levitation)
inven_damage(set_cold_destroy, 2);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
if (fuzzy) msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
{
if (fuzzy) msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
- (void)hp_player(dam);
+ (void)hp_player(p_ptr, dam);
dam = 0;
break;
}
case GF_OLD_SPEED:
{
if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
- (void)set_fast(p_ptr->fast + randint1(5), FALSE);
+ (void)set_fast(p_ptr, p_ptr->fast + randint1(5), FALSE);
dam = 0;
break;
}
case GF_OLD_SLOW:
{
if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
break;
}
{
msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
/* Have some nightmares */
- sanity_blast(NULL, FALSE);
+ sanity_blast(p_ptr, NULL, FALSE);
}
- set_paralyzed(p_ptr->paralyzed + dam);
+ set_paralyzed(p_ptr, p_ptr->paralyzed + dam);
dam = 0;
break;
}
case GF_SUPER_RAY:
{
if (fuzzy) msg_print(_("魔法のオーラで攻撃された!", "You are hit by an aura of magic!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
case GF_PSY_SPEAR:
{
if (fuzzy) msg_print(_("エネルギーの塊で攻撃された!", "You are hit by an energy!"));
- get_damage = take_hit(DAMAGE_FORCE, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_FORCE, dam, killer, monspell);
break;
}
{
if (fuzzy) msg_print(_("何かが空からあなたの頭上に落ちてきた!", "Something falls from the sky on you!"));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
if (!p_ptr->resist_shard || one_in_(13))
{
if (!p_ptr->immune_fire) inven_damage(set_fire_destroy, 2);
{
if (fuzzy) msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
get_damage = cold_dam(dam, killer, monspell, FALSE);
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_shard)
{
- (void)set_cut(p_ptr->cut + damroll(5, 8));
+ (void)set_cut(p_ptr,p_ptr->cut + damroll(5, 8));
}
if (!p_ptr->resist_sound)
{
- (void)set_stun(p_ptr->stun + randint1(15));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(15));
}
if ((!(p_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
if (p_ptr->mimic_form)
{
if (!(mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
else
{
/* Hurt a lot */
default:
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
break;
}
}
/* Drain mana */
case GF_DRAIN_MANA:
{
- if (CHECK_MULTISHADOW())
+ if (CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
}
/* Mind blast */
case GF_MIND_BLAST:
{
- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->resist_chaos && one_in_(3))
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
p_ptr->csp -= 50;
p_ptr->redraw |= PR_MANA;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* Brain smash */
case GF_BRAIN_SMASH:
{
- if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
p_ptr->redraw |= PR_MANA;
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!CHECK_MULTISHADOW())
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr))
{
if (!p_ptr->resist_blind)
{
- (void)set_blind(p_ptr->blind + 8 + randint0(8));
+ (void)set_blind(p_ptr, p_ptr->blind + 8 + randint0(8));
}
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->free_act)
{
- (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
+ (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4);
}
- (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+ (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
- (void)do_dec_stat(A_INT);
+ (void)do_dec_stat(p_ptr, A_INT);
while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
- (void)do_dec_stat(A_WIS);
+ (void)do_dec_stat(p_ptr, A_WIS);
if (!p_ptr->resist_chaos)
{
- (void)set_image(p_ptr->image + randint0(250) + 150);
+ (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
}
}
}
/* cause 1 */
case GF_CAUSE_1:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(15, 0);
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(15, 0);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 2 */
case GF_CAUSE_2:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(25, MIN(rlev / 2 - 15, 5));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(25, MIN(rlev / 2 - 15, 5));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 3 */
case GF_CAUSE_3:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW()) curse_equipment(33, MIN(rlev / 2 - 15, 15));
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(33, MIN(rlev / 2 - 15, 15));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
}
break;
}
/* cause 4 */
case GF_CAUSE_4:
{
- if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし秘孔を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
- if (!CHECK_MULTISHADOW()) (void)set_cut(p_ptr->cut + damroll(10, 10));
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+ if (!CHECK_MULTISHADOW(p_ptr)) (void)set_cut(p_ptr,p_ptr->cut + damroll(10, 10));
}
break;
}
/* Hand of Doom */
case GF_HAND_DOOM:
{
- if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+ if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
learn_spell(monspell);
}
else
{
- if (!CHECK_MULTISHADOW())
+ if (!CHECK_MULTISHADOW(p_ptr))
{
msg_print(_("あなたは命が薄まっていくように感じた!", "You feel your life fade away!"));
curse_equipment(40, 20);
}
- get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell);
+ get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, m_name, monspell);
- if (p_ptr->chp < 1) p_ptr->chp = 1; /* Paranoia */
+ if (p_ptr->chp < 1) p_ptr->chp = 1;
}
break;
}
msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
- if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
+ if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
}
if (p_ptr->riding && dam > 0)
* @param x 目標X座標 / Target x location (or location to travel "towards")
* @param dam 基本威力 / Base damage roll to apply to affected monsters (or player)
* @param typ 効果属性 / Type of damage to apply to monsters (and objects)
- * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx in "defines.h")
+ * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx)
* @param monspell 効果元のモンスター魔法ID
* @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
* @details
/* Start at monster */
else if (who > 0)
{
- x1 = m_list[who].fx;
- y1 = m_list[who].fy;
- monster_desc(who_name, &m_list[who], MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ x1 = current_floor_ptr->m_list[who].fx;
+ y1 = current_floor_ptr->m_list[who].fy;
+ monster_desc(who_name, ¤t_floor_ptr->m_list[who], MD_WRONGDOER_NAME);
}
else
}
}
if (project_o(0, 0, y, x, dam, GF_SEEKER))notice = TRUE;
- if (is_mirror_grid(&grid_array[y][x]))
+ if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
/* The target of monsterspell becomes tha mirror(broken) */
monster_target_y = y;
x = GRID_X(path_g[j]);
if (project_m(0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
if (!who && (project_m_n == 1) && !jump) {
- if (grid_array[project_m_y][project_m_x].m_idx > 0) {
- monster_type *m_ptr = &m_list[grid_array[project_m_y][project_m_x].m_idx];
+ if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0) {
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
if (m_ptr->ml)
{
- /* Hack -- auto-recall */
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-
- /* Hack - auto-track */
- health_track(grid_array[project_m_y][project_m_x].m_idx);
+ health_track(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx);
}
}
}
if (project_m(0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
notice = TRUE;
if (!who && (project_m_n == 1) && !jump) {
- if (grid_array[project_m_y][project_m_x].m_idx > 0)
+ if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0)
{
- monster_type *m_ptr = &m_list[grid_array[project_m_y][project_m_x].m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
if (m_ptr->ml)
{
- /* Hack -- auto-recall */
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-
- /* Hack - auto-track */
- health_track(grid_array[project_m_y][project_m_x].m_idx);
+ health_track(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx);
}
}
}
if( second_step )continue;
break;
}
- if( is_mirror_grid(&grid_array[y][x]) && !second_step )
+ if( is_mirror_grid(¤t_floor_ptr->grid_array[y][x]) && !second_step )
{
/* The target of monsterspell becomes tha mirror(broken) */
- monster_target_y=(s16b)y;
- monster_target_x=(s16b)x;
+ monster_target_y = y;
+ monster_target_x = x;
remove_mirror(y,x);
for( j = 0; j <=i ; j++ )
px = GRID_X(path_g[i]);
(void)project_m(0, 0, py, px, dam, GF_SUPER_RAY, flg, TRUE);
if(!who && (project_m_n == 1) && !jump){
- if(grid_array[project_m_y][project_m_x].m_idx >0 ){
- monster_type *m_ptr = &m_list[grid_array[project_m_y][project_m_x].m_idx];
+ if(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx >0 ){
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
if (m_ptr->ml)
{
- /* Hack -- auto-recall */
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-
- /* Hack - auto-track */
- health_track(grid_array[project_m_y][project_m_x].m_idx);
+ health_track(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx);
}
}
}
/* Dump everything with this radius */
for (i = gm[t]; i < gm[t+1]; i++)
{
- /* Extract the location */
y = gy[i];
x = gx[i];
/* Erase the explosion drawn above */
for (i = 0; i < grids; i++)
{
- /* Extract the location */
y = gy[i];
x = gx[i];
if (flg & PROJECT_KILL)
{
- see_s_msg = (who > 0) ? is_seen(&m_list[who]) :
+ see_s_msg = (who > 0) ? is_seen(¤t_floor_ptr->m_list[who]) :
(!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)));
}
/* A single bolt may be reflected */
if (grids <= 1)
{
- monster_type *m_ptr = &m_list[grid_array[y][x].m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
monster_race *ref_ptr = &r_info[m_ptr->r_idx];
- if ((flg & PROJECT_REFLECTABLE) && grid_array[y][x].m_idx && (ref_ptr->flags2 & RF2_REFLECTING) &&
- ((grid_array[y][x].m_idx != p_ptr->riding) || !(flg & PROJECT_PLAYER)) &&
+ if ((flg & PROJECT_REFLECTABLE) && current_floor_ptr->grid_array[y][x].m_idx && (ref_ptr->flags2 & RF2_REFLECTING) &&
+ ((current_floor_ptr->grid_array[y][x].m_idx != p_ptr->riding) || !(flg & PROJECT_PLAYER)) &&
(!who || dist_hack > 1) && !one_in_(10))
{
POSITION t_y, t_x;
else flg |= PROJECT_PLAYER;
/* The bolt is reflected */
- project(grid_array[y][x].m_idx, 0, t_y, t_x, dam, typ, flg, monspell);
+ project(current_floor_ptr->grid_array[y][x].m_idx, 0, t_y, t_x, dam, typ, flg, monspell);
/* Don't affect the monster any longer */
continue;
y = project_m_y;
/* Track if possible */
- if (grid_array[y][x].m_idx > 0)
+ if (current_floor_ptr->grid_array[y][x].m_idx > 0)
{
- monster_type *m_ptr = &m_list[grid_array[y][x].m_idx];
+ monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
if (m_ptr->ml)
{
- /* Hack -- auto-recall */
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
-
- /* Hack - auto-track */
- if (m_ptr->ml) health_track(grid_array[y][x].m_idx);
+ health_track(current_floor_ptr->grid_array[y][x].m_idx);
}
}
}
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, &m_list[p_ptr->riding], 0);
+ monster_desc(m_name, ¤t_floor_ptr->m_list[p_ptr->riding], 0);
if (rakubadam_m > 0)
{
monster_target_y = p_ptr->y;
monster_target_x = p_ptr->x;
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- if (is_mirror_grid(&grid_array[y][x]) &&
+ if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]) &&
distance(p_ptr->y, p_ptr->x, y, x) <= MAX_RANGE &&
distance(p_ptr->y, p_ptr->x, y, x) != 0 &&
player_has_los_bold(y, x) &&
{
POSITION x, y;
- for (x = 0; x < cur_wid; x++)
+ for (x = 0; x < current_floor_ptr->width; x++)
{
- for (y = 0; y < cur_hgt; y++)
+ for (y = 0; y < current_floor_ptr->height; y++)
{
- if (is_mirror_grid(&grid_array[y][x]))
+ if (is_mirror_grid(¤t_floor_ptr->grid_array[y][x]))
{
if (project_m(0, 0, y, x, dam, GF_GENOCIDE,
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP), TRUE))
{
- if (!grid_array[y][x].m_idx)
+ if (!current_floor_ptr->grid_array[y][x].m_idx)
{
remove_mirror(y, x);
}