]> granicus.if.org Git - nethack/commitdiff
lenses
authorarromdee <arromdee>
Fri, 18 Jan 2002 01:23:58 +0000 (01:23 +0000)
committerarromdee <arromdee>
Fri, 18 Jan 2002 01:23:58 +0000 (01:23 +0000)
This adds <Someone>'s lens patch.

This is probably it for me adding in any more user-contributed patches for
3.3.2 (except maybe coin flipping; does anyone object to it?)

--Ken A.

doc/fixes33.2
src/detect.c
src/spell.c

index 373d7724c24878c09f24420e41689e0a7af5dcdf..77c8feaf42082a6407ce5ece357a83cf7e5f5dbf 100644 (file)
@@ -480,6 +480,7 @@ put prisoners in the Dark One's dungeon (Dylan O'Donnell)
 add leather cloak so soldiers don't have elven cloaks
 add Tom Friedetzky's BUC-patch (applies to full menustyle only)
 add wizard #poly and #levelchange (originally levelgain; Dylan O'Donnell),
+add Jason Short's additional lenses use patch
 
 
 Platform- and/or Interface-Specific New Features
index d73a69e9cb97c6237d0a5999104435ba243a430c..6015065aedce7037b5a2567a600de69097ef8dbf 100644 (file)
@@ -1115,7 +1115,10 @@ register int aflag;
        } else {
            int fund = (uwep && uwep->oartifact &&
                    spec_ability(uwep, SPFX_SEARCH)) ?
-                       ((uwep->spe > 5) ? 5 : uwep->spe) : 0;
+                   uwep->spe : 0;
+           if (ublindf && ublindf->otyp == LENSES)
+                   fund += 2; /* JDS: lenses help searching */
+           if (fund > 5) fund = 5;
            for(x = u.ux-1; x < u.ux+2; x++)
              for(y = u.uy-1; y < u.uy+2; y++) {
                if(!isok(x,y)) continue;
index 6cd09d167c239122afa9e994dc97df51d1ed7d55..eecd15b4830b4c849d6b9b2b04f3013986f208a4 100644 (file)
@@ -281,6 +281,8 @@ learn()
        char splname[BUFSZ];
        boolean costly = TRUE;
 
+       /* JDS: lenses give 50% faster reading; 33% smaller read time */
+       if (ublindf && ublindf->otyp == LENSES && rn2(2)) delay++;
        if (delay) {    /* not if (delay++), so at end delay == 0 */
                delay++;
                return(1); /* still busy */
@@ -386,7 +388,8 @@ register struct obj *spellbook;
                        } else {
                            /* uncursed - chance to fail */
                            int read_ability = ACURR(A_INT) + 4 + u.ulevel/2
-                                              - 2*objects[booktype].oc_level;
+                                              - 2*objects[booktype].oc_level
+                                              + (ublindf && ublindf->otyp == LENSES) ? 2 : 0;
                            /* only wizards know if a spell is too difficult */
                            if (Role_if(PM_WIZARD) && read_ability < 20) {
                                char qbuf[QBUFSZ];