]> granicus.if.org Git - nethack/commitdiff
"harassment mode"
authornethack.rankin <nethack.rankin>
Thu, 28 Mar 2002 03:03:04 +0000 (03:03 +0000)
committernethack.rankin <nethack.rankin>
Thu, 28 Mar 2002 03:03:04 +0000 (03:03 +0000)
     Make a change suggested by <Someone> to have the Wizard
enter harassment mode when you perform the invocation, in case
you manage to obtain the Book of the Dead without killing him.
Instead of just initiating that periodic effect, behave as if
you have actually killed him (which also affects random monster
generation frequency, prayer timeout, and shopkeeper salutations).

doc/fixes34.1
src/spell.c

index 44288b1450a75eb4929277b1ad9d7bde169a2ecc..cff5afdb3471cf2255dbb681d886d1606b9051b8 100644 (file)
@@ -26,6 +26,8 @@ Sunsword didn't stop glowing when hero killed a monster wielding it
 mimics caught in explosions with messages printed about them are discovered
 let lev_comp and dgn_comp accept optional carriage return character prior to
        the terminating newline in special level and dungeon description files
+Wizard of Yendor will start harassing you after the invocation if you've
+       managed to get that far without ever killing him
 
 
 Platform- and/or Interface-Specific Fixes
index ab72822e0531bf328f542f2a74e0d3f194438444..a723881fdad504a6c61604c7929287148d3732da 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)spell.c    3.4     2002/02/12      */
+/*     SCCS Id: @(#)spell.c    3.4     2002/03/27      */
 /*     Copyright (c) M. Stephenson 1988                          */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -212,8 +212,15 @@ struct obj *book2;
            pline_The("invocation fails!");
            pline("At least one of your artifacts is cursed...");
        } else if(arti1_primed && arti2_primed) {
+           unsigned soon = (unsigned) d(2,6);  /* time til next intervene() */
+
+           /* successful invocation */
            mkinvokearea();
            u.uevent.invoked = 1;
+           /* in case you haven't killed the Wizard yet, behave as if
+              you just did */
+           u.uevent.udemigod = 1;      /* wizdead() */
+           if (!u.udg_cnt || u.udg_cnt > soon) u.udg_cnt = soon;
        } else {        /* at least one artifact not prepared properly */
            You("have a feeling that %s is amiss...", something);
            goto raise_dead;