Re: Wait states and Perform Violence

From: Mike Breuer (mbreuer@new.rr.com)
Date: 12/27/01


From: "Zizazat Lazuras"
-- snip --
> This really isn't right, because PCs can perform a kick every 3 rounds AND
> keep hitting all the while.
The reason you're seeing different behavior is that WAIT_STATE is used
differently for NPC's and PC's.  For PC's, a positive WAIT_STATE will delay
the processing of any typed commands, but combat rounds will continue
normally.  For NPC's, a positive wait state will cause a skip of a round of
combat.  By default, the WAIT_STATE is set to 3 * PULSE_VIOLENCE in do_kick,
so... mobs would skip three rounds of combat, while PC's would be unable to
type any commands (like flee, drink potion, etc), for three rounds.

>       GET_WAIT_STATE(ch) = 0;
>       ^^^^^^^^^^^^^^^^^^^^^^^ The wait state is reset to 0 each time?!?
This ensures that the WAIT_STATE is no less than 0.  If it is greater than
0, this line is never reached.

> #define GET_MOB_WAIT(ch)      GET_WAIT_STATE(ch)
> /* New, preferred macro. */
> #define GET_WAIT_STATE(ch)    ((ch)->wait)
The comment says it all.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT