/* Redraw some stuff */
p_ptr->redraw |= (PR_LEV | PR_TITLE);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER);
/* Handle stuff */
/* Redraw some stuff */
p_ptr->redraw |= (PR_LEV | PR_TITLE | PR_EXP);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER | PW_SPELL | PW_INVEN);
/* HPとMPの上昇量を表示 */
/* Redraw some stuff */
p_ptr->redraw |= (PR_LEV | PR_TITLE);
- /* Window stuff */
p_ptr->window |= (PW_PLAYER | PW_SPELL);
/* Handle stuff */
* @details
* Hack -- Return the "automatic coin type" of a monster race
* Used to allocate proper treasure when "Creeping coins" die
- * XXX XXX XXX Note the use of actual "monster names"
+ * Note the use of actual "monster names"
*/
static int get_coin_type(MONRACE_IDX r_idx)
{
{
/* Get local object */
o_ptr = &forge;
-
- /* Wipe the object */
object_wipe(o_ptr);
/* Make a great object */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Activate restriction */
{
/* Get local object */
q_ptr = &forge;
-
- /* Wipe the object */
object_wipe(q_ptr);
/* Make Gold */
/* Make some gold */
if (!make_gold(q_ptr)) continue;
- /* XXX XXX XXX */
dump_gold++;
}
/* Make an object */
if (!make_object(q_ptr, mo_mode)) continue;
- /* XXX XXX XXX */
dump_item++;
}
* Made name, sex, and capitalization generic -BEN-
* As always, the "ghost" processing is a total hack.
* Hack -- we "delay" fear messages by passing around a "fear" flag.
- * XXX XXX XXX Consider decreasing monster experience over time, say,
+ * Consider decreasing monster experience over time, say,
* by using "(m_exp * m_lev * (m_lev)) / (p_lev * (m_lev + n_killed))"
* instead of simply "(m_exp * m_lev) / (p_lev)", to make the first
* monster worth more than subsequent monsters. This would also need
if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
- /* Delete the monster */
+
delete_monster_idx(m_idx);
if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, mode))
}
else
{
- /* Delete the monster */
+
delete_monster_idx(m_idx);
}
/* Hack -- note fear */
(*fear) = TRUE;
- /* XXX XXX XXX Hack -- Add some timed fear */
+ /* Hack -- Add some timed fear */
(void)set_monster_monfear(m_idx, (randint1(10) +
(((dam >= m_ptr->hp) && (percentage > 7)) ?
20 : ((11 - percentage) * 5))));
{
int wid, hgt;
- /* Get size */
get_screen_size(&wid, &hgt);
panel_row_max = panel_row_min + hgt - 1;
verify_panel();
- /* Update stuff */
p_ptr->update |= (PU_TORCH | PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
/* Forget lite/view */
/* Hack -- update */
handle_stuff();
-
- /* Redraw */
Term_redraw();
/*
/* Only if the dungeon exists */
if (!character_dungeon) return;
- /* Window stuff */
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
-
- /* Window stuff */
p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
/* Hack -- update */
handle_stuff();
-
- /* Redraw */
Term_redraw();
}
POSITION y, x;
TERM_LEN wid, hgt;
- /* Get size */
get_screen_size(&wid, &hgt);
/* Apply the motion */
/* Recalculate the boundaries */
panel_bounds_center();
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
/* Handle stuff */
POSITION dy = 0, dx = 0;
TERM_LEN wid, hgt;
- /* Get size */
get_screen_size(&wid, &hgt);
if (y < panel_row_min) dy = -1;
int max_prow_min;
int max_pcol_min;
- /* Get size */
get_screen_size(&wid, &hgt);
max_prow_min = cur_hgt - hgt;
panel_col_min = pcol_min;
/* Hack -- optional disturb on "panel change" */
- if (disturb_panel && !center_player) disturb(0, 0);
+ if (disturb_panel && !center_player) disturb(FALSE, FALSE);
/* Recalculate the boundaries */
panel_bounds_center();
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
}
/* Monster must be projectable */
if (!projectable(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)) return (FALSE);
- /* XXX XXX XXX Hack -- Never target trappers */
+ /* Hack -- Never target trappers */
/* if (CLEAR_ATTR && (CLEAR_CHAR)) return (FALSE); */
/* Assume okay */
/* Approximate Double Distance */
v = ((x4 > y4) ? (x4 + x4 + y4) : (y4 + y4 + x4));
- /* XXX XXX XXX Penalize location */
+ /* Penalize location */
/* Track best */
if ((b_i >= 0) && (v >= b_v)) continue;
/* Track best */
b_i = i; b_v = v;
}
-
- /* Result */
return (b_i);
}
if (have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_NOTICE)) return TRUE;
}
- /* Nope */
return (FALSE);
}
* recall info and the health bar info to track that monster.
*
* Eventually, we may allow multiple objects per grid, or objects
- * and terrain features in the same grid. XXX XXX XXX
+ * and terrain features in the same grid.
*
* This function must handle blindness/hallucination.
*/
feature_type *f_ptr;
char query = '\001';
char out_val[MAX_NLEN+80];
-
-#ifdef ALLOW_EASY_FLOOR
OBJECT_IDX floor_list[23];
ITEM_NUMBER floor_num = 0;
}
}
-#endif /* ALLOW_EASY_FLOOR */
-
/* Hack -- under the player */
if (player_bold(y, x))
{
/* Obtain an object description */
object_desc(o_name, o_ptr, 0);
- /* Describe the object */
#ifdef JP
sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
#else
#endif
}
-
-#ifdef ALLOW_EASY_FLOOR
if (floor_num)
{
int min_width = 0;
/* Acquire object */
o_ptr = &o_list[floor_list[0]];
- /* Describe the object */
object_desc(o_name, o_ptr, 0);
#ifdef JP
- sprintf(out_val, "%s%s%s%s[%s]",
- s1, o_name, s2, s3, info);
+ sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
#else
- sprintf(out_val, "%s%s%s%s [%s]",
- s1, s2, s3, o_name, info);
+ sprintf(out_val, "%s%s%s%s [%s]", s1, s2, s3, o_name, info);
#endif
prt(out_val, 0, 0);
/* NOTREACHED */
}
-#endif /* ALLOW_EASY_FLOOR */
-
/* Scan all objects in the grid */
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
/* Obtain an object description */
object_desc(o_name, o_ptr, 0);
- /* Describe the object */
#ifdef JP
sprintf(out_val, "%s%s%s%s[%s]", s1, o_name, s2, s3, info);
#else
*
* All locations must be on the current panel. Consider the use of
* "panel_bounds()" to allow "off-panel" targets, perhaps by using
- * some form of "scrolling" the map around the cursor. XXX XXX XXX
+ * some form of "scrolling" the map around the cursor.
* That is, consider the possibility of "auto-scrolling" the screen
* while the cursor moves around. This may require changes in the
- * "update_mon()" code to allow "visibility" even if off panel, and
+ * "update_monster()" code to allow "visibility" even if off panel, and
* may require dynamic recalculation of the "temp" grid set.
*
* Hack -- targeting/observing an "outer border grid" may induce
int wid, hgt;
- /* Get size */
get_screen_size(&wid, &hgt);
/* Cancel target */
/* 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 */
panel_col_min = x2;
panel_bounds_center();
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
/* Handle stuff */
/* 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 */
/* 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 */
cptr p;
COMMAND_CODE code;
- /* Initialize */
(*dp) = 0;
/* Global direction */
/* Hack -- auto-target if requested */
if (use_old_target && target_okay()) dir = 5;
-#ifdef ALLOW_REPEAT /* TNB */
-
if (repeat_pull(&code))
{
/* Confusion? */
}
*dp = (DIRECTION)code;
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Ask until satisfied */
while (!dir)
{
/* Check for confusion */
if (p_ptr->confused)
{
- /* XXX XXX XXX */
/* Random direction */
dir = ddd[randint0(8)];
}
/* Save direction */
(*dp) = dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
/* repeat_push(dir); */
repeat_push((COMMAND_CODE)command_dir);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* A "valid" direction was entered */
return (TRUE);
}
-
-/*
- * Request a "movement" direction (1,2,3,4,6,7,8,9) from the user,
- * and place it into "command_dir", unless we already have one.
- *
- * This function should be used for all "repeatable" commands, such as
- * run, walk, open, close, bash, disarm, spike, tunnel, etc, as well
- * as all commands which must reference a grid adjacent to the player,
- * and which may not reference the grid under the player. Note that,
- * for example, it is no longer possible to "disarm" or "open" chests
- * in the same grid as the player.
- *
- * Direction "5" is illegal and will (cleanly) abort the command.
- *
- * This function tracks and uses the "global direction", and uses
- * that as the "desired direction", to which "confusion" is applied.
- */
-bool get_rep_dir(DIRECTION *dp, bool under)
+bool get_direction(DIRECTION *dp, bool allow_under, bool with_steed)
{
DIRECTION dir;
cptr prompt;
COMMAND_CODE code;
- /* Initialize */
(*dp) = 0;
/* Global direction */
dir = command_dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
if (repeat_pull(&code))
{
dir = (DIRECTION)code;
-/* return (TRUE); */
+ /* return (TRUE); */
}
*dp = (DIRECTION)code;
-#endif /* ALLOW_REPEAT -- TNB */
-
- if (under)
+ if (allow_under)
{
prompt = _("方向 ('.'足元, ESCで中断)? ", "Direction ('.' at feet, Escape to cancel)? ");
}
{
prompt = _("方向 (ESCで中断)? ", "Direction (Escape to cancel)? ");
}
-
+
/* Get a direction */
while (!dir)
{
if (!get_com(prompt, &ch, TRUE)) break;
/* Look down */
- if ((under) && ((ch == '5') || (ch == '-') || (ch == '.')))
+ if ((allow_under) && ((ch == '5') || (ch == '-') || (ch == '.')))
{
dir = 5;
}
/* Look up the direction */
dir = get_keymap_dir(ch);
- /* Oops */
if (!dir) bell();
}
}
/* Prevent weirdness */
- if ((dir == 5) && (!under)) dir = 0;
+ if ((dir == 5) && (!allow_under)) dir = 0;
/* Aborted */
if (!dir) return (FALSE);
dir = ddd[randint0(8)];
}
}
- else if (p_ptr->riding)
+ else if (p_ptr->riding && with_steed)
{
monster_type *m_ptr = &m_list[p_ptr->riding];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Save direction */
(*dp) = dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
-/* repeat_push(dir); */
+ /* repeat_push(dir); */
repeat_push((COMMAND_CODE)command_dir);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}
-
-bool get_rep_dir2(DIRECTION *dp)
+/*
+ * @brief 進行方向を指定する(騎乗対象の混乱の影響を受ける) / Request a "movement" direction (1,2,3,4,6,7,8,9) from the user,
+ * and place it into "command_dir", unless we already have one.
+ *
+ * This function should be used for all "repeatable" commands, such as
+ * run, walk, open, close, bash, disarm, spike, tunnel, etc, as well
+ * as all commands which must reference a grid adjacent to the player,
+ * and which may not reference the grid under the player. Note that,
+ * for example, it is no longer possible to "disarm" or "open" chests
+ * in the same grid as the player.
+ *
+ * Direction "5" is illegal and will (cleanly) abort the command.
+ *
+ * This function tracks and uses the "global direction", and uses
+ * that as the "desired direction", to which "confusion" is applied.
+ */
+bool get_rep_dir(DIRECTION *dp, bool under)
{
DIRECTION dir;
+ cptr prompt;
COMMAND_CODE code;
- /* Initialize */
(*dp) = 0;
/* Global direction */
dir = command_dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
if (repeat_pull(&code))
{
dir = (DIRECTION)code;
}
*dp = (DIRECTION)code;
-#endif /* ALLOW_REPEAT -- TNB */
-
+ if (under)
+ {
+ prompt = _("方向 ('.'足元, ESCで中断)? ", "Direction ('.' at feet, Escape to cancel)? ");
+ }
+ else
+ {
+ prompt = _("方向 (ESCで中断)? ", "Direction (Escape to cancel)? ");
+ }
+
/* Get a direction */
while (!dir)
{
char ch;
/* Get a command (or Cancel) */
- if (!get_com(_("方向 (ESCで中断)? ", "Direction (Escape to cancel)? "), &ch, TRUE)) break;
+ if (!get_com(prompt, &ch, TRUE)) break;
- /* Look up the direction */
- dir = get_keymap_dir(ch);
+ /* Look down */
+ if ((under) && ((ch == '5') || (ch == '-') || (ch == '.')))
+ {
+ dir = 5;
+ }
+ else
+ {
+ /* Look up the direction */
+ dir = get_keymap_dir(ch);
- /* Oops */
- if (!dir) bell();
+ if (!dir) bell();
+ }
}
/* Prevent weirdness */
- if (dir == 5) dir = 0;
+ if ((dir == 5) && (!under)) dir = 0;
/* Aborted */
if (!dir) return (FALSE);
dir = ddd[randint0(8)];
}
}
+ else if (p_ptr->riding)
+ {
+ monster_type *m_ptr = &m_list[p_ptr->riding];
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
+
+ if (MON_CONFUSED(m_ptr))
+ {
+ /* Standard confusion */
+ if (randint0(100) < 75)
+ {
+ /* Random direction */
+ dir = ddd[randint0(8)];
+ }
+ }
+ else if ((r_ptr->flags1 & RF1_RAND_50) && (r_ptr->flags1 & RF1_RAND_25) && (randint0(100) < 50))
+ {
+ /* Random direction */
+ dir = ddd[randint0(8)];
+ }
+ else if ((r_ptr->flags1 & RF1_RAND_50) && (randint0(100) < 25))
+ {
+ /* Random direction */
+ dir = ddd[randint0(8)];
+ }
+ }
/* Notice confusion */
if (command_dir != dir)
{
- /* Warn the user */
- msg_print(_("あなたは混乱している。", "You are confused."));
+ if (p_ptr->confused)
+ {
+ /* Warn the user */
+ msg_print(_("あなたは混乱している。", "You are confused."));
+ }
+ else
+ {
+ char m_name[80];
+ monster_type *m_ptr = &m_list[p_ptr->riding];
+
+ monster_desc(m_name, m_ptr, 0);
+ if (MON_CONFUSED(m_ptr))
+ {
+ msg_format(_("%sは混乱している。", "%^s is confusing."), m_name);
+ }
+ else
+ {
+ msg_format(_("%sは思い通りに動いてくれない。", "You cannot control %s."), m_name);
+ }
+ }
}
/* Save direction */
(*dp) = dir;
-#ifdef ALLOW_REPEAT /* TNB */
-
/* repeat_push(dir); */
repeat_push((COMMAND_CODE)command_dir);
-#endif /* ALLOW_REPEAT -- TNB */
-
/* Success */
return (TRUE);
}
if (cave_have_flag_grid(c_ptr, FF_QUEST_EXIT)) return (TRUE);
}
- /* Nope */
return (FALSE);
}
int wid, hgt;
- /* Get size */
get_screen_size(&wid, &hgt);
x = p_ptr->x;
x = p_ptr->x;
verify_panel(); /* Move cursor to player */
- /* Update stuff */
p_ptr->update |= (PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
- /* Window stuff */
p_ptr->window |= (PW_OVERHEAD);
/* Handle stuff */
/* 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 */
cptr p;
char command;
- /* Initialize */
(*dp) = 0;
/* Global direction */
/* Check for confusion */
if (p_ptr->confused)
{
- /* XXX XXX XXX */
/* Random direction */
dir = ddd[randint0(8)];
}