Guest User

NetHack artifact sacrifice patch

a guest
Aug 5th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.54 KB | None | 0 0
  1. diff --git i/include/extern.h w/include/extern.h
  2. index b6f4825..69d2865 100644
  3. --- i/include/extern.h
  4. +++ w/include/extern.h
  5. @@ -60,8 +60,8 @@ E void FDECL(restore_artifacts, (int));
  6.  E const char *FDECL(artiname, (int));
  7.  E struct obj *FDECL(mk_artifact, (struct obj *, ALIGNTYP_P));
  8.  E const char *FDECL(artifact_name, (const char *, short *));
  9. -E boolean FDECL(exist_artifact, (int, const char *));
  10. -E void FDECL(artifact_exists, (struct obj *, const char *, BOOLEAN_P));
  11. +E int FDECL(exist_artifact, (int, const char *));
  12. +E void FDECL(artifact_exists, (struct obj *, const char *, int));
  13.  E int NDECL(nartifact_exist);
  14.  E boolean FDECL(arti_immune, (struct obj *, int));
  15.  E boolean FDECL(spec_ability, (struct obj *, unsigned long));
  16. @@ -402,7 +402,7 @@ E void FDECL(new_oname, (struct obj *, int));
  17.  E void FDECL(free_oname, (struct obj *));
  18.  E const char *FDECL(safe_oname, (struct obj *));
  19.  E struct monst *FDECL(christen_monst, (struct monst *, const char *));
  20. -E struct obj *FDECL(oname, (struct obj *, const char *));
  21. +E struct obj *FDECL(oname, (struct obj *, const char *, int));
  22.  E boolean FDECL(objtyp_is_callable, (int));
  23.  E int NDECL(docallcmd);
  24.  E void FDECL(docall, (struct obj *));
  25. diff --git i/include/hack.h w/include/hack.h
  26. index af35c2c..311ced8 100644
  27. --- i/include/hack.h
  28. +++ w/include/hack.h
  29. @@ -418,6 +418,26 @@ enum bodypart_types {
  30.  #define BALL_IN_MON (u.uswallow && uball && uball->where == OBJ_FREE)
  31.  #define NODIAG(monnum) ((monnum) == PM_GRID_BUG)
  32.  
  33. +/* Flags to track artifact generation */
  34. +enum artifact_background {
  35. +    ARTIFROM_GONE = -1,
  36. +    ARTIFROM_NONE = 0,
  37. +    ARTIFROM_FOUND,
  38. +    ARTIFROM_NAMED,
  39. +    ARTIFROM_BONES,
  40. +    ARTIFROM_GIFTED_CHAOTIC,
  41. +    ARTIFROM_GIFTED_NEUTRAL,
  42. +    ARTIFROM_GIFTED_LAWFUL,
  43. +    ARTIFROM_WISHED
  44. +};
  45. +#define ARTIFROM_GIFTED(alignment) ((alignment == A_NONE) ? ARTIFROM_NONE \
  46. +                                    : ARTIFROM_GIFTED_NEUTRAL + sgn(alignment))
  47. +#define ARTIFROM_IS_GIFTED(bg) ((bg) == ARTIFROM_GIFTED_CHAOTIC \
  48. +                                || (bg) == ARTIFROM_GIFTED_NEUTRAL \
  49. +                                || (bg) == ARTIFROM_GIFTED_LAWFUL)
  50. +#define ARTIFROM_GIFTED_BY(bg) (ARTIFROM_IS_GIFTED(bg) \
  51. +                                ? (bg) - ARTIFROM_GIFTED_NEUTRAL : A_NONE)
  52. +
  53.  /* Flags to control menus */
  54.  #define MENUTYPELEN sizeof("traditional ")
  55.  #define MENU_TRADITIONAL 0
  56. diff --git i/src/artifact.c w/src/artifact.c
  57. index 2ef7dfa..330f36d 100644
  58. --- i/src/artifact.c
  59. +++ w/src/artifact.c
  60. @@ -43,8 +43,10 @@ STATIC_DCL int FDECL(count_surround_traps, (int, int));
  61.  /* coordinate effects from spec_dbon() with messages in artifact_hit() */
  62.  STATIC_OVL int spec_dbon_applies = 0;
  63.  
  64. -/* flags including which artifacts have already been created */
  65. -static boolean artiexist[1 + NROFARTIFACTS + 1];
  66. +/* flags including which artifacts have already been created
  67. + * used to be boolean, now is an enum; but declared as schar
  68. + * to hopefully preserve savefile compatibility as much as possible */
  69. +static schar artiexist[1 + NROFARTIFACTS + 1];
  70.  /* and a discovery list for them (no dummy first entry here) */
  71.  STATIC_OVL xchar artidisco[NROFARTIFACTS];
  72.  
  73. @@ -194,11 +196,9 @@ aligntyp alignment; /* target alignment, or A_NONE */
  74.          if (by_align)
  75.              otmp = mksobj((int) a->otyp, TRUE, FALSE);
  76.  
  77. -        if (otmp) {
  78. -            otmp = oname(otmp, a->name);
  79. -            otmp->oartifact = m;
  80. -            artiexist[m] = TRUE;
  81. -        }
  82. +        if (otmp)
  83. +            otmp = oname(otmp, a->name, by_align ? ARTIFROM_GIFTED(alignment)
  84. +                                                 : ARTIFROM_FOUND);
  85.      } else {
  86.          /* nothing appropriate could be found; return original object */
  87.          if (by_align)
  88. @@ -238,26 +238,26 @@ short *otyp;
  89.      return (char *) 0;
  90.  }
  91.  
  92. -boolean
  93. +int
  94.  exist_artifact(otyp, name)
  95.  int otyp;
  96.  const char *name;
  97.  {
  98.      register const struct artifact *a;
  99. -    boolean *arex;
  100. +    schar *arex;
  101.  
  102.      if (otyp && *name)
  103.          for (a = artilist + 1, arex = artiexist + 1; a->otyp; a++, arex++)
  104.              if ((int) a->otyp == otyp && !strcmp(a->name, name))
  105. -                return *arex;
  106. -    return FALSE;
  107. +                return (int) *arex;
  108. +    return ARTIFROM_NONE;
  109.  }
  110.  
  111.  void
  112.  artifact_exists(otmp, name, mod)
  113.  struct obj *otmp;
  114.  const char *name;
  115. -boolean mod;
  116. +int mod;
  117.  {
  118.      register const struct artifact *a;
  119.  
  120. @@ -265,7 +265,7 @@ boolean mod;
  121.          for (a = artilist + 1; a->otyp; a++)
  122.              if (a->otyp == otmp->otyp && !strcmp(a->name, name)) {
  123.                  register int m = (int) (a - artilist);
  124. -                otmp->oartifact = (char) (mod ? m : 0);
  125. +                otmp->oartifact = (char) (mod > 0 ? m : 0);
  126.                  otmp->age = 0;
  127.                  if (otmp->otyp == RIN_INCREASE_DAMAGE)
  128.                      otmp->spe = 0;
  129. @@ -282,7 +282,7 @@ nartifact_exist()
  130.      int n = SIZE(artiexist);
  131.  
  132.      while (n > 1)
  133. -        if (artiexist[--n])
  134. +        if (artiexist[--n] > 0)
  135.              a++;
  136.  
  137.      return a;
  138. diff --git i/src/bones.c w/src/bones.c
  139. index 33f5f2c..dcee878 100644
  140. --- i/src/bones.c
  141. +++ w/src/bones.c
  142. @@ -80,7 +80,7 @@ boolean restore;
  143.                      if (has_oname(otmp))
  144.                          free_oname(otmp);
  145.                  } else {
  146. -                    artifact_exists(otmp, safe_oname(otmp), TRUE);
  147. +                    artifact_exists(otmp, safe_oname(otmp), ARTIFROM_BONES);
  148.                  }
  149.              } else if (has_oname(otmp)) {
  150.                  sanitize_name(ONAME(otmp));
  151. diff --git i/src/do_name.c w/src/do_name.c
  152. index e4a8741..54ff4bf 100644
  153. --- i/src/do_name.c
  154. +++ w/src/do_name.c
  155. @@ -1177,8 +1177,6 @@ do_mname()
  156.          (void) christen_monst(mtmp, buf);
  157.  }
  158.  
  159. -STATIC_VAR int via_naming = 0;
  160. -
  161.  /*
  162.   * This routine used to change the address of 'obj' so be unsafe if not
  163.   * used with extreme care.  Applying a name to an object no longer
  164. @@ -1250,15 +1248,14 @@ register struct obj *obj;
  165.             a valid artifact name */
  166.          u.uconduct.literate++;
  167.      }
  168. -    ++via_naming; /* This ought to be an argument rather than a static... */
  169. -    obj = oname(obj, buf);
  170. -    --via_naming; /* ...but oname() is used in a lot of places, so defer. */
  171. +    obj = oname(obj, buf, ARTIFROM_NAMED);
  172.  }
  173.  
  174.  struct obj *
  175. -oname(obj, name)
  176. +oname(obj, name, how)
  177.  struct obj *obj;
  178.  const char *name;
  179. +int how;
  180.  {
  181.      int lth;
  182.      char buf[PL_PSIZ];
  183. @@ -1280,8 +1277,8 @@ const char *name;
  184.      if (lth)
  185.          Strcpy(ONAME(obj), name);
  186.  
  187. -    if (lth)
  188. -        artifact_exists(obj, name, TRUE);
  189. +    if (lth && how > 0)
  190. +        artifact_exists(obj, name, how);
  191.      if (obj->oartifact) {
  192.          /* can't dual-wield with artifact as secondary weapon */
  193.          if (obj == uswapwep)
  194. @@ -1292,7 +1289,7 @@ const char *name;
  195.          /* if obj is owned by a shop, increase your bill */
  196.          if (obj->unpaid)
  197.              alter_cost(obj, 0L);
  198. -        if (via_naming) {
  199. +        if (how == ARTIFROM_NAMED) {
  200.              /* violate illiteracy conduct since successfully wrote arti-name */
  201.              u.uconduct.literate++;
  202.          }
  203. diff --git i/src/eat.c w/src/eat.c
  204. index 79fd56d..e0b25be 100644
  205. --- i/src/eat.c
  206. +++ w/src/eat.c
  207. @@ -58,8 +58,6 @@ char msgbuf[BUFSZ];
  208.      ((otyp) == LEMBAS_WAFER || (otyp) == CRAM_RATION)
  209.  
  210.  STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 };
  211. -STATIC_OVL NEARDATA const char offerfodder[] = { FOOD_CLASS, AMULET_CLASS,
  212. -                                                 0 };
  213.  
  214.  /* Gold must come first for getobj(). */
  215.  STATIC_OVL NEARDATA const char allobj[] = {
  216. @@ -3140,9 +3138,10 @@ skipfloor:
  217.      /* We cannot use ALL_CLASSES since that causes getobj() to skip its
  218.       * "ugly checks" and we need to check for inedible items.
  219.       */
  220. -    otmp = getobj(feeding ? allobj : offering ? offerfodder : comestibles,
  221. +    otmp = getobj(feeding || offering ? allobj : comestibles,
  222.                    verb);
  223. -    if (corpsecheck && otmp && !(offering && otmp->oclass == AMULET_CLASS))
  224. +    if (corpsecheck && otmp && !(offering && (otmp->oclass == AMULET_CLASS
  225. +                                              || otmp->oartifact)))
  226.          if (otmp->otyp != CORPSE || (corpsecheck == 2 && !tinnable(otmp))) {
  227.              You_cant("%s that!", verb);
  228.              return (struct obj *) 0;
  229. diff --git i/src/fountain.c w/src/fountain.c
  230. index 616d42b..2ea5983 100644
  231. --- i/src/fountain.c
  232. +++ w/src/fountain.c
  233. @@ -389,7 +389,7 @@ register struct obj *obj;
  234.              pline(
  235.                "From the murky depths, a hand reaches up to bless the sword.");
  236.              pline("As the hand retreats, the fountain disappears!");
  237. -            obj = oname(obj, artiname(ART_EXCALIBUR));
  238. +            obj = oname(obj, artiname(ART_EXCALIBUR), ARTIFROM_FOUND);
  239.              discover_artifact(ART_EXCALIBUR);
  240.              bless(obj);
  241.              obj->oeroded = obj->oeroded2 = 0;
  242. diff --git i/src/invent.c w/src/invent.c
  243. index 13951f1..50b98c5 100644
  244. --- i/src/invent.c
  245. +++ w/src/invent.c
  246. @@ -398,7 +398,7 @@ struct obj **potmp, **pobj;
  247.          else if (!Is_pudding(otmp))
  248.              otmp->owt += obj->owt;
  249.          if (!has_oname(otmp) && has_oname(obj))
  250. -            otmp = *potmp = oname(otmp, ONAME(obj));
  251. +            otmp = *potmp = oname(otmp, ONAME(obj), ARTIFROM_NONE);
  252.          obj_extract_self(obj);
  253.  
  254.          /* really should merge the timeouts */
  255. @@ -1189,7 +1189,7 @@ register const char *let, *word;
  256.               || (!strcmp(word, "eat") && !is_edible(otmp))
  257.               || (!strcmp(word, "sacrifice")
  258.                   && (otyp != CORPSE && otyp != AMULET_OF_YENDOR
  259. -                     && otyp != FAKE_AMULET_OF_YENDOR))
  260. +                     && otyp != FAKE_AMULET_OF_YENDOR && !otmp->oartifact))
  261.               || (!strcmp(word, "write with")
  262.                   && (otmp->oclass == TOOL_CLASS
  263.                       && otyp != MAGIC_MARKER && otyp != TOWEL))
  264. diff --git i/src/mail.c w/src/mail.c
  265. index 067dab0..f218411 100644
  266. --- i/src/mail.c
  267. +++ w/src/mail.c
  268. @@ -405,7 +405,7 @@ struct mail_info *info;
  269.          struct obj *obj = mksobj(SCR_MAIL, FALSE, FALSE);
  270.  
  271.          if (info->object_nam)
  272. -            obj = oname(obj, info->object_nam);
  273. +            obj = oname(obj, info->object_nam, ARTIFROM_NONE);
  274.          if (info->response_cmd)
  275.              new_omailcmd(obj, info->response_cmd);
  276.  
  277. diff --git i/src/makemon.c w/src/makemon.c
  278. index efca15e..54f8b07 100644
  279. --- i/src/makemon.c
  280. +++ w/src/makemon.c
  281. @@ -333,7 +333,8 @@ register struct monst *mtmp;
  282.              /* maybe make it special */
  283.              if (!rn2(20) || is_lord(ptr))
  284.                  otmp = oname(otmp,
  285. -                             artiname(rn2(2) ? ART_DEMONBANE : ART_SUNSWORD));
  286. +                             artiname(rn2(2) ? ART_DEMONBANE : ART_SUNSWORD),
  287. +                             ARTIFROM_FOUND);
  288.              bless(otmp);
  289.              otmp->oerodeproof = TRUE;
  290.              spe2 = rn2(4);
  291. diff --git i/src/mkobj.c w/src/mkobj.c
  292. index 1724cde..204eab6 100644
  293. --- i/src/mkobj.c
  294. +++ w/src/mkobj.c
  295. @@ -368,7 +368,7 @@ struct obj *obj2, *obj1;
  296.      if (!obj2->oextra)
  297.          obj2->oextra = newoextra();
  298.      if (has_oname(obj1))
  299. -        oname(obj2, ONAME(obj1));
  300. +        oname(obj2, ONAME(obj1), ARTIFROM_NONE);
  301.      if (has_omonst(obj1)) {
  302.          if (!OMONST(obj2))
  303.              newomonst(obj2);
  304. @@ -1061,7 +1061,7 @@ boolean artif;
  305.          break;
  306.      case SPE_NOVEL:
  307.          otmp->novelidx = -1; /* "none of the above"; will be changed */
  308. -        otmp = oname(otmp, noveltitle(&otmp->novelidx));
  309. +        otmp = oname(otmp, noveltitle(&otmp->novelidx), ARTIFROM_NONE);
  310.          break;
  311.      }
  312.  
  313. @@ -1641,7 +1641,7 @@ const char *nm;
  314.  
  315.      otmp = mkcorpstat(objtype, (struct monst *) 0, ptr, x, y, corpstatflags);
  316.      if (nm)
  317. -        otmp = oname(otmp, nm);
  318. +        otmp = oname(otmp, nm, ARTIFROM_NONE);
  319.      return otmp;
  320.  }
  321.  
  322. diff --git i/src/mon.c w/src/mon.c
  323. index b088460..766c859 100644
  324. --- i/src/mon.c
  325. +++ w/src/mon.c
  326. @@ -454,7 +454,7 @@ unsigned corpseflags;
  327.          bypass_obj(obj);
  328.  
  329.      if (has_mname(mtmp))
  330. -        obj = oname(obj, MNAME(mtmp));
  331. +        obj = oname(obj, MNAME(mtmp), ARTIFROM_NONE);
  332.  
  333.      /*  Avoid "It was hidden under a green mold corpse!"
  334.       *  during Blind combat. An unseen monster referred to as "it"
  335. @@ -2118,7 +2118,7 @@ struct monst *mdef;
  336.             item-conferred attributes */
  337.          otmp = mkcorpstat(STATUE, mdef, mdef->data, x, y, CORPSTAT_NONE);
  338.          if (has_mname(mdef))
  339. -            otmp = oname(otmp, MNAME(mdef));
  340. +            otmp = oname(otmp, MNAME(mdef), ARTIFROM_NONE);
  341.          while ((obj = oldminvent) != 0) {
  342.              oldminvent = obj->nobj;
  343.              (void) add_to_container(otmp, obj);
  344. diff --git i/src/objnam.c w/src/objnam.c
  345. index 12bba3c..4dac32e 100644
  346. --- i/src/objnam.c
  347. +++ w/src/objnam.c
  348. @@ -3871,7 +3871,7 @@ typfnd:
  349.                  name = novelname;
  350.          }
  351.  
  352. -        otmp = oname(otmp, name);
  353. +        otmp = oname(otmp, name, ARTIFROM_WISHED);
  354.          /* name==aname => wished for artifact (otmp->oartifact => got it) */
  355.          if (otmp->oartifact || name == aname) {
  356.              otmp->quan = 1L;
  357. @@ -3883,7 +3883,7 @@ typfnd:
  358.      /* and make them pay; charge them for the wish anyway! */
  359.      if ((is_quest_artifact(otmp)
  360.           || (otmp->oartifact && rn2(nartifact_exist()) > 1)) && !wizard) {
  361. -        artifact_exists(otmp, safe_oname(otmp), FALSE);
  362. +        artifact_exists(otmp, safe_oname(otmp), ARTIFROM_NONE);
  363.          obfree(otmp, (struct obj *) 0);
  364.          otmp = &zeroobj;
  365.          pline("For a moment, you feel %s in your %s, but it disappears!",
  366. diff --git i/src/pray.c w/src/pray.c
  367. index d0cb794..4ce265e 100644
  368. --- i/src/pray.c
  369. +++ w/src/pray.c
  370. @@ -813,7 +813,7 @@ gcrownu()
  371.          } else if (obj && obj->otyp == LONG_SWORD && !obj->oartifact) {
  372.              if (!Blind)
  373.                  Your("sword shines brightly for a moment.");
  374. -            obj = oname(obj, artiname(ART_EXCALIBUR));
  375. +            obj = oname(obj, artiname(ART_EXCALIBUR), ARTIFROM_GIFTED_LAWFUL);
  376.              if (obj && obj->oartifact == ART_EXCALIBUR)
  377.                  u.ugifts++;
  378.          }
  379. @@ -830,7 +830,7 @@ gcrownu()
  380.              obj->dknown = TRUE;
  381.          } else if (!already_exists) {
  382.              obj = mksobj(LONG_SWORD, FALSE, FALSE);
  383. -            obj = oname(obj, artiname(ART_VORPAL_BLADE));
  384. +            obj = oname(obj, artiname(ART_VORPAL_BLADE), ARTIFROM_GIFTED_NEUTRAL);
  385.              obj->spe = 1;
  386.              at_your_feet("A sword");
  387.              dropy(obj);
  388. @@ -852,7 +852,7 @@ gcrownu()
  389.              obj->dknown = TRUE;
  390.          } else if (!already_exists) {
  391.              obj = mksobj(RUNESWORD, FALSE, FALSE);
  392. -            obj = oname(obj, artiname(ART_STORMBRINGER));
  393. +            obj = oname(obj, artiname(ART_STORMBRINGER), ARTIFROM_GIFTED_CHAOTIC);
  394.              obj->spe = 1;
  395.              at_your_feet(An(swordbuf));
  396.              dropy(obj);
  397. @@ -1284,6 +1284,8 @@ register struct obj *otmp;
  398.      else
  399.          Your("sacrifice is consumed in a %s!",
  400.               u.ualign.type == A_LAWFUL ? "flash of light" : "burst of flame");
  401. +    if (otmp->oartifact)
  402. +        artifact_exists(otmp, safe_oname(otmp), ARTIFROM_GONE);
  403.      if (carried(otmp))
  404.          useup(otmp);
  405.      else
  406. @@ -1311,6 +1313,12 @@ dosacrifice()
  407.      otmp = floorfood("sacrifice", 1);
  408.      if (!otmp)
  409.          return 0;
  410. +    if (otmp->owornmask & (W_ARMOR | W_SADDLE))
  411. +      {
  412. +        You_cant("sacrifice %s you're wearing.", something);
  413. +        return 0;
  414. +      }
  415. +
  416.      /*
  417.       * Was based on nutritional value and aging behavior (< 50 moves).
  418.       * Sacrificing a food ration got you max luck instantly, making the
  419. @@ -1557,6 +1565,64 @@ dosacrifice()
  420.          }
  421.      } /* fake Amulet */
  422.  
  423. +    if (otmp->oartifact) {
  424. +        char buf[BUFSZ];
  425. +        /* just in case */
  426. +        if (objects[otmp->otyp].oc_unique && !u.uevent.invoked)
  427. +          {
  428. +            You("decide against that.");
  429. +            return 0;
  430. +          }
  431. +        sprintf(buf, "Are you sure you want to sacrifice your %s?",
  432. +                xname(otmp));
  433. +        if (yn(buf) != 'y')
  434. +            return 0;
  435. +
  436. +        int multiplier;
  437. +        int background = exist_artifact(otmp->otyp, safe_oname(otmp));
  438. +        switch (background) {
  439. +        case ARTIFROM_BONES:
  440. +            /* used condition */
  441. +            multiplier = 3;
  442. +            break;
  443. +        case ARTIFROM_NAMED:
  444. +            /* barely even an artifact */
  445. +            multiplier = 1;
  446. +            break;
  447. +        case ARTIFROM_GIFTED_CHAOTIC:
  448. +        case ARTIFROM_GIFTED_NEUTRAL:
  449. +        case ARTIFROM_GIFTED_LAWFUL:
  450. +            /* no regifts! */
  451. +            multiplier = 0;
  452. +            break;
  453. +        case ARTIFROM_WISHED:
  454. +        case ARTIFROM_FOUND:
  455. +        default:
  456. +            multiplier = 5;
  457. +            break;
  458. +        }
  459. +        value = arti_cost(otmp) * multiplier / 500;
  460. +
  461. +        if (ARTIFROM_IS_GIFTED(background))
  462. +            {
  463. +              boolean very_rude = background == ARTIFROM_GIFTED(altaralign);
  464. +            if ((very_rude || !rn2(4)))
  465. +              {
  466. +                You("have not used %s gift wisely...",
  467. +                    s_suffix(align_gname(ARTIFROM_GIFTED_BY(background))));
  468. +                (void) adjattrib(A_WIS, -rnd(3), 1);
  469. +                if (very_rude) value = -1;
  470. +              }
  471. +            else
  472. +                You_feel(Hallucination ? "in violation of a no-return policy."
  473. +                                       : "like a lowly pawnbroker.");
  474. +            }
  475. +
  476. +        /* artifacts are not 'proper' sacrifices so no converting etc. */
  477. +        if (altaralign != u.ualign.type && value > 0)
  478. +            value = 0;
  479. +    }
  480. +
  481.      if (value == 0) {
  482.          pline1(nothing_happens);
  483.          return 1;
  484. diff --git i/src/sp_lev.c w/src/sp_lev.c
  485. index a1b1f6d..d94907b 100644
  486. --- i/src/sp_lev.c
  487. +++ w/src/sp_lev.c
  488. @@ -1893,7 +1893,7 @@ struct mkroom *croom;
  489.      /* set_corpsenm() took care of egg hatch and corpse timers */
  490.  
  491.      if (named)
  492. -        otmp = oname(otmp, o->name.str);
  493. +        otmp = oname(otmp, o->name.str, ARTIFROM_FOUND);
  494.  
  495.      if (o->eroded) {
  496.          if (o->eroded < 0) {
  497. diff --git i/src/topten.c w/src/topten.c
  498. index fbe6573..ea399e1 100644
  499. --- i/src/topten.c
  500. +++ w/src/topten.c
  501. @@ -1231,7 +1231,7 @@ struct obj *otmp;
  502.          return (struct obj *) 0;
  503.  
  504.      set_corpsenm(otmp, classmon(tt->plrole, (tt->plgend[0] == 'F')));
  505. -    otmp = oname(otmp, tt->name);
  506. +    otmp = oname(otmp, tt->name, ARTIFROM_NONE);
  507.  
  508.      return otmp;
  509.  }
Add Comment
Please, Sign In to add comment