From: nothere Date: Mon, 24 Nov 2003 18:31:00 +0000 (+0000) Subject: cave_naked_bold()に関する変更. X-Git-Tag: v2.1.2~849 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=772e2075f15f7cf6d92181ee600e5da08080ff5f;p=hengband%2Fhengband.git cave_naked_bold()に関する変更. * 条件に "PROJECTが必要" "DOORでないこと" 追加. これにより, "ドア生 成", "石の壁" などで木をドア/壁に変えてしまうバグを修正. * デバッグコマンド ^A H でモンスターの大群を召喚する場所の判定を cave_naked_bold()ではなくcave_empty_bold()に変更. 以下の変更を含む. * project_f()で, GF_LAVA_FLOWとGF_WATER_FLOWの処理でdam--;する部分に 意味はないので削除. --- diff --git a/src/defines.h b/src/defines.h index 259903b4e..e190ed145 100644 --- a/src/defines.h +++ b/src/defines.h @@ -4370,16 +4370,19 @@ /* * Determine if a "legal" grid is an "naked" floor grid * - * Line 1 -- forbid non-placers + * Line 1 -- forbid non-projectables * Line 2 -- forbid non-droppers - * Line 3 -- forbid permanent - * Line 4 -- forbid object terrains - * Line 5 -- forbid normal objects - * Line 6 -- forbid monsters - * Line 7 -- forbid the player + * Line 3 -- forbid doors + * Line 4 -- forbid permanent + * Line 5 -- forbid object terrains + * Line 6 -- forbid normal objects + * Line 7 -- forbid monsters + * Line 8 -- forbid the player */ #define cave_naked_bold(Y,X) \ - (have_flag(f_flags_bold((Y), (X)), FF_DROP) && \ + (have_flag(f_flags_bold((Y), (X)), FF_PROJECT) && \ + have_flag(f_flags_bold((Y), (X)), FF_DROP) && \ + !have_flag(f_flags_bold((Y), (X)), FF_DOOR) && \ !have_flag(f_flags_bold((Y), (X)), FF_PERMANENT) && \ !(cave[Y][X].info & CAVE_OBJECT) && \ !(cave[Y][X].o_idx) && \ diff --git a/src/spells1.c b/src/spells1.c index d9d24bce7..c52d46d5d 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -977,7 +977,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ) case GF_LAVA_FLOW: { /* Shallow Lava */ - if(dam == 1) + if (dam == 1) { /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; @@ -986,16 +986,13 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ) cave_set_feat(y, x, FEAT_SHAL_LAVA); } /* Deep Lava */ - else + else if (dam) { /* Require a "naked" floor grid */ - if (cave_perma_bold(y, x) || !dam) break; + if (cave_perma_bold(y, x)) break; /* Place a deep lava */ cave_set_feat(y, x, FEAT_DEEP_LAVA); - - /* Dam is used as a counter for the number of grid to convert */ - dam--; } break; } @@ -1003,7 +1000,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ) case GF_WATER_FLOW: { /* Shallow Water */ - if(dam == 1) + if (dam == 1) { /* Require a "naked" floor grid */ if (!cave_naked_bold(y, x)) break; @@ -1012,16 +1009,13 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ) cave_set_feat(y, x, FEAT_SHAL_WATER); } /* Deep Water */ - else + else if (dam) { /* Require a "naked" floor grid */ - if (cave_perma_bold(y, x) || !dam) break; + if (cave_perma_bold(y, x)) break; /* Place a deep lava */ cave_set_feat(y, x, FEAT_DEEP_WATER); - - /* Dam is used as a counter for the number of grid to convert */ - dam--; } break; } diff --git a/src/wizard2.c b/src/wizard2.c index 899724ba6..905269fb5 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -161,7 +161,7 @@ static void do_cmd_summon_horde(void) while (--attempts) { scatter(&wy, &wx, py, px, 3, 0); - if (cave_naked_bold(wy, wx)) break; + if (cave_empty_bold(wy, wx)) break; } (void)alloc_horde(wy, wx);