Re: [code] anti_male/anti_female eqs

From: Chuck Carson (chuck@EDEN.COM)
Date: 05/30/98


We are currently imping something similiar to this:

We have added item_size to the object file and it is based on
SIZE_TINY_F, SIZE_TINY_M, SIZE_TINY_ANY on up to GIGANTIC, the
_F and _M or male/female. If a tiny player wants to use TINY_F
armor they must get it modifed at a smithy. If A small player
obtains some gigantic armor, they must have it sized down provding
the material warrants it. If a large player obtains some tiny
armor, it is useless to them other than shop value. SIZE_TINY_ANY
means it is unisex, and then SIZE_ANY means the objects size is
irrelevant, thus any size or sex can wear/use the object. For exmaple,
a necklace or something like that. Another thing we are working on
is object classes, like CLS_ARMOR_PADDED and etc. So in the code we
do checks to see what level armor the player is wearing, if a mage
has higher than padded on, he/she is flagged and thus unable to use
class related skills. Same goes for a thief using more than a buckler
shield, and etc... Of course we are sticking to a strict AD&&D
setting. But yea, I suggest adding a new element to the object struct
instead of wasting valuable flag spots. I added a sh_int and we use
the size setting just like the ITEM_TYPE variable, since only one size
will be set, a sh_int gives you plenty of sizes. (Probably could have
gone smaller)

Kuan Chen wrote:
>
> hello all.
>
> i'm trying to add in some sex specific equipments, and i've added
> the necessary changes to structs.h. however, i had some problem
> checking the condition, i.e., a male player trying to wear female
> only eq. i put in the check in handler.c, in the function equip_char(),
> the additions are after the check for class specific eqs. the
> code i had was:
>
> if (IS_OBJ_STAT(obj, ITEM_ANTI_MALE) && GET_SEX(ch) == 1) {
>   send_to_char("some msg.", ch);
>   obj_to_char(obj, ch);
>   return; }
>
> and basically the same for ITEM_ANTI_FEMALE
>
> this additions work *except* it sends back a message for actually
> wearing the item even though the item doesn't show up on the
> equiptment list.
>
> i was wondering if there's something else i'm missing? perhaps some
> other changes that's necessary?
>
> thanks for all inputs.
>
> kuan
> Kuan Chen
> chenk1@vuse.vanderbilt.edu
> ICQ UIN: 4401110
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST