From 879e4dcacafad109c61d47ce2ae3b697ce803fc6 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sat, 16 Jul 2005 04:14:20 +0000 Subject: [PATCH] creating artifacts by naming shop gear (trunk only) A cased missed by "alteration of shop-owned objects" patch in April. If Sting or Orcrist is created in a shop using an unpaid weapon, update the bill to reflect that weapon's increase in value. No new fixes entry needed. --- src/do_name.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/do_name.c b/src/do_name.c index ee6ae0541..a3a389bf0 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)do_name.c 3.5 2005/05/06 */ +/* SCCS Id: @(#)do_name.c 3.5 2005/07/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -453,6 +453,8 @@ const char *name; if (obj == uswapwep) untwoweapon(); /* activate warning if you've just named your weapon "Sting" */ if (obj == uwep) set_artifact_intrinsic(obj, TRUE, W_WEP); + /* if obj is owned by a shop, increase your bill */ + if (obj->unpaid) alter_cost(obj, 0L); } if (carried(obj)) update_inventory(); return obj; -- 2.40.0