Remove ANTI_ class flags and restrictions

This commit is contained in:
kinther 2025-12-30 12:37:32 -08:00
parent ee735d612b
commit dedc5b7def
6 changed files with 19 additions and 93 deletions

View file

@ -1020,21 +1020,17 @@ but has no substantive effect otherwise. The flags have the following values:
1) GLOW Item is glowing (cosmetic).
2) HUM Item is humming (cosmetic).
3) RESERVED Reserved (unused).
3) UNUSED Reserved (unused).
4) NODONATE Item cannot be donated.
5) NOINVIS Item cannot be made invisible.
6) INVISIBLE Item is invisible.
7) MAGIC Item has a magical aura and cannot be enchanted.
8) NODROP Item is cursed and cannot be removed or dropped.
9) BLESS Item is blessed (cosmetic).
10) RESERVED Not used.
11) RESERVED Not used.
12) RESERVED Not used.
13) ANTI_MAGIC_USER Item cannot be used by the Mage class.
14) ANTI_CLERIC Item cannot be used by the Cleric class.
15) ANTI_THIEF Item cannot be used by the Thief class.
16) ANTI_WARRIOR Item cannot be used by the Warrior class.
17) NOSELL Shopkeepers will not buy or sell the item.
10) NOSELL Shopkeepers will not buy or sell the item.
11) QUEST_ITEM Shopkeepers will only accept questpoints for this item.
12) HOOD_UP WORN item hood is currently up.
13) SKINNED Item/corpse can be skinned.
Wear Bitvector A bitvector (see section 2.4 on Using Bitvectors) with
the following values:

View file

@ -1418,15 +1418,6 @@ search for CLASS_UNDEFINEDand add a new CLASS_xxxdefinition for your class name
with the next available number. Remember to bump the value of NUM_CLASSES, just
below, by 1.
Then search structs.hfor "Extra object flags" so you can add an "ITEM_ANTI_xxx"
flag for your new class. As before, use the next available number in the sequence
for ITEM_xxx flags.
The "ITEM_xxx" extra flags have a corresponding text description in constants.c, so
search it for "ITEM_x (extra bits)". Add a string giving a short name for the new
ITEM_ANTI_xxx flag, in the appropriate order, before the "\n" entry near the
bottom.
The shops have a similar "dont trade" setup, so search shop.h for "TRADE_NOSORCEROR"
to add a new TRADE_NOxxx item to the list for the class to be added. Below that
(near "NOTRADE_SORCEROR"), a line will need to be added for each new class so the no

View file

@ -5793,36 +5793,17 @@ OEDIT-EXTRA-FLAGS OEDIT-FLAGS OBJECT-FLAGS OBJECTFLAGS GLOW HUM NODROP NO_DROP O
1) GLOW Item is glowing (cosmetic).
2) HUM Item is humming (cosmetic).
3) UNUSED Reserved (unused).
4) NODONATE Item cannot be donated.
5) NOINVIS Item cannot be made invisible.
6) INVISIBLE Item is invisible.
7) MAGIC Item has a magical aura and cannot be enchanted.
8) NODROP Item is cursed and cannot be removed or dropped.
9) BLESS Item is blessed (cosmetic).
10) RESERVED Not used.
11) RESERVED Not used.
12) RESERVED Not used.
13) ANTI_MAGIC_USER Item cannot be used by the Mage class.
14) ANTI_CLERIC Item cannot be used by the Cleric class.
15) ANTI_THIEF Item cannot be used by the Thief class.
16) ANTI_WARRIOR Item cannot be used by the Warrior class.
17) NOSELL Shopkeepers will not buy or sell the item.
18) QUEST_ITEM Shopkeepers will only accept questpoints for this item.
Always try to promote role-playing. The last thing you should do is have
Thieves running around wearing dangly bracelets making noise, Clerics and Mages
wearing large suits of armor and Warriors wearing delicate clothing. None of
that makes sense! So, use your head a little while creating equipment. If the
equipment gives addition hitpoints then it should probably be made of metal and
should be geared for Warrior types. We do not need Mages out there with bonus
hitpoints on all their eq.
Class and Race restrictions are very important. Be sure to know what your
MUD uses for both and build for them. For example, a Minotaur would not wear
a regular helmet on his head. Minotaurs take pride in their horns, so their
horns must be showing. Minotaurs also have hooves for feet. It would be tough
for most to wear regular boots. Use some common sense when creating your
equipment. Think about each object you create. Think about who you are creating
it for.
10) NOSELL Shopkeepers will not buy or sell the item.
11) QUEST_ITEM Shopkeepers will only accept questpoints for this item.
12) HOOD_UP WORN item hood is currently up.
13) SKINNED Item/corpse can be skinned.
#2
OEDIT-ITEM-NUMBER OEDIT-NUMBER

