diff -Nbaur nethack-3.4.3/include/youprop.h nethack-tinfoil/include/youprop.h --- nethack-3.4.3/include/youprop.h 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/include/youprop.h 2004-12-14 16:19:19.000000000 +1100 @@ -141,9 +141,11 @@ #define HTelepat u.uprops[TELEPAT].intrinsic #define ETelepat u.uprops[TELEPAT].extrinsic -#define Blind_telepat (HTelepat || ETelepat || \ - telepathic(youmonst.data)) -#define Unblind_telepat (ETelepat) +#define BTelepat u.uprops[TELEPAT].blocked +#define Blind_telepat ((HTelepat || ETelepat || \ + telepathic(youmonst.data)) \ + && !BTelepat) +#define Unblind_telepat (ETelepat & !BTelepat) #define HWarning u.uprops[WARNING].intrinsic #define EWarning u.uprops[WARNING].extrinsic diff -Nbaur nethack-3.4.3/src/eat.c nethack-tinfoil/src/eat.c --- nethack-3.4.3/src/eat.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/src/eat.c 2004-12-14 16:20:35.000000000 +1100 @@ -763,7 +763,7 @@ #ifdef DEBUG debugpline("Trying to give telepathy"); #endif - if(!(HTelepat & FROMOUTSIDE)) { + if(!(HTelepat & FROMOUTSIDE) && !BTelepat) { You_feel(Hallucination ? "in touch with the cosmos." : "a strange mental acuity."); diff -Nbaur nethack-3.4.3/src/monmove.c nethack-tinfoil/src/monmove.c --- nethack-3.4.3/src/monmove.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/src/monmove.c 2004-12-14 17:33:15.000000000 +1100 @@ -407,7 +407,9 @@ if (canseemon(mtmp)) pline("%s concentrates.", Monnam(mtmp)); - if (distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM) { + /* MRKR: tinfoil hats block psychic energy */ + if (uarmh && uarmh->otyp == TINFOIL_HAT || + distu(mtmp->mx, mtmp->my) > BOLT_LIM * BOLT_LIM) { You("sense a faint wave of psychic energy."); goto toofar; } diff -Nbaur nethack-3.4.3/src/objects.c nethack-tinfoil/src/objects.c --- nethack-3.4.3/src/objects.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/src/objects.c 2004-12-14 16:07:06.000000000 +1100 @@ -308,6 +308,8 @@ 0, 1, 0, 3, 1, 4, 1,10, 0, CLOTH, CLR_BLUE), HELM("dented pot", (char *)0, 1, 0, 0, 2, 0, 10, 8, 9, 0, IRON, CLR_BLACK), +HELM("tinfoil hat", (char *)0, + 1, 1, 0, 0, 0, 0, 1, 10, 0, METAL, HI_METAL), /* With shuffled appearances... */ HELM("helmet", "plumed helmet", 0, 0, 0, 10, 1, 30, 10, 9, 0, IRON, HI_METAL), diff -Nbaur nethack-3.4.3/src/polyself.c nethack-tinfoil/src/polyself.c --- nethack-3.4.3/src/polyself.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/src/polyself.c 2004-12-14 17:32:55.000000000 +1100 @@ -1080,6 +1080,10 @@ flags.botl = 1; You("concentrate."); + if (uarmh && uarmh->otyp == TINFOIL_HAT) { + pline("A wave of psychic energy pours out, but it is blocked by your tinfoil hat."); + return 0; + } pline("A wave of psychic energy pours out."); for(mtmp=fmon; mtmp; mtmp = nmon) { int u_sen; diff -Nbaur nethack-3.4.3/src/worn.c nethack-tinfoil/src/worn.c --- nethack-3.4.3/src/worn.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-tinfoil/src/worn.c 2004-12-14 16:35:56.000000000 +1100 @@ -37,7 +37,8 @@ #define w_blocks(o,m) \ ((o->otyp == MUMMY_WRAPPING && ((m) & W_ARMC)) ? INVIS : \ (o->otyp == CORNUTHAUM && ((m) & W_ARMH) && \ - !Role_if(PM_WIZARD)) ? CLAIRVOYANT : 0) + !Role_if(PM_WIZARD)) ? CLAIRVOYANT : \ + (o->otyp == TINFOIL_HAT && ((m) & W_ARMH)) ? TELEPAT : 0) /* note: monsters don't have clairvoyance, so your role has no significant effect on their use of w_blocks() */