Re: [IDEA] Turn Based Combat

From: Sammy (samedi@ticnet.com)
Date: 03/15/01


On Wed, 14 Mar 2001 18:38:09 -0900, Brian Hartvigsen wrote:

>ReWrite #2
>
>I'm looking to implement Menu driven Turn based Combat.  Basicly I want to
>make an Oasis style interface to combat.  The turn based part isn't to
>hard..  I'm thinking that a check like:
> if (!IS_READY(ch) || !IS_READY(vict))
>at the begining of preform_violence (or is it hit()?) will do the trick..
>  My main problem comes to the Menu driven part.  There are a couple things
>I want to do differant from Oasis or anyother menu driven system.

There's another menu system that's been on the ftp site for several
years but as far as I know only one mud has ever used it.

>1) I want the character to continue to recieve any kind of messages (on a
>toggle so they can turn it off if they are gettin spammed or something)

That's two things

The first part (continuing to receive mud messages, I've taken care
of.  The second part (a PRF_NOSPAM toggle) I never got around to but
is very simple and should only take 15-20 minutes for an intermediate
circle coder.

>2) Okay never mind just one thing I want differant..
>
>The true problem comes in when I look at how Oasis works (or the Oasis
>add-ins like HEDIT)  I don't understand what's going on and don't know
>where to start to make something similar.

In a nutshell, I added something similar to the SPECIAL() function
pointer on mobs/objs/rooms.  Each player has a PARSER() function
pointer that is checked right before command_interpreter().  If the
player is CON_PLAYING (not necessarily mandatory) and has a non-NULL
PARSER() pointer, his/her input is checked by the parser first.  If it
decides it doesn't need to act on the input, it returns a zero and the
command interpreter takes over.  This allows someone in the menu to
not only see mud output, but they can use gossip to ask for advice in
the middle of the menu system.  The basic system is very simple and
fairly easy to implement.

>If anyone has any kind of input on this I would appreciate it..  I am
>honestly completely lost here..

I thought I submitted a parser-mod patch long ago but I can't seem to
find it.  You can get it from the menu.tar.gz package included in
obuild .08.  Just patch it by hand since you probably don't need the
room editing stuff, except for examples.

Sometime soon when I have coding time (possibly this weekend, but
don't count on it) I plan to release a parser-only patch with some
simple examples and better documentation.

Sam

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST