#include "monster.h"
#include "monster-status.h"
+#include "monster-spell.h"
+#include "spells-status.h"
#include "spells-diceroll.h"
#include "spells-summon.h"
#include "monsterrace-hook.h"
#include "artifact.h"
#include "avatar.h"
#include "player-status.h"
+#include "player-move.h"
#include "realm-hex.h"
#include "object-hook.h"
+#include "object-broken.h"
#include "term.h"
#include "grid.h"
#include "feature.h"
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(¤t_floor->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++;
*/
static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
{
- grid_type *g_ptr = ¤t_floor->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;
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
/* 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 = ¤t_floor->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))
{
{
if (is_mirror_grid(g_ptr))
{
- msg_print(_("鏡が割れた!", "The mirror was crashed!"));
+ msg_print(_("鏡が割れた!", "The mirror was shattered!"));
sound(SOUND_GLASS);
remove_mirror(y, x);
project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
{
if (known && (g_ptr->info & CAVE_MARK))
{
- msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
+ msg_format(_("%sが割れた!", "The %s crumbled!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
sound(SOUND_GLASS);
}
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
break;
{
if (is_mirror_grid(g_ptr) && p_ptr->lev < 40)
{
- msg_print(_("鏡が割れた!", "The mirror was crashed!"));
+ msg_print(_("鏡が割れた!", "The mirror was shattered!"));
sound(SOUND_GLASS);
remove_mirror(y, x);
project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS, (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
{
if (known && (g_ptr->info & CAVE_MARK))
{
- msg_format(_("%sが割れた!", "The %s was crashed!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
+ msg_format(_("%sが割れた!", "The %s crumbled!"), f_name + f_info[get_feat_mimic(g_ptr)].name);
sound(SOUND_GLASS);
}
/* 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 = ¤t_floor->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 = ¤t_floor->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];
else
{
/* Injure +/- confusion */
- monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
take_hit(DAMAGE_ATTACK, dam, killer, -1); /* has already been /3 */
if (one_in_(4) && !CHECK_MULTISHADOW())
{
else
{
/* Injure + mana drain */
- monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
if (!CHECK_MULTISHADOW())
{
msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
}
if (MON_MONFEAR(m_ptr))
{
- if (seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
+ if (seen_msg) msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name, m_poss);
(void)set_monster_monfear(g_ptr->m_idx, 0);
}
if (seen) obvious = 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);
+ if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappeared!"), m_name);
chg_virtue(V_VITALITY, -1);
return TRUE;
}
}
/* 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];
x = m_ptr->fx;
/* Hack -- get new grid */
- g_ptr = ¤t_floor->grid_array[y][x];
+ g_ptr = ¤t_floor_ptr->grid_array[y][x];
}
/* Fear */
{
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);
}
if (one_in_(4)) /* 4 */
do_poly_self();
else
- mutate_player();
+ status_shuffle();
}
if (one_in_(6))
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)
case 1: case 2: case 3: case 4: case 5:
{
if (p_ptr->prace == RACE_ANDROID) break;
- msg_print(_("人生が逆戻りした気がする。", "You feel life has clocked back."));
+ msg_print(_("人生が逆戻りした気がする。", "You feel like a chunk of the past has been ripped away."));
lose_exp(100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
break;
}
{
if (CHECK_MULTISHADOW())
{
- msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
+ msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, but you are unharmed!"));
}
else if (p_ptr->csp)
{
{
if (!CHECK_MULTISHADOW())
{
- msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
+ msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psionic energy."));
if (!p_ptr->resist_conf)
{
{
if (!CHECK_MULTISHADOW())
{
- msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
+ msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psionic energy."));
p_ptr->csp -= 100;
if (p_ptr->csp < 0)
get_damage = take_hit(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;
}
/* 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(¤t_floor->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 (current_floor->grid_array[project_m_y][project_m_x].m_idx > 0) {
- monster_type *m_ptr = &m_list[current_floor->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)
{
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- health_track(current_floor->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 (current_floor->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[current_floor->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)
{
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- health_track(current_floor->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(¤t_floor->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 = y;
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(current_floor->grid_array[project_m_y][project_m_x].m_idx >0 ){
- monster_type *m_ptr = &m_list[current_floor->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)
{
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- health_track(current_floor->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 (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[current_floor->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) && current_floor->grid_array[y][x].m_idx && (ref_ptr->flags2 & RF2_REFLECTING) &&
- ((current_floor->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(current_floor->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 (current_floor->grid_array[y][x].m_idx > 0)
+ if (current_floor_ptr->grid_array[y][x].m_idx > 0)
{
- monster_type *m_ptr = &m_list[current_floor->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)
{
if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- health_track(current_floor->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(¤t_floor->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(¤t_floor->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 (!current_floor->grid_array[y][x].m_idx)
+ if (!current_floor_ptr->grid_array[y][x].m_idx)
{
remove_mirror(y, x);
}