empty horn of plenty

Format a horn of plenty whose charge count is unknown but is known to
be empty as "empty horn of plenty" like is done for real containers.

This was too easy; I must have missed something....
This commit is contained in:
PatR
2022-09-15 14:14:12 -07:00
parent 5b0f4a2e6d
commit aa8f73c890
3 changed files with 27 additions and 7 deletions

View File

@@ -121,10 +121,22 @@ struct obj {
Bitfield(in_use, 1); /* for magic items before useup items */
Bitfield(bypass, 1); /* mark this as an object to be skipped by bhito() */
Bitfield(cknown, 1); /* for containers (including statues): the contents
* are known; also applicable to tins */
Bitfield(lknown, 1); /* locked/unlocked status is known */
* are known; also applicable to tins; also applies
* to horn of plenty but only for empty/non-empty */
Bitfield(lknown, 1); /* locked/unlocked status is known; assigned for bags
* and for horn of plenty (when tipping) even though
* they have no locks */
Bitfield(pickup_prev, 1); /* was picked up previously */
#if 0
/* 3 free bits */
#else
/* not implemented */
Bitfield(tknown, 1); /* trap status known for chests */
Bitfield(eknown, 1); /* effect known for wands zapped or rings worn when
* not seen yet after being picked up while blind
* [maybe for remaining stack of used potion too] */
/* 1 free bit */
#endif
int corpsenm; /* type of corpse is mons[corpsenm] */
#define leashmon corpsenm /* gets m_id of attached pet */