From 167e25b4e619ef76df846222898fea89b6c04877 Mon Sep 17 00:00:00 2001 From: nothere Date: Tue, 16 Sep 2003 11:44:15 +0000 Subject: [PATCH] =?utf8?q?vanilla=5Ftown/lite=5Ftown=E3=81=A7=E3=81=AE?= =?utf8?q?=E8=A1=97=E3=81=AE=E5=A4=96=E5=A3=81=E3=82=84=E4=B8=96=E7=95=8C?= =?utf8?q?=E3=81=AE=E6=9E=9C=E3=81=A6=E3=81=AB=E3=81=B6=E3=81=A4=E3=81=8B?= =?utf8?q?=E3=81=A3=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB=E4=BD=95=E3=81=AE?= =?utf8?q?=20=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=82?= =?utf8?q?=E5=87=BA=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7,?= =?utf8?q?=20=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=8C?= =?utf8?q?=E5=87=BA=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F.?= =?utf8?q?=20=E3=81=BE=E3=81=9F,=20=E3=83=95=E3=83=AD=E3=82=A2=20=E5=A2=83?= =?utf8?q?=E7=95=8C=E3=81=AE=E5=B1=B1=E3=81=AB=E3=81=B6=E3=81=A4=E3=81=8B?= =?utf8?q?=E3=81=A3=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB=20"=E5=A3=81"=20?= =?utf8?q?=E3=81=A8=E6=9B=B8=E3=81=8B=E3=81=9A=20"=E5=B1=B1"=20=E3=81=A8?= =?utf8?q?=E6=9B=B8=E3=81=8F=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd1.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/cmd1.c b/src/cmd1.c index 054585a69..dfb598ad0 100644 --- a/src/cmd1.c +++ b/src/cmd1.c @@ -3548,6 +3548,26 @@ bool player_can_enter(byte feature) /* + * Get feature string which blocks your way + */ +static cptr blocking_feat_name(byte feat) +{ + switch (feat) + { +#ifdef JP + case FEAT_TREES: return "ÌÚ"; + case FEAT_MOUNTAIN: return "»³"; + default: return "ÊÉ"; +#else + case FEAT_TREES: return "tree"; + case FEAT_MOUNTAIN: return "mountain"; + default: return "wall"; +#endif + } +} + + +/* * Move player in the given direction, with the given "pickup" flag. * * This routine should (probably) always induce energy expenditure. @@ -3667,7 +3687,8 @@ void move_player(int dir, int do_pickup, bool break_trap) return; } - oktomove = FALSE; + /* "Blocked" message appears later */ + /* oktomove = FALSE; */ } /* Get the monster */ @@ -3681,8 +3702,7 @@ void move_player(int dir, int do_pickup, bool break_trap) /* unless in Shadow Form */ if (p_ptr->wraith_form || p_ptr->pass_wall || p_ptr->kabenuke) p_can_pass_walls = TRUE; - if ((cave[y][x].feat >= FEAT_PERM_EXTRA) && - (cave[y][x].feat <= FEAT_PERM_SOLID)) + if ((c_ptr->feat >= FEAT_PERM_EXTRA) && (c_ptr->feat <= FEAT_PERM_SOLID)) { p_can_pass_walls = FALSE; } @@ -3992,9 +4012,9 @@ void move_player(int dir, int do_pickup, bool break_trap) else { #ifdef JP - msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¤è¤¦¤À¡£", (feat == FEAT_TREES) ? "ÌÚ" : "ÊÉ"); + msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¤è¤¦¤À¡£", blocking_feat_name(feat)); #else - msg_format("You feel a %s blocking your way.", (feat == FEAT_TREES) ? "tree" : "wall"); + msg_format("You feel a %s blocking your way.", blocking_feat_name(feat)); #endif c_ptr->info |= (CAVE_MARK); @@ -4059,9 +4079,9 @@ void move_player(int dir, int do_pickup, bool break_trap) else { #ifdef JP - msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¡£", (feat == FEAT_TREES) ? "ÌÚ" : "ÊÉ"); + msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¡£", blocking_feat_name(feat)); #else - msg_format("There is a %s blocking your way.", (feat == FEAT_TREES) ? "tree" : "wall"); + msg_format("There is a %s blocking your way.", blocking_feat_name(feat)); #endif if (!(p_ptr->confused || p_ptr->stun || p_ptr->image)) @@ -4276,7 +4296,7 @@ void move_player(int dir, int do_pickup, bool break_trap) } /* Handle quest areas -KMW- */ - else if (cave[y][x].feat == FEAT_QUEST_ENTER) + else if (c_ptr->feat == FEAT_QUEST_ENTER) { /* Disturb */ disturb(0, 0); @@ -4286,7 +4306,7 @@ void move_player(int dir, int do_pickup, bool break_trap) command_new = SPECIAL_KEY_QUEST; } - else if (cave[y][x].feat == FEAT_QUEST_EXIT) + else if (c_ptr->feat == FEAT_QUEST_EXIT) { if (quest[p_ptr->inside_quest].type == QUEST_TYPE_FIND_EXIT) { @@ -4304,7 +4324,7 @@ void move_player(int dir, int do_pickup, bool break_trap) leave_quest_check(); - p_ptr->inside_quest = cave[y][x].special; + p_ptr->inside_quest = c_ptr->special; dun_level = 0; p_ptr->oldpx = 0; p_ptr->oldpy = 0; -- 2.11.0