Re: [CODE] Race Attributes

From: Zeavon (zeavon@kilnar.com)
Date: 03/08/99


Don't try to fight with the rest of the code on whether or not the dwarf has
infravision. Dispel magic, (on some muds, nomagic rooms), unaffect, etc. can
all screw this up.

In utils.h

#define HAS_INFRAVISION(ch) \
        (IS_DWARF((ch)) || AFF_FLAGGED((ch), AFF_INFRAVISION))

and anywhere in the code where you may be tempted to do:
AFF_FLAGGED(ch, AFF_INFRAVISION)
use the HAS_INFRAVISION macro instead.

You can do the same thing for any spell affect in the book (fly, detect magic,
etc.) All very clean, very consice and very stable.

--
Zeavon Calatin, MageMaster of the Realms
Implementor of The Spear of Insanity
  MUD: kilnar.com 1066
  Web: http://www.kilnar.com/spear/

> -----Original Message-----
> From: Circle Discussion List
> [mailto:CIRCLE@post.queensu.ca]On Behalf Of
> Xual
> Sent: Monday, March 08, 1999 6:11 AM
> To: CIRCLE@post.queensu.ca
> Subject: Re:  [CODE] Race Attributes
>
>
> On Mon, 8 Mar 1999, Brian Heimgartner wrote:
>
> > How do you set it so that races get special skills/spells like:
> > Dwarf - Infravision, or something like that?
> > I have tried for a long time, and I'm, stumped.
>
> class.c
> do_start()
>
> if (GET_RACE(ch) == RACE_DWARF)
>   SET_BIT(AFF_FLAGS(ch), AFF_INFRAVISION);
>
> "Misery is boundless"
>         -Xual the Torturer, on the Eve of the Sundering.
>
> Danathara Online RPG
> telnet://danathara.dhs.org:4000
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>      +------------------------------------------------------------+
>


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



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