X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fdungeon.c;h=700ede6da105ccfacfac8908af4dceb60793b188;hb=00445cb625f1cb35d1b0146d382f32c215da53cf;hp=45bbf3032949ba422a02e76feba07071ded2901f;hpb=403daa16e469de3549d96781bbe10b6d258615fd;p=jnethack%2Fsource.git diff --git a/src/dungeon.c b/src/dungeon.c index 45bbf30..700ede6 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1,5 +1,6 @@ -/* NetHack 3.6 dungeon.c $NHDT-Date: 1448862377 2015/11/30 05:46:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.69 $ */ +/* NetHack 3.6 dungeon.c $NHDT-Date: 1523308357 2018/04/09 21:12:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.87 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ +/*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" @@ -57,11 +58,13 @@ STATIC_DCL boolean FDECL(unreachable_level, (d_level *, BOOLEAN_P)); STATIC_DCL void FDECL(tport_menu, (winid, char *, struct lchoice *, d_level *, BOOLEAN_P)); STATIC_DCL const char *FDECL(br_string, (int)); +STATIC_DCL char FDECL(chr_u_on_lvl, (d_level *)); STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); STATIC_DCL mapseen *FDECL(load_mapseen, (int)); STATIC_DCL void FDECL(save_mapseen, (int, mapseen *)); STATIC_DCL mapseen *FDECL(find_mapseen, (d_level *)); +STATIC_DCL mapseen *FDECL(find_mapseen_by_str, (const char *)); STATIC_DCL void FDECL(print_mapseen, (winid, mapseen *, int, int, BOOLEAN_P)); STATIC_DCL boolean FDECL(interest_mapseen, (mapseen *)); STATIC_DCL void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid, @@ -246,7 +249,7 @@ dlb *stream; panic( "Premature EOF on dungeon description file!\r\nExpected %d bytes - got %d.", (size * nitems), (size * cnt)); - terminate(EXIT_FAILURE); + nh_terminate(EXIT_FAILURE); } } @@ -490,6 +493,7 @@ struct proto_dungeon *pd; branch_num = find_branch(dungeons[dgn].dname, pd); new_branch = (branch *) alloc(sizeof(branch)); + (void) memset((genericptr_t)new_branch, 0, sizeof(branch)); new_branch->next = (branch *) 0; new_branch->id = branch_id++; new_branch->type = correct_branch_type(&pd->tmpbranch[branch_num]); @@ -545,6 +549,7 @@ struct proto_dungeon *pd; pd->final_lev[proto_index] = new_level = (s_level *) alloc(sizeof(s_level)); + (void) memset((genericptr_t)new_level, 0, sizeof(s_level)); /* load new level with data */ Strcpy(new_level->proto, tlevel->name); new_level->boneid = tlevel->boneschar; @@ -852,7 +857,7 @@ init_dungeons() * its branch. First, the depth of the entry point: * * depth of branch from "parent" dungeon - * + -1 or 1 depending on a up or down stair or + * + -1 or 1 depending on an up or down stair or * 0 if portal * * Followed by the depth of the top of the dungeon: @@ -974,7 +979,7 @@ init_dungeons() instead of 0, so adjust the start point to shift endgame up */ if (dunlevs_in_dungeon(&x->dlevel) > 1 - dungeons[i].depth_start) dungeons[i].depth_start -= 1; - /* TO DO: strip "dummy" out all the way here, + /* TODO: strip "dummy" out all the way here, so that it's hidden from feedback. */ } @@ -1228,16 +1233,16 @@ int upflag; destination instead of its enclosing region. Note: up vs down doesn't matter in this case because both specify the same exclusion area. */ - place_lregion(dndest.nlx, dndest.nly, dndest.nhx, dndest.nhy, 0, 0, 0, - 0, LR_DOWNTELE, (d_level *) 0); + place_lregion(dndest.nlx, dndest.nly, dndest.nhx, dndest.nhy, + 0, 0, 0, 0, LR_DOWNTELE, (d_level *) 0); else if (up) - place_lregion(updest.lx, updest.ly, updest.hx, updest.hy, updest.nlx, - updest.nly, updest.nhx, updest.nhy, LR_UPTELE, - (d_level *) 0); + place_lregion(updest.lx, updest.ly, updest.hx, updest.hy, + updest.nlx, updest.nly, updest.nhx, updest.nhy, + LR_UPTELE, (d_level *) 0); else - place_lregion(dndest.lx, dndest.ly, dndest.hx, dndest.hy, dndest.nlx, - dndest.nly, dndest.nhx, dndest.nhy, LR_DOWNTELE, - (d_level *) 0); + place_lregion(dndest.lx, dndest.ly, dndest.hx, dndest.hy, + dndest.nlx, dndest.nly, dndest.nhx, dndest.nhy, + LR_DOWNTELE, (d_level *) 0); } /* place you on the special staircase */ @@ -1616,6 +1621,25 @@ level_difficulty() * The same applies to Vlad's Tower, although the increment * there is inconsequential compared to overall depth. */ +#if 0 + /* + * The inside of the Wizard's Tower is also effectively a + * builds-up area, reached from a portal an arbitrary distance + * below rather than stairs 1 level beneath the entry level. + */ + else if (On_W_tower_level(&u.uz) && In_W_tower(some_X, some_Y, &u.uz)) + res += (fakewiz1.dlev - u.uz.dlev); + /* + * Handling this properly would need more information here: + * an inside/outside flag, or coordinates to calculate it. + * Unfortunately level difficulty may be wanted before + * coordinates have been chosen so simply extending this + * routine to take extra arguments is not sufficient to cope. + * The difference beyond naive depth-from-surface is small + * relative to the overall depth, so just ignore complications + * posed by W_tower. + */ +#endif /*0*/ } return (xchar) res; } @@ -1628,30 +1652,42 @@ lev_by_name(nam) const char *nam; { schar lev = 0; - s_level *slev; + s_level *slev = (s_level *)0; d_level dlev; const char *p; int idx, idxtoo; char buf[BUFSZ]; + mapseen *mseen; - /* allow strings like "the oracle level" to find "oracle" */ - if (!strncmpi(nam, "the ", 4)) - nam += 4; - if ((p = strstri(nam, " level")) != 0 && p == eos((char *) nam) - 6) { - nam = strcpy(buf, nam); - *(eos(buf) - 6) = '\0'; - } - /* hell is the old name, and wouldn't match; gehennom would match its - branch, yielding the castle level instead of the valley of the dead */ - if (!strcmpi(nam, "gehennom") || !strcmpi(nam, "hell")) { - if (In_V_tower(&u.uz)) - nam = " to Vlad's tower"; /* branch to... */ - else - nam = "valley"; + /* look at the player's custom level annotations first */ + if ((mseen = find_mapseen_by_str(nam)) != 0) { + dlev = mseen->lev; + } else { + /* no matching annotation, check whether they used a name we know */ + +#if 0 /*JP*//*“ú–{Œê‚ł͏ˆ—‚µ‚È‚¢*/ + /* allow strings like "the oracle level" to find "oracle" */ + if (!strncmpi(nam, "the ", 4)) + nam += 4; + if ((p = strstri(nam, " level")) != 0 && p == eos((char *) nam) - 6) { + nam = strcpy(buf, nam); + *(eos(buf) - 6) = '\0'; + } + /* hell is the old name, and wouldn't match; gehennom would match its + branch, yielding the castle level instead of the valley of the dead */ + if (!strcmpi(nam, "gehennom") || !strcmpi(nam, "hell")) { + if (In_V_tower(&u.uz)) + nam = " to Vlad's tower"; /* branch to... */ + else + nam = "valley"; + } +#endif + + if ((slev = find_level(nam)) != 0) + dlev = slev->dlevel; } - if ((slev = find_level(nam)) != 0) { - dlev = slev->dlevel; + if (mseen || slev) { idx = ledger_no(&dlev); if ((dlev.dnum == u.uz.dnum /* within same branch, or else main dungeon <-> gehennom */ @@ -1663,7 +1699,7 @@ const char *nam; wizard || (level_info[idx].flags & (FORGOTTEN | VISITED)) == VISITED)) { - lev = depth(&slev->dlevel); + lev = depth(&dlev); } } else { /* not a specific level; try branch names */ idx = find_branch(nam, (struct proto_dungeon *) 0); @@ -1763,15 +1799,37 @@ int type; { switch (type) { case BR_PORTAL: +/*JP return "Portal"; +*/ + return "–‚–@‚Ì“ü‚èŒû"; case BR_NO_END1: +/*JP return "Connection"; +*/ + return "Ú‘±•”"; case BR_NO_END2: +/*JP return "One way stair"; +*/ + return "ˆê•û’ʍs‚ÌŠK’i"; case BR_STAIR: +/*JP return "Stair"; +*/ + return "ŠK’i"; } +/*JP return " (unknown)"; +*/ + return " (•s–¾)"; +} + +STATIC_OVL char +chr_u_on_lvl(dlev) +d_level *dlev; +{ + return u.uz.dnum == dlev->dnum && u.uz.dlevel == dlev->dlevel ? '*' : ' '; } /* Print all child branches between the lower and upper bounds. */ @@ -1791,8 +1849,17 @@ struct lchoice *lchoices_p; for (br = branches; br; br = br->next) { if (br->end1.dnum == dnum && lower_bound < br->end1.dlevel && br->end1.dlevel <= upper_bound) { - Sprintf(buf, " %s to %s: %d", br_string(br->type), +#if 0 /*JP*/ + Sprintf(buf, "%c %s to %s: %d", + bymenu ? chr_u_on_lvl(&br->end1) : ' ', + br_string(br->type), + dungeons[br->end2.dnum].dname, depth(&br->end1)); +#else + Sprintf(buf, "%c %s‚©‚ç%s: %d", + bymenu ? chr_u_on_lvl(&br->end1) : ' ', + br_string(br->type), dungeons[br->end2.dnum].dname, depth(&br->end1)); +#endif if (bymenu) tport_menu(win, buf, lchoices_p, &br->end1, unreachable_level(&br->end1, FALSE)); @@ -1818,8 +1885,8 @@ xchar *rdgn; branch *br; anything any; struct lchoice lchoices; - winid win = create_nhwindow(NHW_MENU); + if (bymenu) { start_menu(win); lchoices.idx = 0; @@ -1830,21 +1897,37 @@ xchar *rdgn; if (bymenu && In_endgame(&u.uz) && i != astral_level.dnum) continue; unplaced = unplaced_floater(dptr); +/*JP descr = unplaced ? "depth" : "level"; +*/ + descr = unplaced ? "’n‰º" : "ƒŒƒxƒ‹"; nlev = dptr->num_dunlevs; if (nlev > 1) +#if 0 /*JP*/ Sprintf(buf, "%s: %s %d to %d", dptr->dname, makeplural(descr), dptr->depth_start, dptr->depth_start + nlev - 1); +#else + Sprintf(buf, "%s: %s%d‚©‚ç%d", dptr->dname, descr, + dptr->depth_start, dptr->depth_start + nlev - 1); +#endif else Sprintf(buf, "%s: %s %d", dptr->dname, descr, dptr->depth_start); /* Most entrances are uninteresting. */ if (dptr->entry_lev != 1) { if (dptr->entry_lev == nlev) +/*JP Strcat(buf, ", entrance from below"); +*/ + Strcat(buf, ", ‰º‚©‚ç‚Ì“ü‚èŒû"); else +#if 0 /*JP*/ Sprintf(eos(buf), ", entrance on %d", dptr->depth_start + dptr->entry_lev - 1); +#else + Sprintf(eos(buf), ", %d‚Ì“ü‚èŒû", + dptr->depth_start + dptr->entry_lev - 1); +#endif } if (bymenu) { any = zeroany; @@ -1865,7 +1948,9 @@ xchar *rdgn; print_branch(win, i, last_level, slev->dlevel.dlevel, bymenu, &lchoices); - Sprintf(buf, " %s: %d", slev->proto, depth(&slev->dlevel)); + Sprintf(buf, "%c %s: %d", + chr_u_on_lvl(&slev->dlevel), + slev->proto, depth(&slev->dlevel)); if (Is_stronghold(&slev->dlevel)) Sprintf(eos(buf), " (tune %s)", tune); if (bymenu) @@ -1885,7 +1970,10 @@ xchar *rdgn; menu_item *selected; int idx; +/*JP end_menu(win, "Level teleport to where:"); +*/ + end_menu(win, "‚Ç‚±‚ɏuŠÔˆÚ“®‚·‚éF"); n = select_menu(win, PICK_ONE, &selected); destroy_nhwindow(win); if (n > 0) { @@ -1905,11 +1993,19 @@ xchar *rdgn; if (br->end1.dnum == n_dgns) { if (first) { putstr(win, 0, ""); +/*JP putstr(win, 0, "Floating branches"); +*/ + putstr(win, 0, "•‚“®•ªŠò"); first = FALSE; } +#if 0 /*JP*/ Sprintf(buf, " %s to %s", br_string(br->type), dungeons[br->end2.dnum].dname); +#else + Sprintf(buf, " %s‚©‚ç%s", br_string(br->type), + dungeons[br->end2.dnum].dname); +#endif putstr(win, 0, buf); } } @@ -1917,29 +2013,50 @@ xchar *rdgn; /* I hate searching for the invocation pos while debugging. -dean */ if (Invocation_lev(&u.uz)) { putstr(win, 0, ""); +#if 0 /*JP*/ Sprintf(buf, "Invocation position @ (%d,%d), hero @ (%d,%d)", inv_pos.x, inv_pos.y, u.ux, u.uy); +#else + Sprintf(buf, "”­“®ˆÊ’u @ (%d,%d), ƒvƒŒƒCƒ„[ @ (%d,%d)", + inv_pos.x, inv_pos.y, u.ux, u.uy); +#endif putstr(win, 0, buf); - } - /* - * The following is based on the assumption that the inter-level portals - * created by the level compiler (not the dungeon compiler) only exist - * one per level (currently true, of course). - */ - else if (Is_earthlevel(&u.uz) || Is_waterlevel(&u.uz) - || Is_firelevel(&u.uz) || Is_airlevel(&u.uz)) { + } else { struct trap *trap; + + /* if current level has a magic portal, report its location; + this assumes that there is at most one magic portal on any + given level; quest and ft.ludios have pairs (one in main + dungeon matched with one in the corresponding branch), the + elemental planes have singletons (connection to next plane) */ + *buf = '\0'; for (trap = ftrap; trap; trap = trap->ntrap) if (trap->ttyp == MAGIC_PORTAL) break; - putstr(win, 0, ""); if (trap) - Sprintf(buf, "Portal @ (%d,%d), hero @ (%d,%d)", trap->tx, - trap->ty, u.ux, u.uy); - else - Sprintf(buf, "No portal found."); - putstr(win, 0, buf); + Sprintf(buf, "Portal @ (%d,%d), hero @ (%d,%d)", + trap->tx, trap->ty, u.ux, u.uy); + + /* only report "no portal found" when actually expecting a portal */ +#if 0 /*JP*/ + else if (Is_earthlevel(&u.uz) || Is_waterlevel(&u.uz) + || Is_firelevel(&u.uz) || Is_airlevel(&u.uz) + || Is_qstart(&u.uz) || at_dgn_entrance("The Quest") + || Is_knox(&u.uz)) +#else + else if (Is_earthlevel(&u.uz) || Is_waterlevel(&u.uz) + || Is_firelevel(&u.uz) || Is_airlevel(&u.uz) + || Is_qstart(&u.uz) || at_dgn_entrance("ƒNƒGƒXƒg") + || Is_knox(&u.uz)) +#endif + Strcpy(buf, "No portal found."); + + /* only give output if we found a portal or expected one and didn't */ + if (*buf) { + putstr(win, 0, ""); + putstr(win, 0, buf); + } } display_nhwindow(win, TRUE); @@ -2007,24 +2124,36 @@ donamelevel() if (!(mptr = find_mapseen(&u.uz))) return 0; + nbuf[0] = '\0'; +#ifdef EDIT_GETLIN + if (mptr->custom) { + (void) strncpy(nbuf, mptr->custom, BUFSZ); + nbuf[BUFSZ - 1] = '\0'; + } +#else if (mptr->custom) { char tmpbuf[BUFSZ]; + #if 0 /*JP*/ Sprintf(tmpbuf, "Replace annotation \"%.30s%s\" with?", mptr->custom, - strlen(mptr->custom) > 30 ? "..." : ""); - getlin(tmpbuf, nbuf); + (strlen(mptr->custom) > 30) ? "..." : ""); #else - Sprintf(tmpbuf, "Œ»Ý‚Ì–¼‘Ou%.30s%sv‚ð‰½‚É‘‚«Š·‚¦‚éH", mptr->custom, + Sprintf(tmpbuf, "Œ»Ý‚̃ƒ‚u%.30s%sv‚ð‰½‚É‘‚«Š·‚¦‚éH", mptr->custom, strlen(mptr->custom) > 30 ? "..." : ""); - getlin(tmpbuf, nbuf); #endif + getlin(tmpbuf, nbuf); } else +#endif /*JP getlin("What do you want to call this dungeon level?", nbuf); */ getlin("‚±‚ÌŠK‚ð‰½‚ÆŒÄ‚ÔH", nbuf); - if (index(nbuf, '\033')) + + /* empty input or ESC means don't add or change annotation; + space-only means discard current annotation without adding new one */ + if (!*nbuf || *nbuf == '\033') return 0; + /* strip leading and trailing spaces, compress out consecutive spaces */ (void) mungspaces(nbuf); /* discard old annotation, if any */ @@ -2033,7 +2162,8 @@ donamelevel() mptr->custom = (char *) 0; mptr->custom_lth = 0; } - /* add new annotation, unless it's empty or a single space */ + /* add new annotation, unless it's all spaces (which will be an + empty string after mungspaces() above) */ if (*nbuf && strcmp(nbuf, " ")) { mptr->custom = dupstr(nbuf); mptr->custom_lth = strlen(mptr->custom); @@ -2055,6 +2185,20 @@ d_level *lev; return mptr; } +STATIC_OVL mapseen * +find_mapseen_by_str(s) +const char *s; +{ + mapseen *mptr; + + for (mptr = mapseenchn; mptr; mptr = mptr->next) + if (mptr->custom && !strcmpi(s, mptr->custom)) + break; + + return mptr; +} + + void forget_mapseen(ledger_num) int ledger_num; @@ -2084,6 +2228,39 @@ int ledger_num; } } +void +rm_mapseen(ledger_num) +int ledger_num; +{ + mapseen *mptr, *mprev = (mapseen *)0; + struct cemetery *bp, *bpnext; + + for (mptr = mapseenchn; mptr; mprev = mptr, mptr = mptr->next) + if (dungeons[mptr->lev.dnum].ledger_start + mptr->lev.dlevel == ledger_num) + break; + + if (!mptr) + return; + + if (mptr->custom) + free((genericptr_t) mptr->custom); + + bp = mptr->final_resting_place; + while (bp) { + bpnext = bp->next; + free(bp); + bp = bpnext; + } + + if (mprev) { + mprev->next = mptr->next; + free(mptr); + } else { + mapseenchn = mptr->next; + free(mptr); + } +} + STATIC_OVL void save_mapseen(fd, mptr) int fd; @@ -2140,6 +2317,50 @@ int fd; return load; } +/* to support '#stats' wizard-mode command */ +void +overview_stats(win, statsfmt, total_count, total_size) +winid win; +const char *statsfmt; +long *total_count, *total_size; +{ + char buf[BUFSZ], hdrbuf[QBUFSZ]; + long ocount, osize, bcount, bsize, acount, asize; + struct cemetery *ce; + mapseen *mptr = find_mapseen(&u.uz); + + ocount = bcount = acount = osize = bsize = asize = 0L; + for (mptr = mapseenchn; mptr; mptr = mptr->next) { + ++ocount; + osize += (long) sizeof *mptr; + for (ce = mptr->final_resting_place; ce; ce = ce->next) { + ++bcount; + bsize += (long) sizeof *ce; + } + if (mptr->custom_lth) { + ++acount; + asize += (long) (mptr->custom_lth + 1); + } + } + + Sprintf(hdrbuf, "general, size %ld", (long) sizeof (mapseen)); + Sprintf(buf, statsfmt, hdrbuf, ocount, osize); + putstr(win, 0, buf); + if (bcount) { + Sprintf(hdrbuf, "cemetery, size %ld", + (long) sizeof (struct cemetery)); + Sprintf(buf, statsfmt, hdrbuf, bcount, bsize); + putstr(win, 0, buf); + } + if (acount) { + Sprintf(hdrbuf, "annotations, text"); + Sprintf(buf, statsfmt, hdrbuf, acount, asize); + putstr(win, 0, buf); + } + *total_count += ocount + bcount + acount; + *total_size += osize + bsize + asize; +} + /* Remove all mapseen objects for a particular dnum. * Useful during quest expulsion to remove quest levels. * [No longer deleted, just marked as unreachable. #overview will @@ -2445,6 +2666,9 @@ recalc_mapseen() /* An automatic annotation is added to the Castle and * to Fort Ludios once their structure's main entrance * has been seen (in person or via magic mapping). + * For the Fort, that entrance is just a secret door + * which will be converted into a regular one when + * located (or destroyed). * DOOR: possibly a lowered drawbridge's open portcullis; * DBWALL: a raised drawbridge's "closed door"; * DRAWBRIDGE_DOWN: the span provided by lowered bridge, @@ -2454,15 +2678,33 @@ recalc_mapseen() * the adjacent DBWALL has been seen. */ case DOOR: + if (Is_knox(&u.uz)) { + int ty, tx = x - 4; + + /* Throne is four columns left, either directly in + * line or one row higher or lower, and doesn't have + * to have been seen yet. + * ......|}}}. + * ..\...S}... + * ..\...S}... + * ......|}}}. + * For 3.6.0 and earlier, it was always in direct line: + * both throne and door on the lower of the two rows. + */ + for (ty = y - 1; ty <= y + 1; ++ty) + if (isok(tx, ty) && IS_THRONE(levl[tx][ty].typ)) { + mptr->flags.ludios = 1; + break; + } + break; + } if (is_drawbridge_wall(x, y) < 0) break; - /* else FALLTHRU */ + /*FALLTHRU*/ case DBWALL: case DRAWBRIDGE_DOWN: if (Is_stronghold(&u.uz)) mptr->flags.castle = 1, mptr->flags.castletune = 1; - else if (Is_knox(&u.uz)) - mptr->flags.ludios = 1; break; default: break; @@ -2621,11 +2863,7 @@ branch *br; */ return closed_portal ? "••ˆó‚³‚ꂽ–‚–@‚Ì“üŒû" : "–‚–@‚Ì“üŒû"; case BR_NO_END1: -#if 0 /*JP*/ return "Connection"; -#else - return "Ú‘±•”"; -#endif case BR_NO_END2: /*JP return br->end1_up ? "One way stairs up" : "One way stairs down"; @@ -2884,10 +3122,6 @@ boolean printdun; if (In_endgame(&mptr->lev)) Sprintf(buf, "%s%s:", TAB, endgamelevelname(tmpbuf, i)); else - /* FIXME: when this branch has only one level (Ft.Ludios), - * listing "Level 1:" for it might confuse inexperienced - * players into thinking there's more than one. - */ /*JP Sprintf(buf, "%sLevel %d:", TAB, i); */ @@ -2902,14 +3136,18 @@ boolean printdun; } /* [perhaps print custom annotation on its own line when it's long] */ if (mptr->custom) - Sprintf(eos(buf), " (%s)", mptr->custom); + Sprintf(eos(buf), " \"%s\"", mptr->custom); if (on_level(&u.uz, &mptr->lev)) #if 0 /*JP*/ Sprintf(eos(buf), " <- You %s here.", - (!final || (final == 1 && how == ASCENDED)) ? "are" : "were"); + (!final || (final == 1 && how == ASCENDED)) ? "are" + : (final == 1 && how == ESCAPED) ? "left from" + : "were"); #else - Sprintf(eos(buf), " <- ‚±‚±‚É%sD", - (!final || (final == 1 && how == ASCENDED)) ? "‚¢‚é" : "‚¢‚½"); + Sprintf(eos(buf), " <- ‚±‚±%sD", + (!final || (final == 1 && how == ASCENDED)) ? "‚É‚¢‚é" + : (final == 1 && how == ESCAPED) ? "‚©‚甲‚¯‚½" + : "‚É‚¢‚½"); #endif putstr(win, !final ? ATR_BOLD : 0, buf); @@ -3011,11 +3249,6 @@ boolean printdun; Sprintf(buf, "%sA primitive area.", PREFIX); */ Sprintf(buf, "%s’Pƒ‚È•”‰®D", PREFIX); - } else if (mptr->flags.quest_summons) { -/*JP - Sprintf(buf, "%sSummoned by %s.", PREFIX, ldrname()); -*/ - Sprintf(buf, "%s%s‚©‚çŒÄ‚яo‚³‚ꂽD", PREFIX, ldrname()); } else if (on_level(&mptr->lev, &qstart_level)) { #if 0 /*JP*/ Sprintf(buf, "%sHome%s.", PREFIX, @@ -3060,6 +3293,14 @@ boolean printdun; } if (*buf) putstr(win, 0, buf); + /* quest entrance is not mutually-exclusive with bigroom or rogue level */ + if (mptr->flags.quest_summons) { +/*JP + Sprintf(buf, "%sSummoned by %s.", PREFIX, ldrname()); +*/ + Sprintf(buf, "%s%s‚©‚çŒÄ‚яo‚³‚ꂽD", PREFIX, ldrname()); + putstr(win, 0, buf); + } /* print out branches */ if (mptr->br) { @@ -3101,7 +3342,7 @@ boolean printdun; if (died_here) { /* disclosure occurs before bones creation, so listing dead hero here doesn't give away whether bones are produced */ - formatkiller(tmpbuf, sizeof tmpbuf, how); + formatkiller(tmpbuf, sizeof tmpbuf, how, TRUE); #if 0 /*JP*/ /* rephrase a few death reasons to work with "you" */ (void) strsubst(tmpbuf, " himself", " yourself");