1 /* NetHack 3.6 engrave.c $NHDT-Date: 1456304550 2016/02/24 09:02:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.61 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Robert Patrick Rankin, 2012. */
4 /* NetHack may be freely redistributed. See license for details. */
6 /* JNetHack Copyright */
7 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */
8 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2018 */
9 /* JNetHack may be freely redistributed. See license for details. */
14 STATIC_VAR NEARDATA struct engr *head_engr;
17 random_engraving(outbuf)
22 /* a random engraving may come from the "rumors" file,
23 or from the "engrave" file (formerly in an array here) */
24 if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor)
25 (void) get_rnd_text(ENGRAVEFILE, outbuf);
27 wipeout_text(outbuf, (int) (strlen(outbuf) / 4), 0);
31 /* Partial rubouts for engraving characters. -3. */
35 } rubouts[] = { { 'A', "^" },
84 /* degrade some of the characters in a string */
86 wipeout_text(engr, cnt, seed)
89 unsigned seed; /* for semi-controlled randomization */
96 int i, j, nxt, use_rubout, lth = (int) strlen(engr);
100 /* pick next character */
106 /* predictable; caller can reproduce the same sequence by
107 supplying the same arguments later, or a pseudo-random
108 sequence by varying any of them */
110 seed *= 31, seed %= (BUFSZ - 1);
111 use_rubout = seed & 3;
115 #else /*JP:
\93ú
\96{
\8cê
\82Ì
\8fê
\8d\87\82Íjrubout()
\82ð
\8eg
\82Á
\82Ä
\8fÁ
\82·*/
119 seed *= 31, seed %= (BUFSZ-1);
123 if(jrubout(engr, nxt, use_rubout, j)){
127 s = (unsigned char *)&engr[nxt];
132 /* rub out unreadable & small punctuation marks */
133 if (index("?.,'`-|_", *s)) {
141 for (i = 0; i < SIZE(rubouts); i++)
142 if (*s == rubouts[i].wipefrom) {
144 * Pick one of the substitutes at random.
147 j = rn2(strlen(rubouts[i].wipeto));
149 seed *= 31, seed %= (BUFSZ - 1);
150 j = seed % (strlen(rubouts[i].wipeto));
152 *s = rubouts[i].wipeto[j];
156 /* didn't pick rubout; use '?' for unreadable character */
157 if (i == SIZE(rubouts))
162 /* trim trailing spaces */
163 while (lth && engr[lth - 1] == ' ')
167 /* check whether hero can reach something at ground level */
169 can_reach_floor(check_pit)
176 /* Restricted/unskilled riders can't reach the floor */
177 if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
179 if (check_pit && !Flying
180 && (t = t_at(u.ux, u.uy)) != 0 && uteetering_at_seen_pit(t))
183 return (boolean) ((!Levitation || Is_airlevel(&u.uz)
184 || Is_waterlevel(&u.uz))
185 && (!u.uundetected || !is_hider(youmonst.data)
186 || u.umonnum == PM_TRAPPER));
189 /* give a message after caller has determined that hero can't reach */
191 cant_reach_floor(x, y, up, check_pit)
193 boolean up, check_pit;
196 You("can't reach the %s.",
198 : (check_pit && can_reach_floor(FALSE))
199 ? "bottom of the pit"
202 You("%s
\82É
\93Í
\82©
\82È
\82¢
\81D",
204 : (check_pit && can_reach_floor(FALSE))
205 ? "
\97\8e\82µ
\8c\8a\82Ì
\92ê"
214 register struct rm *lev = &levl[x][y];
216 if (x == u.ux && y == u.uy && u.uswallow && is_animal(u.ustuck->data))
221 else if (IS_AIR(lev->typ) && Is_airlevel(&u.uz))
226 else if (is_pool(x, y))
228 return (Underwater && !Is_waterlevel(&u.uz))
229 ? "bottom" : hliquid("water");
231 return (Underwater && !Is_waterlevel(&u.uz))
232 ? "
\90\85\82Ì
\92ê" : hliquid("
\90\85\92\86");
234 else if (is_ice(x, y))
239 else if (is_lava(x, y))
241 return hliquid("lava");
243 return hliquid("
\97n
\8aâ");
244 else if (lev->typ == DRAWBRIDGE_DOWN)
249 else if (IS_ALTAR(levl[x][y].typ))
254 else if (IS_GRAVE(levl[x][y].typ))
259 else if (IS_FOUNTAIN(levl[x][y].typ))
264 else if ((IS_ROOM(lev->typ) && !Is_earthlevel(&u.uz))
265 || IS_WALL(lev->typ) || IS_DOOR(lev->typ) || lev->typ == SDOOR)
281 register struct rm *lev = &levl[x][y];
284 /* other room types will no longer exist when we're interested --
285 * see check_special_room()
287 if (*in_rooms(x, y, VAULT))
289 what = "vault's ceiling";
291 what = "
\91q
\8cÉ
\82Ì
\93V
\88ä";
292 else if (*in_rooms(x, y, TEMPLE))
294 what = "temple's ceiling";
296 what = "
\8e\9b\89@
\82Ì
\93V
\88ä";
297 else if (*in_rooms(x, y, SHOPBASE))
299 what = "shop's ceiling";
301 what = "
\93X
\82Ì
\93V
\88ä";
302 else if (Is_waterlevel(&u.uz))
303 /* water plane has no surface; its air bubbles aren't below sky */
305 what = "water above";
307 what = "
\90\85\82Ì
\8fã
\95û";
308 else if (IS_AIR(lev->typ))
315 what = "water's surface";
318 else if ((IS_ROOM(lev->typ) && !Is_earthlevel(&u.uz))
319 || IS_WALL(lev->typ) || IS_DOOR(lev->typ) || lev->typ == SDOOR)
326 what = "rock cavern";
328 what = "
\93´
\8cA
\82Ì
\93V
\88ä";
337 register struct engr *ep = head_engr;
340 if (x == ep->engr_x && y == ep->engr_y)
344 return (struct engr *) 0;
347 /* Decide whether a particular string is engraved at a specified
348 * location; a case-insensitive substring match is used.
349 * Ignore headstones, in case the player names herself "Elbereth".
351 * If strict checking is requested, the word is only considered to be
352 * present if it is intact and is the entire content of the engraving.
355 sengr_at(s, x, y, strict)
360 register struct engr *ep = engr_at(x, y);
362 if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
363 return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE))
364 : (strstri(ep->engr_txt, s) != 0);
374 if (can_reach_floor(TRUE))
375 wipe_engr_at(u.ux, u.uy, cnt, FALSE);
379 wipe_engr_at(x, y, cnt, magical)
380 xchar x, y, cnt, magical;
382 register struct engr *ep = engr_at(x, y);
384 /* Headstones are indelible */
385 if (ep && ep->engr_type != HEADSTONE) {
386 debugpline1("asked to erode %d characters", cnt);
387 if (ep->engr_type != BURN || is_ice(x, y) || (magical && !rn2(2))) {
388 if (ep->engr_type != DUST && ep->engr_type != ENGR_BLOOD) {
389 cnt = rn2(1 + 50 / (cnt + 1)) ? 0 : 1;
390 debugpline1("actually eroding %d characters", cnt);
392 wipeout_text(ep->engr_txt, (int) cnt, 0);
393 while (ep->engr_txt[0] == ' ')
395 if (!ep->engr_txt[0])
405 register struct engr *ep = engr_at(x, y);
409 /* Sensing an engraving does not require sight,
410 * nor does it necessarily imply comprehension (literacy).
412 if (ep && ep->engr_txt[0]) {
413 switch (ep->engr_type) {
418 pline("%s is written here in the %s.", Something,
419 is_ice(x, y) ? "frost" : "dust");
421 pline("
\89½
\82©
\82Ì
\95¶
\8e\9a\82ª%s
\82É
\8f\91\82¢
\82Ä
\82 \82é
\81D",
422 is_ice(x, y) ? "
\91\9a" : "
\82Ù
\82±
\82è");
428 if (!Blind || can_reach_floor(TRUE)) {
431 pline("%s is engraved here on the %s.", Something,
433 pline("
\89½
\82©
\82Ì
\95¶
\8e\9a\82ª%s
\82É
\8d\8f\82Ü
\82ê
\82Ä
\82¢
\82é
\81D",
438 if (!Blind || can_reach_floor(TRUE)) {
441 pline("Some text has been %s into the %s here.",
442 is_ice(x, y) ? "melted" : "burned", surface(x, y));
444 pline("
\89½
\82©
\82Ì
\95¶
\8e\9a\82ª%s%s
\82¢
\82é
\81D",
446 is_ice(x,y) ? "
\82É
\8d\8f\82Ü
\82ê
\82Ä" : "
\82É
\8fÄ
\82«
\95t
\82¯
\82ç
\82ê
\82Ä");
454 pline("There's some graffiti on the %s here.", surface(x, y));
456 pline("%s
\82É
\97\8e\8f\91\82ª
\82 \82é
\81D", surface(x,y));
460 /* "It's a message! Scrawled in blood!"
462 * "It says... `See you next Wednesday.'" -- Thriller
467 You_see("a message scrawled in blood here.");
469 You("
\8c\8c\95¶
\8e\9a\82ª
\82È
\82®
\82è
\8f\91\82«
\82³
\82ê
\82Ä
\82¢
\82é
\82Ì
\82ð
\8c©
\82Â
\82¯
\82½
\81D");
473 impossible("%s is written in a very strange way.", Something);
479 unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". ");
481 unsigned maxelen = BUFSZ - sizeof("
\82 \82È
\82½
\82Í
\8e\9f\82Ì
\82æ
\82¤
\82É
\8a´
\82¶
\82½
\81F
\81u
\81v");
482 if (strlen(ep->engr_txt) > maxelen) {
483 (void) strncpy(buf, ep->engr_txt, (int) maxelen);
489 You("%s: \"%s\".", (Blind) ? "feel the words" : "read", et);
491 You("%s
\81F
\81u%s
\81v", (Blind) ? "
\8e\9f\82Ì
\82æ
\82¤
\82É
\8a´
\82¶
\82½" : "
\93Ç
\82ñ
\82¾", et);
499 make_engr_at(x, y, s, e_time, e_type)
506 unsigned smem = strlen(s) + 1;
508 if ((ep = engr_at(x, y)) != 0)
511 (void) memset((genericptr_t)ep, 0, smem + sizeof(struct engr));
512 ep->nxt_engr = head_engr;
516 ep->engr_txt = (char *) (ep + 1);
517 Strcpy(ep->engr_txt, s);
518 /* engraving Elbereth shows wisdom */
519 if (!in_mklev && !strcmp(s, "Elbereth"))
520 exercise(A_WIS, TRUE);
521 ep->engr_time = e_time;
522 ep->engr_type = e_type > 0 ? e_type : rnd(N_ENGRAVE - 1);
526 /* delete any engraving at location <x,y> */
531 register struct engr *ep = engr_at(x, y);
538 * freehand - returns true if player has a free hand
543 return (!uwep || !welded(uwep)
544 || (!bimanual(uwep) && (!uarms || !uarms->cursed)));
547 static NEARDATA const char styluses[] = { ALL_CLASSES, ALLOW_NONE,
548 TOOL_CLASS, WEAPON_CLASS,
549 WAND_CLASS, GEM_CLASS,
552 /* Mohs' Hardness Scale:
553 * 1 - Talc 6 - Orthoclase
554 * 2 - Gypsum 7 - Quartz
555 * 3 - Calcite 8 - Topaz
556 * 4 - Fluorite 9 - Corundum
557 * 5 - Apatite 10 - Diamond
559 * Since granite is an igneous rock hardness ~ 7, anything >= 8 should
560 * probably be able to scratch the rock.
561 * Devaluation of less hard gems is not easily possible because obj struct
562 * does not contain individual oc_cost currently. 7/91
564 * steel - 5-8.5 (usu. weapon)
565 * diamond - 10 * jade - 5-6 (nephrite)
566 * ruby - 9 (corundum) * turquoise - 5-6
567 * sapphire - 9 (corundum) * opal - 5-6
568 * topaz - 8 * glass - ~5.5
569 * emerald - 7.5-8 (beryl) * dilithium - 4-5??
570 * aquamarine - 7.5-8 (beryl) * iron - 4-5
571 * garnet - 7.25 (var. 6.5-8) * fluorite - 4
572 * agate - 7 (quartz) * brass - 3-4
573 * amethyst - 7 (quartz) * gold - 2.5-3
574 * jasper - 7 (quartz) * silver - 2.5-3
575 * onyx - 7 (quartz) * copper - 2.5-3
576 * moonstone - 6 (orthoclase) * amber - 2-2.5
579 /* return 1 if action took 1 (or more) moves, 0 if error or aborted */
583 boolean dengr = FALSE; /* TRUE if we wipe out the current engraving */
584 boolean doblind = FALSE; /* TRUE if engraving blinds the player */
585 boolean doknown = FALSE; /* TRUE if we identify the stylus */
586 boolean eow = FALSE; /* TRUE if we are overwriting oep */
587 boolean jello = FALSE; /* TRUE if we are engraving in slime */
588 boolean ptext = TRUE; /* TRUE if we must prompt for engrave text */
589 boolean teleengr = FALSE; /* TRUE if we move the old engraving */
590 boolean zapwand = FALSE; /* TRUE if we remove a wand charge */
591 xchar type = DUST; /* Type of engraving made */
592 char buf[BUFSZ]; /* Buffer for final/poly engraving text */
593 char ebuf[BUFSZ]; /* Buffer for initial engraving text */
594 char fbuf[BUFSZ]; /* Buffer for "your fingers" */
595 char qbuf[QBUFSZ]; /* Buffer for query text */
596 char post_engr_text[BUFSZ]; /* Text displayed after engraving prompt */
597 const char *everb; /* Present tense of engraving type */
598 const char *eloc; /* Where the engraving is (ie dust/floor/...) */
599 char *sp; /* Place holder for space count of engr text */
600 int len; /* # of nonspace chars of new engraving text */
601 int maxelen; /* Max allowable length of engraving text */
602 struct engr *oep = engr_at(u.ux, u.uy);
603 /* The current engraving */
604 struct obj *otmp; /* Object selected with which to engrave */
607 multi = 0; /* moves consumed */
608 nomovemsg = (char *) 0; /* occupation end message */
612 post_engr_text[0] = (char) 0;
614 if (is_demon(youmonst.data) || youmonst.data->mlet == S_VAMPIRE)
617 /* Can the adventurer engrave at all? */
620 if (is_animal(u.ustuck->data)) {
622 pline("What would you write? \"Jonah was here\"?");
624 pline("
\89½
\82ð
\8f\91\82
\82ñ
\82¾
\82¢
\81H
\81u
\83\88\83i
\82Í
\82±
\82±
\82É
\82¢
\82é
\81v
\81H");
626 } else if (is_whirly(u.ustuck->data)) {
627 cant_reach_floor(u.ux, u.uy, FALSE, FALSE);
631 } else if (is_lava(u.ux, u.uy)) {
633 You_cant("write on the %s!", surface(u.ux, u.uy));
635 You("%s
\82É
\93Í
\82©
\82È
\82¢
\81D", surface(u.ux,u.uy));
637 } else if (is_pool(u.ux, u.uy) || IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
639 You_cant("write on the %s!", surface(u.ux, u.uy));
641 You("%s
\82É
\82Í
\8f\91\82¯
\82È
\82¢
\81I", surface(u.ux, u.uy));
644 if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) /* in bubble */) {
646 You_cant("write in thin air!");
648 You("
\8bó
\92\86\82É
\82Í
\8f\91\82¯
\82È
\82¢
\81I");
650 } else if (!accessible(u.ux, u.uy)) {
651 /* stone, tree, wall, secret corridor, pool, lava, bars */
653 You_cant("write here.");
655 You_cant("
\82±
\82±
\82É
\82Í
\8f\91\82¯
\82È
\82¢
\81D");
658 if (cantwield(youmonst.data)) {
660 You_cant("even hold anything!");
662 You("
\89½
\82©
\82ð
\8e\9d\82Â
\82±
\82Æ
\82·
\82ç
\82Å
\82«
\82È
\82¢
\81I");
665 if (check_capacity((char *) 0))
668 /* One may write with finger, or weapon, or wand, or..., or...
669 * Edited by GAN 10/20/86 so as not to change weapon wielded.
672 otmp = getobj(styluses, "write with");
673 if (!otmp) /* otmp == zeroobj if fingers */
676 if (otmp == &zeroobj) {
678 Strcat(strcpy(fbuf, "your "), body_part(FINGERTIP));
680 Strcat(strcpy(fbuf, "
\82 \82È
\82½
\82Ì"), body_part(FINGERTIP));
683 writer = yname(otmp);
685 /* There's no reason you should be able to write with a wand
686 * while both your hands are tied up.
688 if (!freehand() && otmp != uwep && !otmp->owornmask) {
690 You("have no free %s to write with!", body_part(HAND));
692 pline("%s
\82Ì
\8e©
\97R
\82ª
\8cø
\82©
\82È
\82¢
\82Ì
\82Å
\8f\91\82¯
\82È
\82¢
\81I", body_part(HAND));
698 You("tickle %s with %s.", mon_nam(u.ustuck), writer);
700 You("%s
\82Å%s
\82ð
\82
\82·
\82®
\82Á
\82½
\81D", writer, mon_nam(u.ustuck));
702 Your("message dissolves...");
704 Your("
\83\81\83b
\83Z
\81[
\83W
\82Í
\8fÁ
\82¦
\82½
\81D
\81D
\81D");
707 if (otmp->oclass != WAND_CLASS && !can_reach_floor(TRUE)) {
708 cant_reach_floor(u.ux, u.uy, FALSE, TRUE);
711 if (IS_ALTAR(levl[u.ux][u.uy].typ)) {
713 You("make a motion towards the altar with %s.", writer);
715 You("%s
\82ð
\8eg
\82Á
\82Ä
\8dÕ
\92d
\82É
\8f\91\82±
\82¤
\82Æ
\82µ
\82½
\81D", writer);
716 altar_wrath(u.ux, u.uy);
719 if (IS_GRAVE(levl[u.ux][u.uy].typ)) {
720 if (otmp == &zeroobj) { /* using only finger */
722 You("would only make a small smudge on the %s.",
724 You("%s
\82ð
\8f
\82µ
\82æ
\82²
\82·
\82±
\82Æ
\82µ
\82©
\82Å
\82«
\82È
\82©
\82Á
\82½
\81D",
725 surface(u.ux, u.uy));
727 } else if (!levl[u.ux][u.uy].disturbed) {
729 You("disturb the undead!");
731 You("
\95s
\8e\80\82Ì
\8eÒ
\82Ì
\96°
\82è
\82ð
\96W
\82°
\82½
\81I");
732 levl[u.ux][u.uy].disturbed = 1;
733 (void) makemon(&mons[PM_GHOUL], u.ux, u.uy, NO_MM_FLAGS);
734 exercise(A_WIS, FALSE);
741 switch (otmp->oclass) {
749 /* "diamond" rings and others should work */
751 /* diamonds & other hard gems should work */
752 if (objects[otmp->otyp].oc_tough) {
758 if (is_boots(otmp)) {
763 /* Objects too large to engrave with */
767 You_cant("engrave with such a large object!");
769 pline("
\82»
\82ñ
\82È
\91å
\82«
\82È
\82à
\82Ì
\82ð
\8eg
\82Á
\82Ä
\95¶
\8e\9a\82ð
\8d\8f\82ß
\82È
\82¢
\81I");
772 /* Objects too silly to engrave with */
777 pline("%s would get %s.", Yname2(otmp),
778 is_ice(u.ux, u.uy) ? "all frosty" : "too dirty");
780 Your("%s
\82Í%s
\82È
\82Á
\82½
\81D", xname(otmp),
781 is_ice(u.ux,u.uy) ? "
\91\9a\82¾
\82ç
\82¯
\82É" : "
\89\98\82È
\82");
785 case RANDOM_CLASS: /* This should mean fingers */
788 /* The charge is removed from the wand before prompting for
789 * the engraving text, because all kinds of setup decisions
790 * and pre-engraving messages are based upon knowing what type
791 * of engraving the wand is going to do. Also, the player
792 * will have potentially seen "You wrest .." message, and
793 * therefore will know they are using a charge.
796 if (zappable(otmp)) {
798 if (otmp->cursed && !rn2(WAND_BACKFIRE_CHANCE)) {
799 wand_explode(otmp, 0);
803 if (!can_reach_floor(TRUE))
806 switch (otmp->otyp) {
812 case WAN_SECRET_DOOR_DETECTION:
813 case WAN_CREATE_MONSTER:
815 case WAN_ENLIGHTENMENT:
818 /* IMMEDIATE wands */
819 /* If wand is "IMMEDIATE", remember to affect the
820 * previous engraving even if turning to dust.
823 Strcpy(post_engr_text,
825 "The wand unsuccessfully fights your attempt to write!");
827 "
\82 \82È
\82½
\82ª
\8f\91\82±
\82¤
\82Æ
\82·
\82é
\82Æ
\8fñ
\82Í
\92ï
\8dR
\82µ
\82½
\81I");
829 case WAN_SLOW_MONSTER:
832 Sprintf(post_engr_text, "The bugs on the %s slow down!",
834 Sprintf(post_engr_text, "%s
\82Ì
\8fã
\82Ì
\92\8e\82Ì
\93®
\82«
\82ª
\92x
\82
\82È
\82Á
\82½
\81I",
835 surface(u.ux, u.uy));
838 case WAN_SPEED_MONSTER:
841 Sprintf(post_engr_text, "The bugs on the %s speed up!",
843 Sprintf(post_engr_text, "%s
\82Ì
\8fã
\82Ì
\92\8e\82Ì
\93®
\82«
\82ª
\91¬
\82
\82È
\82Á
\82½
\81I",
844 surface(u.ux, u.uy));
850 type = (xchar) 0; /* random */
851 (void) random_engraving(buf);
857 case WAN_UNDEAD_TURNING:
863 case WAN_MAGIC_MISSILE:
866 Sprintf(post_engr_text,
868 "The %s is riddled by bullet holes!",
870 "%s
\82Í
\8eU
\92e
\82Å
\8d×
\82©
\82¢
\8c\8a\82¾
\82ç
\82¯
\82É
\82È
\82Á
\82½
\81I",
871 surface(u.ux, u.uy));
874 /* can't tell sleep from death - Eric Backus */
879 Sprintf(post_engr_text, "The bugs on the %s stop moving!",
881 Sprintf(post_engr_text, "%s
\82Ì
\8fã
\82Ì
\92\8e\82Ì
\93®
\82«
\82ª
\8e~
\82Ü
\82Á
\82½
\81I",
882 surface(u.ux, u.uy));
887 Strcpy(post_engr_text,
889 "A few ice cubes drop from the wand.");
891 "
\95X
\82Ì
\82©
\82¯
\82ç
\82ª
\8fñ
\82©
\82ç
\82±
\82Ú
\82ê
\97\8e\82¿
\82½
\81D");
892 if (!oep || (oep->engr_type != BURN))
895 case WAN_CANCELLATION:
896 case WAN_MAKE_INVISIBLE:
897 if (oep && oep->engr_type != HEADSTONE) {
900 pline_The("engraving on the %s vanishes!",
902 pline("%s
\82Ì
\8fã
\82Ì
\95¶
\8e\9a\82Í
\8fÁ
\82¦
\82½
\81I",
903 surface(u.ux, u.uy));
907 case WAN_TELEPORTATION:
908 if (oep && oep->engr_type != HEADSTONE) {
911 pline_The("engraving on the %s vanishes!",
913 pline("%s
\82Ì
\8fã
\82Ì
\95¶
\8e\9a\82Í
\8fÁ
\82¦
\82½
\81I",
914 surface(u.ux, u.uy));
918 /* type = ENGRAVE wands */
922 if (!objects[otmp->otyp].oc_name_known) {
925 pline("This %s is a wand of digging!", xname(otmp));
927 pline("
\82±
\82ê
\82Í
\8c\8a\8c@
\82è
\82Ì
\8fñ
\82¾
\81I");
931 Strcpy(post_engr_text,
933 ? "You hear drilling!"
935 ? "You feel tremors."
936 : IS_GRAVE(levl[u.ux][u.uy].typ)
937 ? "Chips fly out from the headstone."
939 ? "Ice chips fly up from the ice surface!"
940 : (level.locations[u.ux][u.uy].typ
942 ? "Splinters fly up from the bridge."
943 : "Gravel flies up from the floor.");
945 Strcpy(post_engr_text,
947 ? "
\8c\8a\82ª
\8aJ
\82
\89¹
\82ð
\95·
\82¢
\82½
\81I"
948 : IS_GRAVE(levl[u.ux][u.uy].typ)
949 ? "
\95æ
\90Î
\82©
\82ç
\94j
\95Ð
\82ª
\94ò
\82Ñ
\8eU
\82Á
\82½
\81D"
951 ? "
\95X
\82Ì
\95\
\96Ê
\82©
\82ç
\95X
\82Ì
\82©
\82¯
\82ç
\82ª
\94ò
\82Ñ
\8eU
\82Á
\82½
\81D"
952 : (level.locations[u.ux][u.uy].typ
954 ? "
\94j
\95Ð
\82ª
\8b´
\82©
\82ç
\95\91\82¢
\82 \82ª
\82Á
\82½
\81D"
955 : "
\8d»
\97\98\82ª
\8f°
\82©
\82ç
\94ò
\82Ñ
\8eU
\82Á
\82½
\81D");
958 /* type = BURN wands */
962 if (!objects[otmp->otyp].oc_name_known) {
965 pline("This %s is a wand of fire!", xname(otmp));
967 pline("
\82±
\82ê
\82Í
\89\8a\82Ì
\8fñ
\82¾
\81I");
971 Strcpy(post_engr_text, Blind ? "You feel the wand heat up."
972 : "Flames fly from the wand.");
974 Strcpy(post_engr_text, Blind ? "
\8fñ
\82ª
\92g
\82©
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D"
975 : "
\89\8a\82ª
\8fñ
\82©
\82ç
\94ò
\82Ñ
\8eU
\82Á
\82½
\81D");
981 if (!objects[otmp->otyp].oc_name_known) {
984 pline("This %s is a wand of lightning!", xname(otmp));
986 pline("
\82±
\82ê
\82Í
\97\8b\82Ì
\8fñ
\82¾
\81I");
991 Strcpy(post_engr_text, "Lightning arcs from the wand.");
993 Strcpy(post_engr_text, "
\89Î
\89Ô
\82ª
\8fñ
\82©
\82ç
\94ò
\82Ñ
\8eU
\82Á
\82½
\81D");
997 Strcpy(post_engr_text, !Deaf
998 ? "You hear crackling!"
999 : "Your hair stands up!");
1001 Strcpy(post_engr_text, !Deaf
1002 ? "
\83p
\83`
\83p
\83`
\82Æ
\82¢
\82¤
\89¹
\82ð
\95·
\82¢
\82½
\81I"
1003 : "
\83]
\83b
\82Æ
\82µ
\82½
\81I");
1007 /* type = MARK wands */
1008 /* type = ENGR_BLOOD wands */
1010 } else { /* end if zappable */
1011 /* failing to wrest one last charge takes time */
1012 ptext = FALSE; /* use "early exit" below, return 1 */
1013 /* give feedback here if we won't be getting the
1014 "can't reach floor" message below */
1015 if (can_reach_floor(TRUE)) {
1016 /* cancelled wand turns to dust */
1019 /* empty wand just doesn't write */
1022 pline_The("wand is too worn out to engrave.");
1024 pline_The("
\8fñ
\82Í
\95¶
\8e\9a\82ð
\8d\8f\82Þ
\82É
\82Í
\8eg
\82¢
\82·
\82¬
\82Ä
\82¢
\82é
\81D");
1030 if (is_blade(otmp)) {
1031 if ((int) otmp->spe > -3)
1035 pline("%s too dull for engraving.", Yobjnam2(otmp, "are"));
1037 pline("%s
\82Í
\90n
\82ª
\83{
\83\8d\83{
\83\8d\82Å
\81C
\95¶
\8e\9a\82ð
\92¤
\82ê
\82È
\82¢
\81D", xname(otmp));
1042 if (otmp == ublindf) {
1045 "That is a bit difficult to engrave with, don't you think?");
1047 "
\82¿
\82å
\82Á
\82Æ
\82»
\82ê
\82Å
\92¤
\82é
\82Ì
\82Í
\91å
\95Ï
\82¾
\82ë
\82¤
\81C
\82»
\82¤
\8ev
\82í
\82È
\82¢
\81H");
1050 switch (otmp->otyp) {
1054 Your("marker has dried out.");
1056 Your("
\83}
\81[
\83J
\82Í
\8a£
\82«
\82«
\82Á
\82½
\81D");
1061 /* Can't really engrave with a towel */
1064 if (oep->engr_type == DUST
1065 || oep->engr_type == ENGR_BLOOD
1066 || oep->engr_type == MARK) {
1067 if (is_wet_towel(otmp))
1068 dry_a_towel(otmp, -1, TRUE);
1071 You("wipe out the message here.");
1073 You("
\83\81\83b
\83Z
\81[
\83W
\82ð
\90@
\82«
\82Æ
\82Á
\82½
\81D");
1076 pline("%s %s.", Yobjnam2(otmp, "get"),
1077 is_ice(u.ux, u.uy) ? "frosty" : "dusty");
1079 pline("%s
\82Í%s
\82É
\82È
\82Á
\82½
\81D", xname(otmp),
1080 is_ice(u.ux,u.uy) ? "
\91\9a\82¾
\82ç
\82¯" : "
\82Ù
\82±
\82è
\82Ü
\82Ý
\82ê");
1085 pline("%s can't wipe out this engraving.", Yname2(otmp));
1087 pline("
\82±
\82Ì
\95¶
\8e\9a\82Í%s
\82Å
\82Í
\90@
\82«
\82Æ
\82ê
\82È
\82¢
\81D", xname(otmp));
1090 pline("%s %s.", Yobjnam2(otmp, "get"),
1091 is_ice(u.ux, u.uy) ? "frosty" : "dusty");
1093 pline("%s
\82Í%s
\82É
\82È
\82Á
\82½
\81D", xname(otmp),
1094 is_ice(u.ux,u.uy) ? "
\91\9a\82¾
\82ç
\82¯" : "
\82Ù
\82±
\82è
\82Ü
\82Ý
\82ê");
1105 pline("Writing a poison pen letter??");
1107 pline("
\82Ó
\82Þ
\81D
\82±
\82ê
\82±
\82»
\96{
\93\96\82Ì
\93Å
\90ã
\82¾
\81D");
1112 impossible("You're engraving with an illegal object!");
1116 if (IS_GRAVE(levl[u.ux][u.uy].typ)) {
1117 if (type == ENGRAVE || type == 0) {
1120 /* ensures the "cannot wipe out" case */
1129 * End of implement setup
1132 /* Identify stylus */
1135 if (objects[otmp->otyp].oc_name_known)
1136 more_experienced(0, 10);
1140 oep = (struct engr *) 0;
1144 oep = (struct engr *) 0;
1146 /* Something has changed the engraving here */
1148 make_engr_at(u.ux, u.uy, buf, moves, type);
1150 pline_The("engraving now reads: \"%s\".", buf);
1152 pline("
\8d\8f\82Ü
\82ê
\82½
\95¶
\8e\9a\82ð
\93Ç
\82ñ
\82¾
\81F
\81u%s
\81v
\81D", buf);
1155 if (zapwand && (otmp->spe < 0)) {
1157 pline("%s %sturns to dust.", The(xname(otmp)),
1158 Blind ? "" : "glows violently, then ");
1160 pline("%s
\82Í%s
\82¿
\82è
\82Æ
\82È
\82Á
\82½
\81D", xname(otmp),
1161 Blind ? "" : "
\8c\83\82µ
\82
\8bP
\82«
\81C");
1163 if (!IS_GRAVE(levl[u.ux][u.uy].typ))
1166 "are not going to get anywhere trying to write in the %s with your dust.",
1167 is_ice(u.ux, u.uy) ? "frost" : "dust");
1170 "
\90o
\82Å%s
\82É
\89½
\82©
\8f\91\82±
\82¤
\82Æ
\82µ
\82½
\82ª
\81C
\82Å
\82«
\82È
\82©
\82Á
\82½
\81D",
1171 is_ice(u.ux,u.uy) ? "
\95X" : "
\82Ù
\82±
\82è");
1174 otmp = 0; /* wand is now gone */
1177 /* Early exit for some implements. */
1179 if (otmp && otmp->oclass == WAND_CLASS && !can_reach_floor(TRUE))
1180 cant_reach_floor(u.ux, u.uy, FALSE, TRUE);
1184 * Special effects should have deleted the current engraving (if
1188 register char c = 'n';
1190 /* Give player the choice to add to engraving. */
1191 if (type == HEADSTONE) {
1192 /* no choice, only append */
1194 } else if (type == oep->engr_type
1195 && (!Blind || oep->engr_type == BURN
1196 || oep->engr_type == ENGRAVE)) {
1198 c = yn_function("Do you want to add to the current engraving?",
1200 c = yn_function("
\89½
\82©
\8f\91\82«
\89Á
\82¦
\82Ü
\82·
\82©
\81H",
1208 if (c == 'n' || Blind) {
1209 if (oep->engr_type == DUST
1210 || oep->engr_type == ENGR_BLOOD
1211 || oep->engr_type == MARK) {
1214 You("wipe out the message that was %s here.",
1215 (oep->engr_type == DUST)
1216 ? "written in the dust"
1217 : (oep->engr_type == ENGR_BLOOD)
1218 ? "scrawled in blood"
1221 You("%s
\83\81\83b
\83Z
\81[
\83W
\82ð
\90@
\82«
\82Æ
\82Á
\82½
\81D",
1222 (oep->engr_type == DUST)
1223 ? "
\82Ù
\82±
\82è
\82É
\8f\91\82©
\82ê
\82Ä
\82¢
\82é"
1224 : (oep->engr_type == BLOOD)
1225 ? "
\8c\8c\95¶
\8e\9a\82Å
\82È
\82®
\82è
\8f\91\82«
\82³
\82ê
\82Ä
\82¢
\82é"
1226 : "
\8f\91\82©
\82ê
\82Ä
\82¢
\82é");
1229 oep = (struct engr *) 0;
1231 /* Don't delete engr until after we *know* we're engraving
1234 } else if (type == DUST || type == MARK || type == ENGR_BLOOD) {
1236 You("cannot wipe out the message that is %s the %s here.",
1237 oep->engr_type == BURN
1238 ? (is_ice(u.ux, u.uy) ? "melted into" : "burned into")
1240 surface(u.ux, u.uy));
1242 You("%s
\83\81\83b
\83Z
\81[
\83W
\82ð
\90@
\82«
\82Æ
\82ê
\82È
\82©
\82Á
\82½
\81D",
1243 oep->engr_type == BURN
1244 ? (is_ice(u.ux, u.uy) ? "
\8d\8f\82Ü
\82ê
\82Ä
\82¢
\82é" : "
\8fÄ
\82«
\95t
\82¯
\82ç
\82ê
\82Ä
\82¢
\82é")
1245 : "
\8d\8f\82Ü
\82ê
\82Ä
\82¢
\82é");
1248 } else if (type != oep->engr_type || c == 'n') {
1249 if (!Blind || can_reach_floor(TRUE))
1251 You("will overwrite the current message.");
1253 You("
\83\81\83b
\83Z
\81[
\83W
\82ð
\8fã
\8f\91\82«
\82µ
\82æ
\82¤
\82Æ
\82µ
\82½
\81D");
1259 eloc = surface(u.ux, u.uy);
1263 everb = (oep && !eow ? "add to the weird writing on"
1265 everb = (oep && !eow ? "
\8aï
\96
\82È
\95¶
\8e\9a\97ñ
\82É
\8f\91\82«
\89Á
\82¦
\82é"
1267 : "write strangely on");
1269 : "
\8aï
\96
\82È
\95¶
\8e\9a\97ñ
\82ð
\8f\91\82");
1273 everb = (oep && !eow ? "add to the writing in" : "write in");
1275 everb = (oep && !eow ? "
\8f\91\82«
\89Á
\82¦
\82é" : "
\8f\91\82");
1277 eloc = is_ice(u.ux, u.uy) ? "frost" : "dust";
1279 eloc = is_ice(u.ux,u.uy) ? "
\91\9a" : "
\82Ù
\82±
\82è";
1283 everb = (oep && !eow ? "add to the epitaph on" : "engrave on");
1285 everb = (oep && !eow ? "
\95æ
\94è
\96Á
\82ð
\8d\8f\82Ý
\89Á
\82¦
\82é" : "
\95æ
\94è
\96Á
\82ð
\8d\8f\82Þ");
1289 everb = (oep && !eow ? "add to the engraving in" : "engrave in");
1291 everb = (oep && !eow ? "
\8d\8f\82Ý
\89Á
\82¦
\82é" : "
\8d\8f\82Þ");
1295 everb = (oep && !eow
1296 ? (is_ice(u.ux, u.uy) ? "add to the text melted into"
1297 : "add to the text burned into")
1298 : (is_ice(u.ux, u.uy) ? "melt into" : "burn into"));
1300 everb = (oep && !eow
1301 ? ( is_ice(u.ux,u.uy) ? "
\8d\8f\82Ý
\89Á
\82¦
\82é"
1302 : "
\94R
\82¦
\82Ä
\82¢
\82é
\95¶
\8e\9a\82É
\8f\91\82«
\89Á
\82¦
\82é")
1303 : ( is_ice(u.ux,u.uy) ? "
\8d\8f\82Þ" : "
\8fÄ
\88ó
\82ð
\82¢
\82ê
\82é"));
1308 everb = (oep && !eow ? "add to the graffiti on" : "scribble on");
1310 everb = (oep && !eow ? "
\97\8e\8f\91\82É
\8f\91\82«
\89Á
\82¦
\82é" : "
\82Í
\82µ
\82è
\8f\91\82«
\82·
\82é");
1314 everb = (oep && !eow ? "add to the scrawl on" : "scrawl on");
1316 everb = (oep && !eow ? "
\82È
\82®
\82è
\8f\91\82«
\82É
\8f\91\82«
\89Á
\82¦
\82é" : "
\82È
\82®
\82è
\8f\91\82«
\82·
\82é");
1320 /* Tell adventurer what is going on */
1321 if (otmp != &zeroobj)
1323 You("%s the %s with %s.", everb, eloc, doname(otmp));
1325 You("%s
\82Å%s
\82É%s
\81D", doname(otmp), eloc, jpast(everb));
1328 You("%s the %s with your %s.", everb, eloc, body_part(FINGERTIP));
1330 You("%s
\82Å%s
\82É%s
\81D", body_part(FINGER), eloc, jpast(everb));
1333 /* Prompt for engraving! */
1335 Sprintf(qbuf, "What do you want to %s the %s here?", everb, eloc);
1337 Sprintf(qbuf,"%s
\82É
\89½
\82Æ%s
\82©
\81H", eloc, jpolite(everb));
1339 /* convert tabs to spaces and condense consecutive spaces to one */
1342 /* Count the actual # of chars engraved not including spaces */
1344 for (sp = ebuf; *sp; sp++)
1348 if (len == 0 || index(ebuf, '\033')) {
1352 pline("%s, then %s.", Tobjnam(otmp, "glow"),
1353 otense(otmp, "fade"));
1355 pline("%s
\82Í
\8bP
\82¢
\82½
\82ª
\81C
\82·
\82®
\82É
\8fÁ
\82¦
\82½
\81D", xname(otmp));
1364 /* A single `x' is the traditional signature of an illiterate person */
1365 if (len != 1 || (!index(ebuf, 'x') && !index(ebuf, 'X')))
1366 u.uconduct.literate++;
1368 /* Mix up engraving if surface or state of mind is unsound.
1369 Note: this won't add or remove any spaces. */
1370 for (sp = ebuf; *sp; sp++) {
1373 if (((type == DUST || type == ENGR_BLOOD) && !rn2(25))
1374 || (Blind && !rn2(11)) || (Confusion && !rn2(7))
1375 || (Stunned && !rn2(4)) || (Hallucination && !rn2(2)))
1377 *sp = ' ' + rnd(96 - 2); /* ASCII '!' thru '~'
1378 (excludes ' ' and DEL) */
1379 #else /*JP:
\93ú
\96{
\8cê
\82Å
\83\89\83\93\83_
\83\80\89» */
1381 if(is_kanji1(ebuf, sp-ebuf))
1383 else if(is_kanji2(ebuf, sp-ebuf))
1384 jrndm_replace(sp-1);
1386 *sp = '!' + rn2(93); /* ASCII-code only */
1391 /* Previous engraving is overwritten */
1394 oep = (struct engr *) 0;
1397 /* Figure out how long it took to engrave, and if player has
1398 * engraved too much.
1402 multi = -(len / 10);
1405 nomovemsg = "You finish your weird engraving.";
1407 nomovemsg = "
\82 \82È
\82½
\82Í
\8aï
\96
\82È
\8d\8f\82Ý
\82ð
\8fI
\82¦
\82½
\81D";
1410 multi = -(len / 10);
1413 nomovemsg = "You finish writing in the dust.";
1415 nomovemsg = "
\82 \82È
\82½
\82Í
\82Ù
\82±
\82è
\82É
\8f\91\82«
\8fI
\82¦
\82½
\81D";
1419 multi = -(len / 10);
1420 if (otmp->oclass == WEAPON_CLASS
1421 && (otmp->otyp != ATHAME || otmp->cursed)) {
1423 maxelen = ((otmp->spe + 3) * 2) + 1;
1424 /* -2 => 3, -1 => 5, 0 => 7, +1 => 9, +2 => 11
1425 * Note: this does not allow a +0 anything (except an athame)
1426 * to engrave "Elbereth" all at once.
1427 * However, you can engrave "Elb", then "ere", then "th".
1430 pline("%s dull.", Yobjnam2(otmp, "get"));
1432 Your("%s
\82Í
\90n
\82±
\82Ú
\82ê
\82µ
\82½
\81D", xname(otmp));
1433 costly_alteration(otmp, COST_DEGRD);
1434 if (len > maxelen) {
1438 otmp->spe -= len >> 1;
1440 otmp->spe -= 1; /* Prevent infinite engraving */
1441 } else if (otmp->oclass == RING_CLASS || otmp->oclass == GEM_CLASS) {
1446 nomovemsg = "You finish engraving.";
1448 nomovemsg = "
\82 \82È
\82½
\82Í
\8d\8f\82Ý
\8fI
\82¦
\82½
\81D";
1451 multi = -(len / 10);
1453 nomovemsg = is_ice(u.ux, u.uy)
1455 ? "You finish melting your message into the ice."
1457 ? "
\95X
\82Ö
\83\81\83b
\83Z
\81[
\83W
\82ð
\8d\8f\82Ý
\8fI
\82¦
\82½
\81D"
1459 : "You finish burning your message into the floor.";
1461 : "
\8f°
\82Ö
\83\81\83b
\83Z
\81[
\83W
\82ð
\8fÄ
\82«
\82¢
\82ê
\8fI
\82¦
\82½
\81D";
1464 multi = -(len / 10);
1465 if (otmp->otyp == MAGIC_MARKER) {
1466 maxelen = otmp->spe * 2; /* one charge / 2 letters */
1467 if (len > maxelen) {
1469 Your("marker dries out.");
1471 Your("
\83}
\81[
\83J
\82Í
\8a£
\82«
\82«
\82Á
\82½
\81D");
1473 multi = -(maxelen / 10);
1475 otmp->spe -= len >> 1;
1477 otmp->spe -= 1; /* Prevent infinite graffiti */
1481 nomovemsg = "You finish defacing the dungeon.";
1483 nomovemsg = "
\82 \82È
\82½
\82Í
\96À
\8b{
\82Ö
\82Ì
\97\8e\8f\91\82ð
\8f\91\82«
\8fI
\82¦
\82½
\81D";
1486 multi = -(len / 10);
1489 nomovemsg = "You finish scrawling.";
1491 nomovemsg = "
\82Í
\82µ
\82è
\8f\91\82«
\82ð
\8f\91\82«
\8fI
\82¦
\82½
\81D";
1495 /* Chop engraving down to size if necessary */
1496 if (len > maxelen) {
1497 for (sp = ebuf; maxelen && *sp; sp++)
1500 if (!maxelen && *sp) {
1501 #if 1 /*JP*//*
\8a¿
\8e\9a\82Ì1
\83o
\83C
\83g
\96Ú
\82¾
\82¯
\82ª
\8ec
\82ç
\82È
\82¢
\82æ
\82¤
\82É*/
1502 if(is_kanji2(ebuf, sp - ebuf))
1508 nomovemsg = "You cannot write any more.";
1510 nomovemsg = "
\82±
\82ê
\88È
\8fã
\89½
\82à
\8f\91\82¯
\82È
\82©
\82Á
\82½
\81D";
1512 You("are only able to write \"%s\".", ebuf);
1514 You("
\81u%s
\81v
\82Æ
\82Ü
\82Å
\82µ
\82©
\8f\91\82¯
\82È
\82©
\82Á
\82½
\81D", ebuf);
1518 if (oep) /* add to existing engraving */
1519 Strcpy(buf, oep->engr_txt);
1520 (void) strncat(buf, ebuf, BUFSZ - (int) strlen(buf) - 1);
1521 /* Put the engraving onto the map */
1522 make_engr_at(u.ux, u.uy, buf, moves - multi, type);
1524 if (post_engr_text[0])
1525 pline("%s", post_engr_text);
1526 if (doblind && !resists_blnd(&youmonst)) {
1528 You("are blinded by the flash!");
1530 You("
\82Ü
\82Î
\82ä
\82¢
\8cõ
\82Å
\96Ú
\82ª
\82
\82ç
\82ñ
\82¾
\81I");
1531 make_blinded((long) rnd(50), FALSE);
1533 Your1(vision_clears);
1538 /* while loading bones, clean up text which might accidentally
1539 or maliciously disrupt player's terminal when displayed */
1541 sanitize_engravings()
1545 for (ep = head_engr; ep; ep = ep->nxt_engr) {
1546 sanitize_name(ep->engr_txt);
1551 save_engravings(fd, mode)
1554 struct engr *ep, *ep2;
1555 unsigned no_more_engr = 0;
1557 for (ep = head_engr; ep; ep = ep2) {
1559 if (ep->engr_lth && ep->engr_txt[0] && perform_bwrite(mode)) {
1560 bwrite(fd, (genericptr_t) &ep->engr_lth, sizeof ep->engr_lth);
1561 bwrite(fd, (genericptr_t) ep, sizeof (struct engr) + ep->engr_lth);
1563 if (release_data(mode))
1566 if (perform_bwrite(mode))
1567 bwrite(fd, (genericptr_t) &no_more_engr, sizeof no_more_engr);
1568 if (release_data(mode))
1581 mread(fd, (genericptr_t) <h, sizeof lth);
1585 mread(fd, (genericptr_t) ep, sizeof (struct engr) + lth);
1586 ep->nxt_engr = head_engr;
1588 ep->engr_txt = (char *) (ep + 1); /* Andreas Bormann */
1589 /* Mark as finished for bones levels -- no problem for
1590 * normal levels as the player must have finished engraving
1591 * to be able to move again.
1593 ep->engr_time = moves;
1597 /* to support '#stats' wizard-mode command */
1599 engr_stats(hdrfmt, hdrbuf, count, size)
1606 Sprintf(hdrbuf, hdrfmt, (long) sizeof (struct engr));
1607 *count = *size = 0L;
1608 for (ep = head_engr; ep; ep = ep->nxt_engr) {
1610 *size += (long) sizeof *ep + (long) ep->engr_lth;
1616 register struct engr *ep;
1618 if (ep == head_engr) {
1619 head_engr = ep->nxt_engr;
1621 register struct engr *ept;
1623 for (ept = head_engr; ept; ept = ept->nxt_engr)
1624 if (ept->nxt_engr == ep) {
1625 ept->nxt_engr = ep->nxt_engr;
1629 impossible("Error in del_engr?");
1636 /* randomly relocate an engraving */
1641 int tx, ty, tryct = 200;
1646 tx = rn1(COLNO - 3, 2);
1648 } while (engr_at(tx, ty) || !goodpos(tx, ty, (struct monst *) 0, 0));
1654 /* Create a headstone at the given location.
1655 * The caller is responsible for newsym(x, y).
1658 make_grave(x, y, str)
1664 /* Can we put a grave here? */
1665 if ((levl[x][y].typ != ROOM && levl[x][y].typ != GRAVE) || t_at(x, y))
1667 /* Make the grave */
1668 levl[x][y].typ = GRAVE;
1669 /* Engrave the headstone */
1672 str = get_rnd_text(EPITAPHFILE, buf);
1673 make_engr_at(x, y, str, 0L, HEADSTONE);