OSDN Git Service

神の怒りが永久岩の真上に落ちて、永久岩の向こうまで分解の範囲に入って
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 20 May 2002 17:21:11 +0000 (17:21 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 20 May 2002 17:21:11 +0000 (17:21 +0000)
しまっていたので、永久岩の上には落ちないように修正。

src/cmd5.c
src/defines.h

index 9a5d2e2..3d5ea62 100644 (file)
@@ -4187,7 +4187,7 @@ msg_print("
                                        x = tx - 8 + randint0(17);
                                        y = ty - 8 + randint0(17);
 
-                                       if (!in_bounds(y,x) || !in_disintegration_range(ty, tx, y, x)) continue;
+                                       if (!in_bounds(y,x) || cave_stop_disintegration(y,x) || !in_disintegration_range(ty, tx, y, x)) continue;
 
                                        dx = (tx > x) ? (tx - x) : (x - tx);
                                        dy = (ty > y) ? (ty - y) : (y - ty);
index a65ebf1..b4e8ec2 100644 (file)
      ((cave[Y][X].feat <= FEAT_PATTERN_XTRA2) && (cave[Y][X].feat >= FEAT_PATTERN_START))
 
 /*
+ * Does the grid stop disintegration?
+ */
+#define cave_stop_disintegration(Y,X) \
+       (((cave[Y][X].feat >= FEAT_PERM_EXTRA) && \
+         (cave[Y][X].feat <= FEAT_PERM_SOLID)) || \
+         (cave[Y][X].feat == FEAT_MOUNTAIN) || \
+        ((cave[Y][X].feat >= FEAT_SHOP_HEAD) && \
+         (cave[Y][X].feat <= FEAT_SHOP_TAIL)) || \
+        ((cave[Y][X].feat >= FEAT_BLDG_HEAD) && \
+         (cave[Y][X].feat <= FEAT_BLDG_TAIL)) || \
+         (cave[Y][X].feat == FEAT_MUSEUM))
+
+
+/*
  * Determine if a "legal" grid is within "los" of the player
  *
  * Note the use of comparison to zero to force a "boolean" result