Re: positions

From: Fafhrd (
Date: 02/06/99

Here's the Duris method....
/* these two work together to give us many possible positions. */
/* postures */
#define POS_PRONE       0
#define POS_KNEELING    1
#define POS_SITTING     2
#define POS_STANDING    3
#define NUM_POSITIONS   4

/* status */
#define STAT_DEAD       BIT_3
#define STAT_DYING      BIT_4
#define STAT_INCAP      BIT_5
#define STAT_RESTING    BIT_7
#define STAT_NORMAL     BIT_8
#define STAT_MASK       (BIT_9 - 4)

#define GET_POS(ch)     ((ch)->char_specials.position & 3)
#define GET_STAT(ch)     ((ch)->char_specials.position & STAT_MASK)
#define MIN_POS(ch, v)  \
        ((GET_POS(ch) >= (ubyte)((v) & 3)) && \
        (GET_STAT(ch) >= (ubyte)((v) & STAT_MASK)))
#define SET_POS(ch, v) ((ch)->char_specials.position = (ubyte)(v)


Erik Madison
ICQ #13940294

>Having STATE_x is better for more than just MOUNTED.  You should also look
>at putting STATE_SLEEPING, STATE_STUNNED, etc for these.  Since you can be
>sitting and alseep, they should be 2 different things.  You'll just need to
>add in some macros and check throughout the code for checked against
>since they use <, >, or = and make the appropriate changes.
>-----Original Message-----
>From: Edward J Glamkowski <>
>To: <>
>Date: Friday, February 05, 1999 4:47 PM
>Subject:  positions
>>Having just added mounts to my mud, I added in a
>>POS_MOUNTED to allow for certain skills that can be
>>used only from horseback (e.g. a jousting skill).
>>To this end, I am thinking of making fighting a state
>>instead of a position so I can have players engaged
>>in combat while remaining mounted.
>>But before I do this, I would like to hear opinions on
>>making such a change.  The alternative would be to
>>create an additional position POS_MOUNTED_FIGHTING
>>and everywhere it currently checks for POS_FIGHTING
>>have it also check for POS_MOUNTED_FIGHTING.
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     |  |
>     +------------------------------------------------------------+

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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