Re: GHOST Wiklund on Tue, Mar 24, 1998 at 10:15:51PM +0100

From: Eric Green (ejg3@CORNELL.EDU)
Date: 03/24/98


On Tue, Mar 24, 1998 at 10:15:51PM +0100, David Wiklund wrote:
>  I have been thinking on changing the death in my mud as follows:
>
>   When you die you do not leave a corpse and (as a result of that) you do
> not loose your eq. But what I wan't to do is that you convert into a ghost
> who can only do certain commandos. ex. who, mud (channel), whisper and the
> walk commands.
> And their aliases will also be disabled.
>
> All that I have figured out (most anyway but no hard thing)
>
> What I wonder is this... I want to add a new pos, POS_GHOST, but I started
> wondering if I have to add that at the POS_DEAD place and move the others
> up a bit cause now you got in some functions
> "something" > POS_STANDING {
>
> And then if I add POS_GHOST after that it really fucks thing upp...
> but if I add POS_GHOST before POS_DEAD will that fuck some other thing up
> or is everything written with the POS_### or are some written with numbers??

Change the position field in the struct command_info to be a bitvector
rather than a plain integer.  In the cmd_info table, you fill in the
field with a list of positions that that command can be done in.  Then
in the command_interpreter, you just need to change the position check.

I did this with DG, originially to get rid of the fighting position to
make bash useful and implement riding.  It also makes it easy to extend
commands with "pseudo positions" like silence... it took about 10 minutes
to add the silence spell to DG.  Check out the DG code if you are looking
for implementation details.

Eric


     +------------------------------------------------------------+
     | 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