diff -Naurd ../nh340-gold/include/decl.h ./include/decl.h
--- ../nh340-gold/include/decl.h	Fri Mar 22 14:40:56 2002
+++ ./include/decl.h	Fri Mar 22 14:40:53 2002
@@ -176,6 +176,9 @@
 E NEARDATA int killer_format;
 E const char *killer;
 E const char *delayed_killer;
+#ifdef GOLDOBJ
+E long done_money;
+#endif
 E char killer_buf[BUFSZ];
 E const char *configfile;
 E NEARDATA char plname[PL_NSIZ];
diff -Naurd ../nh340-gold/include/extern.h ./include/extern.h
--- ../nh340-gold/include/extern.h	Fri Mar 22 14:40:56 2002
+++ ./include/extern.h	Fri Mar 22 14:40:53 2002
@@ -681,6 +681,9 @@
 E int NDECL(max_capacity);
 E boolean FDECL(check_capacity, (const char *));
 E int NDECL(inv_cnt);
+#ifdef GOLDOBJ
+E long FDECL(money_cnt, (struct obj *));
+#endif
 
 /* ### hacklib.c ### */
 
@@ -902,6 +905,9 @@
 E void FDECL(set_malign, (struct monst *));
 E void FDECL(set_mimic_sym, (struct monst *));
 E int FDECL(mbirth_limit, (int));
+#ifdef GOLDOBJ
+E void FDECL(mkmonmoney, (struct monst *, long));
+#endif
 
 /* ### mapglyph.c ### */
 
@@ -1408,8 +1414,13 @@
 
 /* ### pickup.c ### */
 
+#ifdef GOLDOBJ
+E int FDECL(collect_obj_classes,
+	(char *,struct obj *,BOOLEAN_P,boolean FDECL((*),(OBJ_P))));
+#else
 E int FDECL(collect_obj_classes,
 	(char *,struct obj *,BOOLEAN_P,BOOLEAN_P,boolean FDECL((*),(OBJ_P))));
+#endif
 E void FDECL(add_valid_menu_class, (int));
 E boolean FDECL(allow_all, (struct obj *));
 E boolean FDECL(allow_category, (struct obj *));
@@ -1705,6 +1716,10 @@
 
 /* ### shk.c ### */
 
+#ifdef GOLDOBJ
+E long FDECL(money2mon, (struct monst *, long));
+E void FDECL(money2u, (struct monst *, long));
+#endif
 E char *FDECL(shkname, (struct monst *));
 E void FDECL(shkgone, (struct monst *));
 E void FDECL(set_residency, (struct monst *,BOOLEAN_P));
@@ -1822,13 +1837,20 @@
 #ifdef USE_TRAMPOLI
 E int NDECL(stealarm);
 #endif
+#ifdef GOLDOBJ
+E long FDECL(somegold, (long));
+#else
 E long NDECL(somegold);
+#endif
 E void FDECL(stealgold, (struct monst *));
 E void FDECL(remove_worn_item, (struct obj *));
 E int FDECL(steal, (struct monst *, char *));
 E int FDECL(mpickobj, (struct monst *,struct obj *));
 E void FDECL(stealamulet, (struct monst *));
 E void FDECL(relobj, (struct monst *,int,BOOLEAN_P));
+#ifdef GOLDOBJ
+E struct obj *FDECL(findgold, (struct obj *));
+#endif
 
 /* ### steed.c ### */
 
diff -Naurd ../nh340-gold/include/monst.h ./include/monst.h
--- ../nh340-gold/include/monst.h	Fri Mar 22 14:40:57 2002
+++ ./include/monst.h	Fri Mar 22 14:40:53 2002
@@ -128,7 +128,9 @@
 
 	long mtrapseen;		/* bitmap of traps we've been trapped in */
 	long mlstmv;		/* for catching up with lost time */
+#ifndef GOLDOBJ
 	long mgold;
+#endif
 	struct obj *minvent;
 
 	struct obj *mw;
diff -Naurd ../nh340-gold/include/you.h ./include/you.h
--- ../nh340-gold/include/you.h	Fri Mar 22 14:40:58 2002
+++ ./include/you.h	Fri Mar 22 14:40:53 2002
@@ -336,7 +336,11 @@
 	int ugangr;			/* if the gods are angry at you */
 	int ugifts;			/* number of artifacts bestowed */
 	int ublessed, ublesscnt;	/* blessing/duration from #pray */
+#ifndef GOLDOBJ
 	long	ugold, ugold0;
+#else
+	long	umoney0;
+#endif
 	long	uexp, urexp;
 	long	ucleansed;	/* to record moves when player was cleansed */
 	long	usleep;		/* sleeping; monstermove you last started */
diff -Naurd ../nh340-gold/src/apply.c ./src/apply.c
--- ../nh340-gold/src/apply.c	Fri Mar 22 14:40:58 2002
+++ ./src/apply.c	Fri Mar 22 14:40:53 2002
@@ -1830,17 +1830,21 @@
     char stonebuf[QBUFSZ];
     static const char scritch[] = "\"scritch, scritch\"";
     static char allowall[3] = { GOLD_CLASS, ALL_CLASSES, 0 };
+#ifndef GOLDOBJ
     struct obj goldobj;
+#endif
 
     Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan));
     if ((obj = getobj(allowall, stonebuf)) == 0)
 	return;
+#ifndef GOLDOBJ
     if (obj->oclass == GOLD_CLASS) {
 	u.ugold += obj->quan;	/* keep botl up to date */
 	goldobj = *obj;
 	dealloc_obj(obj);
 	obj = &goldobj;
     }
+#endif
 
     if (obj == tstone && obj->quan == 1) {
 	You_cant("rub %s on itself.", the(xname(obj)));
@@ -1857,7 +1861,9 @@
 	else
 	    pline("A sharp crack shatters %s%s.",
 		  (obj->quan > 1) ? "one of " : "", the(xname(obj)));
+#ifndef GOLDOBJ
      /* assert(obj != &goldobj); */
+#endif
 	useup(obj);
 	return;
     }
diff -Naurd ../nh340-gold/src/bones.c ./src/bones.c
--- ../nh340-gold/src/bones.c	Fri Mar 22 14:40:58 2002
+++ ./src/bones.c	Fri Mar 22 14:40:53 2002
@@ -143,6 +143,7 @@
 		else
 			place_object(otmp, u.ux, u.uy);
 	}
+#ifndef GOLDOBJ
 	if(u.ugold) {
 		long ugold = u.ugold;
 		if (mtmp) mtmp->mgold = ugold;
@@ -150,6 +151,7 @@
 		else (void)mkgold(ugold, u.ux, u.uy);
 		u.ugold = ugold;	/* undo mkgoldobj()'s removal */
 	}
+#endif
 	if (cont) cont->owt = weight(cont);
 }
 
diff -Naurd ../nh340-gold/src/botl.c ./src/botl.c
--- ../nh340-gold/src/botl.c	Fri Mar 22 14:40:58 2002
+++ ./src/botl.c	Fri Mar 22 14:40:53 2002
@@ -147,10 +147,17 @@
 botl_score()
 {
     int deepest = deepest_lev_reached(FALSE);
+#ifndef GOLDOBJ
     long ugold = u.ugold + hidden_gold();
 
     if ((ugold -= u.ugold0) < 0L) ugold = 0L;
     return ugold + u.urexp + (long)(50 * (deepest - 1))
+#else
+    long umoney = money_cnt(invent) + hidden_gold();
+
+    if ((umoney -= u.umoney0) < 0L) umoney = 0L;
+    return umoney + u.urexp + (long)(50 * (deepest - 1))
+#endif
 			  + (long)(deepest > 30 ? 10000 :
 				   deepest > 20 ? 1000*(deepest - 20) : 0);
 }
@@ -248,7 +255,11 @@
 	(void) describe_level(newbot2);
 	Sprintf(nb = eos(newbot2),
 		"%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", oc_syms[GOLD_CLASS],
+#ifndef GOLDOBJ
 		u.ugold,
+#else
+		money_cnt(invent),
+#endif
 		hp, hpmax, u.uen, u.uenmax, u.uac);
 
 	if (Upolyd)
diff -Naurd ../nh340-gold/src/decl.c ./src/decl.c
--- ../nh340-gold/src/decl.c	Fri Mar 22 14:40:58 2002
+++ ./src/decl.c	Fri Mar 22 14:40:53 2002
@@ -50,6 +50,9 @@
 NEARDATA int killer_format = 0;
 const char *killer = 0;
 const char *delayed_killer = 0;
+#ifdef GOLDOBJ
+NEARDATA long done_money = 0;
+#endif
 char killer_buf[BUFSZ] = DUMMY;
 const char *nomovemsg = 0;
 const char nul[40] = DUMMY;			/* contains zeros */
diff -Naurd ../nh340-gold/src/detect.c ./src/detect.c
--- ../nh340-gold/src/detect.c	Fri Mar 22 14:40:59 2002
+++ ./src/detect.c	Fri Mar 22 14:40:53 2002
@@ -91,7 +91,9 @@
 		return((boolean)( !(level.objects[x][y] ||     /* stale if nothing here */
 			    ((mtmp = m_at(x,y)) != 0 &&
 				(
+#ifndef GOLDOBJ
 				 mtmp->mgold ||
+#endif
 						 mtmp->minvent)))));
 	    } else {
 		if (material && objects[glyph_to_obj(glyph)].oc_material == material) {
@@ -111,12 +113,19 @@
 			for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
 				if (o_in(otmp, oclass)) return FALSE;
 			/* didn't find it; perhaps a monster is carrying it */
+#ifndef GOLDOBJ
 			if ((mtmp = m_at(x,y)) != 0) {
 				if (oclass == GOLD_CLASS && mtmp->mgold)
 					return FALSE;
 				else for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
 					if (o_in(otmp, oclass)) return FALSE;
 		        }
+#else
+			if ((mtmp = m_at(x,y)) != 0) {
+				for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
+					if (o_in(otmp, oclass)) return FALSE;
+		        }
+#endif
 			/* detection indicates removal of this object from the map */
 			return TRUE;
 	        }
@@ -166,7 +175,11 @@
     /* look for gold carried by monsters (might be in a container) */
     for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
     	if (DEADMONSTER(mtmp)) continue;	/* probably not needed in this case but... */
+#ifndef GOLDOBJ
 	if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) {
+#else
+	if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) {
+#endif
 	    known = TRUE;
 	    goto outgoldmap;	/* skip further searching */
 	} else for (obj = mtmp->minvent; obj; obj = obj->nobj)
@@ -199,7 +212,11 @@
 			Sprintf(buf, "You feel like a million %s!",
 				currency(2L));
 		} else if (hidden_gold() ||
+#ifndef GOLDOBJ
 				u.ugold)
+#else
+			        money_cnt(invent))
+#endif
 			Strcpy(buf,
 				"You feel worried about your future financial situation.");
 		else
@@ -235,7 +252,11 @@
     }
     for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
     	if (DEADMONSTER(mtmp)) continue;	/* probably overkill here */
+#ifndef GOLDOBJ
 	if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) {
+#else
+	if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) {
+#endif
 	    struct obj gold;
 
 	    gold.otyp = GOLD_PIECE;
@@ -426,7 +447,11 @@
 	}
 	if ((is_cursed && mtmp->m_ap_type == M_AP_OBJECT &&
 	    (!class || class == objects[mtmp->mappearance].oc_class)) ||
+#ifndef GOLDOBJ
 	    (mtmp->mgold && (!class || class == GOLD_CLASS))) {
+#else
+	    (findgold(mtmp->minvent) && (!class || class == GOLD_CLASS))) {
+#endif
 	    ct++;
 	    break;
 	}
@@ -504,7 +529,11 @@
 	    temp.oy = mtmp->my;
 	    temp.corpsenm = PM_TENGU;		/* if mimicing a corpse */
 	    map_object(&temp, 1);
