From 558216e0c5e34c7b7e4e1f441d5dbe5e3d38e21f Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 10 Apr 2019 17:22:18 -0400 Subject: [PATCH 1/5] Guidebook.tex corrections --- doc/Guidebook.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 2f9e17bb0..36ff94c78 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -4584,7 +4584,7 @@ Allowed colors are {\it black}, {\it red}, {\it green}, {\it brown}, {\it blue}, {\it magenta}, {\it cyan}, {\it gray}, {\it orange}, {\it light-green}, {\it yellow}, {\it light-blue}, {\it light-magenta}, {\it light-cyan}, and {\it white}. -And {\itno-color}, the default foreground color, which isn't necessarily +And {\it no-color}, the default foreground color, which isn't necessarily the same as any of the other colors. %.lp "" @@ -4675,9 +4675,9 @@ the hitpoints field to display in the color red if your hitpoints drop to or below a threshold of 30%:\\ \begin{verbatim} OPTION=hilite_status:hitpoints/<=30%/red/normal -\end{verbatim}\\ -(That example is actually specifying {\tt red\&normal} for <=30\% -and {\tt no-color\&normal} for >30\%.)\\ +\end{verbatim} +(That example is actually specifying {\tt red\&normal} for {\tt <=30\%} +and {\tt no-color\&normal} for {\tt >30\%}.)\\ For another example, the following line in your configuration file will cause wisdom to be displayed red if it drops and green if it rises:\\ From 86e5022293aaca4c54fe62d7087689faf13d0ed2 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Apr 2019 15:38:51 -0700 Subject: [PATCH 2/5] fix #H8534 - thrown pick-axe vs "scum!" Change in meaning of mnearto()'s return value wasn't progagated to shkcatch(). Make it an int instead of boolean so that it can communicate both 'moved successfully' and 'moved but had to move another monster out of the way to do so'. --- doc/fixes36.2 | 4 +++- include/extern.h | 4 ++-- src/mkmaze.c | 3 ++- src/mon.c | 35 ++++++++++++++++++----------------- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index f234f0776..b550c2a06 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.300 $ $NHDT-Date: 1554841009 2019/04/09 20:16:49 $ +$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.301 $ $NHDT-Date: 1555022325 2019/04/11 22:38:45 $ This fixes36.2 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.1 in April 2018. Please note, however, @@ -409,6 +409,8 @@ once a status highlight for a temporary rule ('up', 'down', 'changed') timed if a migrating long worm couldn't be placed, or some other monster was given an existing long worm's place and it couldn't be put somewhere else, a "trying to place monster at <0,0>" warning would occur +if hero throws a pick-axe into a shop and shopkeeper catches it, shk will say + "get out of my way, scum" even if there's no monster at pick-axe spot Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index ee4731ad3..ec4c6707d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1554857123 2019/04/10 00:45:23 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.700 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1555022327 2019/04/11 22:38:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.701 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1411,7 +1411,7 @@ E void FDECL(mon_to_stone, (struct monst *)); E void FDECL(m_into_limbo, (struct monst *)); E void FDECL(mnexto, (struct monst *)); E void FDECL(maybe_mnexto, (struct monst *)); -E boolean FDECL(mnearto, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P)); +E int FDECL(mnearto, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P)); E void FDECL(m_respond, (struct monst *)); E void FDECL(setmangry, (struct monst *, BOOLEAN_P)); E void FDECL(wakeup, (struct monst *, BOOLEAN_P)); diff --git a/src/mkmaze.c b/src/mkmaze.c index 863502baf..1b3959315 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkmaze.c $NHDT-Date: 1543185071 2018/11/25 22:31:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */ +/* NetHack 3.6 mkmaze.c $NHDT-Date: 1555022325 2019/04/11 22:38:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.68 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Pasi Kallinen, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1878,6 +1878,7 @@ boolean ini; case CONS_MON: { struct monst *mon = (struct monst *) cons->list; + (void) mnearto(mon, cons->x, cons->y, TRUE); break; } diff --git a/src/mon.c b/src/mon.c index d0a422f60..b3c1abaf3 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mon.c $NHDT-Date: 1554580625 2019/04/06 19:57:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.280 $ */ +/* NetHack 3.6 mon.c $NHDT-Date: 1555022326 2019/04/11 22:38:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.281 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2636,10 +2636,15 @@ struct monst *mtmp; /* mnearto() * Put monster near (or at) location if possible. * Returns: - * true if relocation was successful - * false otherwise + * 2 if another monster was moved out of this one's way; + * 1 if relocation was successful (without moving another one); + * 0 otherwise. + * Note: if already at the target spot, result is 1 rather than 0. + * + * Might be called recursively if 'move_other' is True; if so, that argument + * will be False on the nested call so there won't be any further recursion. */ -boolean +int mnearto(mtmp, x, y, move_other) register struct monst *mtmp; xchar x, y; @@ -2648,15 +2653,18 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */ struct monst *othermon = (struct monst *) 0; xchar newx, newy; coord mm; + int res = 1; if (mtmp->mx == x && mtmp->my == y && m_at(x, y) == mtmp) - return TRUE; + return res; if (move_other && (othermon = m_at(x, y)) != 0) { if (othermon->wormno) remove_worm(othermon); else remove_monster(x, y); + + othermon->mx = othermon->my = 0; /* 'othermon' is not on the map */ } newx = x; @@ -2667,28 +2675,21 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */ * no end of trouble. */ if (!enexto(&mm, newx, newy, mtmp->data)) - return FALSE; + return 0; if (!isok(mm.x, mm.y)) - return FALSE; + return 0; newx = mm.x; newy = mm.y; } rloc_to(mtmp, newx, newy); if (move_other && othermon) { - xchar oldx = othermon->mx, oldy = othermon->my; - - othermon->mx = othermon->my = 0; - (void) mnearto(othermon, x, y, FALSE); - if (othermon->mx == 0 && othermon->my == 0) { - /* reloc failed */ - othermon->mx = oldx; - othermon->my = oldy; + res = 2; /* moving another monster out of the way */ + if (!mnearto(othermon, x, y, FALSE)) /* no 'move_other' this time */ m_into_limbo(othermon); - } } - return TRUE; + return res; } /* monster responds to player action; not the same as a passive attack; From fa98c6fb72bcc53dc45e2b3d72e84e3e261a5f65 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 12 Apr 2019 01:33:42 -0700 Subject: [PATCH 3/5] fix #H8534 - thrown pick-axe vs "scum!" [I accidentally left this out of the earlier patch.] Change in meaning of mnearto()'s return value wasn't progagated to shkcatch(). Make it an int instead of boolean so that it can communicate both 'moved successfully' and 'moved but had to move another monster out of the way to do so'. --- src/shk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shk.c b/src/shk.c index ef5bc0206..649a84521 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1551738135 2019/03/04 22:22:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1555058014 2019/04/12 08:33:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3397,7 +3397,7 @@ register xchar x, y; && dist2(shkp->mx, shkp->my, x, y) < 3 /* if it is the shk's pos, you hit and anger him */ && (shkp->mx != x || shkp->my != y)) { - if (mnearto(shkp, x, y, TRUE) && !Deaf && !muteshk(shkp)) + if (mnearto(shkp, x, y, TRUE) == 2 && !Deaf && !muteshk(shkp)) verbalize("Out of my way, scum!"); if (cansee(x, y)) { pline("%s nimbly%s catches %s.", Shknam(shkp), From 5534eab5141e80d06082583148bb741c3021e45e Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 13 Apr 2019 15:57:16 -0700 Subject: [PATCH 4/5] probing fix For the inventory of a probed monster, if the probing took place in a shop the inventory display would have selling price appended to all the items. That wouldn't really be a problem if it was just for a pet who was carrying one shop item, but it applied to every item being carried by any probed monster (including shopkeeper) with no regard for whether the shop actually claimed ownership. --- doc/fixes36.2 | 4 +++- src/invent.c | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index b550c2a06..360e0de82 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.301 $ $NHDT-Date: 1555022325 2019/04/11 22:38:45 $ +$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.302 $ $NHDT-Date: 1555196229 2019/04/13 22:57:09 $ This fixes36.2 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.1 in April 2018. Please note, however, @@ -467,6 +467,8 @@ when engulfed while in a shop, dropping an item into the engulfer and then using ':' to look at current location could cause a crash when items were on the floor just inside a shop's door where the shopkeeper doesn't buy and sell stuff, those items showed a 'for sale' price +probing a monster inside a shop (including shopkeeper) showed 'for sale' + price for items in monster's minvent applying a container while inside a shop and initiating a put-in operation would show non-empty containers in inventory--including the one being applied--with "for sale" amounts for the prices of their contents diff --git a/src/invent.c b/src/invent.c index 3d502673f..ff69de77e 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1549075239 2019/02/02 02:40:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.252 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1555196229 2019/04/13 22:57:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.253 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4303,12 +4303,17 @@ char *title; * displaying 'weapon in claw', etc. properly. */ youmonst.data = mon->data; + /* in case inside a shop, don't append "for sale" prices */ + iflags.suppress_price++; n = query_objlist(title ? title : tmp, &(mon->minvent), (INVORDER_SORT | (incl_hero ? INCLUDE_HERO : 0)), &selected, pickings, do_all ? allow_all : worn_wield_only); - set_uasmon(); + + iflags.suppress_price--; + /* was 'set_uasmon();' but that potentially has side-effects */ + youmonst.data = &mons[u.umonnum]; /* most basic part of set_uasmon */ } else { invdisp_nothing(title ? title : tmp, "(none)"); n = 0; From 0776a864f193ac951e756a32ae87c6c8c1c93b16 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 13 Apr 2019 17:28:26 -0700 Subject: [PATCH 5/5] slightly better shop repair feedback During shop repair, give a message about the shopkeeper using a spell (if hero is close enough) before "Suddenly, ." And when shop repair is for a single untrap of landmine or bear trap adjacent to shk (and the hero can see it happen), say " untraps " rather than just "Suddenly, a trap is removed from the floor!" --- doc/fixes36.2 | 3 ++- include/extern.h | 5 ++-- src/restore.c | 4 +-- src/shk.c | 64 ++++++++++++++++++++++++++++++++++++------------ 4 files changed, 56 insertions(+), 20 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 360e0de82..dee7ce01d 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.302 $ $NHDT-Date: 1555196229 2019/04/13 22:57:09 $ +$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ $NHDT-Date: 1555201701 2019/04/14 00:28:21 $ This fixes36.2 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.1 in April 2018. Please note, however, @@ -685,6 +685,7 @@ include isaac64 for pseudo random number generation core prng and display prng use different contexts when healing magic other than unicorn horn cures blindness, cure deafness too do less status updating when the 'time' option is on +slightly more thorough feedback when shop damage is repaired in hero's presence curses: status display substantially revamped for both horizontal (via 'align_status:bottom' or 'top') and vertical (via 'align_status:left' or 'right'); 3-line horizontal layout (via 'statuslines:3') added diff --git a/include/extern.h b/include/extern.h index ec4c6707d..67f8e3ee1 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1555022327 2019/04/11 22:38:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.701 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1555201698 2019/04/14 00:28:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.702 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2247,7 +2247,8 @@ E void FDECL(sellobj, (struct obj *, XCHAR_P, XCHAR_P)); E int FDECL(doinvbill, (int)); E struct monst *FDECL(shkcatch, (struct obj *, XCHAR_P, XCHAR_P)); E void FDECL(add_damage, (XCHAR_P, XCHAR_P, long)); -E int FDECL(repair_damage, (struct monst *, struct damage *, BOOLEAN_P)); +E int FDECL(repair_damage, (struct monst *, struct damage *, int *, + BOOLEAN_P)); E int FDECL(shk_move, (struct monst *)); E void FDECL(after_shk_move, (struct monst *)); E boolean FDECL(is_fshk, (struct monst *)); diff --git a/src/restore.c b/src/restore.c index e9f25d72c..4f19ed878 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 restore.c $NHDT-Date: 1543972193 2018/12/05 01:09:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.128 $ */ +/* NetHack 3.6 restore.c $NHDT-Date: 1555201698 2019/04/14 00:28:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2009. */ /* NetHack may be freely redistributed. See license for details. */ @@ -192,7 +192,7 @@ boolean ghostly; struct monst *shkp = shop_keeper(*shp); if (shkp && inhishop(shkp) - && repair_damage(shkp, tmp_dam, TRUE)) + && repair_damage(shkp, tmp_dam, (int *) 0, TRUE)) break; } } diff --git a/src/shk.c b/src/shk.c index 649a84521..1817d9bec 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 shk.c $NHDT-Date: 1555058014 2019/04/12 08:33:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */ +/* NetHack 3.6 shk.c $NHDT-Date: 1555201699 2019/04/14 00:28:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.159 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3469,11 +3469,13 @@ struct monst *shkp; boolean croaked; { struct damage *tmp_dam, *tmp2_dam; + struct obj *shk_inv = shkp->minvent; boolean did_repair = FALSE, saw_door = FALSE, saw_floor = FALSE, - stop_picking = FALSE, doorway_trap = FALSE; - int saw_walls = 0, saw_untrap = 0; + stop_picking = FALSE, doorway_trap = FALSE, skip_msg = FALSE; + int saw_walls = 0, saw_untrap = 0, feedback; char trapmsg[BUFSZ]; + feedback = !croaked; /* 1 => give feedback, 0 => don't or already did */ tmp_dam = level.damagelist; tmp2_dam = 0; while (tmp_dam) { @@ -3491,12 +3493,12 @@ boolean croaked; if (croaked) { disposition = (shops[1]) ? 0 : 1; } else if (stop_picking) { - disposition = repair_damage(shkp, tmp_dam, FALSE); + disposition = repair_damage(shkp, tmp_dam, &feedback, FALSE); } else { /* Defer the stop_occupation() until after repair msgs */ if (closed_door(x, y)) stop_picking = picking_at(x, y); - disposition = repair_damage(shkp, tmp_dam, FALSE); + disposition = repair_damage(shkp, tmp_dam, &feedback, FALSE); if (!disposition) stop_picking = FALSE; } @@ -3539,7 +3541,16 @@ boolean croaked; if (!did_repair) return; - if (saw_untrap) { + trapmsg[0] = '\0'; /* not just lint suppression... */ + shk_inv = (shkp->minvent != shk_inv) ? shkp->minvent : 0; + if (saw_untrap == 1 && shk_inv + && (shk_inv->otyp == BEARTRAP || shk_inv->otyp == LAND_MINE) + && canseemon(shkp)) { + pline("%s untraps %s.", Shknam(shkp), ansimpleoname(shk_inv)); + /* we've already reported this trap (and know it's the only one) */ + saw_untrap = 0; + skip_msg = !(saw_walls || saw_door || saw_floor); + } else if (saw_untrap) { Sprintf(trapmsg, "%s trap%s", (saw_untrap > 3) ? "several" : (saw_untrap > 1) ? "some" : "a", @@ -3547,10 +3558,11 @@ boolean croaked; Sprintf(eos(trapmsg), " %s", vtense(trapmsg, "are")); Sprintf(eos(trapmsg), " removed from the %s", (doorway_trap && saw_untrap == 1) ? "doorway" : "floor"); - } else - trapmsg[0] = '\0'; /* not just lint suppression... */ + } - if (saw_walls) { + if (skip_msg) { + ; /* already gave an untrap message which covered the only repair */ + } else if (saw_walls) { char wallbuf[BUFSZ]; Sprintf(wallbuf, "section%s", plur(saw_walls)); @@ -3572,6 +3584,10 @@ boolean croaked; saw_floor ? "the floor damage is gone" : "", ((saw_door || saw_floor) && *trapmsg) ? " and " : "", trapmsg); + /* FIXME: + * these messages aren't right if the unseen repairs were only + * for trap removal (except for hole and possibly trap door). + */ else if (inside_shop(u.ux, u.uy) == ESHK(shkp)->shoproom) You_feel("more claustrophobic than before."); else if (!Deaf && !rn2(10)) @@ -3586,9 +3602,10 @@ boolean croaked; * 3: untrap */ int -repair_damage(shkp, tmp_dam, catchup) +repair_damage(shkp, tmp_dam, once, catchup) struct monst *shkp; struct damage *tmp_dam; +int *once; boolean catchup; /* restoring a level */ { xchar x, y; @@ -3607,13 +3624,30 @@ boolean catchup; /* restoring a level */ if (!IS_ROOM(tmp_dam->typ)) { if ((x == u.ux && y == u.uy && !Passes_walls) || (x == shkp->mx && y == shkp->my) - || ((mtmp = m_at(x, y)) && !passes_walls(mtmp->data))) + || ((mtmp = m_at(x, y)) != 0 && !passes_walls(mtmp->data))) return 0; } - if ((ttmp = t_at(x, y)) != 0) { - if (x == u.ux && y == u.uy && !Passes_walls) - return 0; - if (ttmp->ttyp == LANDMINE || ttmp->ttyp == BEAR_TRAP) { + ttmp = t_at(x, y); + if (ttmp && x == u.ux && y == u.uy && !Passes_walls) + return 0; + + if (once && *once) { + boolean shk_closeby = (distu(shkp->mx, shkp->my) + <= (BOLT_LIM / 2) * (BOLT_LIM / 2)); + + /* this is suboptimal if we eventually give a "shk untraps" + message for the only repair, but perhaps the shop repair + incantation means that shk's untrap attempt will never fail */ + if (canseemon(shkp)) + pline("%s whispers %s.", Shknam(shkp), + shk_closeby ? "an incantation" : "something"); + else if (!Deaf && shk_closeby) + You_hear("someone muttering an incantation."); + *once = 0; + } + if (ttmp) { + if ((ttmp->ttyp == LANDMINE || ttmp->ttyp == BEAR_TRAP) + && dist2(x, y, shkp->mx, shkp->my) <= 2) { /* convert to an object */ otmp = mksobj((ttmp->ttyp == LANDMINE) ? LAND_MINE : BEARTRAP, TRUE, FALSE);