* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(FEAT_IDX feat), bool under)
+static int count_dt(player_type *creature_ptr, POSITION *y, POSITION *x, bool (*test)(player_type*, FEAT_IDX feat), bool under)
{
/* Check around (and under) the character */
int count = 0;
feat = get_feat_mimic(g_ptr);
/* Not looking for this feature */
- if (!((*test)(feat))) continue;
+ if (!((*test)(creature_ptr, feat))) continue;
/* OK */
++count;
return more;
}
- s16b closed_feat = feat_state(old_feat, FF_CLOSE);
+ s16b closed_feat = feat_state(creature_ptr, old_feat, FF_CLOSE);
/* Hack -- object in the way */
if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) &&
}
}
- if (is_hidden_door(g_ptr))
+ if (is_hidden_door(creature_ptr, g_ptr))
{
/* Occasional Search XXX XXX */
if (randint0(100) < 25) search(creature_ptr);
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Must be a closed door */
- if (!is_closed_door(g_ptr->feat))
+ if (!is_closed_door(creature_ptr, g_ptr->feat))
{
return FALSE;
}
o_idx = chest_check(creature_ptr->current_floor_ptr, y, x, TRUE);
/* Disarm a trap */
- if (!is_trap(feat) && !o_idx)
+ if (!is_trap(creature_ptr, feat) && !o_idx)
{
msg_print(_("そこには解除するものが見当たらない。", "You see nothing there to disarm."));
}
sound(have_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
/* Break down the door */
- if ((randint0(100) < 50) || (feat_state(g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
+ if ((randint0(100) < 50) || (feat_state(creature_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))
{
cave_alter_feat(creature_ptr, y, x, FF_BASH);
}
/* Single object */
q_ptr->number = 1;
- object_desc(o_name, q_ptr, OD_OMIT_PREFIX);
+ object_desc(creature_ptr, o_name, q_ptr, OD_OMIT_PREFIX);
if (creature_ptr->mighty_throw) mult += 3;
else
{
floor_item_increase(creature_ptr->current_floor_ptr, 0 - item, -1);
- floor_item_optimize(creature_ptr->current_floor_ptr, 0 - item);
+ floor_item_optimize(creature_ptr, 0 - item);
}
if (item >= INVEN_RARM)
move_cursor_relative(ny[cur_dis], nx[cur_dis]);
Term_fresh();
Term_xtra(TERM_XTRA_DELAY, msec);
- lite_spot(ny[cur_dis], nx[cur_dis]);
+ lite_spot(creature_ptr, ny[cur_dis], nx[cur_dis]);
Term_fresh();
}
grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
GAME_TEXT m_name[MAX_NLEN];
- monster_name(g_ptr->m_idx, m_name);
+ monster_name(creature_ptr, g_ptr->m_idx, m_name);
/* Check the visibility */
visible = m_ptr->ml;
/* No death */
else
{
- message_pain(g_ptr->m_idx, tdam);
+ message_pain(creature_ptr, g_ptr->m_idx, tdam);
/* Anger the monster */
if ((tdam > 0) && !object_is_potion(q_ptr))
if (creature_ptr->current_floor_ptr->grid_array[y][x].m_idx && is_friendly(m_ptr) && !MON_INVULNER(m_ptr))
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(creature_ptr, m_name, m_ptr, 0);
msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
- set_hostile(&creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx]);
+ set_hostile(creature_ptr, &creature_ptr->current_floor_ptr->m_list[creature_ptr->current_floor_ptr->grid_array[y][x].m_idx]);
}
}
do_drop = FALSE;
j = -1;
if (boomerang) back_chance += 4+randint1(5);
if (super_boomerang) back_chance += 100;
- object_desc(o2_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+ object_desc(creature_ptr, o2_name, q_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
if((back_chance > 30) && (!one_in_(100) || super_boomerang))
{
move_cursor_relative(ny[i], nx[i]);
Term_fresh();
Term_xtra(TERM_XTRA_DELAY, msec);
- lite_spot(ny[i], nx[i]);
+ lite_spot(creature_ptr, ny[i], nx[i]);
Term_fresh();
}
else