]> granicus.if.org Git - nethack/commitdiff
Make kicking activate statue trap
authorPasi Kallinen <paxed@alt.org>
Sat, 8 Oct 2016 09:47:27 +0000 (12:47 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 8 Oct 2016 09:47:32 +0000 (12:47 +0300)
Change via dNetHack

src/dokick.c

index 4737a27a0b469faeb1994e5e42add76ec99d4180..f1e0dcddfdcaaa92f66d702383674caf82b30b47 100644 (file)
@@ -497,15 +497,20 @@ xchar x, y;
         || kickedobj == uchain)
         return 0;
 
-    if ((trap = t_at(x, y)) != 0
-        && (((trap->ttyp == PIT || trap->ttyp == SPIKED_PIT) && !Passes_walls)
-            || trap->ttyp == WEB)) {
-        if (!trap->tseen)
-            find_trap(trap);
-        You_cant("kick %s that's in a %s!", something,
-                 Hallucination ? "tizzy" : (trap->ttyp == WEB) ? "web"
-                                                               : "pit");
-        return 1;
+    if ((trap = t_at(x, y)) != 0) {
+        if (((trap->ttyp == PIT || trap->ttyp == SPIKED_PIT) && !Passes_walls)
+            || trap->ttyp == WEB) {
+            if (!trap->tseen)
+                find_trap(trap);
+            You_cant("kick %s that's in a %s!", something,
+                     Hallucination ? "tizzy" :
+                     (trap->ttyp == WEB) ? "web" : "pit");
+            return 1;
+        }
+        if (trap->ttyp == STATUE_TRAP) {
+            activate_statue_trap(trap, x,y, FALSE);
+            return 1;
+        }
     }
 
     if (Fumbling && !rn2(3)) {