Re: [Newbie] [CODE]

From: Tony Robbins (tonyr@NWPACLINK.COM)
Date: 07/14/98


At 01:17 PM 7/14/98 EDT, you wrote:
>In a message dated 98-07-14 12:10:33 EDT, siv@CYBERENET.NET writes:
>
><< why don't you post that code?
>
> [code snipped]
> >                         next_d = d->next;
> >                         log("Checking to make sure RT >= 0.");
> >                         if (GET_RT(d->character) < 0) GET_RT(d->character)
>= 0;
> >                         log("Subracting 1 from RT");
> >                         if (GET_RT(d->character) > 0) GET_RT(d->character)
>-= 1;
>
> well..let me ask this: what are you trying to do? from what i can infer,
> you are trying to have a combat system that will use calculated speed
> rather than standard 2 second rounds..if this is the case, i'd
> suggest using the dg_event system to create events that will call the
> hit() func (or whatever)..it would be much less CPU intensive (no
> decrementation of a roundtime var)..i did this a while ago using events
> based on the dg system (extracted from the dg src, not the patch that is
> now available), but didn't like the feel of event based combat.. >>
>
>I'm running a check on certain commands... ie do_kill, I might do this...
>if (GET_RT(ch) < 0)
>  GET_RT(ch) = 0;
>else if (GET_RT(ch) == 0) {
> ...do_kill code...
>
>The point is to regulate commands while someone's in roundtime. IE, someone
>cast's a spell on something (offensive or non-offensive, whichever --ie
>doesn't have to start a fight), and they can't type other offensive or
>movement commands for x seconds. Get it?
>
>I try to post help more than code, because I'm endeavoring to create a
>completely original MUD (except for DG events, Regen, Color, and
>Abbreviations). But if I post code it won't be original anymore. Hell, if I
>didn't care about originality, I'd be glad to just ftp my MUD to
>ftp.circlemud.org! Sorry guys. :-P
>

Should've replied to the last message in the thread, rather than going one
previous.  Anyway, if I'm not too confused, isn't that what wait states are
for?  I personally decremented PULSE_VIOLENCE to 1 second, and this gives
magic users a little bonus (if the other guy's going slow, and casting a
spell isn't a physical effort, why should it be slowed too?).  Just my two
nickels worth.

-B.


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