* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
-s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
+HIT_POINT tot_dam_aux(object_type *o_ptr, HIT_POINT tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
{
MULTIPLY mult = 10;
/* Pick a trap */
disclose_grid(y, x);
- /* Message */
msg_print(_("トラップを発見した。", "You have found a trap."));
/* Disturb */
/* Secret door */
if (is_hidden_door(c_ptr))
{
- /* Message */
msg_print(_("隠しドアを発見した。", "You have found a secret door."));
/* Disclose */
/* Identify once */
if (!object_is_known(o_ptr))
{
- /* Message */
msg_print(_("箱に仕掛けられたトラップを発見した!", "You have discovered a trap on the chest!"));
/* Know the trap */
/* Describe the object */
object_desc(o_name, o_ptr, 0);
- /* Message */
#ifdef JP
if ((o_ptr->name1 == ART_CRIMSON) && (p_ptr->pseikaku == SEIKAKU_COMBAT))
{
{
cave_type *c_ptr = &cave[p_ptr->y][p_ptr->x];
- s16b this_o_idx, next_o_idx = 0;
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
char o_name[MAX_NLEN];
/* Recenter the map around the player */
verify_panel();
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
/* Handle stuff */
/* Delete the gold */
delete_object_idx(this_o_idx);
- /* Message */
msg_format(_(" $%ld の価値がある%sを見つけた。", "You collect %ld gold pieces worth of %s."),
(long)value, o_name);
/* Redraw gold */
p_ptr->redraw |= (PR_GOLD);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
}
* @param n_x プレイヤーの移動先X座標
* @return 移動処理が可能である場合(可能な場合に選択した場合)TRUEを返す。
*/
-bool pattern_seq(int c_y, int c_x, int n_y, int n_x)
+bool pattern_seq(POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
{
feature_type *cur_f_ptr = &f_info[cave[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[cave[n_y][n_x].feat];
* @param mpe_mode 移動オプションフラグ
* @return プレイヤーが死亡やフロア離脱を行わず、実際に移動が可能ならばTRUEを返す。
*/
-bool move_player_effect(POSITION ny, POSITION nx, u32b mpe_mode)
+bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
{
cave_type *c_ptr = &cave[ny][nx];
feature_type *f_ptr = &f_info[c_ptr->feat];
p_ptr->redraw |= (PR_MAP);
}
- /* Update stuff */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_DISTANCE);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
/* Remove "unsafe" flag */
/* Hidden trap */
if (c_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET))
{
- /* Message */
msg_print(_("トラップだ!", "You found a trap!"));
/* Pick a trap */
else if (!p_can_enter && !p_can_kill_walls)
{
/* Feature code (applying "mimic" field) */
- s16b feat = get_feat_mimic(c_ptr);
+ FEAT_IDX feat = get_feat_mimic(c_ptr);
feature_type *mimic_f_ptr = &f_info[feat];
cptr name = f_name + mimic_f_ptr->name;
/* Disturb the player */
disturb(0, 1);
- /* Sound */
if (!boundary_floor(c_ptr, f_ptr, mimic_f_ptr)) sound(SOUND_HITWALL);
}
p_ptr->update |= (PU_FLOW);
}
- /* Sound */
/* sound(SOUND_WALK); */
#ifdef ALLOW_EASY_DISARM /* TNB */
* @param x 移動元のX座標
* @return 移動先が既知の壁ならばTRUE
*/
-static int see_wall(int dir, int y, int x)
+static bool see_wall(DIRECTION dir, POSITION y, POSITION x)
{
- cave_type *c_ptr;
+ cave_type *c_ptr;
/* Get the new location */
y += ddy[dir];
* @param x 移動元のX座標
* @return 移動先が未知の地形ならばTRUE
*/
-static int see_nothing(int dir, int y, int x)
+static bool see_nothing(DIRECTION dir, POSITION y, POSITION x)
{
/* Get the new location */
y += ddy[dir];
* \#x\# \@x\#\n
* \@\@p. p\n
*/
-static void run_init(int dir)
+static void run_init(DIRECTION dir)
{
int row, col, deepleft, deepright;
int i, shortleft, shortright;
int i, max, inv;
int option = 0, option2 = 0;
cave_type *c_ptr;
- s16b feat;
+ FEAT_IDX feat;
feature_type *f_ptr;
/* Where we came from */
/* Look at every newly adjacent square. */
for (i = -max; i <= max; i++)
{
- s16b this_o_idx, next_o_idx = 0;
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
/* New direction */
new_dir = cycle[chome[prev_dir] + i];
* @param dir 移動を試みる方向ID
* @return なし
*/
-void run_step(int dir)
+void run_step(DIRECTION dir)
{
/* Start running */
if (dir)
{
sound(SOUND_HITWALL);
- /* Message */
msg_print(_("その方向には走れません。", "You cannot run in that direction."));
/* Disturb */
disturb(0, 0);
- /* Done */
return;
}
/* Disturb */
disturb(0, 0);
- /* Done */
return;
}
}
* @brief トラベル機能の判定処理 /
* Test for traveling
* @param prev_dir 前回移動を行った元の方角ID
- * @return なし
+ * @return 次の方向
*/
-static int travel_test(int prev_dir)
+static DIRECTION travel_test(DIRECTION prev_dir)
{
int new_dir = 0;
int i, max;
for (i = -max; i <= max; i++)
{
/* New direction */
- int dir = cycle[chome[prev_dir] + i];
+ DIRECTION dir = cycle[chome[prev_dir] + i];
/* New location */
int row = p_ptr->y + ddy[dir];