]> granicus.if.org Git - nethack/commit
artifact fruit
authorPatR <rankin@nethack.org>
Thu, 25 Nov 2021 01:17:40 +0000 (17:17 -0800)
committerPatR <rankin@nethack.org>
Thu, 25 Nov 2021 01:17:40 +0000 (17:17 -0800)
commit01b2bcff756ddd679b3e70a23ce51935cb4b74c8
tree00acf0ffaab7cfc270bac6edf3a8b550561d4983
parent341d1dff13aa0159866283823907cd62f18c02b1
artifact fruit

Reported by entrez:  when fruit name is given the name of an artifact
that doesn't use "the" at the start of its name, messages about the
artifact could be altered.  Example was fruit=Excalibur causing usual
 |You are blased by Excalibur's power!
to unintentionally change to
 |You are blased by the Excalibur's power!
because of a false match during special handling for named fruit in
function the().

This fixes that, and also changes basic inventory formatting.  Former
 |f - an Excalibur
will now be
 |f - Excalibur
for a fruit that has been assigned that name.  When sort pack in On,
as it is by default, that will be listed under Comestibles rather than
under Weapons so really shouldn't fool anyone.  And
 |f - 2 Excaliburs
also breaks the illusion.

This formatting change only affects named fruits.  User assigned names
for object types or for individual objects behave the same as before.
doc/fixes37.0
src/artifact.c
src/objnam.c