Re: wait/timer...

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 10/17/97


On Sat, 18 Oct 1997, Steven Smith wrote:

-+Hello all,
-+
-+Im doing a bodyslam function (yawn) but have struck a small prob. I want
-+to have the ac of the player (or victim) lowered for the duration of the
-+'bash'.

The reason for affections.  It might be surprising, but Circle
does this sort of thing quite often.  Think about it: for spells,
such as 'armor' it temporarily decreases the person's AC.  It'd
make sense, then, to look at how the spell-code does it.  But to
save you the trouble of actually looking:

  struct affected_type af;
  af.type = SKILL_BODYSLAM;
  af.duration = number(1, 4);
  af.modifier = 5; /* add 5 ac to make the person EASIER hit */
  af.location = APPLY_AC;
  af.bitvector = 0;
  affect_join(victim, &af, FALSE, FALSE, FALSE, FALSE);

the only things I'm uncertain about here is (a) whether or not you
want the victim's AC to get better (decreased) or worse (increased),
(b) the duration.  The probelm with this method is that the armor
class will be affected for an entire MUD hour, which isn't what you
want.  You can use WAIT_STATE() on the victim to make them unable
to hit (and thus more vulnerable) for a few combat rounds; or you
can add some special case (ick) code in perform_violence to handle
this.

....

BTW, a little nit-pick.  In comm.c, for the definition of
affect_update():

  void affect_update(void);     /* In spells.c */

but in fact, it's in magic.c :)


--
Daniel Anton Koepke -:- dkoepke@california.com -:- [Nether]
"Human language is a cracked kettle on which we beat out tunes
 for bears to dance to when all the while we want to move the
 stars to pity." -- Flaubert


     +------------------------------------------------------------+
     | 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/08/00 PST