+#ifndef GOLDOBJ
 	} else if (mtmp->mgold && (!class || class == GOLD_CLASS)) {
+#else
+	} else if (findgold(mtmp->minvent) && (!class || class == GOLD_CLASS)) {
+#endif
 	    struct obj gold;
 
 	    gold.otyp = GOLD_PIECE;
diff -Naurd ../nh340-gold/src/do.c ./src/do.c
--- ../nh340-gold/src/do.c	Fri Mar 22 14:40:59 2002
+++ ./src/do.c	Fri Mar 22 14:40:53 2002
@@ -48,7 +48,11 @@
 int
 dodrop()
 {
+#ifndef GOLDOBJ
 	int result, i = (invent || u.ugold) ? 0 : (SIZE(drop_types) - 1);
+#else
+	int result, i = (invent) ? 0 : (SIZE(drop_types) - 1);
+#endif
 
 	if (*u.ushops) sellobj_state(SELL_DELIBERATE);
 	result = drop(getobj(&drop_types[i], "drop"));
@@ -498,7 +502,17 @@
 dropx(obj)
 register struct obj *obj;
 {
+#ifndef GOLDOBJ
 	if (obj->oclass != GOLD_CLASS || obj == invent) freeinv(obj);
+#else
+        /* Ensure update when we drop gold objects */
+        if (obj->oclass == GOLD_CLASS) flags.botl = 1;
+	/* Money is usually not in our inventory */
+	/*if (obj->oclass != GOLD_CLASS || obj == invent)*/ 
+        /* !!!! make sure we don't drop "created" gold not in inventory any more,*/
+        /* or this will crash !!!! */
+        freeinv(obj);
+#endif
 	if (!u.uswallow && ship_object(obj, u.ux, u.uy, FALSE)) return;
 	dropy(obj);
 }
@@ -588,11 +602,14 @@
     int n, i, n_dropped = 0;
     long cnt;
     struct obj *otmp, *otmp2;
+#ifndef GOLDOBJ
     struct obj *u_gold = 0;
+#endif
     menu_item *pick_list;
     boolean all_categories = TRUE;
     boolean drop_everything = FALSE;
 
+#ifndef GOLDOBJ
     if (u.ugold) {
 	/* Hack: gold is not in the inventory, so make a gold object
 	   and put it at the head of the inventory list. */
@@ -602,6 +619,7 @@
 	u_gold->nobj = invent;
 	invent = u_gold;
     }
+#endif
     if (retry) {
 	all_categories = (retry == -2);
     } else if (flags.menu_style == MENU_FULL) {
@@ -649,9 +667,11 @@
 		cnt = pick_list[i].count;
 		if (cnt < otmp->quan && !welded(otmp) &&
 			(!otmp->cursed || otmp->otyp != LOADSTONE)) {
+#ifndef GOLDOBJ
 		    if (otmp->oclass == GOLD_CLASS)
 			(void) splitobj(otmp, otmp->quan - cnt);
 		    else
+#endif
 		    otmp = splitobj(otmp, cnt);
 		}
 		n_dropped += drop(otmp);
@@ -661,6 +681,7 @@
     }
 
  drop_done:
+#ifndef GOLDOBJ
     if (u_gold && invent && invent->oclass == GOLD_CLASS) {
 	/* didn't drop [all of] it */
 	u_gold = invent;
@@ -668,6 +689,7 @@
 	dealloc_obj(u_gold);
 	update_inventory();
     }
+#endif
     return n_dropped;
 }
 
diff -Naurd ../nh340-gold/src/dogmove.c ./src/dogmove.c
--- ../nh340-gold/src/dogmove.c	Fri Mar 22 14:40:59 2002
+++ ./src/dogmove.c	Fri Mar 22 14:40:53 2002
@@ -283,7 +283,11 @@
 	/* if we are carrying sth then we drop it (perhaps near @) */
 	/* Note: if apport == 1 then our behaviour is independent of udist */
 	/* Use udist+1 so steed won't cause divide by zero */
+#ifndef GOLDOBJ
 	if(DROPPABLES(mtmp) || mtmp->mgold) {
+#else
+	if(DROPPABLES(mtmp)) {
+#endif
 	    if (!rn2(udist+1) || !rn2(edog->apport))
 		if(rn2(10) < edog->apport){
 		    relobj(mtmp, (int)mtmp->minvis, TRUE);
diff -Naurd ../nh340-gold/src/dokick.c ./src/dokick.c
--- ../nh340-gold/src/dokick.c	Fri Mar 22 14:40:59 2002
+++ ./src/dokick.c	Fri Mar 22 14:40:53 2002
@@ -247,6 +247,9 @@
 		if (canseemon(mtmp))
 		    pline_The("gold hits %s.", mon_nam(mtmp));
 	} else {
+#ifdef GOLDOBJ
+                long value = gold->quan * objects[gold->otyp].oc_cost;
+#endif
 		mtmp->msleeping = 0;
 		mtmp->meating = 0;
 		if(!rn2(4)) setmangry(mtmp); /* not always pleasing */
@@ -254,12 +257,18 @@
 		/* greedy monsters catch gold */
 		if (cansee(mtmp->mx, mtmp->my))
 		    pline("%s catches the gold.", Monnam(mtmp));
+#ifndef GOLDOBJ
 		mtmp->mgold += gold->quan;
+#endif
 		if (mtmp->isshk) {
 			long robbed = ESHK(mtmp)->robbed;
 
 			if (robbed) {
+#ifndef GOLDOBJ
 				robbed -= gold->quan;
+#else
+				robbed -= value;
+#endif
 				if (robbed < 0) robbed = 0;
 				pline_The("amount %scovers %s recent losses.",
 				      !robbed ? "" : "partially ",
@@ -269,7 +278,11 @@
 					make_happy_shk(mtmp, FALSE);
 			} else {
 				if(mtmp->mpeaceful) {
+#ifndef GOLDOBJ
 				    ESHK(mtmp)->credit += gold->quan;
+#else
+				    ESHK(mtmp)->credit += value;
+#endif
 				    You("have %ld %s in credit.",
 					ESHK(mtmp)->credit,
 					currency(ESHK(mtmp)->credit));
@@ -293,8 +306,13 @@
 			   goldreqd = 750L;
 
 			if (goldreqd) {
+#ifndef GOLDOBJ
 			   if (gold->quan > goldreqd +
 				(u.ugold + u.ulevel*rn2(5))/ACURR(A_CHA))
+#else
+			   if (value > goldreqd +
+				(money_cnt(invent) + u.ulevel*rn2(5))/ACURR(A_CHA))
+#endif
 			    mtmp->mpeaceful = TRUE;
 			}
 		     }
@@ -303,7 +321,11 @@
 		     else verbalize("That's not enough, coward!");
 		 }
 
+#ifndef GOLDOBJ
 		dealloc_obj(gold);
+#else
+                add_to_minv(mtmp, gold);
+#endif
 		return(1);
 	}
 	return(0);
diff -Naurd ../nh340-gold/src/dothrow.c ./src/dothrow.c
--- ../nh340-gold/src/dothrow.c	Fri Mar 22 14:41:01 2002
+++ ./src/dothrow.c	Fri Mar 22 14:40:53 2002
@@ -42,6 +42,7 @@
 	boolean twoweap;
 
 	/* ask "in what direction?" */
+#ifndef GOLDOBJ
 	if (!getdir((char *)0)) {
 		if (obj->oclass == GOLD_CLASS) {
 		    u.ugold += obj->quan;
@@ -52,6 +53,24 @@
 	}
 
 	if(obj->oclass == GOLD_CLASS) return(throw_gold(obj));
+#else
+	if (!getdir((char *)0)) {
+	    /* obj might need to be merged back into the singular gold object */
+	    freeinv(obj);
+	    addinv(obj);
+	    return(0);
+	}
+
+        /*
+	  Throwing money is usually for getting rid of it when
+          a leprechaun approaches, or for bribing an oncoming 
+          angry monster.  So throw the whole object.
+
+          If the money is in quiver, throw one coin at a time,
+          possibly using a sling.
+        */
+	if(obj->oclass == GOLD_CLASS && obj != uquiver) return(throw_gold(obj));
+#endif
 
 	if(!canletgo(obj,"throw"))
 		return(0);
@@ -1608,19 +1627,29 @@
 struct obj *obj;
 {
 	int range, odx, ody;
+#ifndef GOLDOBJ
 	long zorks = obj->quan;
+#endif
 	register struct monst *mon;
 
 	if(!u.dx && !u.dy && !u.dz) {
 		You("cannot throw gold at yourself.");
 		return(0);
 	}
+#ifdef GOLDOBJ
+        freeinv(obj);
+#endif
 	if(u.uswallow) {
 		pline(is_animal(u.ustuck->data) ?
 			"%s in the %s's entrails." : "%s into %s.",
+#ifndef GOLDOBJ
 			"The gold disappears", mon_nam(u.ustuck));
 		u.ustuck->mgold += zorks;
 		dealloc_obj(obj);
+#else
+			"The money disappears", mon_nam(u.ustuck));
+		add_to_minv(u.ustuck, obj);
+#endif
 		return(1);
 	}
 
diff -Naurd ../nh340-gold/src/eat.c ./src/eat.c
--- ../nh340-gold/src/eat.c	Fri Mar 22 14:41:01 2002
+++ ./src/eat.c	Fri Mar 22 14:40:53 2002
@@ -1539,6 +1539,11 @@
 	victual.piece = (struct obj *)0;
 	victual.eating = 0;
 	if (otmp->oclass == GOLD_CLASS) {
+#ifdef GOLDOBJ
+		if (carried(otmp))
+		    useupall(otmp);
+		else
+#endif
 		dealloc_obj(otmp);
 		return;
 	}
diff -Naurd ../nh340-gold/src/end.c ./src/end.c
--- ../nh340-gold/src/end.c	Fri Mar 22 14:41:01 2002
+++ ./src/end.c	Fri Mar 22 14:40:53 2002
@@ -673,8 +673,13 @@
 	    long tmp;
 	    int deepest = deepest_lev_reached(FALSE);
 
+#ifndef GOLDOBJ
 	    umoney = u.ugold;
 	    tmp = u.ugold0;
+#else
+	    umoney = money_cnt(invent);
+	    tmp = u.umoney0;
+#endif
 	    umoney += hidden_gold();	/* accumulate gold from containers */
 	    tmp = umoney - tmp;		/* net gain */
 
@@ -701,7 +706,11 @@
 
 	/* update gold for the rip output, which can't use hidden_gold()
 	   (containers will be gone by then if bones just got saved...) */
+#ifndef GOLDOBJ
 	u.ugold = umoney;
+#else
+	done_money = umoney;
+#endif
 
 	/* clean up unneeded windows */
 	if (have_windows) {
diff -Naurd ../nh340-gold/src/fountain.c ./src/fountain.c
--- ../nh340-gold/src/fountain.c	Fri Mar 22 14:41:02 2002
+++ ./src/fountain.c	Fri Mar 22 14:40:53 2002
@@ -439,12 +439,34 @@
 			break;
 		case 28: /* Strange feeling */
 			pline("An urge to take a bath overwhelms you.");
+#ifndef GOLDOBJ
 			if (u.ugold > 10) {
 			    u.ugold -= somegold() / 10;
 			    You("lost some of your gold in the fountain!");
 			    levl[u.ux][u.uy].looted &= ~F_LOOTED;
 			    exercise(A_WIS, FALSE);
 			}
+#else
+			{
+			    long money = money_cnt(invent);
+			    struct obj *otmp;
+                            if (money > 10) {
+				/* Amount to loose.  Might get rounded up as fountains don't pay change... */
+			        money = somegold(money) / 10; 
+			        for (otmp = invent; otmp && money > 0; otmp = otmp->nobj) if (otmp->oclass == GOLD_CLASS) {
+				    int denomination = objects[otmp->otyp].oc_cost;
+				    long coin_loss = (money + denomination - 1) / denomination;
+                                    coin_loss = min(coin_loss, otmp->quan);
+				    otmp->quan -= coin_loss;
+				    money -= coin_loss * denomination;				  
+				    if (!otmp->quan) delobj(otmp);
+				}
+			        You("lost some of your money in the fountain!");
+			        levl[u.ux][u.uy].looted &= ~F_LOOTED;
+			        exercise(A_WIS, FALSE);
+                            }
+			}
+#endif
 			break;
 		case 29: /* You see coins */
 
diff -Naurd ../nh340-gold/src/hack.c ./src/hack.c
--- ../nh340-gold/src/hack.c	Fri Mar 22 14:41:02 2002
+++ ./src/hack.c	Fri Mar 22 14:40:53 2002
@@ -1987,14 +1987,22 @@
 	register struct obj *otmp = invent;
 	register int wt = 0;
 
+#ifndef GOLDOBJ
 	/* when putting stuff into containers, gold is inserted at the head
 	   of invent for easier manipulation by askchain & co, but it's also
 	   retained in u.ugold in order to keep the status line accurate; we
 	   mustn't add its weight in twice under that circumstance */
 	wt = (otmp && otmp->oclass == GOLD_CLASS) ? 0 :
 		(int)((u.ugold + 50L) / 100L);
+#endif
 	while (otmp) {
+#ifndef GOLDOBJ
 		if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data))
+#else
+		if (otmp->oclass == GOLD_CLASS)
+			wt += (int)(((long)otmp->quan + 50L) / 100L);
+		else if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data))
+#endif
 			wt += otmp->owt;
 		otmp = otmp->nobj;
 	}
@@ -2062,6 +2070,22 @@
 	return(ct);
 }
 
+#ifdef GOLDOBJ
+/* Counts the money in an object chain. */
+/* Intended use is for your or some monsters inventory, */
+/* now that u.gold/m.gold is gone.*/
+/* Counting money in a container might be possible too. */
+long money_cnt(otmp)
+struct obj *otmp;
+{
+        while(otmp) {
+	        /* Must change when silver & copper is implemented: */
+ 	        if (otmp->oclass == GOLD_CLASS) return otmp->quan;
+  	        otmp = otmp->nobj;
+	}
+	return 0;
+}
+#endif
 #endif /* OVLB */
 
 /*hack.c*/
diff -Naurd ../nh340-gold/src/invent.c ./src/invent.c
--- ../nh340-gold/src/invent.c	Fri Mar 22 14:41:02 2002
+++ ./src/invent.c	Fri Mar 22 14:40:53 2002
@@ -53,6 +53,13 @@
 	register int i;
 	register struct obj *obj;
 
+#ifdef GOLDOBJ
+        /* There is only one of these in inventory... */        
+        if (otmp->oclass == GOLD_CLASS) {
+	    otmp->invlet = GOLD_SYM;
+	    return;
+	}
+#endif
 
 	for(i = 0; i < 52; i++) inuse[i] = FALSE;
 	for(obj = invent; obj; obj = obj->nobj) if(obj != otmp) {
@@ -169,6 +176,9 @@
 			    / (otmp->quan + obj->quan);
 
 		otmp->quan += obj->quan;
+#ifdef GOLDOBJ
+                /* temporary special case for gold objects!!!! */
+#endif
 		if (otmp->oclass == GOLD_CLASS) otmp->owt = weight(otmp);
 		else otmp->owt += obj->owt;
 		if(!otmp->onamelth && obj->onamelth)
@@ -236,7 +246,11 @@
 struct obj *obj;
 {
 	if (obj->oclass == GOLD_CLASS) {
+#ifndef GOLDOBJ
 		u.ugold += obj->quan;
+#else
+		flags.botl = 1;
+#endif
 	} else if (obj->otyp == AMULET_OF_YENDOR) {
 		if (u.uhave.amulet) impossible("already have amulet?");
 		u.uhave.amulet = 1;
@@ -296,9 +310,11 @@
 	obj->no_charge = 0;	/* not meaningful for invent */
 
 	addinv_core1(obj);
+#ifndef GOLDOBJ
 	/* if handed gold, we're done */
 	if (obj->oclass == GOLD_CLASS)
 	    return obj;
+#endif
 
 	/* merge if possible; find end of chain in the process */
 	for (prev = 0, otmp = invent; otmp; prev = otmp, otmp = otmp->nobj)
@@ -440,7 +456,9 @@
 struct obj *obj;
 {
 	if (obj->oclass == GOLD_CLASS) {
+#ifndef GOLDOBJ
 		u.ugold -= obj->quan;
+#endif
 		flags.botl = 1;
 		return;
 	} else if (obj->otyp == AMULET_OF_YENDOR) {
@@ -623,6 +641,7 @@
 
 #endif /* OVL2 */
 #ifdef OVLB
+#ifndef GOLDOBJ
 /* Make a gold object from the hero's gold. */
 struct obj *
 mkgoldobj(q)
@@ -637,6 +656,7 @@
 	flags.botl = 1;
 	return(otmp);
 }
+#endif
 #endif /* OVLB */
 #ifdef OVL1
 
@@ -707,7 +727,9 @@
 	register int foo = 0;
 	register char *bp = buf;
 	xchar allowcnt = 0;	/* 0, 1 or 2 */
+#ifndef GOLDOBJ
 	boolean allowgold = FALSE;	/* can't use gold because they don't have any */
+#endif
 	boolean usegold = FALSE;	/* can't use gold because its illegal */
 	boolean allowall = FALSE;
 	boolean allownone = FALSE;
@@ -717,12 +739,20 @@
 	long dummymask;
 
 	if(*let == ALLOW_COUNT) let++, allowcnt = 1;
+#ifndef GOLDOBJ
 	if(*let == GOLD_CLASS) let++,
 		usegold = TRUE, allowgold = (u.ugold ? TRUE : FALSE);
+#else
+	if(*let == GOLD_CLASS) let++, usegold = TRUE;
+#endif
 
 	/* Equivalent of an "ugly check" for gold */
 	if (usegold && !strcmp(word, "eat") && !metallivorous(youmonst.data))
+#ifndef GOLDOBJ
 		usegold = allowgold = FALSE;
+#else
+		usegold = FALSE;
+#endif
 
 	if(*let == ALL_CLASSES) let++, allowall = TRUE;
 	if(*let == ALLOW_NONE) let++, allownone = TRUE;
@@ -735,15 +765,23 @@
 	if(allowall && !strcmp(word, "read")) allowall = FALSE;
 
 	if(allownone) *bp++ = '-';
+#ifndef GOLDOBJ
 	if(allowgold) *bp++ = def_oc_syms[GOLD_CLASS];
+#endif
 	if(bp > buf && bp[-1] == '-') *bp++ = ' ';
 	ap = altlets;
 
 	ilet = 'a';
 	for (otmp = invent; otmp; otmp = otmp->nobj) {
 	    if (!flags.invlet_constant)
+#ifdef GOLDOBJ
+		if (otmp->invlet != GOLD_SYM) /* don't reassign this */
+#endif
 		otmp->invlet = ilet;	/* reassign() */
 	    if (!*let || index(let, otmp->oclass)
+#ifdef GOLDOBJ
+		|| (usegold && otmp->invlet == GOLD_SYM)
+#endif
 		) {
 		register int otyp = otmp->otyp;
 		bp[foo++] = otmp->invlet;
@@ -844,7 +882,11 @@
 		compactify(bp);
 	*ap = '\0';
 
+#ifndef GOLDOBJ
 	if(!foo && !allowall && !allowgold && !allownone) {
+#else
+	if(!foo && !allowall && !allownone) {
+#endif
 		You("don't have anything %sto %s.",
 			foox ? "else " : "", word);
 		return((struct obj *)0);
@@ -889,9 +931,11 @@
 			if (!usegold) {
 			    You("cannot %s gold.", word);
 			    return(struct obj *)0;
+#ifndef GOLDOBJ
 			} else if (!allowgold) {
 				You("are not carrying any gold.");
 				return(struct obj *)0;
+#endif
 			} 
 			if(cnt == 0 && prezero) return((struct obj *)0);
 			/* Historic note: early Nethack had a bug which was
@@ -905,9 +949,11 @@
 				return(struct obj *)0;
 			}
 
+#ifndef GOLDOBJ
 			if(!(allowcnt == 2 && cnt < u.ugold))
 				cnt = u.ugold;
 			return(mkgoldobj(cnt));
+#endif
 		}
 		if(ilet == '?' || ilet == '*') {
 		    char *allowed_choices = (ilet == '?') ? lets : (char *)0;
@@ -934,6 +980,9 @@
 		    /* permit counts for throwing gold, but don't accept
 		     * counts for other things since the throw code will
 		     * split off a single item anyway */
+#ifdef GOLDOBJ
+		    if (ilet != def_oc_syms[GOLD_CLASS])
+#endif
 			allowcnt = 1;
 		    if(cnt == 0 && prezero) return((struct obj *)0);
 		    if(cnt > 1) {
@@ -941,6 +990,9 @@
 			continue;
 		    }
 		}
+#ifdef GOLDOBJ
+		flags.botl = 1; /* May have changed the amount of money */
+#endif
 #ifdef REDO
 		savech(ilet);
 #endif
@@ -963,6 +1015,9 @@
 		break;
 	}
 	if(!allowall && let && !index(let,otmp->oclass)
+#ifdef GOLDOBJ
+	   && !(usegold && otmp->oclass == GOLD_CLASS)
+#endif
 	   ) {
 		pline(silly_thing_to, word);
 		return((struct obj *)0);
@@ -1038,14 +1093,24 @@
 	int FDECL((*ckfn),(OBJ_P)) = (int FDECL((*),(OBJ_P))) 0;
 	boolean FDECL((*filter),(OBJ_P)) = (boolean FDECL((*),(OBJ_P))) 0;
 	boolean takeoff, ident, allflag, m_seen;
+#ifndef GOLDOBJ
 	int oletct, iletct, allowgold, unpaid, oc_of_sym;
+#else
+	int oletct, iletct, unpaid, oc_of_sym;
+#endif
 	char sym, *ip, olets[MAXOCLASSES+5], ilets[MAXOCLASSES+5];
 	char buf[BUFSZ], qbuf[QBUFSZ];
 
 	if (resultflags) *resultflags = 0;
+#ifndef GOLDOBJ
 	allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0;
+#endif
 	takeoff = ident = allflag = m_seen = FALSE;
+#ifndef GOLDOBJ
 	if(!invent && !allowgold){
+#else
+	if(!invent){
+#endif
 		You("have nothing to %s.", word);
 		return(0);
 	}
@@ -1060,7 +1125,9 @@
 
 	iletct = collect_obj_classes(ilets, invent,
 				     	FALSE,
+#ifndef GOLDOBJ
 					(allowgold != 0),
+#endif
 					filter);
 	unpaid = count_unpaid(invent);
 
@@ -1122,11 +1189,15 @@
 	    }
 
 	    if (oc_of_sym == GOLD_CLASS && !combo) {
+#ifndef GOLDOBJ
 		if (allowgold == 1)
 		    (*fn)(mkgoldobj(u.ugold));
 		else if (!u.ugold)
 		    You("have no gold.");
 		allowgold = 2;
+#else
+		flags.botl = 1;
+#endif
 	    } else if (sym == 'a') {
 		allflag = TRUE;
 	    } else if (sym == 'A') {
@@ -1163,9 +1234,16 @@
 	    return (allflag || (!oletct && ckfn != ckunpaid)) ? -2 : -3;
 	else if (flags.menu_style != MENU_TRADITIONAL && combo && !allflag)
 	    return 0;
+#ifndef GOLDOBJ
 	else if (allowgold == 2 && !oletct)
 	    return 1;	/* you dropped gold (or at least tried to) */
 	else {
+#else
+	else /*!!!! if (allowgold == 2 && !oletct)
+	    !!!! return 1;	 you dropped gold (or at least tried to) 
+            !!!! test gold dropping
+	else*/ {
+#endif
 	    int cnt = askchain(&invent, olets, allflag, fn, ckfn, mx, word); 
 	    /*
 	     * askchain() has already finished the job in this case
@@ -1375,8 +1453,10 @@
 obj_to_let(obj)	/* should of course only be called for things in invent */
 register struct obj *obj;
 {
+#ifndef GOLDOBJ
 	if (obj->oclass == GOLD_CLASS)
 		return GOLD_SYM;
+#endif
 	if (!flags.invlet_constant) {
 		obj->invlet = NOINVSYM;
 		reassign();
@@ -1435,9 +1515,11 @@
 	Sprintf(li, "%c - %-45s %6ld %s",
 		(dot && use_invlet ? obj->invlet : let),
 		(txt ? txt : doname(obj)), cost, currency(cost));
+#ifndef GOLDOBJ
     } else if (obj && obj->oclass == GOLD_CLASS) {
 	Sprintf(li, "%ld gold piece%s%s", obj->quan, plur(obj->quan),
 		(dot ? "." : ""));
+#endif
     } else {
 	/* ordinary inventory display or pickup message */
 	Sprintf(li, "%c - %s%s",
@@ -1534,7 +1616,11 @@
 	to here is short circuited away.
 	*/
 	if (!invent && !(flags.perm_invent && !lets && !want_reply)) {
+#ifndef GOLDOBJ
 	    pline("Not carrying anything%s.", u.ugold ? " except gold" : "");
+#else
+	    pline("Not carrying anything.");
+#endif
 	    return 0;
 	}
 
@@ -1784,7 +1870,11 @@
 	boolean traditional = TRUE;
 	const char *prompt = "What type of object do you want an inventory of?";
 
+#ifndef GOLDOBJ
 	if (!invent && !u.ugold && !billx) {
+#else
+	if (!invent && !billx) {
+#endif
 	    You("aren't carrying anything.");
 	    return 0;
 	}
@@ -1806,7 +1896,9 @@
 	    types[0] = 0;
 	    class_count = collect_obj_classes(types, invent,
 					      FALSE,
+#ifndef GOLDOBJ
 					      (u.ugold != 0),
+#endif
 					      (boolean FDECL((*),(OBJ_P))) 0);
 	    if (unpaid_count) {
 		Strcat(types, "u");
@@ -2094,7 +2186,16 @@
 mergable(otmp, obj)	/* returns TRUE if obj  & otmp can be merged */
 	register struct obj *otmp, *obj;
 {
+#ifndef GOLDOBJ
 	if (obj->otyp != otmp->otyp || obj->unpaid != otmp->unpaid ||
+#else
+	if (obj->otyp != otmp->otyp) return FALSE;
+       
+        /* Coins of the same kind will always merge. */
+        if (obj->oclass == GOLD_CLASS) return TRUE;
+
+        if (obj->unpaid != otmp->unpaid ||
+#endif
 	    obj->spe != otmp->spe || obj->dknown != otmp->dknown ||
 	    (obj->bknown != otmp->bknown && !Role_if(PM_PRIEST)) ||
 	    obj->cursed != otmp->cursed || obj->blessed != otmp->blessed ||
@@ -2167,10 +2268,18 @@
 {
 	/* the messages used to refer to "carrying gold", but that didn't
 	   take containers into account */
+#ifndef GOLDOBJ
 	if(!u.ugold)
 	    Your("wallet is empty.");
 	else
 	    Your("wallet contains %ld gold piece%s.", u.ugold, plur(u.ugold));
+#else
+        long umoney = money_cnt(invent);
+	if(!umoney)
+	    Your("wallet is empty.");
+	else
+	    Your("wallet contains %ld %s.", umoney, currency(umoney));
+#endif
 	shopper_financial_report();
 	return 0;
 }
@@ -2537,23 +2646,34 @@
 char *title;
 {
 	struct obj *ret;
+#ifndef GOLDOBJ
 	struct obj m_gold;
+#endif
 	char tmp[QBUFSZ];
 	int n;
 	menu_item *selected = 0;
+#ifndef GOLDOBJ
 	int do_all = (dflags & MINV_ALL) != 0,
 	    do_gold = (do_all && mon->mgold);
+#else
+	int do_all = (dflags & MINV_ALL) != 0;
+#endif
 
 	Sprintf(tmp,"%s %s:", s_suffix(noit_Monnam(mon)),
 		do_all ? "possessions" : "armament");
 
+#ifndef GOLDOBJ
 	if (do_all ? (mon->minvent || mon->mgold)
+#else
+	if (do_all ? (mon->minvent != 0)
+#endif
 		   : (mon->misc_worn_check || MON_WEP(mon))) {
 	    /* Fool the 'weapon in hand' routine into
 	     * displaying 'weapon in claw', etc. properly.
 	     */
 	    youmonst.data = mon->data;
 
+#ifndef GOLDOBJ
 	    if (do_gold) {
 		/*
 		 * Make temporary gold object and insert at the head of
@@ -2570,11 +2690,14 @@
 		    panic("display_minventory: static object freed.");
 	    }
 
+#endif
 	    n = query_objlist(title ? title : tmp, mon->minvent, INVORDER_SORT, &selected,
 			(dflags & MINV_NOLET) ? PICK_NONE : PICK_ONE,
 			do_all ? allow_all : worn_wield_only);
 
+#ifndef GOLDOBJ
 	    if (do_gold) obj_extract_self(&m_gold);
+#endif
 
 	    set_uasmon();
 	} else {
@@ -2585,12 +2708,14 @@
 	if (n > 0) {
 	    ret = selected[0].item.a_obj;
 	    free((genericptr_t)selected);
+#ifndef GOLDOBJ
 	    /*
 	     * Unfortunately, we can't return a pointer to our temporary
 	     * gold object.  We'll have to work out a scheme where this
 	     * can happen.  Maybe even put gold in the inventory list...
 	     */
 	    if (ret == &m_gold) ret = (struct obj *) 0;
+#endif
 	} else
 	    ret = (struct obj *) 0;
 	return ret;
diff -Naurd ../nh340-gold/src/makemon.c ./src/makemon.c
--- ../nh340-gold/src/makemon.c	Fri Mar 22 14:41:02 2002
+++ ./src/makemon.c	Fri Mar 22 14:40:53 2002
@@ -475,6 +475,21 @@
 #endif /* OVL2 */
 #ifdef OVL1
 
+#ifdef GOLDOBJ
+/*
+ *   Makes up money for monster's inventory.
+ *   This will change with silver & copper coins
+ */
+void 
+mkmonmoney(mtmp, amount)
+struct monst *mtmp;
+long amount;
+{
+    struct obj *gold = mksobj(GOLD_PIECE, FALSE, FALSE);
+    gold->quan = amount;
+    add_to_minv(mtmp, gold);
+}
+#endif
 
 STATIC_OVL void
 m_initinv(mtmp)
@@ -563,7 +578,11 @@
 					     rn2(3) ? CLOAK_OF_PROTECTION :
 						 CLOAK_OF_MAGIC_RESISTANCE);
 		    (void) mongets(mtmp, SMALL_SHIELD);
+#ifndef GOLDOBJ
 		    mtmp->mgold = (long)rn1(10,20);
+#else
+		    mkmonmoney(mtmp,(long)rn1(10,20));
+#endif
 		} else if (quest_mon_represents_role(ptr,PM_MONK)) {
 		    (void) mongets(mtmp, rn2(11) ? ROBE :
 					     CLOAK_OF_MAGIC_RESISTANCE);
@@ -617,7 +636,11 @@
 		}
 		break;
 	    case S_LEPRECHAUN:
+#ifndef GOLDOBJ
 		mtmp->mgold = (long) d(level_difficulty(), 30);
+#else
+		mkmonmoney(mtmp, (long) d(level_difficulty(), 30));
+#endif
 		break;
 	    default:
 		break;
@@ -630,9 +653,14 @@
 		(void) mongets(mtmp, rnd_defensive_item(mtmp));
 	if ((int) mtmp->m_lev > rn2(100))
 		(void) mongets(mtmp, rnd_misc_item(mtmp));
+#ifndef GOLDOBJ
 	if (likes_gold(ptr) && !mtmp->mgold && !rn2(5))
 		mtmp->mgold =
 		      (long) d(level_difficulty(), mtmp->minvent ? 5 : 10);
+#else
+	if (likes_gold(ptr) && !findgold(mtmp->minvent) && !rn2(5))
+		mkmonmoney(mtmp, (long) d(level_difficulty(), mtmp->minvent ? 5 : 10));
+#endif
 }
 
 struct monst *
@@ -661,7 +689,9 @@
 
 	m2->minvent = (struct obj *) 0; /* objects don't clone */
 	m2->mleashed = FALSE;
+#ifndef GOLDOBJ
 	m2->mgold = 0L;
+#endif
 	/* Max HP the same, but current HP halved for both.  The caller
 	 * might want to override this by halving the max HP also.
 	 * When current HP is odd, the original keeps the extra point.
diff -Naurd ../nh340-gold/src/mhitm.c ./src/mhitm.c
--- ../nh340-gold/src/mhitm.c	Fri Mar 22 14:41:03 2002
+++ ./src/mhitm.c	Fri Mar 22 14:40:53 2002
@@ -907,12 +907,25 @@
 		break;
 	    case AD_SGLD:
 		tmp = 0;
+#ifndef GOLDOBJ
 		if (magr->mcan || !mdef->mgold) break;
 		/* technically incorrect; no check for stealing gold from
 		 * between mdef's feet...
 		 */
 		magr->mgold += mdef->mgold;
 		mdef->mgold = 0;
+#else
+                if (magr->mcan) break;
+		/* technically incorrect; no check for stealing gold from
+		 * between mdef's feet...
+		 */
+                {
+		    struct obj *gold = findgold(mdef->minvent);
+		    if (!gold) break;
+                    obj_extract_self(gold);
+		    add_to_minv(magr, gold);
+                }
+#endif
 		if (vis) {
 		    Strcpy(buf, Monnam(magr));
 		    pline("%s steals some gold from %s.", buf, mon_nam(mdef));
diff -Naurd ../nh340-gold/src/mhitu.c ./src/mhitu.c
--- ../nh340-gold/src/mhitu.c	Fri Mar 22 14:41:03 2002
+++ ./src/mhitu.c	Fri Mar 22 14:40:53 2002
@@ -2273,6 +2273,7 @@
 		pline("%s tries to take your money, but fails...",
 				noit_Monnam(mon));
 	else {
+#ifndef GOLDOBJ
 		long cost;
 
 		if (u.ugold > (long)LARGEST_INT - 10L)
@@ -2292,6 +2293,27 @@
 		    mon->mgold += cost;
 		    flags.botl = 1;
 		}
+#else
+		long cost;
+                long umoney = money_cnt(invent);
+
+		if (umoney > (long)LARGEST_INT - 10L)
+			cost = (long) rnd(LARGEST_INT) + 500L;
+		else
+			cost = (long) rnd((int)umoney + 10) + 500L;
+		if (mon->mpeaceful) {
+			cost /= 5L;
+			if (!cost) cost = 1L;
+		}
+		if (cost > umoney) cost = umoney;
+		if (!cost) verbalize("It's on the house!");
+		else { 
+		    pline("%s takes %ld %s for services rendered!",
+			    noit_Monnam(mon), cost, currency(cost));
+                    money2mon(mon, cost);
+		    flags.botl = 1;
+		}
+#endif
 	}
 	if (!rn2(25)) mon->mcan = 1; /* monster is worn out */
 	if (!tele_restrict(mon)) rloc(mon);
diff -Naurd ../nh340-gold/src/minion.c ./src/minion.c
--- ../nh340-gold/src/minion.c	Fri Mar 22 14:41:03 2002
+++ ./src/minion.c	Fri Mar 22 14:40:53 2002
@@ -131,7 +131,11 @@
 	    if (!tele_restrict(mtmp)) rloc(mtmp);
 	    return(1);
 	}
+#ifndef GOLDOBJ
 	demand = (u.ugold * (rnd(80) + 20 * Athome)) /
+#else
+	demand = (money_cnt(invent) * (rnd(80) + 20 * Athome)) /
+#endif
 	    (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
 	if (!demand)		/* you have no gold */
 	    return mtmp->mpeaceful = 0;
@@ -162,6 +166,9 @@
 {
 	char buf[BUFSZ];
 	long offer;
+#ifdef GOLDOBJ
+	long umoney = money_cnt(invent);
+#endif
 
 	getlin("How much will you offer?", buf);
 	if (sscanf(buf, "%ld", &offer) != 1) offer = 0L;
@@ -175,6 +182,7 @@
 	} else if (offer == 0L) {
 		You("refuse.");
 		return 0L;
+#ifndef GOLDOBJ
 	} else if (offer >= u.ugold) {
 		You("give %s all your gold.", mon_nam(mtmp));
 		offer = u.ugold;
@@ -183,6 +191,15 @@
 	}
 	u.ugold -= offer;
 	mtmp->mgold += offer;
+#else
+	} else if (offer >= umoney) {
+		You("give %s all your gold.", mon_nam(mtmp));
+		offer = umoney;
+	} else {
+		You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer));
+	}
+	(void) money2mon(mtmp, offer);
+#endif
 	flags.botl = 1;
 	return(offer);
 }
diff -Naurd ../nh340-gold/src/mon.c ./src/mon.c
--- ../nh340-gold/src/mon.c	Fri Mar 22 14:41:04 2002
+++ ./src/mon.c	Fri Mar 22 14:40:53 2002
@@ -768,11 +768,19 @@
     register struct obj *gold;
 
     if ((gold = g_at(mtmp->mx, mtmp->my)) != 0) {
+#ifndef GOLDOBJ
 	mtmp->mgold += gold->quan;
 	delobj(gold);
 	if (cansee(mtmp->mx, mtmp->my) ) {
 	    if (flags.verbose && !mtmp->isgd)
 		pline("%s picks up some gold.", Monnam(mtmp));
+#else
+        obj_extract_self(gold);
+        add_to_minv(mtmp, gold);
+	if (cansee(mtmp->mx, mtmp->my) ) {
+	    if (flags.verbose && !mtmp->isgd)
+		pline("%s picks up some money.", Monnam(mtmp));
+#endif
 	    newsym(mtmp->mx, mtmp->my);
 	}
     }
@@ -1481,7 +1489,9 @@
 #endif
 
 	discard_minvent(mdef);	/* release monster's inventory */
+#ifndef GOLDOBJ
 	mdef->mgold = 0L;
+#endif
 	m_detach(mdef, mdef->data);
 }
 
@@ -1527,6 +1537,7 @@
 			(void) add_to_container(otmp, obj);
 		    }
 		}
+#ifndef GOLDOBJ
 		if (mdef->mgold) {
 			struct obj *au;
 			au = mksobj(GOLD_PIECE, FALSE, FALSE);
@@ -1535,6 +1546,7 @@
 			(void) add_to_container(otmp, au);
 			mdef->mgold = 0;
 		}
+#endif
 		/* Archeologists should not break unique statues */
 		if (mdef->data->geno & G_UNIQ)
 			otmp->spe = 1;
diff -Naurd ../nh340-gold/src/monmove.c ./src/monmove.c
--- ../nh340-gold/src/monmove.c	Fri Mar 22 14:41:04 2002
+++ ./src/monmove.c	Fri Mar 22 14:40:53 2002
@@ -296,6 +296,9 @@
 	register struct permonst *mdat;
 	register int tmp=0;
 	int inrange, nearby, scared;
+#ifdef GOLDOBJ
+        struct obj *ygold = 0, *lepgold = 0;
+#endif
 
 /*	Pre-movement adjustments	*/
 
@@ -466,9 +469,20 @@
 
 /*	Now the actual movement phase	*/
 
+#ifndef GOLDOBJ
 	if(!nearby || mtmp->mflee || scared ||
 	   mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) ||
 	   (mdat->mlet == S_LEPRECHAUN && !u.ugold && (mtmp->mgold || rn2(2))) ||
+#else
+        if (mdat->mlet == S_LEPRECHAUN) {
+	    ygold = findgold(invent);
+	    lepgold = findgold(mtmp->minvent);
+	}
+
+	if(!nearby || mtmp->mflee || scared ||
+	   mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) ||
+	   (mdat->mlet == S_LEPRECHAUN && !ygold && (lepgold || rn2(2))) ||
+#endif
 	   (is_wanderer(mdat) && !rn2(4)) || (Conflict && !mtmp->iswiz) ||
 	   (!mtmp->mcansee && !rn2(4)) || mtmp->mpeaceful) {
 		/* Possibly cast an undirected spell if not attacking you */
@@ -700,6 +714,9 @@
 	if (mtmp->mconf || (u.uswallow && mtmp == u.ustuck))
 		appr = 0;
 	else {
+#ifdef GOLDOBJ
+		struct obj *lepgold, *ygold;
+#endif
 		boolean should_see = (couldsee(omx, omy) &&
 				      (levl[gx][gy].lit ||
 				       !levl[omx][omy].lit) &&
@@ -715,7 +732,12 @@
 			appr = 0;
 
 		if(monsndx(ptr) == PM_LEPRECHAUN && (appr == 1) &&
+#ifndef GOLDOBJ
 		   (mtmp->mgold > u.ugold))
+#else
+		   ( (lepgold = findgold(mtmp->minvent)) && 
+                   (lepgold->quan > ((ygold = findgold(invent)) ? ygold->quan : 0L)) ))
+#endif
 			appr = -1;
 
 		if (!should_see && can_track(ptr)) {
@@ -1197,6 +1219,9 @@
 {
 	boolean notseen, gotu;
 	register int disp, mx = mtmp->mux, my = mtmp->muy;
+#ifdef GOLDOBJ
+	long umoney = money_cnt(invent);
+#endif
 
 	/*
 	 * do cheapest and/or most likely tests first
@@ -1214,7 +1239,11 @@
 	if (notseen || Underwater) {
 	    /* Xorns can smell valuable metal like gold, treat as seen */
 	    if ((mtmp->data == &mons[PM_XORN]) &&
+#ifndef GOLDOBJ
 			u.ugold
+#else
+			umoney
+#endif
 			&& !Underwater)
 		disp = 0;
 	    else
@@ -1264,15 +1293,22 @@
 
 	if (!amorphous(mtmp->data)) return FALSE;
 	if (mtmp == &youmonst) {
+#ifndef GOLDOBJ
 		if (u.ugold > 100L) return FALSE;
+#endif
 		chain = invent;
 	} else {
+#ifndef GOLDOBJ
 		if (mtmp->mgold > 100L) return FALSE;
+#endif
 		chain = mtmp->minvent;
 	}
 	for (obj = chain; obj; obj = obj->nobj) {
 		int typ = obj->otyp;
 
+#ifdef GOLDOBJ
+                if (typ == GOLD_CLASS && obj->quan > 100L) return FALSE;
+#endif
 		if (obj->oclass != GEM_CLASS &&
 		    !(typ >= ARROW && typ <= BOOMERANG) &&
 		    !(typ >= DAGGER && typ <= CRYSKNIFE) &&
diff -Naurd ../nh340-gold/src/mplayer.c ./src/mplayer.c
--- ../nh340-gold/src/mplayer.c	Fri Mar 22 14:41:04 2002
+++ ./src/mplayer.c	Fri Mar 22 14:40:53 2002
@@ -256,7 +256,11 @@
 		    (void)mongets(mtmp, rnd_class(DILITHIUM_CRYSTAL, JADE));
 		/* To get the gold "right" would mean a player can double his */
 		/* gold supply by killing one mplayer.  Not good. */
+#ifndef GOLDOBJ
 		mtmp->mgold = rn2(1000);
+#else
+		mkmonmoney(mtmp, rn2(1000));
+#endif
 		quan = rn2(10);
 		while(quan--)
 		    (void) mpickobj(mtmp, mkobj(RANDOM_CLASS, FALSE));
diff -Naurd ../nh340-gold/src/objnam.c ./src/objnam.c
--- ../nh340-gold/src/objnam.c	Fri Mar 22 14:41:04 2002
+++ ./src/objnam.c	Fri Mar 22 14:40:53 2002
@@ -1943,11 +1943,19 @@
 #endif
 						) cnt=5000;
 		if (cnt < 1) cnt=1;
+#ifndef GOLDOBJ
 		if (from_user)
 		    pline("%d gold piece%s.", cnt, plur(cnt));
 		u.ugold += cnt;
 		flags.botl=1;
 		return (&zeroobj);
+#else
+                otmp = mksobj(GOLD_PIECE, FALSE, FALSE);
+		otmp->quan = cnt;
+                otmp->owt = weight(otmp);
+		flags.botl=1;
+		return (otmp);
+#endif
 	}
 	if (strlen(bp) == 1 &&
 	   (i = def_char_to_objclass(*bp)) < MAXOCLASSES && i > ILLOBJ_CLASS
diff -Naurd ../nh340-gold/src/options.c ./src/options.c
--- ../nh340-gold/src/options.c	Fri Mar 22 14:41:05 2002
+++ ./src/options.c	Fri Mar 22 14:40:53 2002
@@ -742,8 +742,12 @@
     char *sp, buf[BUFSZ];
 
     num = 0;
+#ifndef GOLDOBJ
     if (!index(op, GOLD_SYM))
 	buf[num++] = GOLD_CLASS;
+#else
+    /*  !!!! probably unnecessary with gold as normal inventory */
+#endif
 
     for (sp = op; *sp; sp++) {
 	oc_sym = def_char_to_objclass(*sp);
diff -Naurd ../nh340-gold/src/pickup.c ./src/pickup.c
--- ../nh340-gold/src/pickup.c	Fri Mar 22 14:41:05 2002
+++ ./src/pickup.c	Fri Mar 22 14:40:53 2002
@@ -9,8 +9,13 @@
 #include "hack.h"
 
 STATIC_DCL void FDECL(simple_look, (struct obj *,BOOLEAN_P));
+#ifndef GOLDOBJ
 STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *,
 		const char *,struct obj *,BOOLEAN_P,BOOLEAN_P,int *));
+#else
+STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *,
+		const char *,struct obj *,BOOLEAN_P,int *));
+#endif
 STATIC_DCL void FDECL(check_here, (BOOLEAN_P));
 STATIC_DCL boolean FDECL(n_or_more, (struct obj *));
 STATIC_DCL boolean FDECL(all_but_uchain, (struct obj *));
@@ -80,18 +85,29 @@
 	}
 }
 
+#ifndef GOLDOBJ
 int
 collect_obj_classes(ilets, otmp, here, incl_gold, filter)
 char ilets[];
 register struct obj *otmp;
 boolean here, incl_gold;
 boolean FDECL((*filter),(OBJ_P));
+#else
+int
+collect_obj_classes(ilets, otmp, here, filter)
+char ilets[];
+register struct obj *otmp;
+boolean here;
+boolean FDECL((*filter),(OBJ_P));
+#endif
 {
 	register int iletct = 0;
 	register char c;
 
+#ifndef GOLDOBJ
 	if (incl_gold)
 	    ilets[iletct++] = def_oc_syms[GOLD_CLASS];
+#endif
 	ilets[iletct] = '\0'; /* terminate ilets so that index() will work */
 	while (otmp) {
 	    c = def_oc_syms[(int)otmp->oclass];
@@ -115,6 +131,7 @@
  *	"?/a" or "a?/" or "/a?",&c picks all '?' even though no '/'
  *	    (ie, treated as if it had just been "?a").
  */
+#ifndef GOLDOBJ
 STATIC_OVL boolean
 query_classes(oclasses, one_at_a_time, everything, action, objs,
 	      here, incl_gold, menu_on_demand)
@@ -124,6 +141,17 @@
 struct obj *objs;
 boolean here, incl_gold;
 int *menu_on_demand;
+#else
+STATIC_OVL boolean
+query_classes(oclasses, one_at_a_time, everything, action, objs,
+	      here, menu_on_demand)
+char oclasses[];
+boolean *one_at_a_time, *everything;
+const char *action;
+struct obj *objs;
+boolean here;
+int *menu_on_demand;
+#endif
 {
 	char ilets[20], inbuf[BUFSZ];
 	int iletct, oclassct;
@@ -134,7 +162,9 @@
 	oclasses[oclassct = 0] = '\0';
 	*one_at_a_time = *everything = m_seen = FALSE;
 	iletct = collect_obj_classes(ilets, objs, here,
+#ifndef GOLDOBJ
 				     incl_gold,
+#endif
 				     (boolean FDECL((*),(OBJ_P))) 0);
 	if (iletct == 0) {
 		return FALSE;
@@ -469,7 +499,9 @@
 		if (!query_classes(oclasses, &selective, &all_of_a_type,
 				   "pick up", objchain,
 				   traverse_how == BY_NEXTHERE,
+#ifndef GOLDOBJ
 				   FALSE,
+#endif
 				   &via_menu)) {
 		    if (!via_menu) return (0);
 		    n = query_objlist("Pick up what?",
@@ -884,6 +916,9 @@
 	    is_gold = obj->oclass == GOLD_CLASS;
     int wt, iw, ow, oow;
     long qq, savequan;
+#ifdef GOLDOBJ
+    long umoney = money_cnt(invent);
+#endif
     unsigned saveowt;
     const char *verb, *prefx1, *prefx2, *suffx;
     char obj_nambuf[BUFSZ], where[BUFSZ];
@@ -901,8 +936,14 @@
     if (adjust_wt)
 	wt -= (container->otyp == BAG_OF_HOLDING) ?
 		(int)DELTA_CWT(container, obj) : (int)obj->owt;
+#ifndef GOLDOBJ
     if (is_gold)	/* merged gold might affect cumulative weight */
 	wt -= (GOLD_WT(u.ugold) + GOLD_WT(count) - GOLD_WT(u.ugold + count));
+#else
+    /* This will go with silver+copper & new gold weight */
+    if (is_gold)	/* merged gold might affect cumulative weight */
+	wt -= (GOLD_WT(umoney) + GOLD_WT(count) - GOLD_WT(umoney + count));
+#endif
     if (count != savequan) {
 	obj->quan = savequan;
 	obj->owt = saveowt;
@@ -915,17 +956,30 @@
 
     /* see how many we can lift */
     if (is_gold) {
+#ifndef GOLDOBJ
 	iw -= (int)GOLD_WT(u.ugold);
 	if (!adjust_wt) {
 	    qq = GOLD_CAPACITY((long)iw, u.ugold);
 	} else {
 	    oow = 0;
 	    qq = 50L - (u.ugold % 100L) - 1L;
+#else
+	iw -= (int)GOLD_WT(umoney);
+	if (!adjust_wt) {
+	    qq = GOLD_CAPACITY((long)iw, umoney);
+	} else {
+	    oow = 0;
+	    qq = 50L - (umoney % 100L) - 1L;
+#endif
 	    if (qq < 0L) qq += 100L;
 	    for ( ; qq <= count; qq += 100L) {
 		obj->quan = qq;
 		obj->owt = (unsigned)GOLD_WT(qq);
+#ifndef GOLDOBJ
 		ow = (int)GOLD_WT(u.ugold + qq);
+#else
+		ow = (int)GOLD_WT(umoney + qq);
+#endif
 		ow -= (container->otyp == BAG_OF_HOLDING) ?
 			(int)DELTA_CWT(container, obj) : (int)obj->owt;
 		if (iw + ow >= 0) break;
@@ -936,7 +990,11 @@
 	}
 	if (qq < 0L) qq = 0L;
 	else if (qq > count) qq = count;
+#ifndef GOLDOBJ
 	wt = iw + (int)GOLD_WT(u.ugold + qq);
+#else
+	wt = iw + (int)GOLD_WT(umoney + qq);
+#endif
     } else if (count > 1 || count < obj->quan) {
 	/*
 	 * Ugh. Calc num to lift by changing the quan of of the
@@ -988,7 +1046,11 @@
     }
 
     if (!container) Strcpy(where, "here");  /* slightly shorter form */
+#ifndef GOLDOBJ
     if (invent || u.ugold) {
+#else
+    if (invent || umoney) {
+#endif
 	prefx1 = "you cannot ";
 	prefx2 = "";
 	suffx  = " any more";
@@ -1027,8 +1089,12 @@
     *cnt_p = carry_count(obj, container, *cnt_p, telekinesis, &old_wt, &new_wt);
     if (*cnt_p < 1L) {
 	result = -1;	/* nothing lifted */
+#ifndef GOLDOBJ
     } else if (obj->oclass != GOLD_CLASS && inv_cnt() >= 52 &&
 		!merge_choice(invent, obj)) {
+#else
+    } else if (inv_cnt() >= 52 && !merge_choice(invent, obj)) {
+#endif
 	Your("knapsack cannot accommodate any more items.");
 	result = -1;	/* nothing lifted */
     } else {
@@ -1076,8 +1142,10 @@
 boolean telekinesis;	/* not picking it up directly by hand */
 {
 	int res, nearload;
+#ifndef GOLDOBJ
 	const char *where = (obj->ox == u.ux && obj->oy == u.uy) ?
 			    "here" : "there";
+#endif
 
 	if (obj->quan < count) {
 	    impossible("pickup_object: count %ld > quan %ld?",
@@ -1097,6 +1165,7 @@
 	    return 0;
 	} else if (obj->oartifact && !touch_artifact(obj,&youmonst)) {
 	    return 0;
+#ifndef GOLDOBJ
 	} else if (obj->oclass == GOLD_CLASS) {
 	    /* Special consideration for gold pieces... */
 	    long iw = (long)max_capacity() - GOLD_WT(u.ugold);
@@ -1135,6 +1204,7 @@
 	    flags.botl = 1;
 	    if (flags.run) nomul(0);
 	    return 1;
+#endif
 	} else if (obj->otyp == CORPSE) {
 	    if ( (touch_petrifies(&mons[obj->corpsenm])) && !uarmg
 				&& !Stone_resistance && !telekinesis) {
@@ -1175,6 +1245,10 @@
 	if ((res = lift_object(obj, (struct obj *)0, &count, telekinesis)) <= 0)
 	    return res;
 
+#ifdef GOLDOBJ
+        /* Whats left of the special case for gold :-) */
+	if (obj->oclass == GOLD_CLASS) flags.botl = 1;
+#endif
 	if (obj->quan != count && obj->otyp != LOADSTONE)
 	    obj = splitobj(obj, count);
 
@@ -1386,9 +1460,22 @@
 	    }
 	}
     } else if (Confusion) {
+#ifndef GOLDOBJ
 	if (u.ugold){
 	    long contribution = rnd((int)min(LARGEST_INT,u.ugold));
 	    struct obj *goldob = mkgoldobj(contribution);
+#else
+	struct obj *goldob;
+	/* Find a money object to mess with */
+	for (goldob = invent; goldob; goldob = goldob->nobj) {
+	    if (goldob->oclass == GOLD_CLASS) break;
+	}
+	if (goldob){
+	    long contribution = rnd((int)min(LARGEST_INT, goldob->quan));
+	    if (contribution < goldob->quan)
+		goldob = splitobj(goldob, contribution);
+	    freeinv(goldob);
+#endif
 	    if (IS_THRONE(levl[u.ux][u.uy].typ)){
 		struct obj *coffers;
 		int pass;
@@ -1406,6 +1493,7 @@
 		    struct monst *mon = makemon(courtmon(),
 					    u.ux, u.uy, NO_MM_FLAGS);
 		    if (mon) {
+#ifndef GOLDOBJ
 			mon->mgold += goldob->quan;
 			delobj(goldob);
 			pline("The exchequer accepts your contribution.");
@@ -1415,6 +1503,16 @@
 		}
 	    } else {
 		dropx(goldob);
+#else
+			add_to_minv(mon, goldob);
+			pline("The exchequer accepts your contribution.");
+		    } else {
+			dropy(goldob);
+		    }
+		}
+	    } else {
+		dropy(goldob);
+#endif
 		pline("Ok, now there is loot here.");
 	    }
 	}
@@ -1786,7 +1884,9 @@
 	      otmp, count);
 
 	if (is_gold) {
+#ifndef GOLDOBJ
 		dealloc_obj(obj);
+#endif
 		bot();	/* update character's gold piece count immediately */
 	}
 	return 1;
@@ -1800,7 +1900,9 @@
 register int held;
 {
 	struct obj *curr, *otmp;
+#ifndef GOLDOBJ
 	struct obj *u_gold = (struct obj *)0;
+#endif
 	struct monst *shkp;
 	boolean one_by_one, allflag, loot_out = FALSE, loot_in = FALSE;
 	char select[MAXOCLASSES+1];
@@ -1927,7 +2029,9 @@
 		    if (query_classes(select, &one_by_one, &allflag,
 				      "take out", current_container->cobj,
 				      FALSE,
+#ifndef GOLDOBJ
 				      FALSE,
+#endif
 				      &menu_on_request)) {
 			if (askchain((struct obj **)&current_container->cobj,
 				     (one_by_one ? (char *)0 : select),
@@ -1949,7 +2053,11 @@
 	    }
 	}
 
+#ifndef GOLDOBJ
 	if (!invent && u.ugold == 0) {
+#else
+	if (!invent) {
+#endif
 	    /* nothing to put in, but some feedback is necessary */
 	    You("don't have anything to put in.");
 	    return used;
@@ -1963,6 +2071,7 @@
 	 * putting things in an ice chest.
 	 */
 	if (loot_in) {
+#ifndef GOLDOBJ
 	    if (u.ugold) {
 		/*
 		 * Hack: gold is not in the inventory, so make a gold object
@@ -1974,6 +2083,7 @@
 		u_gold->nobj = invent;
 		invent = u_gold;
 	    }
+#endif
 	    add_valid_menu_class(0);	  /* reset */
 	    if (flags.menu_style != MENU_TRADITIONAL) {
 		used |= menu_loot(0, current_container, TRUE) > 0;
@@ -1982,7 +2092,9 @@
 		menu_on_request = 0;
 		if (query_classes(select, &one_by_one, &allflag, "put in",
 				   invent, FALSE,
+#ifndef GOLDOBJ
 				   (u.ugold != 0L),
+#endif
 				   &menu_on_request)) {
 		    (void) askchain((struct obj **)&invent,
 				    (one_by_one ? (char *)0 : select), allflag,
@@ -1995,12 +2107,14 @@
 	    }
 	}
 
+#ifndef GOLDOBJ
 	if (u_gold && invent && invent->oclass == GOLD_CLASS) {
 	    /* didn't stash [all of] it */
 	    u_gold = invent;
 	    invent = u_gold->nobj;
 	    dealloc_obj(u_gold);
 	}
+#endif
 	return used;
 }
 
diff -Naurd ../nh340-gold/src/priest.c ./src/priest.c
--- ../nh340-gold/src/priest.c	Fri Mar 22 14:41:06 2002
+++ ./src/priest.c	Fri Mar 22 14:40:53 2002
@@ -437,6 +437,7 @@
 	    priest->mpeaceful = 0;
 	    return;
 	}
+#ifndef GOLDOBJ
 	if(!u.ugold) {
 	    if(coaligned && !strayed) {
 		if (priest->mgold > 0L) {
@@ -449,6 +450,16 @@
 			u.ugold = 1L;
 		    priest->mgold -= u.ugold;
 		    flags.botl = 1;
+#else
+	if(!money_cnt(invent)) {
+	    if(coaligned && !strayed) {
+                long pmoney = money_cnt(priest->minvent);
+		if (pmoney > 0L) {
+		    /* Note: two bits is actually 25 cents.  Hmm. */
+		    pline("%s gives you %s for an ale.", Monnam(priest),
+			(pmoney == 1L) ? "one bit" : "two bits");
+		     money2u(priest, pmoney > 1L ? 2 : 1);
+#endif
 		} else
 		    pline("%s preaches the virtues of poverty.", Monnam(priest));
 		exercise(A_WIS, TRUE);
@@ -464,7 +475,11 @@
 		verbalize("Thou shalt regret thine action!");
 		if(coaligned) adjalign(-1);
 	    } else if(offer < (u.ulevel * 200)) {
+#ifndef GOLDOBJ
 		if(u.ugold > (offer * 2L)) verbalize("Cheapskate.");
+#else
+		if(money_cnt(invent) > (offer * 2L)) verbalize("Cheapskate.");
+#endif
 		else {
 		    verbalize("I thank thee for thy contribution.");
 		    /*  give player some token  */
@@ -472,7 +487,11 @@
 		}
 	    } else if(offer < (u.ulevel * 400)) {
 		verbalize("Thou art indeed a pious individual.");
+#ifndef GOLDOBJ
 		if(u.ugold < (offer * 2L)) {
+#else
+		if(money_cnt(invent) < (offer * 2L)) {
+#endif
 		    if (coaligned && u.ualign.record <= ALGN_SINNED)
 			adjalign(1);
 		    verbalize("I bestow upon thee a blessing.");
@@ -488,7 +507,11 @@
 		} else u.ublessed++;
 	    } else {
 		verbalize("Thy selfless generosity is deeply appreciated.");
+#ifndef GOLDOBJ
 		if(u.ugold < (offer * 2L) && coaligned) {
+#else
+		if(money_cnt(invent) < (offer * 2L) && coaligned) {
+#endif
 		    if(strayed && (moves - u.ucleansed) > 5000L) {
 			u.ualign.record = 0; /* cleanse thee */
 			u.ucleansed = moves;
diff -Naurd ../nh340-gold/src/rip.c ./src/rip.c
--- ../nh340-gold/src/rip.c	Fri Mar 22 14:41:06 2002
+++ ./src/rip.c	Fri Mar 22 14:40:53 2002
@@ -108,7 +108,11 @@
 	center(NAME_LINE, buf);
 
 	/* Put $ on stone */
+#ifndef GOLDOBJ
 	Sprintf(buf, "%ld Au", u.ugold);
+#else
+	Sprintf(buf, "%ld Au", done_money);
+#endif
 	buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */
 	center(GOLD_LINE, buf);
 
diff -Naurd ../nh340-gold/src/rumors.c ./src/rumors.c
--- ../nh340-gold/src/rumors.c	Fri Mar 22 14:41:06 2002
+++ ./src/rumors.c	Fri Mar 22 14:40:53 2002
@@ -287,6 +287,9 @@
 doconsult(oracl)
 register struct monst *oracl;
 {
+#ifdef GOLDOBJ
+        long umoney = money_cnt(invent);
+#endif
 	int u_pay, minor_cost = 50, major_cost = 500 + 50 * u.ulevel;
 	int add_xpts;
 	char qbuf[QBUFSZ];
@@ -299,7 +302,11 @@
 	} else if (!oracl->mpeaceful) {
 		pline("%s is in no mood for consultations.", Monnam(oracl));
 		return 0;
+#ifndef GOLDOBJ
 	} else if (!u.ugold) {
+#else
+	} else if (!umoney) {
+#endif
 		You("have no money.");
 		return 0;
 	}
@@ -312,25 +319,42 @@
 	    case 'q':
 		return 0;
 	    case 'y':
+#ifndef GOLDOBJ
 		if (u.ugold < (long)minor_cost) {
+#else
+		if (umoney < (long)minor_cost) {
+#endif
 		    You("don't even have enough money for that!");
 		    return 0;
 		}
 		u_pay = minor_cost;
 		break;
 	    case 'n':
+#ifndef GOLDOBJ
 		if (u.ugold <= (long)minor_cost ||	/* don't even ask */
+#else
+		if (umoney <= (long)minor_cost ||	/* don't even ask */
+#endif
 		    (oracle_cnt == 1 || oracle_flg < 0)) return 0;
 		Sprintf(qbuf,
 			"\"Then dost thou desire a major one?\" (%d %s)",
 			major_cost, currency((long)major_cost));
 		if (yn(qbuf) != 'y') return 0;
+#ifndef GOLDOBJ
 		u_pay = (u.ugold < (long)major_cost ? (int)u.ugold
 						    : major_cost);
+#else
+		u_pay = (umoney < (long)major_cost ? (int)umoney
+						    : major_cost);
+#endif
 		break;
 	}
+#ifndef GOLDOBJ
 	u.ugold -= (long)u_pay;
 	oracl->mgold += (long)u_pay;
+#else
+        money2mon(oracl, (long)u_pay);
+#endif
 	flags.botl = 1;
 	add_xpts = 0;	/* first oracle of each type gives experience points */
 	if (u_pay == minor_cost) {
diff -Naurd ../nh340-gold/src/shk.c ./src/shk.c
--- ../nh340-gold/src/shk.c	Fri Mar 22 14:41:06 2002
+++ ./src/shk.c	Fri Mar 22 14:40:53 2002
@@ -74,6 +74,79 @@
  */
 
 
+#ifdef GOLDOBJ
+/*
+    Transfer money from inventory to monster when paying
+    shopkeepers, priests, oracle, succubus, & other demons.
+    Simple with only gold coins.
+    This routine will handle money changing when multiple
+    coin types is implemented, only appropriate
+    monsters will pay change.  (Peaceful shopkeepers, priests
+    & the oracle try to maintain goodwill while selling
+    their wares or services.  Angry monsters and all demons
+    will keep anything they get their hands on.
+    Returns the amount actually paid, so we can know
+    if the monster kept the change.
+ */
+long money2mon(mon, amount)
+struct monst *mon;
+long amount;
+{
+    struct obj *ygold = findgold(invent);
+
+    if (amount <= 0) {
+	impossible("%s payment in money2mon!", amount ? "negative" : "zero");
+	return 0L;
+    }
+    if (!ygold || ygold->quan < amount) {
+	impossible("Paying without %s money?", ygold ? "enough" : "");
+	return 0L;
+    }
+
+    if (ygold->quan > amount) ygold = splitobj(ygold, amount);
+    else if (ygold->owornmask) remove_worn_item(ygold);		/* quiver */
+    freeinv(ygold);
+    add_to_minv(mon, ygold);
+    flags.botl = 1;
+    return amount;
+}
+
+
+/*
+    Transfer money from monster to inventory.
+    Used when the shopkeeper pay for items, and when
+    the priest gives you money for an ale.
+ */
+void
+money2u(mon, amount)
+struct monst *mon;
+long amount;
+{
+    struct obj *mongold = findgold(mon->minvent);
+
+    if (amount <= 0) {
+	impossible("%s payment in money2u!", amount ? "negative" : "zero");
+	return;
+    }
+    if (!mongold || mongold->quan < amount) {
+	impossible("%s paying without %s money?", a_monnam(mon),
+		   mongold ? "enough" : "");
+	return;
+    }
+
+    if (mongold->quan > amount) mongold = splitobj(mongold, amount);
+    obj_extract_self(mongold);
+
+    if (!merge_choice(invent, mongold) && inv_cnt() >= 52) {
+	You("have no room for the money!");
+	dropy(mongold);
+    } else {
+	addinv(mongold);
+	flags.botl = 1;
+    }
+}
+
+#endif /* GOLDOBJ */
 
 STATIC_OVL struct monst *
 next_shkp(shkp, withbill)
@@ -781,8 +854,13 @@
 	long robbed = ESHK(shkp)->robbed;
 	long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp));
 
+#ifndef GOLDOBJ
 	u.ugold -= balance;
 	shkp->mgold += balance;
+#else
+	if (balance > 0) money2mon(shkp, balance);
+	else if (balance < 0) money2u(shkp, -balance);
+#endif
 	flags.botl = 1;
 	if(robbed) {
 		robbed -= tmp;
@@ -985,6 +1063,9 @@
 	register struct monst *shkp;
 	struct monst *nxtm, *resident;
 	long ltmp;
+#ifdef GOLDOBJ
+	long umoney;
+#endif
 	int pass, tmp, sk = 0, seensk = 0;
 	boolean paid = FALSE, stashed_gold = (hidden_gold() > 0L);
 
@@ -1089,25 +1170,44 @@
 	ltmp = eshkp->robbed;
 
 	if(shkp != resident && NOTANGRY(shkp)) {
+#ifdef GOLDOBJ
+                umoney = money_cnt(invent);
+#endif
 		if(!ltmp)
 		    You("do not owe %s anything.", mon_nam(shkp));
+#ifndef GOLDOBJ
 		else if(!u.ugold) {
+#else
+		else if(!umoney) {
+#endif
 		    You("%shave no money.", stashed_gold ? "seem to " : "");
 		    if(stashed_gold)
 			pline("But you have some gold stashed away.");
 		} else {
+#ifndef GOLDOBJ
 		    long ugold = u.ugold;
 		    if(ugold > ltmp) {
+#else
+		    if(umoney > ltmp) {
+#endif
 			You("give %s the %ld gold piece%s %s asked for.",
 			    mon_nam(shkp), ltmp, plur(ltmp), mhe(shkp));
 			pay(ltmp, shkp);
 		    } else {
 			You("give %s all your%s gold.", mon_nam(shkp),
 					stashed_gold ? " openly kept" : "");
+#ifndef GOLDOBJ
 			pay(u.ugold, shkp);
+#else
+			pay(umoney, shkp);
+#endif
 			if (stashed_gold) pline("But you have hidden gold!");
 		    }
+#ifndef GOLDOBJ
 		    if((ugold < ltmp/2L) || (ugold < ltmp && stashed_gold))
+#else
+		    if((umoney < ltmp/2L) || (umoney < ltmp && stashed_gold))
+#endif
 			pline("Unfortunately, %s doesn't look satisfied.",
 			      mhe(shkp));
 		    else
@@ -1118,15 +1218,28 @@
 
 	/* ltmp is still eshkp->robbed here */
 	if (!eshkp->billct && !eshkp->debit) {
+#ifdef GOLDOBJ
+                umoney = money_cnt(invent);
+#endif
 		if(!ltmp && NOTANGRY(shkp)) {
 		    You("do not owe %s anything.", mon_nam(shkp));
+#ifndef GOLDOBJ
 		    if (!u.ugold)
+#else
+		    if (!umoney)
+#endif
 			pline(no_money, stashed_gold ? " seem to" : "");
 		} else if(ltmp) {
 		    pline("%s is after blood, not money!", Monnam(shkp));
+#ifndef GOLDOBJ
 		    if(u.ugold < ltmp/2L ||
 				(u.ugold < ltmp && stashed_gold)) {
 			if (!u.ugold)
+#else
+		    if(umoney < ltmp/2L ||
+				(umoney < ltmp && stashed_gold)) {
+			if (!umoney)
+#endif
 			    pline(no_money, stashed_gold ? " seem to" : "");
 			else pline(not_enough_money, mhim(shkp));
 			return(1);
@@ -1134,18 +1247,31 @@
 		    pline("But since %s shop has been robbed recently,",
 			  mhis(shkp));
 		    pline("you %scompensate %s for %s losses.",
+#ifndef GOLDOBJ
 			  (u.ugold < ltmp) ? 
+#else
+			  (umoney < ltmp) ? 
+#endif
 			  "partially " : "",
 			  mon_nam(shkp), mhis(shkp));
+#ifndef GOLDOBJ
 		    pay(u.ugold < ltmp ? u.ugold : ltmp, shkp);
+#else
+		    pay(umoney < ltmp ? umoney : ltmp, shkp);
+#endif
 		    make_happy_shk(shkp, FALSE);
 		} else {
 		    /* shopkeeper is angry, but has not been robbed --
 		     * door broken, attacked, etc. */
 		    pline("%s is after your hide, not your money!",
 			  Monnam(shkp));
+#ifndef GOLDOBJ
 		    if(u.ugold < 1000L) {
 			if (!u.ugold)
+#else
+		    if(umoney < 1000L) {
+			if (!umoney)
+#endif
 			    pline(no_money, stashed_gold ? " seem to" : "");
 			else pline(not_enough_money, mhim(shkp));
 			return(1);
@@ -1171,6 +1297,9 @@
 		long dtmp = eshkp->debit;
 		long loan = eshkp->loan;
 		char sbuf[BUFSZ];
+#ifdef GOLDOBJ
+                umoney = money_cnt(invent);
+#endif
 		Sprintf(sbuf, "You owe %s %ld %s ",
 					   shkname(shkp), dtmp, currency(dtmp));
 		if(loan) {
@@ -1180,7 +1309,11 @@
 			   "for gold picked up and the use of merchandise.");
 		} else Strcat(sbuf, "for the use of merchandise.");
 		pline(sbuf);
+#ifndef GOLDOBJ
 		if (u.ugold + eshkp->credit < dtmp) {
+#else
+		if (umoney + eshkp->credit < dtmp) {
+#endif
 		    pline("But you don't%s have enough gold%s.",
 			stashed_gold ? " seem to" : "",
 			eshkp->credit ? " or credit" : "");
@@ -1192,8 +1325,12 @@
 			eshkp->loan = 0L;
 			Your("debt is covered by your credit.");
 		    } else if (!eshkp->credit) {
+#ifndef GOLDOBJ
 			u.ugold -= dtmp;
  			shkp->mgold += dtmp;
+#else
+                        money2mon(shkp, dtmp);
+#endif
 			eshkp->debit = 0L;
 			eshkp->loan = 0L;
 			You("pay that debt.");
@@ -1201,8 +1338,12 @@
 		    } else {
 			dtmp -= eshkp->credit;
 			eshkp->credit = 0L;
+#ifndef GOLDOBJ
 			u.ugold -= dtmp;
 			shkp->mgold += dtmp;
+#else
+                        money2mon(shkp, dtmp);
+#endif
 			eshkp->debit = 0L;
 			eshkp->loan = 0L;
 			pline("That debt is partially offset by your credit.");
@@ -1215,13 +1356,22 @@
 	/* now check items on bill */
 	if (eshkp->billct) {
 	    register boolean itemize;
+#ifndef GOLDOBJ
 	    if (!u.ugold && !eshkp->credit) {
+#else
+            umoney = money_cnt(invent);
+	    if (!umoney && !eshkp->credit) {
+#endif
 		You("%shave no money or credit%s.",
 				    stashed_gold ? "seem to " : "",
 				    paid ? " left" : "");
 		return(0);
 	    }
+#ifndef GOLDOBJ
 	    if ((u.ugold + eshkp->credit) < cheapest_item(shkp)) {
+#else
+	    if ((umoney + eshkp->credit) < cheapest_item(shkp)) {
+#endif
 		You("don't have enough money to buy%s the item%s you picked.",
 		    eshkp->billct > 1 ? " any of" : "", plur(eshkp->billct));
 		if(stashed_gold)
@@ -1307,6 +1457,9 @@
 {
 	register struct obj *obj = *obj_p;
 	long ltmp, quan, save_quan;
+#ifdef GOLDOBJ
+	long umoney = money_cnt(invent);
+#endif
 	int buy;
 	boolean stashed_gold = (hidden_gold() > 0L),
 		consumed = (which == 0);
@@ -1315,7 +1468,11 @@
 		impossible("Paid object on bill??");
 		return PAY_BUY;
 	}
+#ifndef GOLDOBJ
 	if(itemize && u.ugold + ESHK(shkp)->credit == 0L){
+#else
+	if(itemize && umoney + ESHK(shkp)->credit == 0L){
+#endif
 		You("%shave no money or credit left.",
 			     stashed_gold ? "seem to " : "");
 		return PAY_BROKE;
@@ -1351,7 +1508,11 @@
 		buy = PAY_SKIP;		/* shk won't sell */
 	    }
 	}
+#ifndef GOLDOBJ
 	if (buy == PAY_BUY && u.ugold + ESHK(shkp)->credit < ltmp) {
+#else
+	if (buy == PAY_BUY && umoney + ESHK(shkp)->credit < ltmp) {
+#endif
 	    You("don't%s have gold%s enough to pay for %s.",
 		stashed_gold ? " seem to" : "",
 		(ESHK(shkp)->credit > 0L) ? " or credit" : "",
@@ -1434,6 +1595,9 @@
 boolean croaked;
 {
 	long loss = 0L;
+#ifdef GOLDOBJ
+	long umoney;
+#endif
 	struct eshk *eshkp = ESHK(shkp);
 	boolean take = FALSE, taken = FALSE;
 	int roomno = *u.ushops;
@@ -1473,7 +1637,12 @@
 	}
 
 	if (eshkp->following || ANGRY(shkp) || take) {
+#ifndef GOLDOBJ
 		if (!invent && !u.ugold) goto skip;
+#else
+		if (!invent) goto skip;
+                umoney = money_cnt(invent);
+#endif
 		takes[0] = '\0';
 		if (shkp->msleeping || !shkp->mcanmove)
 			Strcat(takes, "wakes up and ");
@@ -1481,11 +1650,18 @@
 			Strcat(takes, "comes and ");
 		Strcat(takes, "takes");
 
+#ifndef GOLDOBJ
 		if (loss > u.ugold || !loss || roomno == eshkp->shoproom) {
 			eshkp->robbed -= u.ugold;
 			if (eshkp->robbed < 0L) eshkp->robbed = 0L;
 			shkp->mgold += u.ugold;
 			u.ugold = 0L;
+#else
+		if (loss > umoney || !loss || roomno == eshkp->shoproom) {
+			eshkp->robbed -= umoney;
+			if (eshkp->robbed < 0L) eshkp->robbed = 0L;
+                        money2mon(shkp, umoney);
+#endif
 			flags.botl = 1;
 			pline("%s %s all your possessions.",
 			      shkname(shkp), takes);
@@ -1493,8 +1669,12 @@
 			/* where to put player's invent (after disclosure) */
 			set_repo_loc(eshkp);
 		} else {
+#ifndef GOLDOBJ
 			shkp->mgold += loss;
 			u.ugold -= loss;
+#else
+                        money2mon(shkp, loss);
+#endif
 			flags.botl = 1;
 			pline("%s %s the %ld %s %sowed %s.",
 			      Monnam(shkp), takes,
@@ -2444,7 +2624,11 @@
 		return;
 	}
         
+#ifndef GOLDOBJ
 	if(!shkp->mgold) {
+#else
+	if(!money_cnt(shkp->minvent)) {
+#endif
 		char c, qbuf[BUFSZ];
 		long tmpcr = ((offer * 9L) / 10L) + (offer <= 1L);
 
@@ -2483,8 +2667,14 @@
 		}
 	} else {
 		char qbuf[BUFSZ];
+#ifndef GOLDOBJ
 		boolean short_funds = (offer > shkp->mgold);
 		if (short_funds) offer = shkp->mgold;
+#else
+                long shkmoney = money_cnt(shkp->minvent);
+		boolean short_funds = (offer > shkmoney);
+		if (short_funds) offer = shkmoney;
+#endif
 		if (!sell_response) {
 		    only_partially_your_contents =
 			(contained_cost(obj, shkp, 0L, FALSE, FALSE) !=
@@ -3304,7 +3494,11 @@
 	}
 
 	if((um_dist(x, y, 1) && !uinshp) ||
+#ifndef GOLDOBJ
 			(u.ugold + ESHK(shkp)->credit) < cost_of_damage
+#else
+			(money_cnt(invent) + ESHK(shkp)->credit) < cost_of_damage
+#endif
 				|| !rn2(50)) {
 		if(um_dist(x, y, 1) && !uinshp) {
 		    pline("%s shouts:", shkname(shkp));
@@ -3324,8 +3518,12 @@
 		 cost_of_damage, currency(cost_of_damage));
 	if(yn(qbuf) != 'n') {
 		cost_of_damage = check_credit(cost_of_damage, shkp);
+#ifndef GOLDOBJ
 		u.ugold -= cost_of_damage;
 		shkp->mgold += cost_of_damage;
+#else
+                money2mon(shkp, cost_of_damage);
+#endif
 		flags.botl = 1;
 		pline("Mollified, %s accepts your restitution.",
 			shkname(shkp));
@@ -3479,6 +3677,9 @@
 struct monst *shkp;
 {
 	struct eshk *eshk;
+#ifdef GOLDOBJ
+	long shkmoney;
+#endif
 	if (!shkp->isshk) {
 		/* The monster type is shopkeeper, but this monster is
 		   not actually a shk, which could happen if someone
@@ -3519,9 +3720,17 @@
 		      shkname(shkp), eshk->credit, currency(eshk->credit));
 	else if (eshk->robbed)
 		pline("%s complains about a recent robbery.", shkname(shkp));
+#ifndef GOLDOBJ
 	else if (shkp->mgold < 50)
+#else
+	else if ((shkmoney = money_cnt(shkp->minvent)) < 50)
+#endif
 		pline("%s complains that business is bad.", shkname(shkp));
+#ifndef GOLDOBJ
 	else if (shkp->mgold > 4000)
+#else
+	else if (shkmoney > 4000)
+#endif
 		pline("%s says that business is good.", shkname(shkp));
 	else if (strcmp(shkname(shkp), "Izchak") == 0)
 		pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))],shkname(shkp));
diff -Naurd ../nh340-gold/src/shknam.c ./src/shknam.c
--- ../nh340-gold/src/shknam.c	Fri Mar 22 14:41:06 2002
+++ ./src/shknam.c	Fri Mar 22 14:40:53 2002
@@ -406,7 +406,11 @@
 	ESHK(shk)->visitct = 0;
 	ESHK(shk)->following = 0;
 	ESHK(shk)->billct = 0;
+#ifndef GOLDOBJ
 	shk->mgold = 1000L + 30L*(long)rnd(100);	/* initial capital */
+#else
+        mkmonmoney(shk, 1000L + 30L*(long)rnd(100));	/* initial capital */
+#endif
 	if (shp->shknms == shkrings)
 	    (void) mongets(shk, TOUCHSTONE);
 	nameshk(shk, shp->shknms);
diff -Naurd ../nh340-gold/src/sit.c ./src/sit.c
--- ../nh340-gold/src/sit.c	Fri Mar 22 14:41:07 2002
+++ ./src/sit.c	Fri Mar 22 14:40:53 2002
@@ -8,6 +8,7 @@
 void
 take_gold()
 {
+#ifndef GOLDOBJ
 	if (u.ugold <= 0)  {
 		You_feel("a strange sensation.");
 	} else {
@@ -15,6 +16,22 @@
 		u.ugold = 0;
 		flags.botl = 1;
 	}
+#else
+        struct obj *otmp;
+	int lost_money = 0;
+	for (otmp = invent; otmp; otmp = otmp->nobj) {
+		if (otmp->oclass == GOLD_CLASS) {
+			lost_money = 1;
+			delobj(otmp);
+		}
+	}
+	if (!lost_money)  {
+		You_feel("a strange sensation.");
+	} else {
+		You("notice you have no money!");
+		flags.botl = 1;
+	}
+#endif
 }
 
 int
diff -Naurd ../nh340-gold/src/sounds.c ./src/sounds.c
--- ../nh340-gold/src/sounds.c	Fri Mar 22 14:41:07 2002
+++ ./src/sounds.c	Fri Mar 22 14:40:53 2002
@@ -776,7 +776,11 @@
 	    else verbl_msg = "Relax, this won't hurt a bit.";
 	    break;
 	case MS_GUARD:
+#ifndef GOLDOBJ
 	    if (u.ugold)
+#else
+	    if (money_cnt(invent))
+#endif
 		verbl_msg = "Please drop that gold and follow me.";
 	    else
 		verbl_msg = "Please follow me.";
diff -Naurd ../nh340-gold/src/steal.c ./src/steal.c
--- ../nh340-gold/src/steal.c	Fri Mar 22 14:41:07 2002
+++ ./src/steal.c	Fri Mar 22 14:40:53 2002
@@ -24,6 +24,7 @@
 		(otmp == uarmh) ? "helmet" : "armor");
 }
 
+#ifndef GOLDOBJ
 long		/* actually returns something that fits in an int */
 somegold()
 {
@@ -62,6 +63,77 @@
 	}
 }
 
+#else /* !GOLDOBJ */
+
+long		/* actually returns something that fits in an int */
+somegold(umoney)
+long umoney;
+{
+#ifdef LINT	/* long conv. ok */
+	return(0L);
+#else
+	return (long)( (umoney < 100) ? umoney :
+		(umoney > 10000) ? rnd(10000) : rnd((int) umoney) );
+#endif
+}
+
+/*
+Find the first (and hopefully only) gold object in a chain.
+Used when leprechaun (or you as leprechaun) looks for
+someone else's gold.  Returns a pointer so the gold may
+be seized without further searching.
+May search containers too.
+Deals in gold only, as leprechauns don't care for lesser coins.
+*/
+struct obj *
+findgold(chain)
+register struct obj *chain;
+{
+        while (chain && chain->otyp != GOLD_PIECE) chain = chain->nobj;
+        return chain;
+}
+
+/* 
+Steal gold coins only.  Leprechauns don't care for lesser coins.
+*/
+void
+stealgold(mtmp)
+register struct monst *mtmp;
+{
+	register struct obj *fgold = g_at(u.ux, u.uy);
+	register struct obj *ygold;
+	register long tmp;
+
+        /* skip lesser coins on the floor */        
+        while (fgold && fgold->otyp != GOLD_PIECE) fgold = fgold->nexthere; 
+
+        /* Do you have real gold? */
+        ygold = findgold(invent);
+
+	if (fgold && ( !ygold || fgold->quan > ygold->quan || !rn2(5))) {
+            obj_extract_self(fgold);
+	    add_to_minv(mtmp, fgold);
+	    newsym(u.ux, u.uy);
+	    pline("%s quickly snatches some gold from between your %s!",
+		    Monnam(mtmp), makeplural(body_part(FOOT)));
+	    if(!ygold || !rn2(5)) {
+		if (!tele_restrict(mtmp)) rloc(mtmp);
+		monflee(mtmp, 0, FALSE, FALSE);
+	    }
+	} else if(ygold) {
+            const int gold_price = objects[GOLD_PIECE].oc_cost;
+	    tmp = (somegold(money_cnt(invent)) + gold_price - 1) / gold_price;
+	    tmp = min(tmp, ygold->quan);
+            if (tmp < ygold->quan) ygold = splitobj(ygold, tmp);
+            freeinv(ygold);
+            add_to_minv(mtmp, ygold);
+	    Your("purse feels lighter.");
+	    if (!tele_restrict(mtmp)) rloc(mtmp);
+	    monflee(mtmp, 0, FALSE, FALSE);
+	    flags.botl = 1;
+	}
+}
+#endif /* GOLDOBJ */
 
 /* steal armor after you finish taking it off */
 unsigned int stealoid;		/* object to be stolen */
@@ -347,11 +419,13 @@
 {
     int freed_otmp;
 
+#ifndef GOLDOBJ
     if (otmp->oclass == GOLD_CLASS) {
 	mtmp->mgold += otmp->quan;
 	obfree(otmp, (struct obj *)0);
 	freed_otmp = 1;
     } else {
+#endif
     boolean snuff_otmp = FALSE;
     /* don't want hidden light source inside the monster; assumes that
        engulfers won't have external inventories; whirly monsters cause
@@ -371,7 +445,9 @@
     freed_otmp = add_to_minv(mtmp, otmp);
     /* and we had to defer this until object is in mtmp's inventory */
     if (snuff_otmp) snuff_light_source(mtmp->mx, mtmp->my);
+#ifndef GOLDOBJ
     }
+#endif
     return freed_otmp;
 }
 
@@ -481,6 +557,7 @@
 	    keepobj = otmp->nobj;
 	    (void) add_to_minv(mtmp, otmp);
 	}
+#ifndef GOLDOBJ
 	if (mtmp->mgold) {
 		register long g = mtmp->mgold;
 		(void) mkgold(g, omx, omy);
@@ -489,6 +566,7 @@
 				g, plur(g));
 		mtmp->mgold = 0L;
 	}
+#endif
 	
 	if (show & cansee(omx, omy))
 		newsym(omx, omy);
diff -Naurd ../nh340-gold/src/trap.c ./src/trap.c
--- ../nh340-gold/src/trap.c	Fri Mar 22 14:41:08 2002
+++ ./src/trap.c	Fri Mar 22 14:40:53 2002
@@ -2487,6 +2487,7 @@
 			/* else continue */
 		}
 		}
+#ifndef GOLDOBJ
 		if (!otmp) {
 			/* Nothing available left to drop; try gold */
 			if (u.ugold) {
@@ -2506,6 +2507,9 @@
 			/* We can't even drop gold! */
 			return (FALSE);
 		}
+#else
+		if (!otmp) return (FALSE); /* nothing to drop! */	
+#endif
 		if (otmp->owornmask && otmp != uball) remove_worn_item(otmp);
 		*lostsome = TRUE;
 		dropx(otmp);
diff -Naurd ../nh340-gold/src/u_init.c ./src/u_init.c
--- ../nh340-gold/src/u_init.c	Fri Mar 22 14:41:08 2002
+++ ./src/u_init.c	Fri Mar 22 14:40:53 2002
@@ -213,6 +213,12 @@
 	{ WAN_WISHING, 3, WAND_CLASS, 1, 0 },
 	{ 0, 0, 0, 0, 0 }
 };
+#ifdef GOLDOBJ
+static struct trobj Money[] = {
+	{ GOLD_PIECE, 0 , GOLD_CLASS, 1, 0 },
+	{ 0, 0, 0, 0, 0 }
+};
+#endif
 
 /* race-based substitutions for initial inventory;
    the weaker cloak for elven rangers is intentional--they shoot better */
@@ -623,7 +629,11 @@
 		skill_init(Skill_C);
 		break;
 	case PM_HEALER:
+#ifndef GOLDOBJ
 		u.ugold = u.ugold0 = rn1(1000, 1001);
+#else
+		u.umoney0 = rn1(1000, 1001);
+#endif
 		ini_inv(Healer);
 		if(!rn2(25)) ini_inv(Lamp);
 		knows_object(POT_FULL_HEALING);
@@ -672,7 +682,11 @@
 		break;
 	case PM_ROGUE:
 		Rogue[R_DAGGERS].trquan = rn1(10, 6);
+#ifndef GOLDOBJ
 		u.ugold = u.ugold0 = 0;
+#else
+		u.umoney0 = 0;
+#endif
 		ini_inv(Rogue);
 		if(!rn2(5)) ini_inv(Blindfold);
 		knows_object(SACK);
@@ -689,7 +703,11 @@
 #ifdef TOURIST
 	case PM_TOURIST:
 		Tourist[T_DARTS].trquan = rn1(20, 21);
+#ifndef GOLDOBJ
 		u.ugold = u.ugold0 = rnd(1000);
+#else
+		u.umoney0 = rnd(1000);
+#endif
 		ini_inv(Tourist);
 		if(!rn2(25)) ini_inv(Tinopener);
 		else if(!rn2(25)) ini_inv(Leash);
@@ -796,7 +814,12 @@
 		read_wizkit();
 #endif
 
+#ifndef GOLDOBJ
 	u.ugold0 += hidden_gold();	/* in case sack has gold in it */
+#else
+	if (u.umoney0) ini_inv(Money);
+	u.umoney0 += hidden_gold();	/* in case sack has gold in it */
+#endif
 
 	find_ac();			/* get initial ac value */
 	init_attr(75);			/* init attribute values */
@@ -956,6 +979,12 @@
 				nocreate4 = otyp;
 		}
 
+#ifdef GOLDOBJ
+		if (trop->trclass == GOLD_CLASS) {
+			/* no "blessed" or "identified" money */
+			obj->quan = u.umoney0;
+		} else {
+#endif
 			obj->dknown = obj->bknown = obj->rknown = 1;
 			if (objects[otyp].oc_uses_known) obj->known = 1;
 			obj->cursed = 0;
@@ -973,6 +1002,9 @@
 			    obj->spe = trop->trspe;
 			if (trop->trbless != UNDEF_BLESS)
 			    obj->blessed = trop->trbless;
+#ifdef GOLDOBJ
+		}
+#endif
 		/* defined after setting otyp+quan + blessedness */
 		obj->owt = weight(obj);
 		obj = addinv(obj);
diff -Naurd ../nh340-gold/src/uhitm.c ./src/uhitm.c
--- ../nh340-gold/src/uhitm.c	Fri Mar 22 14:41:08 2002
+++ ./src/uhitm.c	Fri Mar 22 14:40:53 2002
@@ -1238,11 +1238,29 @@
 		tmp = 0;
 		break;
 	    case AD_SGLD:
+#ifndef GOLDOBJ
 		if (mdef->mgold) {
 		    u.ugold += mdef->mgold;
 		    mdef->mgold = 0;
 		    Your("purse feels heavier.");
 		}
+#else
+                /* This you as a leprechaun, so steal
+                   real gold only, no lesser coins */
+	        {
+		    struct obj *mongold = findgold(mdef->minvent);
+	            if (mongold) {
+		        obj_extract_self(mongold);  
+		        if (merge_choice(invent, mongold) || inv_cnt() < 52) {
+			    addinv(mongold);
+			    Your("purse feels heavier.");
+			} else {
+                            You("grab %s's gold, but find no room in your knapsack.", mon_nam(mdef));
+			    dropy(mongold);
+		        }
+		    }
+	        }
+#endif
 		exercise(A_DEX, TRUE);
 		tmp = 0;
 		break;
diff -Naurd ../nh340-gold/src/vault.c ./src/vault.c
--- ../nh340-gold/src/vault.c	Fri Mar 22 14:41:08 2002
+++ ./src/vault.c	Fri Mar 22 14:40:53 2002
@@ -147,6 +147,9 @@
 	char buf[BUFSZ];
 	register int x, y, dd, gx, gy;
 	int lx = 0, ly = 0;
+#ifdef GOLDOBJ
+        long umoney;
+#endif
 	/* first find the goal for the guard */
 	for(dd = 2; (dd < ROWNO || dd < COLNO); dd++) {
 	  for(y = u.uy-dd; y <= u.uy+dd; ly = y, y++) {
@@ -283,6 +286,7 @@
 	    return;
 	}
 	verbalize("I don't know you.");
+#ifndef GOLDOBJ
 	if (!u.ugold && !hidden_gold())
 	    verbalize("Please follow me.");
 	else {
@@ -291,6 +295,17 @@
 	    verbalize("Most likely all your gold was stolen from this vault.");
 	    verbalize("Please drop that gold and follow me.");
 	}
+#else
+        umoney = money_cnt(invent);
+	if (!umoney && !hidden_gold())
+	    verbalize("Please follow me.");
+	else {
+	    if (!umoney)
+		verbalize("You have hidden money.");
+	    verbalize("Most likely all your money was stolen from this vault.");
+	    verbalize("Please drop that money and follow me.");
+	}
+#endif
 	EGD(guard)->gdx = gx;
 	EGD(guard)->gdy = gy;
 	EGD(guard)->fcbeg = 0;
@@ -443,7 +458,12 @@
 			 grd_in_vault = *in_rooms(grd->mx, grd->my, VAULT)?
 					TRUE : FALSE;
 	boolean disappear_msg_seen = FALSE, semi_dead = (grd->mhp <= 0);
+#ifndef GOLDOBJ
 	register boolean u_carry_gold = ((u.ugold + hidden_gold()) > 0L);
+#else
+        long umoney = money_cnt(invent);
+	register boolean u_carry_gold = ((umoney + hidden_gold()) > 0L);
+#endif
 	if(!on_level(&(egrd->gdlevel), &u.uz)) return(-1);
 	nx = ny = m = n = 0;
 	if(!u_in_vault && !grd_in_vault)
@@ -475,9 +495,15 @@
 		if(egrd->warncnt == 3)
 			verbalize("I repeat, %sfollow me!",
 				u_carry_gold ? (
+#ifndef GOLDOBJ
 					  !u.ugold ?
 					  "drop that hidden gold and " :
 					  "drop that gold and ") : "");
+#else
+					  !umoney ?
+					  "drop that hidden money and " :
+					  "drop that money and ") : "");
+#endif
 		if(egrd->warncnt == 7) {
 			m = grd->mx;
 			n = grd->my;
@@ -559,8 +585,13 @@
 		if (m == u.ux && n == u.uy) {
 		    struct obj *gold = g_at(m,n);
 		    /* Grab the gold from between the hero's feet.  */
+#ifndef GOLDOBJ
 		    grd->mgold += gold->quan;
 		    delobj(gold);
+#else
+		    obj_extract_self(gold);
+		    add_to_minv(grd, gold);
+#endif
 		    newsym(m,n);
 		} else if (m == x && n == y) {
 		    mpickgold(grd);	/* does a newsym */
@@ -718,16 +749,30 @@
 paygd()
 {
 	register struct monst *grd = findgd();
+#ifndef GOLDOBJ
 	struct obj *gold;
+#else
+        long umoney = money_cnt(invent);
+	struct obj *coins, *nextcoins;
+#endif
 	int gx,gy;
 	char buf[BUFSZ];
 
+#ifndef GOLDOBJ
 	if (!u.ugold || !grd) return;
+#else
+	if (!umoney || !grd) return;
+#endif
 
 	if (u.uinvault) {
 	    Your("%ld %s goes into the Magic Memory Vault.",
+#ifndef GOLDOBJ
 		u.ugold,
 		currency(u.ugold));
+#else
+		umoney,
+		currency(umoney));
+#endif
 	    gx = u.ux;
 	    gy = u.uy;
 	} else {
@@ -744,8 +789,19 @@
 		plname, mons[u.umonster].mname);
 	    make_grave(gx, gy, buf);
 	}
+#ifndef GOLDOBJ
 	place_object(gold = mkgoldobj(u.ugold), gx, gy);
 	stackobj(gold);
+#else
+        for (coins = invent; coins; coins = nextcoins) {
+            nextcoins = coins->nobj;
+	    if (objects[coins->otyp].oc_class == GOLD_CLASS) {
+	        freeinv(coins);
+                place_object(coins, gx, gy);
+		stackobj(coins);
+	    }
+        }
+#endif
 	mongone(grd);
 }
 
diff -Naurd ../nh340-gold/src/zap.c ./src/zap.c
--- ../nh340-gold/src/zap.c	Fri Mar 22 14:41:09 2002
+++ ./src/zap.c	Fri Mar 22 14:40:53 2002
@@ -358,7 +358,11 @@
 	mstatusline(mtmp);
 	if (notonhead) return;	/* don't show minvent for long worm tail */
 
+#ifndef GOLDOBJ
 	if (mtmp->minvent || mtmp->mgold) {
+#else
+	if (mtmp->minvent) {
+#endif
 	    for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
 		otmp->dknown = 1;	/* treat as "seen" */
 	    (void) display_minventory(mtmp, MINV_ALL, (char *)0);
@@ -3320,7 +3324,9 @@
 			    else
 				hit(fltxt, mon, "!");
 			}
+#ifndef GOLDOBJ
 			mon->mgold = 0L;
+#endif
 
 /* note: worn amulet of life saving must be preserved in order to operate */
 #define oresist_disintegration(obj) \
diff -Naurd ../nh340-gold/sys/amiga/amirip.c ./sys/amiga/amirip.c
--- ../nh340-gold/sys/amiga/amirip.c	Fri Mar 22 14:41:09 2002
+++ ./sys/amiga/amirip.c	Fri Mar 22 14:40:53 2002
@@ -196,7 +196,11 @@
 
     /* Put $ on stone */
     Sprintf(buf, "%ld Au",
+#ifndef GOLDOBJ
 		u.ugold);
+#else
+		done_money);
+#endif
     buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */
     tomb_text(buf);
 
diff -Naurd ../nh340-gold/util/makedefs.c ./util/makedefs.c
--- ../nh340-gold/util/makedefs.c	Fri Mar 22 14:41:12 2002
+++ ./util/makedefs.c	Fri Mar 22 14:40:54 2002
@@ -447,6 +447,9 @@
 #ifdef STEED
 			| (1L << 11)
 #endif
+#ifdef GOLDOBJ
+			| (1L << 12)
+#endif
 		/* flag bits and/or other global variables (15..26) */
 #ifdef TEXTCOLOR
 			| (1L << 17)
@@ -619,6 +622,9 @@
 #ifdef MFLOPPY
 		"floppy drive support",
 #endif
+#ifdef GOLDOBJ
+		"gold object in inventories",
+#endif
 #ifdef INSURANCE
 		"insurance files for recovering from crashes",
 #endif
diff -Naurd ../nh340-gold/win/X11/winstat.c ./win/X11/winstat.c
--- ../nh340-gold/win/X11/winstat.c	Fri Mar 22 14:41:14 2002
+++ ./win/X11/winstat.c	Fri Mar 22 14:40:55 2002
@@ -598,7 +598,11 @@
 
 	    case F_NAME:	val = (long) 0L; break;	/* special */
 	    case F_DLEVEL:	val = (long) 0L; break;	/* special */
+#ifndef GOLDOBJ
 	    case F_GOLD:	val = (long) u.ugold; break;
+#else
+	    case F_GOLD:	val = money_cnt(invent); break;
+#endif
 	    case F_HP:		val = (long) (u.mtimedone ?
 					      (u.mh  > 0 ? u.mh  : 0):
 					      (u.uhp > 0 ? u.uhp : 0)); break;
diff -Naurd ../nh340-gold/win/X11/wintext.c ./win/X11/wintext.c
--- ../nh340-gold/win/X11/wintext.c	Fri Mar 22 14:41:14 2002
+++ ./win/X11/wintext.c	Fri Mar 22 14:40:55 2002
@@ -468,7 +468,11 @@
 
 	/* Put $ on stone */
 	Sprintf(rip_line[GOLD_LINE], "%ld Au",
+#ifndef GOLDOBJ
 		u.ugold);
+#else
+		done_money);
+#endif
 	/* Put together death description */
 	switch (killer_format) {
 		default: impossible("bad killer format?");
diff -Naurd ../nh340-gold/win/gem/wingem.c ./win/gem/wingem.c
--- ../nh340-gold/win/gem/wingem.c	Fri Mar 22 14:41:12 2002
+++ ./win/gem/wingem.c	Fri Mar 22 14:40:54 2002
@@ -1076,7 +1076,11 @@
 	Sprintf(rip_line[NAME_LINE], "%s", plname);
 	/* Put $ on stone */
 	Sprintf(rip_line[GOLD_LINE], "%ld Au",
+#ifndef GOLDOBJ
 		u.ugold);
+#else
+		done_money);
+#endif
 	/* Put together death description */
 	switch (killer_format) {
 	default: impossible("bad killer format?");
diff -Naurd ../nh340-gold/win/gnome/gnbind.c ./win/gnome/gnbind.c
--- ../nh340-gold/win/gnome/gnbind.c	Fri Mar 22 14:41:13 2002
+++ ./win/gnome/gnbind.c	Fri Mar 22 14:40:54 2002
@@ -1149,7 +1149,11 @@
     
     /* Put $ on stone */
     Sprintf(buf, "%ld Au\n",
+#ifndef GOLDOBJ
 		u.ugold);
+#else
+		done_money);
+#endif
     Strcat(ripString, buf);
 
     /* Put together death description */
diff -Naurd ../nh340-gold/win/gnome/gnstatus.c ./win/gnome/gnstatus.c
--- ../nh340-gold/win/gnome/gnstatus.c	Fri Mar 22 14:41:13 2002
+++ ./win/gnome/gnstatus.c	Fri Mar 22 14:40:54 2002
@@ -432,6 +432,9 @@
     const char* hung;
     const char* enc;
     static int firstTime=TRUE;
+#ifdef GOLDOBJ
+    long umoney;
+#endif
 
     /* First, fill in the player name and the dungeon level */
     strcpy(buf, plname);
@@ -560,16 +563,30 @@
     gtk_label_set( GTK_LABEL( chaLabel), buf);
     
     /* Now do the non-pixmaped stats (gold and such) */
+#ifndef GOLDOBJ
     sprintf(buf,"Au:%ld", u.ugold);
     if (lastAu < u.ugold && firstTime==FALSE) {
+#else
+    umoney = money_cnt(invent);
+    sprintf(buf,"Au:%ld", umouney);
+    if (lastAu < umoney && firstTime==FALSE) {
+#endif
 	/* Ok, this changed so add it to the highlighing list */
 	ghack_highlight_widget( goldLabel, normalStyle, greenStyle);
     }
+#ifndef GOLDOBJ
     else if (lastAu > u.ugold && firstTime==FALSE) {
+#else
+    else if (lastAu > umoney && firstTime==FALSE) {
+#endif
 	/* Ok, this changed so add it to the highlighing list */
 	ghack_highlight_widget( goldLabel, normalStyle, redStyle);
     }
+#ifndef GOLDOBJ
     lastAu = u.ugold;
+#else
+    lastAu = umoney;
+#endif
     gtk_label_set( GTK_LABEL( goldLabel), buf);
     
     if (u.mtimedone) {
diff -Naurd ../nethack-3.3.1/include/config.h ./include/config.h
--- ../nethack-3.3.1/include/config.h Sat Jul 22 02:13:51 2000
+++ ./include/config.h Fri Mar 22 14:40:55 2002
@@ -322,6 +338,18 @@
 #define EXP_ON_BOTL	/* Show experience on bottom line */
 /* #define SCORE_ON_BOTL */	/* added by Gary Erickson (erickson@ucivax) */
 
+/*
+ * Section 5:  EXPERIMENTAL STUFF
+ *
+ * Conditional compilation of new or experimental options are controlled here.
+ * Enable any of these at your own risk -- there are almost certainly
+ * bugs left here.
+ */
+
+/*#define GOLDOBJ */	/* Gold is kept on obj chains - Helge Hafting */
+
+/* End of Section 5 */
+
 #include "global.h"	/* Define everything else according to choices above */
 
 #endif /* CONFIG_H */

