From 39ec3407437de0aa89c3982ee1905ebad8ff5fa5 Mon Sep 17 00:00:00 2001 From: mogami Date: Tue, 5 Nov 2002 09:27:42 +0000 Subject: [PATCH] =?utf8?q?=E8=8D=92=E9=87=8E=E3=81=A7=E5=A4=96=E5=91=A8?= =?utf8?q?=E3=81=AE=E6=9C=A8=E3=82=92=E5=88=87=E3=82=8C=E3=81=A6=E3=81=97?= =?utf8?q?=E3=81=BE=E3=81=A3=E3=81=A6=E5=A4=89=E6=84=9A=E3=81=8C=E8=90=BD?= =?utf8?q?=E3=81=A1=E3=82=8B=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3=E3=80=82?= =?utf8?q?=20=E6=9C=A8=E7=AD=89=E3=81=ABmimic=E3=81=97=E3=81=A6=E3=81=84?= =?utf8?q?=E3=82=8B=E6=B0=B8=E4=B9=85=E5=B2=A9=E3=81=8C=E6=9C=A8=E3=81=A8?= =?utf8?q?=E3=81=97=E3=81=A6=E6=89=B1=E3=82=8F=E3=82=8C=E3=81=A6=E3=81=97?= =?utf8?q?=E3=81=BE=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=80=82=20?= =?utf8?q?=E3=81=BE=E3=81=9F=E3=80=81=E3=83=94=E3=83=A9=E3=83=8B=E3=82=A2/?= =?utf8?q?=E3=83=8F=E3=83=AB=E3=83=9E=E3=82=B2/=E9=96=8B=E9=96=80=E3=81=AE?= =?utf8?q?=E5=90=84=E7=89=B9=E6=AE=8A=E3=83=88=E3=83=A9=E3=83=83=E3=83=97?= =?utf8?q?=E3=81=AE=E8=A7=A3=E9=99=A4=E3=82=92=E5=9B=B0=E9=9B=A3=E3=81=AB?= =?utf8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd2.c | 60 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/src/cmd2.c b/src/cmd2.c index a6656e157..3102f979a 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -1079,7 +1079,6 @@ static bool do_cmd_open_aux(int y, int x) int i, j; cave_type *c_ptr; - byte feat; bool more = FALSE; @@ -1090,11 +1089,10 @@ static bool do_cmd_open_aux(int y, int x) /* Get requested grid */ c_ptr = &cave[y][x]; - /* Feature code (applying "mimic" field) */ - feat = c_ptr->mimic ? c_ptr->mimic : f_info[c_ptr->feat].mimic; + /* Seeing true feature code (ignore mimic) */ /* Jammed door */ - if (feat >= FEAT_DOOR_HEAD + 0x08) + if (c_ptr->feat >= FEAT_DOOR_HEAD + 0x08) { /* Stuck */ #ifdef JP @@ -1106,7 +1104,7 @@ static bool do_cmd_open_aux(int y, int x) } /* Locked door */ - else if (feat >= FEAT_DOOR_HEAD + 0x01) + else if (c_ptr->feat >= FEAT_DOOR_HEAD + 0x01) { /* Disarm factor */ i = p_ptr->skill_dis; @@ -1168,7 +1166,7 @@ static bool do_cmd_open_aux(int y, int x) } /* Closed door */ - else + else if (c_ptr->feat == FEAT_DOOR_HEAD) { /* Open the door */ cave_set_feat(y, x, FEAT_OPEN); @@ -1323,22 +1321,18 @@ void do_cmd_open(void) static bool do_cmd_close_aux(int y, int x) { cave_type *c_ptr; - byte feat; - bool more = FALSE; - /* Take a turn */ energy_use = 100; /* Get grid and contents */ c_ptr = &cave[y][x]; - /* Feature code (applying "mimic" field) */ - feat = c_ptr->mimic ? c_ptr->mimic : f_info[c_ptr->feat].mimic; + /* Seeing true feature code (ignore mimic) */ /* Broken door */ - if (feat == FEAT_BROKEN) + if (c_ptr->feat == FEAT_BROKEN) { /* Message */ #ifdef JP @@ -1350,7 +1344,7 @@ static bool do_cmd_close_aux(int y, int x) } /* Open door */ - else + else if (c_ptr->feat == FEAT_OPEN) { /* Close the door */ cave_set_feat(y, x, FEAT_DOOR_HEAD + 0x00); @@ -1594,6 +1588,19 @@ static bool do_cmd_tunnel_aux(int y, int x) } + /* Map border (mimiccing Permanent wall) */ + else if ((c_ptr->feat >= FEAT_PERM_EXTRA && + c_ptr->feat <= FEAT_PERM_SOLID) || + c_ptr->feat == FEAT_MOUNTAIN) + { +#ifdef JP + msg_print("¤½¤³¤Ï·¡¤ì¤Ê¤¤!"); +#else + msg_print("You can't tunnel through that!"); +#endif + + } + else if (feat == FEAT_TREES) /* -KMW- */ { /* Chop Down */ @@ -1665,8 +1672,9 @@ static bool do_cmd_tunnel_aux(int y, int x) bool gold = FALSE; bool hard = FALSE; - /* Found gold */ - if (feat >= FEAT_MAGMA_H) gold = TRUE; + /* Found gold (ignore mimic; maybe a hidden treasure) */ + if (c_ptr->feat >= FEAT_MAGMA_H && + c_ptr->feat <= FEAT_QUARTZ_K) gold = TRUE; /* Extract "quartz" flag XXX XXX XXX */ if ((feat - FEAT_MAGMA) & 0x01) hard = TRUE; @@ -1821,13 +1829,6 @@ static bool do_cmd_tunnel_aux(int y, int x) if (randint0(100) < 25) search(); } - /* Notice new floor grids */ - if (!cave_floor_bold(y, x)) - { - /* Update some things */ - p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE); - } - /* Result */ return (more); } @@ -2226,10 +2227,21 @@ static bool do_cmd_disarm_aux(int y, int x, int dir) if (p_ptr->blind || no_lite()) i = i / 10; if (p_ptr->confused || p_ptr->image) i = i / 10; - /* XXX XXX XXX Variable power? */ + /* Variable power! */ /* Extract trap "power" */ - power = 5; + switch (c_ptr->feat) + { + case FEAT_TRAP_OPEN: + case FEAT_TRAP_ARMAGEDDON: + case FEAT_TRAP_PIRANHA: + /* Special traps are very difficult to disarm */ + power = 100; + break; + default: + power = 5; + break; + } /* Extract the difficulty */ j = i - power; -- 2.11.0