#else
(void)strnfmt(out_val, 78, "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
#endif
- p, I2A(0), I2A(num - 1), p);
+ p, I2A(0), I2A(num - 1), p);
}
if (use_menu && !only_browse) screen_save();
/* Get a spell from the user */
- choice= (always_show_list || use_menu) ? ESCAPE:1 ;
- while (!flag)
- {
+ choice= (always_show_list || use_menu) ? ESCAPE:1 ;
+ while (!flag)
+ {
if(choice==ESCAPE) choice = ' ';
else if( !get_com(out_val, &choice, TRUE) )break;
if (plev < 25)
return psychometry();
else
- return ident_spell(FALSE, FALSE);
+ return ident_spell(FALSE);
break;
case 8:
/* Mindwave */
int val=0;
for( x=0 ; x < cur_wid ; x++ ){
for( y=0 ; y < cur_hgt ; y++ ){
- if( (cave[y][x].info & CAVE_IN_MIRROR) )val++;
+ if (is_mirror_grid(&cave[y][x])) val++;
}
}
return val;
{
/* mirror of seeing */
case 0:
- tmp = (cave[py][px].info & CAVE_IN_MIRROR) ? 4 : 0;
+ tmp = is_mirror_grid(&cave[py][px]) ? 4 : 0;
if( plev + tmp > 4)detect_monsters_normal(DETECT_RAD_DEFAULT);
if( plev + tmp > 18 )detect_monsters_invis(DETECT_RAD_DEFAULT);
if( plev + tmp > 28 )set_tim_esp(plev,FALSE);
break;
case 2:
if (!get_aim_dir(&dir)) return FALSE;
- if ( plev > 9 && (cave[py][px].info & CAVE_IN_MIRROR) ){
+ if ( plev > 9 && is_mirror_grid(&cave[py][px]) ) {
fire_beam(GF_LITE, dir,damroll(3+((plev-1)/5),4));
}
else {
case 9:
for(x=0;x<cur_wid;x++){
for(y=0;y<cur_hgt;y++){
- if(cave[y][x].info & CAVE_IN_MIRROR){
- project(0,2,y,x,plev,GF_OLD_SLEEP,(PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP|PROJECT_NO_REF|PROJECT_NO_HANGEKI),-1);
+ if (is_mirror_grid(&cave[y][x])) {
+ project(0,2,y,x,plev,GF_OLD_SLEEP,(PROJECT_GRID|PROJECT_ITEM|PROJECT_KILL|PROJECT_JUMP|PROJECT_NO_HANGEKI),-1);
}
}
}
break;
/* illusion light */
case 14:
- tmp = (cave[py][px].feat & CAVE_IN_MIRROR) ? 4 : 3;
+ tmp = is_mirror_grid(&cave[py][px]) ? 4 : 3;
slow_monsters();
stun_monsters(plev*tmp);
confuse_monsters(plev*tmp);
break;
/* mirror shift */
case 15:
- if( !(cave[py][px].info & CAVE_IN_MIRROR) ){
+ if( !is_mirror_grid(&cave[py][px]) ){
#ifdef JP
msg_print("¶À¤Î¹ñ¤Î¾ì½ê¤¬¤ï¤«¤é¤Ê¤¤¡ª");
#else
break;
}
case 7:
- return ident_spell(FALSE, FALSE);
+ return ident_spell(FALSE);
break;
case 8:
set_tim_ffall(randint1(20) + 20, FALSE);
case 10:
project_length = 5;
if (!get_aim_dir(&dir)) return FALSE;
- project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF);
+ project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL);
break;
case 11:
{
int ny = GRID_Y(path_g[i]);
int nx = GRID_X(path_g[i]);
-
+ cave_type *c_ptr = &cave[ny][nx];
+
if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
- cave[ny][nx].feat != FEAT_GLYPH &&
- cave[ny][nx].feat != FEAT_MINOR_GLYPH &&
- !(cave[ny][nx].feat >= FEAT_PATTERN_START &&
- cave[ny][nx].feat <= FEAT_PATTERN_XTRA2))
+ !(c_ptr->info & CAVE_OBJECT) &&
+ !(c_ptr->feat >= FEAT_PATTERN_START &&
+ c_ptr->feat <= FEAT_PATTERN_XTRA2))
{
ty = ny;
tx = nx;
/* Update the old location */
cave[target_row][target_col].m_idx = 0;
- /* Update the new location */
+ /* Update the new location */
cave[ty][tx].m_idx = m_idx;
/* Move the monster */
break;
case MIND_MIRROR_MASTER:
/* Cast the spell */
- if( (cave[py][px].info & CAVE_IN_MIRROR) )on_mirror = TRUE;
+ if( is_mirror_grid(&cave[py][px]) )on_mirror = TRUE;
cast = cast_mirror_spell(n);
break;
case MIND_NINJUTSU:
/* teleport from mirror costs small energy */
if( on_mirror && p_ptr->pclass == CLASS_MIRROR_MASTER )
{
- if( n==2 || n==4 || n==6 || n==15 )energy_use = 50;
+ if( n==3 || n==5 || n==7 || n==16 )energy_use = 50;
}
if ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU))
Term_erase(12, 17, 255);
Term_erase(12, 16, 255);
- roff_to_buf( mind_tips[use_mind][n],62,temp);
+ roff_to_buf(mind_tips[use_mind][n], 62, temp, sizeof(temp));
for(j=0, line = 17;temp[j];j+=(1+strlen(&temp[j])))
{
prt(&temp[j], line, 15);