]> granicus.if.org Git - nethack/commitdiff
make diluted oil less effective than normal oil
authorPatR <rankin@nethack.org>
Wed, 19 Dec 2018 01:16:05 +0000 (17:16 -0800)
committerPatR <rankin@nethack.org>
Wed, 19 Dec 2018 01:16:05 +0000 (17:16 -0800)
Suggested 6.5 years ago...

doc/fixes36.2
include/extern.h
src/explode.c
src/potion.c
src/timeout.c

index 9cd67bc384257dde0cd29d78281a94e85b1ed37e..f499a63517dd8c735c0507bdcfb114119e0fdff9 100644 (file)
@@ -284,6 +284,8 @@ while levitating inside a shop, throwing an unpaid item and having recoil move
        leave the item unpaid on shop floor and also on the shop's bill but
        not visible via 'Iu' or 'Ix'; leaving the shop after that would anger
        the shopkeeper and summon kops
+diluted potion of oil is less effective when filling lamps (adds less fuel)
+       or burning (lasts less long) or exploding (inflicts less damage)
 
 
 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
index f8a81c7b7a95799ec6f4cd192938c3313c0606e8..bd0255c2ab9d4d65cc45c538a18f3659b63acee1 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 extern.h        $NHDT-Date: 1545043771 2018/12/17 10:49:31 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.673 $ */
+/* NetHack 3.6 extern.h        $NHDT-Date: 1545182146 2018/12/19 01:15:46 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.674 $ */
 /* Copyright (c) Steve Creps, 1988.                              */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -739,7 +739,7 @@ E long FDECL(rndexp, (BOOLEAN_P));
 
 E void FDECL(explode, (int, int, int, int, CHAR_P, int));
 E long FDECL(scatter, (int, int, int, unsigned int, struct obj *));
-E void FDECL(splatter_burning_oil, (int, int));
+E void FDECL(splatter_burning_oil, (int, int, BOOLEAN_P));
 E void FDECL(explode_oil, (struct obj *, int, int));
 
 /* ### extralev.c ### */
index 46d3b327f9baccad24b644f0bcbd155778d28db7..941d222019afcc4b1f18e3d66007869676f9a603 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 explode.c       $NHDT-Date: 1543101719 2018/11/24 23:21:59 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
+/* NetHack 3.6 explode.c       $NHDT-Date: 1545182146 2018/12/19 01:15:46 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.60 $ */
 /*      Copyright (C) 1990 by Ken Arromdee */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -780,12 +780,15 @@ struct obj *obj; /* only scatter this obj        */
  * For now, just perform a "regular" explosion.
  */
 void
-splatter_burning_oil(x, y)
+splatter_burning_oil(x, y, diluted_oil)
 int x, y;
+boolean diluted_oil;
 {
+    int dmg = d(diluted_oil ? 3 : 4, 4);
+
 /* ZT_SPELL(ZT_FIRE) = ZT_SPELL(AD_FIRE-1) = 10+(2-1) = 11 */
 #define ZT_SPELL_O_FIRE 11 /* value kludge, see zap.c */
-    explode(x, y, ZT_SPELL_O_FIRE, d(4, 4), BURNING_OIL, EXPL_FIERY);
+    explode(x, y, ZT_SPELL_O_FIRE, dmg, BURNING_OIL, EXPL_FIERY);
 }
 
 /* lit potion of oil is exploding; extinguish it as a light source before
@@ -795,10 +798,12 @@ explode_oil(obj, x, y)
 struct obj *obj;
 int x, y;
 {
+    boolean diluted_oil = obj->odiluted;
+
     if (!obj->lamplit)
         impossible("exploding unlit oil");
     end_burn(obj, TRUE);
-    splatter_burning_oil(x, y);
+    splatter_burning_oil(x, y, diluted_oil);
 }
 
 /*explode.c*/
index dc96331e6e8097047ef7e5c160841209287f05e6..a6bf5f656646121fcfbe630c780874c9e22c98ac 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 potion.c        $NHDT-Date: 1543745356 2018/12/02 10:09:16 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.155 $ */
+/* NetHack 3.6 potion.c        $NHDT-Date: 1545182147 2018/12/19 01:15:47 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.156 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2013. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -2169,7 +2169,10 @@ more_dips:
         } else {
             You("fill %s with oil.", yname(obj));
             check_unpaid(potion);        /* Yendorian Fuel Tax */
-            obj->age += 2 * potion->age; /* burns more efficiently */
+            /* burns more efficiently in a lamp than in a bottle;
+               diluted potion provides less benefit but we don't attempt
+               to track that the lamp now also has some non-oil in it */
+            obj->age += (!potion->odiluted ? 4L : 3L) * potion->age / 2L;
             if (obj->age > 1500L)
                 obj->age = 1500L;
             useup(potion);
index 29b740fccec24ec9e57626cf706828fc2fda49bc..a4408de5c295bf2949a27201d79c1e1d358ef036 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 timeout.c       $NHDT-Date: 1544050558 2018/12/05 22:55:58 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.88 $ */
+/* NetHack 3.6 timeout.c       $NHDT-Date: 1545182148 2018/12/19 01:15:48 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.89 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1423,6 +1423,8 @@ boolean already_lit;
 
     case POT_OIL:
         turns = obj->age;
+        if (obj->odiluted)
+            turns = (3L * turns + 2L) / 4L;
         radius = 1; /* very dim light */
         break;