#include "lev.h"
STATIC_VAR NEARDATA struct engr *head_engr;
+STATIC_DCL const char *NDECL(blengr);
char *
random_engraving(outbuf)
boolean teleengr = FALSE; /* TRUE if we move the old engraving */
boolean zapwand = FALSE; /* TRUE if we remove a wand charge */
xchar type = DUST; /* Type of engraving made */
+ xchar oetype = 0; /* will be set to type of current engraving */
char buf[BUFSZ]; /* Buffer for final/poly engraving text */
char ebuf[BUFSZ]; /* Buffer for initial engraving text */
char fbuf[BUFSZ]; /* Buffer for "your fingers" */
ebuf[0] = (char) 0;
post_engr_text[0] = (char) 0;
maxelen = BUFSZ - 1;
+ if (oep)
+ oetype = oep->engr_type;
if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE)
type = ENGR_BLOOD;
if (!Blind) {
type = (xchar) 0; /* random */
(void) random_engraving(buf);
+ } else {
+ /* keep the same type so that feels don't
+ change and only the text is altered,
+ but you won't know anyway because
+ you're a _blind writer_ */
+ if (oetype)
+ type = oetype;
+ xcrypt(blengr(), buf);
}
dengr = TRUE;
- }
+ }
break;
case WAN_NOTHING:
case WAN_UNDEAD_TURNING:
/* Something has changed the engraving here */
if (*buf) {
make_engr_at(u.ux, u.uy, buf, moves, type);
- pline_The("engraving now reads: \"%s\".", buf);
+ if (!Blind)
+ pline_The("engraving now reads: \"%s\".", buf);
ptext = FALSE;
}
if (zapwand && (otmp->spe < 0)) {
return;
}
+static const char blind_writing[][21] = {
+ {0x44, 0x66, 0x6d, 0x69, 0x62, 0x65, 0x22, 0x45, 0x7b, 0x71,
+ 0x65, 0x6d, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+ {0x51, 0x67, 0x60, 0x7a, 0x7f, 0x21, 0x40, 0x71, 0x6b, 0x71,
+ 0x6f, 0x67, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x49, 0x6d, 0x73, 0x69, 0x62, 0x65, 0x22, 0x4c, 0x61, 0x7c,
+ 0x6d, 0x67, 0x24, 0x42, 0x7f, 0x69, 0x6c, 0x77, 0x67, 0x7e, 0x00},
+ {0x4b, 0x6d, 0x6c, 0x66, 0x30, 0x4c, 0x6b, 0x68, 0x7c, 0x7f,
+ 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x51, 0x67, 0x70, 0x7a, 0x7f, 0x6f, 0x67, 0x68, 0x64, 0x71,
+ 0x21, 0x4f, 0x6b, 0x6d, 0x7e, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x4c, 0x63, 0x76, 0x61, 0x71, 0x21, 0x48, 0x6b, 0x7b, 0x75,
+ 0x67, 0x63, 0x24, 0x45, 0x65, 0x6b, 0x6b, 0x65, 0x00, 0x00, 0x00},
+ {0x4c, 0x67, 0x68, 0x6b, 0x78, 0x68, 0x6d, 0x76, 0x7a, 0x75,
+ 0x21, 0x4f, 0x71, 0x7a, 0x75, 0x6f, 0x77, 0x00, 0x00, 0x00, 0x00},
+ {0x44, 0x66, 0x6d, 0x7c, 0x78, 0x21, 0x50, 0x65, 0x66, 0x65,
+ 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x44, 0x66, 0x73, 0x69, 0x62, 0x65, 0x22, 0x56, 0x7d, 0x63,
+ 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x52, 0x77, 0x61, 0x28, 0x44, 0x6e, 0x75, 0x6a, 0x7b, 0x75,
+ 0x6f, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+};
+
+STATIC_OVL const char *
+blengr(VOID_ARGS)
+{
+ return blind_writing[rn2(SIZE(blind_writing))];
+}
+
/*engrave.c*/