]> granicus.if.org Git - nethack/commitdiff
cursed genocide of "none"
authorcohrs <cohrs>
Sat, 9 Feb 2002 17:38:43 +0000 (17:38 +0000)
committercohrs <cohrs>
Sat, 9 Feb 2002 17:38:43 +0000 (17:38 +0000)
treat this as a creation of a random monster, which still meets the
goal of not violating genocide conduct

src/read.c

index 1abf5a236f8609adee2ed38cea48bb5a9241c2dd..b0f9bb637d3929b5194089c617b7f2d5f2d45a12 100644 (file)
@@ -1575,7 +1575,15 @@ int how;
                        buf);
                (void)mungspaces(buf);
                /* choosing "none" preserves genocideless conduct */
-               if (!strcmpi(buf, "none")) return;
+               if (!strcmpi(buf, "none")) {
+                   /* ... but no free pass if cursed */
+                   if (!(how & REALLY)) {
+                       ptr = rndmonst();
+                       if (!ptr) return; /* no message, like normal case */
+                       mndx = monsndx(ptr);
+                       break;          /* remaining checks don't apply */
+                   } else return;
+               }
 
                mndx = name_to_mon(buf);
                if (mndx == NON_PM || (mvitals[mndx].mvflags & G_GENOD)) {