diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 86dcd6e5a..bab5ec03b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -77,6 +77,7 @@ NetHack Community Patches (or Variation) Included ------------------------------------------------- hallucinatory trap names from github pull request #174 autounlock feature originally from unnethack in github pull request #228 +applying a candelabrum with no candles gives a tip (github #265) Code Cleanup and Reorganization diff --git a/src/apply.c b/src/apply.c index 8d35e2f0e..e8a1c231d 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1138,7 +1138,20 @@ register struct obj *obj; } if (obj->spe <= 0) { pline("This %s has no %s.", xname(obj), s); - pline("To attach candles, apply them instead of the %s.", xname(obj)); + + /* only output tip if candles are in inventory */ + boolean has_candles = FALSE; + struct obj *otmp = g.invent; + while (!has_candles && otmp) { + has_candles = Is_candle(otmp); + otmp = otmp->nobj; + } + + if (has_candles) { + pline("To attach candles, apply them instead of the %s.", + xname(obj)); + } + return; } if (Underwater) { @@ -2514,7 +2527,7 @@ struct obj *otmp; return; } ttyp = (otmp->otyp == LAND_MINE) ? LANDMINE : BEAR_TRAP; - if (otmp == g.trapinfo.tobj && u.ux == g.trapinfo.tx + if (otmp == g.trapinfo.tobj && u.ux == g.trapinfo.tx && u.uy == g.trapinfo.ty) { You("resume setting %s%s.", shk_your(buf, otmp), trapname(ttyp, FALSE));