]> granicus.if.org Git - nethack/commitdiff
axing boulder/statue follow-up
authornethack.allison <nethack.allison>
Mon, 1 Jul 2002 06:41:08 +0000 (06:41 +0000)
committernethack.allison <nethack.allison>
Mon, 1 Jul 2002 06:41:08 +0000 (06:41 +0000)
<email deleted>
Sent: Sunday, June 30, 2002 6:30 PM
Subject: Sparks from statue-axing
> First, the message given when your axe-handle vibrates is a little
> ambiguous; I'd be explicit and include the name of obj.
>
> More seriously, potions of oil catching light from the sparks are a) a
> great idea, but b) slightly broken. They catch light fine, but
> snuffing them produces a "del_light_source: not found"
> impossible(). (This probably means the same applies to being lit by
> fire_damage(), but that's rare enough this hasn't been caught before.)
>
> (Also, a)pplying a potion of oil to light one identifies its object
> type, so lighting one by this means probably ought to as well. And
> oughtn't it to be charged for if you don't own it, as light_cocktail()
> does?)

src/apply.c
src/dig.c

index 303de73070a7c75f354f85a3dca23a2e85815617..edbf6164e156659b8e829d653cf593335400d138 100644 (file)
@@ -1056,7 +1056,15 @@ struct obj *obj;
                return FALSE;
            if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
                pline("%s %s light!", Yname2(obj), otense(obj, "catch"));
-           begin_burn(obj, TRUE);
+           if (obj->otyp == POT_OIL) makeknown(obj->otyp);
+           if (obj->unpaid && costly_spot(u.ux, u.uy) && (obj->where == OBJ_INVENT)) {
+               /* if it catches while you have it, then it's your tough luck */
+               check_unpaid(obj);
+               verbalize("That's in addition to the cost of %s %s, of course.",
+                               Yname2(obj), obj->quan == 1 ? "itself" : "themselves");
+               bill_dummy_object(obj);
+           }
+           begin_burn(obj, FALSE);
            return TRUE;
        }
        return FALSE;
index 0beb56ae9045dd1641a8253531cfa99f9a727e4f..436a48922a25cef1459f20250ebe860fb0653134 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -914,7 +914,7 @@ struct obj *obj;
                            boolean vibrate = !rn2(3);
                            pline("Sparks fly as you whack the %s%s!",
                                sobj_at(STATUE, rx, ry) ? "statue" : "boulder",
-                               vibrate ? " and the handle vibrates violently" : "");
+                               vibrate ? " and the axe-handle vibrates violently" : "");
                            if (vibrate) losehp(2, "axing a hard object", KILLED_BY);
                            if ((otmp = carrying(POT_OIL))) catch_lit(otmp);
                        }