OSDN Git Service

花、草むら、沼 に FF_FLOOR 追加。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 24 Nov 2003 19:25:47 +0000 (19:25 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 24 Nov 2003 19:25:47 +0000 (19:25 +0000)
cave_clean_bold()はFF_FLOORを見るように変更。
cave_naked_bold()はcave_clean_bold()を呼び出す。
LAVE_FLOWとWATER_FLOWはcave_naked_bold()を使うのをやめて、
アイテム等があっても邪魔されないようにした。

lib/edit/f_info.txt
src/defines.h
src/spells1.c

index db0ca23..09962b7 100644 (file)
@@ -1077,7 +1077,7 @@ E:flower
 G:::G:LIT
 W:2
 K:DESTROYED:GRASS
-F:LOS | PROJECT | MOVE | PLACE | DROP | REMEMBER | CAN_FLY | PLANT |
+F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | CAN_FLY | PLANT |
 F:HURT_DISI | TELEPORTABLE
 
 N:94:BRAKE
@@ -1086,7 +1086,7 @@ E:brake
 G:::g:LIT
 W:2
 K:DESTROYED:GRASS
-F:LOS | PROJECT | MOVE | PLACE | DROP | REMEMBER | CAN_FLY | PLANT |
+F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | CAN_FLY | PLANT |
 F:HURT_DISI | TELEPORTABLE
 
 N:95:MUSEUM
@@ -1400,7 +1400,7 @@ J:
 E:swamp
 G:.:B:LIT
 W:2
-F:LOS | PROJECT | MOVE | PLACE | DROP | REMEMBER | WATER | SHALLOW | CAN_FLY |
+F:LOS | PROJECT | MOVE | PLACE | DROP | FLOOR | REMEMBER | WATER | SHALLOW | CAN_FLY |
 F:CAN_SWIM | TELEPORTABLE
 
 N:195:MIRROR
index e190ed1..13c0957 100644 (file)
  * Line 4 -- forbid normal objects
  */
 #define cave_clean_bold(Y,X) \
-       (have_flag(f_flags_bold((Y), (X)), FF_DROP) && \
-        !have_flag(f_flags_bold((Y), (X)), FF_PERMANENT) && \
+       (have_flag(f_flags_bold((Y), (X)), FF_FLOOR) && \
         !(cave[Y][X].info & CAVE_OBJECT) && \
          (cave[Y][X].o_idx == 0))
 
  * Line 8 -- forbid the player
  */
 #define cave_naked_bold(Y,X) \
-       (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) && \
+       (cave_clean_bold(Y,X) && \
         !(cave[Y][X].m_idx) && \
         !player_bold(Y,X))
 
index c52d46d..073bdc8 100644 (file)
@@ -979,8 +979,11 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                        /* Shallow Lava */
                        if (dam == 1)
                        {
-                               /* Require a "naked" floor grid */
-                               if (!cave_naked_bold(y, x)) break;
+                               /* Ignore permanent grid */
+                               if (cave_perma_bold(y, x)) break;
+
+                               /* Ignore grid without enough space */
+                               if (!have_flag(f_flags_bold(y, x), FF_FLOOR)) break;
 
                                /* Place a shallow lava */
                                cave_set_feat(y, x, FEAT_SHAL_LAVA);
@@ -988,7 +991,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                        /* Deep Lava */
                        else if (dam)
                        {
-                               /* Require a "naked" floor grid */
+                               /* Ignore permanent grid */
                                if (cave_perma_bold(y, x)) break;
 
                                /* Place a deep lava */
@@ -1002,8 +1005,11 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                        /* Shallow Water */
                        if (dam == 1)
                        {
-                               /* Require a "naked" floor grid */
-                               if (!cave_naked_bold(y, x)) break;
+                               /* Ignore permanent grid */
+                               if (cave_perma_bold(y, x)) break;
+
+                               /* Ignore grid without enough space */
+                               if (!have_flag(f_flags_bold(y, x), FF_FLOOR)) break;
 
                                /* Place a shallow lava */
                                cave_set_feat(y, x, FEAT_SHAL_WATER);
@@ -1011,7 +1017,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                        /* Deep Water */
                        else if (dam)
                        {
-                               /* Require a "naked" floor grid */
+                               /* Ignore permanent grid */
                                if (cave_perma_bold(y, x)) break;
 
                                /* Place a deep lava */