Re: [CODE] immortals/flight

From: John Evans (evansj@HI-LINE.NET)
Date: 09/26/97


On Fri, 26 Sep 1997, Mike Carpenter wrote:

> I am trying to figure a way to make it so that Immortals do not have to
> worry about casting 'flight' on them
> in order to move around in a sector 'IN_FLIGHT", now that I am asking, I
> think want to make it so that

I made a macro in utils.h called IS_FLYING(ch). Like so:
#define IS_FLYING(ch)   (IS_AFFECTED((ch), AFF_FLY) || IS_FAERIE(ch) || \
        (IS_NPC((ch)) && MOB_FLAGGED((ch), MOB_FLYING)) || \
        PLR_FLAGGED(vict, PRF_NOHASSLE))

This means that if someone is flying is a Faerie (a winged race) or is a
mob that is flying via non-magical means (a bird), or has NOHASSLE on,
then they are considered flying.

I did the check as nohassle instead of level so that an immort could turn
off nohassle and fall just like mortals do so they can test their zones a
bit easier.

When you need to check and see if someone is affected by flying, do:

if (IS_FLYING(ch)) {
....
}

Hope that helps!

John Evans <evansj@hi-line.net>

May the source be with you.


     +------------------------------------------------------------+
     | 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/08/00 PST