rnd-20040217-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 17 Feb 2004 00:37:53 +0000 (01:37 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:45:51 +0000 (10:45 +0200)
src/conftime.h
src/game.c
src/init.c
src/main.h

index a984d548b999922473988b9af42f0df76b8fad9c..9ca7244743fff72c9aa60fc7b035a7851a155ded 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-02-07 12:58]"
+#define COMPILE_DATE_STRING "[2004-02-17 01:20]"
index d304e76ee8b873daeb975bf330464948858afbba..ffd0cd613714104cc14605f8abeda6c1036f599a 100644 (file)
@@ -2722,7 +2722,7 @@ void Explode(int ex, int ey, int phase, int mode)
       if (phase == last_phase)
        printf("::: IS_PLAYER\n");
     }
-    else if (CAN_EXPLODE_BY_FIRE(border_element))
+    else if (CAN_EXPLODE_BY_EXPLOSION(border_element))
     {
       Feld[x][y] = Store2[x][y];
       Store2[x][y] = 0;
@@ -2730,18 +2730,25 @@ void Explode(int ex, int ey, int phase, int mode)
       border_explosion = TRUE;
 
       if (phase == last_phase)
-       printf("::: CAN_EXPLODE_BY_FIRE\n");
+       printf("::: CAN_EXPLODE_BY_EXPLOSION\n");
     }
     else if (border_element == EL_AMOEBA_TO_DIAMOND)
     {
       AmoebeUmwandeln(x, y);
+      Store2[x][y] = 0;
       border_explosion = TRUE;
 
       if (phase == last_phase)
-       printf("::: EL_AMOEBA_TO_DIAMOND\n");
+       printf("::: EL_AMOEBA_TO_DIAMOND [%d, %d] [%d]\n",
+              element_info[border_element].explosion_delay,
+              element_info[border_element].ignition_delay,
+              phase);
     }
 
-#if 0
+#if 1
+    /* if an element just explodes due to another explosion (chain-reaction),
+       do not immediately end the new explosion when it was the last frame of
+       the explosion (as it would be done in the following "if"-statement!) */
     if (border_explosion && phase == last_phase)
       return;
 #endif
@@ -2766,7 +2773,7 @@ void Explode(int ex, int ey, int phase, int mode)
 
     if (IS_PLAYER(x, y))
       KillHeroUnlessExplosionProtected(x, y);
-    else if (CAN_EXPLODE_BY_FIRE(element))
+    else if (CAN_EXPLODE_BY_EXPLOSION(element))
     {
       Feld[x][y] = Store2[x][y];
       Store2[x][y] = 0;
@@ -4759,7 +4766,7 @@ void StartMoving(int x, int y)
          {
            int flamed = MovingOrBlocked2Element(xx, yy);
 
-           if (IS_CLASSIC_ENEMY(flamed) || CAN_EXPLODE_BY_FIRE(flamed))
+           if (IS_CLASSIC_ENEMY(flamed) || CAN_EXPLODE_BY_DRAGONFIRE(flamed))
              Bang(xx, yy);
            else
              RemoveMovingField(xx, yy);
index f8004d0bd7ef5397cc1c09ae50130180a6daa06e..cfb271b1c04d8bc360357718ccee1a04931c64d6 100644 (file)
@@ -1945,7 +1945,7 @@ void InitElementPropertiesStatic()
     EL_SP_DISK_YELLOW,
     EL_SP_SNIKSNAK,
     EL_SP_ELECTRON,
-#if 1
+#if 0
     EL_BLACK_ORB,
 #endif
     -1
@@ -3082,6 +3082,10 @@ void InitElementPropertiesEngine(int engine_version)
                                             !IS_DIGGABLE(i) &&
                                             !IS_COLLECTIBLE(i)));
 
+    /* ---------- PROTECTED ------------------------------------------------ */
+    if (IS_ACCESSIBLE_INSIDE(i))
+      SET_PROPERTY(i, EP_PROTECTED, TRUE);
+
     /* ---------- DRAGONFIRE_PROOF ----------------------------------------- */
 
     if (IS_HISTORIC_SOLID(i) || i == EL_EXPLOSION)
@@ -3090,10 +3094,6 @@ void InitElementPropertiesEngine(int engine_version)
       SET_PROPERTY(i, EP_DRAGONFIRE_PROOF, (IS_CUSTOM_ELEMENT(i) &&
                                            IS_INDESTRUCTIBLE(i)));
 
-    /* ---------- PROTECTED ------------------------------------------------ */
-    if (IS_ACCESSIBLE_INSIDE(i))
-      SET_PROPERTY(i, EP_PROTECTED, TRUE);
-
     /* ---------- EXPLOSION_PROOF ------------------------------------------ */
     if (i == EL_FLAMES)
       SET_PROPERTY(i, EP_EXPLOSION_PROOF, TRUE);
@@ -3145,6 +3145,13 @@ void InitElementPropertiesEngine(int engine_version)
                                         !CAN_EXPLODE_1X1(i) &&
                                         !CAN_EXPLODE_DYNA(i)));
 
+    /* ---------- CAN_EXPLODE_BY_DRAGONFIRE -------------------------------- */
+    SET_PROPERTY(i, EP_CAN_EXPLODE_BY_DRAGONFIRE, CAN_EXPLODE_BY_FIRE(i));
+
+    /* ---------- CAN_EXPLODE_BY_EXPLOSION --------------------------------- */
+    SET_PROPERTY(i, EP_CAN_EXPLODE_BY_EXPLOSION, (CAN_EXPLODE_BY_FIRE(i) ||
+                                                 i == EL_BLACK_ORB));
+
     /* ---------- SP_PORT -------------------------------------------------- */
     SET_PROPERTY(i, EP_SP_PORT, (IS_SP_ELEMENT(i) &&
                                 IS_PASSABLE_INSIDE(i)));
index 486f6f2a020e889fce10eab3994bb1126cb898f4..c94ff57f534fcdfd497fecc7c7f253714753d47e 100644 (file)
 #define EP_CAN_EXPLODE         70
 #define EP_CAN_EXPLODE_3X3     71
 #define EP_SP_PORT             72
+#define EP_CAN_EXPLODE_BY_DRAGONFIRE 73
+#define EP_CAN_EXPLODE_BY_EXPLOSION  74
 
 /* values for internal purpose only (level editor) */
-#define EP_EXPLODE_RESULT      73
-#define EP_WALK_TO_OBJECT      74
-#define EP_DEADLY              75
+#define EP_EXPLODE_RESULT      75
+#define EP_WALK_TO_OBJECT      76
+#define EP_DEADLY              77
 
-#define NUM_ELEMENT_PROPERTIES 76
+#define NUM_ELEMENT_PROPERTIES 78
 
 #define NUM_EP_BITFIELDS       ((NUM_ELEMENT_PROPERTIES + 31) / 32)
 #define EP_BITFIELD_BASE       0
 #define CAN_EXPLODE(e)         HAS_PROPERTY(e, EP_CAN_EXPLODE)
 #define CAN_EXPLODE_3X3(e)     HAS_PROPERTY(e, EP_CAN_EXPLODE_3X3)
 #define IS_SP_PORT(e)          HAS_PROPERTY(e, EP_SP_PORT)
+#define CAN_EXPLODE_BY_DRAGONFIRE(e)   \
+                               HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_DRAGONFIRE)
+#define CAN_EXPLODE_BY_EXPLOSION(e)    \
+                               HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_EXPLOSION)
 
 /* special macros used in game engine */
 #define IS_CUSTOM_ELEMENT(e)   ((e) >= EL_CUSTOM_START &&              \