Re: [CODE][LONG] Redirect Skill

From: Mike Breuer (mbreuer@new.rr.com)
Date: 10/03/01


From: "Brian Williams" <user17564@QWEST.NET>
> You have to switch the person fighting ch.. i.e. add a
> FIGHTING(ch) = vict;
> in there somewhere around the hit() call after you know it's successful.

A quick glance at the code makes it seem to me that the best way to do it is
by calling:

stop_fighting(ch);

right before the call to hit().  The damage function will then properly call
set_fighting() as needed.  (Note that damage() is called, even if the
attacker misses).

This handles a couple of things that don't otherwise get managed if you
manipulate FIGHTING(ch) directly.

Mike

--
   +---------------------------------------------------------------+
   | 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/06/01 PST