]> granicus.if.org Git - nethack/commitdiff
B5008 <Someone> feeling "materially poor" while rich
authornethack.allison <nethack.allison>
Sun, 10 Feb 2002 16:21:17 +0000 (16:21 +0000)
committernethack.allison <nethack.allison>
Sun, 10 Feb 2002 16:21:17 +0000 (16:21 +0000)
Shouldn't gold detection pay attention to my inventory? "You feel
materially poor" sounds extremely odd if I've got 50,000 zorkmids
stuffed in my backpack.

src/detect.c

index 190096df993673a545ab34d2b2380d39001f7fa0..e9944adbbdb8fdd6b83ccb35914eec163ffcf11a 100644 (file)
@@ -203,8 +203,21 @@ register struct obj *sobj;
     }
 
     if (!known) {
-       /* no gold found */
-       if (sobj) strange_feeling(sobj, "You feel materially poor.");
+       /* no gold found on floor or monster's inventory.
+          adjust message if you have gold in your inventory */
+       if (sobj) {
+               if (youmonst.data == &mons[PM_GOLD_GOLEM])
+                       You_feel("like a million %s!", currency(2L));
+               else if (sobj && hidden_gold() ||
+#ifndef GOLDOBJ
+                               u.ugold)
+#else
+                               money_cnt(invent))
+#endif
+                       You("worry about your future financial situation.");
+               else
+                       strange_feeling(sobj, "You feel materially poor.");
+        }
        return(1);
     }
     /* only under me - no separate display required */