case GF_SOUND: return (0x09);
case GF_SHARDS: return (0x08);
case GF_FORCE: return (0x09);
- case GF_INERTIA: return (0x09);
+ case GF_INERTIAL: return (0x09);
case GF_GRAVITY: return (0x09);
case GF_TIME: return (0x09);
case GF_LITE_WEAK: return (0x06);
}
/* Inertia -- breathers resist */
- case GF_INERTIA:
+ case GF_INERTIAL:
{
if (seen) obvious = TRUE;
if (seen) obvious = TRUE;
/* PSI only works if the monster can see you! -- RG */
- if (!(los(m_ptr->fy, m_ptr->fx, py, px)))
+ 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);
break;
}
- if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->flags5 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->flags6 & ~(RF6_NOMAGIC_MASK)))
+ if ((r_ptr->flags4 & ~(RF4_NOMAGIC_MASK)) || (r_ptr->a_ability_flags1 & ~(RF5_NOMAGIC_MASK)) || (r_ptr->a_ability_flags2 & ~(RF6_NOMAGIC_MASK)))
{
if (who > 0)
{
case 3: case 4: case 5: case 6:
if (!count)
{
- int dam = damroll(10, 10);
+ int extra_dam = damroll(10, 10);
msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
- project(0, 8, ty,tx, dam, GF_MANA, curse_flg, -1);
+ project(0, 8, ty, tx, extra_dam, GF_MANA, curse_flg, -1);
if (!one_in_(6)) break;
}
case 7: case 8:
if (pet) mode |= PM_FORCE_PET;
else mode |= (PM_NO_PET | PM_FORCE_FRIENDLY);
- count += summon_specific((pet ? -1 : 0), py, px, (pet ? p_ptr->lev*2/3+randint1(p_ptr->lev/2) : dun_level), 0, mode);
+ 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);
if (!one_in_(6)) break;
}
case 23: case 24: case 25:
q_ptr->ident |= (IDENT_MENTAL);
/* Drop it in the dungeon */
- (void)drop_near(q_ptr, -1, py, px);
+ (void)drop_near(q_ptr, -1, p_ptr->y, p_ptr->x);
}
/* Track it */
t_x = m_list[who].fx - 1 + randint1(3);
max_attempts--;
}
- while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(py, px, t_y, t_x));
+ while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
if (max_attempts < 1)
{
}
else
{
- t_y = py - 1 + randint1(3);
- t_x = px - 1 + randint1(3);
+ t_y = p_ptr->y - 1 + randint1(3);
+ t_x = p_ptr->x - 1 + randint1(3);
}
project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
/* Arrow -- XXX no dodging */
case GF_ARROW:
{
- if (fuzzy)
- {
- msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
- }
+ if (fuzzy)
+ {
+ msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
+ }
else if ((inventory[INVEN_RARM].name1 == ART_ZANTETSU) || (inventory[INVEN_LARM].name1 == ART_ZANTETSU))
{
- msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
+ msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
break;
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
- int k = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
- (void)set_stun(p_ptr->stun + k);
+ int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
+ (void)set_stun(p_ptr->stun + plus_stun);
}
if (!(p_ptr->resist_fire ||
- IS_OPPOSE_FIRE() ||
- p_ptr->immune_fire))
+ IS_OPPOSE_FIRE() ||
+ p_ptr->immune_fire))
{
inven_damage(set_acid_destroy, 3);
}
}
else if (!CHECK_MULTISHADOW())
{
- int k = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + k);
+ int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
+ (void)set_stun(p_ptr->stun + plus_stun);
}
if (!p_ptr->resist_sound || one_in_(13))
}
/* Inertia -- slowness */
- case GF_INERTIA:
+ 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);
case GF_GRAVITY:
{
if (fuzzy) msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
- msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
+ msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
if (!CHECK_MULTISHADOW())
{
(void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
if (!(p_ptr->resist_sound || p_ptr->levitation))
{
- int k = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + k);
+ int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
+ (void)set_stun(p_ptr->stun + plus_stun);
}
}
if (p_ptr->levitation)
rakubadam_m = 0;
/* Default target of monsterspell is player */
- monster_target_y=py;
- monster_target_x=px;
+ monster_target_y=p_ptr->y;
+ monster_target_x=p_ptr->x;
/* Hack -- Jump to target */
if (flg & (PROJECT_JUMP))
/* Start at player */
else if (who <= 0)
{
- x1 = px;
- y1 = py;
+ x1 = p_ptr->x;
+ y1 = p_ptr->y;
}
/* Start at monster */
monster_target_y=(s16b)y;
monster_target_x=(s16b)x;
- remove_mirror(y,x);
- next_mirror( &oy,&ox,y,x );
+ remove_mirror(y, x);
+ next_mirror(&oy, &ox, y, x);
path_n = i+project_path(&(path_g[i+1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg);
- for( j = last_i; j <=i ; j++ )
+ for(j = last_i; j <= i; j++)
{
y = GRID_Y(path_g[j]);
x = GRID_X(path_g[j]);
last_i = i;
}
}
- for( i = last_i ; i < path_n ; i++ )
+ for(i = last_i ; i < path_n ; i++)
{
- int x,y;
- y = GRID_Y(path_g[i]);
- x = GRID_X(path_g[i]);
- if(project_m(0,0,y,x,dam,GF_SEEKER,flg,TRUE))
- notice=TRUE;
+ int py, px;
+ py = GRID_Y(path_g[i]);
+ px = GRID_X(path_g[i]);
+ if(project_m(0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
+ notice = TRUE;
if(!who && (project_m_n==1) && !jump ){
- if(cave[project_m_y][project_m_x].m_idx >0 ){
- monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
+ if(cave[project_m_y][project_m_x].m_idx > 0)
+ {
+ monster_type *m_ptr = &m_list[cave[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);
+ if (m_ptr->ml)
+ {
+ /* Hack -- auto-recall */
+ if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- /* Hack - auto-track */
- health_track(cave[project_m_y][project_m_x].m_idx);
- }
- }
+ /* Hack - auto-track */
+ health_track(cave[project_m_y][project_m_x].m_idx);
+ }
+ }
}
- (void)project_f(0,0,y,x,dam,GF_SEEKER);
+ (void)project_f(0, 0, py, px, dam, GF_SEEKER);
}
return notice;
}
}
for( i = 0; i < path_n ; i++ )
{
- int x,y;
- y = GRID_Y(path_g[i]);
- x = GRID_X(path_g[i]);
- (void)project_m(0,0,y,x,dam,GF_SUPER_RAY,flg,TRUE);
- if(!who && (project_m_n==1) && !jump ){
- if(cave[project_m_y][project_m_x].m_idx >0 ){
- monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
+ int py, px;
+ py = GRID_Y(path_g[i]);
+ 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(cave[project_m_y][project_m_x].m_idx >0 ){
+ monster_type *m_ptr = &m_list[cave[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);
+ if (m_ptr->ml)
+ {
+ /* Hack -- auto-recall */
+ if (!p_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- /* Hack - auto-track */
- health_track(cave[project_m_y][project_m_x].m_idx);
- }
- }
+ /* Hack - auto-track */
+ health_track(cave[project_m_y][project_m_x].m_idx);
+ }
+ }
}
- (void)project_f(0,0,y,x,dam,GF_SUPER_RAY);
+ (void)project_f(0, 0, py, px, dam, GF_SUPER_RAY);
}
return notice;
}
if (flg & PROJECT_KILL)
{
see_s_msg = (who > 0) ? is_seen(&m_list[who]) :
- (!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(py, px, y1, x1)));
+ (!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)));
}
int point_y[3];
/* Default target of monsterspell is player */
- monster_target_y=py;
- monster_target_x=px;
+ monster_target_y=p_ptr->y;
+ monster_target_x=p_ptr->x;
for( x=0 ; x < cur_wid ; x++ )
{
for( y=0 ; y < cur_hgt ; y++ )
{
if( is_mirror_grid(&cave[y][x]) &&
- distance(py,px,y,x) <= MAX_RANGE &&
- distance(py,px,y,x) != 0 &&
+ 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) &&
- projectable(py, px, y, x)
+ projectable(p_ptr->y, p_ptr->x, y, x)
){
mirror_y[mirror_num]=y;
mirror_x[mirror_num]=x;
point_x[0]=mirror_x[point_x[0]];
point_y[1]=mirror_y[point_x[1]];
point_x[1]=mirror_x[point_x[1]];
- point_y[2]=py;
- point_x[2]=px;
+ point_y[2]=p_ptr->y;
+ point_x[2]=p_ptr->x;
x=point_x[0]+point_x[1]+point_x[2];
y=point_y[0]+point_y[1]+point_y[2];
centersign*( (point_x[2]-x)*(point_y[0]-y)
-(point_y[2]-y)*(point_x[0]-x)) >=0 )
{
- if (player_has_los_bold(y, x) && projectable(py, px, y, x)) {
+ if (player_has_los_bold(y, x) && projectable(p_ptr->y, p_ptr->x, y, x)) {
/* Visual effects */
if(!(p_ptr->blind)
&& panel_contains(y,x)){
centersign*( (point_x[2]-x)*(point_y[0]-y)
-(point_y[2]-y)*(point_x[0]-x)) >=0 )
{
- if (player_has_los_bold(y, x) && projectable(py, px, y, x)) {
+ if (player_has_los_bold(y, x) && projectable(p_ptr->y, p_ptr->x, y, x)) {
(void)project_f(0,0,y,x,dam,GF_MANA);
}
}
centersign*( (point_x[2]-x)*(point_y[0]-y)
-(point_y[2]-y)*(point_x[0]-x)) >=0 )
{
- if (player_has_los_bold(y, x) && projectable(py, px, y, x)) {
+ if (player_has_los_bold(y, x) && projectable(p_ptr->y, p_ptr->x, y, x)) {
(void)project_o(0,0,y,x,dam,GF_MANA);
}
}
centersign*( (point_x[2]-x)*(point_y[0]-y)
-(point_y[2]-y)*(point_x[0]-x)) >=0 )
{
- if (player_has_los_bold(y, x) && projectable(py, px, y, x)) {
+ if (player_has_los_bold(y, x) && projectable(p_ptr->y, p_ptr->x, y, x)) {
(void)project_m(0,0,y,x,dam,GF_MANA,
(PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP),TRUE);
}