View file

@ -726,32 +726,12 @@ int backstab_mult(int level)
}
/* invalid_class is used by handler.c to determine if a piece of equipment is
* usable by a particular class, based on the ITEM_ANTI_{class} bitvectors. */
* usable by a particular class. Class-based anti item flags are no longer
* enforced. */
int invalid_class(struct char_data *ch, struct obj_data *obj)
{
if (OBJ_FLAGGED(obj, ITEM_ANTI_SORCEROR) && IS_SORCEROR(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_FIGHTER) && IS_FIGHTER(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_ROGUE) && IS_ROGUE(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_BARBARIAN) && IS_BARBARIAN(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_RANGER) && IS_RANGER(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_BARD) && IS_BARD(ch))
return TRUE;
if (OBJ_FLAGGED(obj, ITEM_ANTI_DRUID) && IS_DRUID(ch))
return TRUE;
(void) ch;
(void) obj;
return FALSE;
}

View file

@ -485,17 +485,6 @@ const char *extra_bits[] = {
"MAGIC",
"NO_DROP",
"BLESS",
"RESERVED",
"RESERVED",
"RESERVED",
"ANTI_SORCEROR",
"ANTI_CLERIC",
"ANTI_ROGUE",
"ANTI_FIGHTER",
"ANTI_BARBARIAN",
"ANTI_RANGER",
"ANTI_BARD",
"ANTI_DRUID",
"NO_SELL",
"QUEST_ITEM",
"HOOD_UP",

View file

@ -474,23 +474,12 @@
#define ITEM_MAGIC 6 /**< Item is magical */
#define ITEM_NODROP 7 /**< Item is cursed: can't drop */
#define ITEM_BLESS 8 /**< Item is blessed */
#define ITEM_RESERVED9 9 /**< Reserved (unused) */
#define ITEM_RESERVED10 10 /**< Reserved (unused) */
#define ITEM_RESERVED11 11 /**< Reserved (unused) */
#define ITEM_ANTI_SORCEROR 12 /**< Not usable by sorcerors */
#define ITEM_ANTI_CLERIC 13 /**< Not usable by clerics */
#define ITEM_ANTI_ROGUE 14 /**< Not usable by rogues */
#define ITEM_ANTI_FIGHTER 15 /**< Not usable by fighters */
#define ITEM_ANTI_BARBARIAN 16 /**< Not usable by barbarians */
#define ITEM_ANTI_RANGER 17 /**< Not usable by rangers */
#define ITEM_ANTI_BARD 18 /**< Not usable by bards */
#define ITEM_ANTI_DRUID 19 /**< Not usable by druids */
#define ITEM_NOSELL 20 /**< Shopkeepers won't touch it */
#define ITEM_QUEST 21 /**< Item is a quest item */
#define ITEM_HOOD_UP 22 /**< WORN item hood is currently up */
#define ITEM_SKINNED 23 /* Item/corpse can be skinned */
#define ITEM_NOSELL 9 /**< Shopkeepers won't touch it */
#define ITEM_QUEST 10 /**< Item is a quest item */
#define ITEM_HOOD_UP 11 /**< WORN item hood is currently up */
#define ITEM_SKINNED 12 /* Item/corpse can be skinned */
/** Total number of item flags */
#define NUM_ITEM_FLAGS 24
#define NUM_ITEM_FLAGS 13
/* Modifier constants used with obj affects ('A' fields) */
#define APPLY_NONE 0 /**< No effect */