static OBJECT_IDX chest_check(POSITION y, POSITION x, bool trapped)
{
cave_type *c_ptr = &cave[y][x];
-
OBJECT_IDX this_o_idx, next_o_idx = 0;
-
/* Scan all objects in the grid */
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
-
- /* Acquire next object */
next_o_idx = o_ptr->next_o_idx;
/* Skip unknown chests XXX XXX */
return (this_o_idx);
}
}
-
- /* No chest */
return (0);
}
/* Let the Chest drop items */
chest_death(FALSE, y, x, o_idx);
}
-
- /* Result */
return (more);
}
-
-#if defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) /* TNB */
-
/*!
* @brief 地形は開くものであって、かつ開かれているかを返す /
* Attempt to open the given chest at the given location
return d[dx + 1][dy + 1];
}
-#endif /* defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) -- TNB */
-
-
/*!
* @brief 「開ける」動作コマンドのサブルーチン /
* Perform the basic "open" command on doors
/* Extract the lock power */
j = f_ptr->power;
- /* Extract the difficulty XXX XXX XXX */
+ /* Extract the difficulty */
j = i - (j * 4);
/* Always have a small chance of success */
sound(SOUND_OPENDOOR);
}
-
- /* Result */
return (more);
}
set_action(ACTION_NONE);
}
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/* Option: Pick a direction */
if (easy_open)
{
}
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
/* Allow repeated command */
if (command_arg)
{
}
/* Cancel repeat unless we may continue */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
}
}
}
-
- /* Result */
return (more);
}
set_action(ACTION_NONE);
}
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/* Option: Pick a direction */
if (easy_open)
{
}
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
/* Allow repeated command */
if (command_arg)
{
}
/* Get a "repeated" direction */
- if (get_rep_dir(&dir,FALSE))
+ if (get_rep_dir(&dir, FALSE))
{
cave_type *c_ptr;
FEAT_IDX feat;
}
/* Cancel repeat unless we may continue */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
{
msg_print(_("そこには何も見当たらない。", "You see nothing there."));
- /* Nope */
return (FALSE);
}
{
msg_print(_("そこには掘るものが見当たらない。", "You see nothing there to tunnel."));
- /* Nope */
return (FALSE);
}
- /* Okay */
return (TRUE);
}
/* Occasional Search XXX XXX */
if (randint0(100) < 25) search();
}
-
- /* Result */
return more;
}
}
/* Cancel repetition unless we can continue */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
-
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
/*!
* @brief 移動処理による簡易な「開く」処理 /
* easy_open_door --
/* Must be a closed door */
if (!is_closed_door(c_ptr->feat))
{
- /* Nope */
return (FALSE);
}
/* Extract the lock power */
j = f_ptr->power;
- /* Extract the difficulty XXX XXX XXX */
+ /* Extract the difficulty */
j = i - (j * 4);
/* Always have a small chance of success */
sound(SOUND_OPENDOOR);
}
-
- /* Result */
return (TRUE);
}
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
-
/*!
* @brief 箱のトラップを解除するコマンドのメインルーチン /
* Perform the basic "disarm" command
sound(SOUND_FAIL);
chest_trap(y, x, o_idx);
}
-
- /* Result */
return (more);
}
* Returns TRUE if repeated commands may continue
* </pre>
*/
-#ifdef ALLOW_EASY_DISARM /* TNB */
bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
{
/* Get grid and contents */
cave_type *c_ptr = &cave[y][x];
/* Remove the trap */
cave_alter_feat(y, x, FF_DISARM);
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
/* Move the player onto the trap */
move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
- /* move the player onto the trap grid */
- move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
}
/* Failure -- Keep trying */
else
{
msg_format(_("%sを作動させてしまった!", "You set off the %s!"), name);
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
/* Move the player onto the trap */
move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
- /* Move the player onto the trap */
- move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
}
-
- /* Result */
return (more);
}
set_action(ACTION_NONE);
}
-#ifdef ALLOW_EASY_DISARM /* TNB */
/* Option: Pick a direction */
if (easy_disarm)
}
}
-#endif /* ALLOW_EASY_DISARM -- TNB */
/* Allow repeated command */
if (command_arg)
}
/* Cancel repeat unless told not to */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
msg_format(_("%sに体当たりをした!", "You smash into the %s!"), name);
- /* Compare bash power to door power XXX XXX XXX */
+ /* Compare bash power to door power */
temp = (bash - (temp * 10));
if (p_ptr->pclass == CLASS_BERSERKER) temp *= 2;
/* Hack -- Lose balance ala paralysis */
(void)set_paralyzed(p_ptr->paralyzed + 2 + randint0(2));
}
-
- /* Result */
return (more);
}
}
/* Unless valid action taken, cancel bash */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
*
* Attack monsters, tunnel through walls, disarm traps, open doors.
*
- * Consider confusion XXX XXX XXX
+ * Consider confusion
*
* This command must always take a turn, to prevent free detection
* of invisible monsters.
}
/* Cancel repetition unless we can continue */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
* @return オブジェクトがある場合TRUEを返す
* @details
* <pre>
- * XXX XXX XXX Let user choose a pile of spikes, perhaps?
+ * Let user choose a pile of spikes, perhaps?
* </pre>
*/
static bool get_spike(INVENTORY_IDX *ip)
}
/* Cancel repeat unless we may continue */
- if (!more) disturb(0, 0);
+ if (!more) disturb(FALSE, FALSE);
}
if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
- /* Take a turn XXX XXX XXX (?) */
+ /* Take a turn (?) */
p_ptr->energy_use = 100;
/* The sin of sloth */
/* Redraw the state */
p_ptr->redraw |= (PR_STATE);
-
- /* Handle stuff */
handle_stuff();
/* Refresh */
/* Sniper - Cannot shot a single arrow twice */
if ((snipe_type == SP_DOUBLE) && (o_ptr->number < 2)) snipe_type = SP_NONE;
- /* Describe the object */
object_desc(o_name, o_ptr, OD_OMIT_PREFIX);
/* Use the proper number of shots */
/* Start at the player */
y = p_ptr->y;
x = p_ptr->x;
-
- /* Get local object */
q_ptr = &forge;
/* Obtain a local object */
}
sound(SOUND_SHOOT);
-
- /* Hack -- Handle stuff */
handle_stuff();
/* Save the old location */
{
cave[ny][nx].info |= (CAVE_GLOW);
- /* Notice */
note_spot(ny, nx);
- /* Redraw */
lite_spot(ny, nx);
}
{
cave[ny][nx].info &= ~(CAVE_GLOW | CAVE_MARK);
- /* Notice */
note_spot(ny, nx);
- /* Redraw */
lite_spot(ny, nx);
}
}
else
{
- /* Apply special damage XXX XXX XXX */
+ /* Apply special damage */
tdam = tot_dam_aux_shot(q_ptr, tdam, m_ptr);
tdam = critical_shot(q_ptr->weight, q_ptr->to_h, j_ptr->to_h, tdam);
{
cave[ny][nx].info |= (CAVE_GLOW);
- /* Notice */
note_spot(ny, nx);
- /* Redraw */
lite_spot(ny, nx);
}
m_ptr->fy = ny;
/* Update the monster (new location) */
- update_mon(c_mon_ptr->m_idx, TRUE);
+ update_monster(c_mon_ptr->m_idx, TRUE);
lite_spot(ny, nx);
lite_spot(oy, ox);
/* Require proper missile */
item_tester_tval = p_ptr->tval_ammo;
- /* Get an item */
q = _("どれを撃ちますか? ", "Fire which item? ");
s = _("発射されるアイテムがありません。", "You have nothing to fire.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR)))
}
else
{
- /* Get an item */
q = _("どのアイテムを投げますか? ", "Throw which item? ");
s = _("投げるアイテムがない。", "You have nothing to throw.");
if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP)))
o_ptr = &o_list[0 - item];
}
-
/* Item is cursed */
if (object_is_cursed(o_ptr) && (item >= INVEN_RARM))
{
msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
- /* Nope */
return FALSE;
}
msg_print(_("アリーナではアイテムを使えない!", "You're in the arena now. This is hand-to-hand!"));
msg_print(NULL);
- /* Nope */
return FALSE;
}
}
-
- /* Get local object */
q_ptr = &forge;
/* Obtain a local object */
y = p_ptr->y;
x = p_ptr->x;
-
- /* Hack -- Handle stuff */
handle_stuff();
if ((p_ptr->pclass == CLASS_NINJA) && ((q_ptr->tval == TV_SPIKE) || ((have_flag(flgs, TR_THROW)) && (q_ptr->tval == TV_SWORD)))) shuriken = TRUE;
ds = q_ptr->ds;
torch_dice(q_ptr, &dd, &ds); /* throwing a torch */
tdam = damroll(dd, ds);
- /* Apply special damage XXX XXX XXX */
+ /* Apply special damage */
tdam = tot_dam_aux(q_ptr, tdam, m_ptr, 0, TRUE);
tdam = critical_shot(q_ptr->weight, q_ptr->to_h, 0, tdam);
if (q_ptr->to_d > 0)