Fight.c: switching targets in hit()

From: Nitelite (dalamar@cybercom.net)
Date: 11/19/98


  Sorry if you received this already. I sent it from another server on my
ISP accidently so I am pretty sure it never got out.
  I have a question about switching victims during a fight. I want to make
a skill that basically works like an autorescue but it happens BEFORE the
first attack gets off. So, for instance, you go into a room with your mage
following. The mob in that room is aggro towards Mages, and attacks. The
warrior skill kicks in so instead he takes the hit instead of the mage.
How do I switch targets like that? I tried simple victim = victim->master
(the person taking the hit is the leader of the group), and this works
until I type peace (stops battle) which then causes the MUD to crash. I
also went through and used basically the rescue code for stopping a fight
and starting one, but that didn't work either. I am putting all
this code in the hit() function right above where it calculates AC because
this is where it needs to be. Can anyone help?


        _\|/_____________________________\|/_ Ryan Lane Gasper _\|/_
         /|"You will never see me cause    \/------------------\/|\
          | I'm always alone" -Ministry      dalamar@cybercom.net|
          |"The tree of liberty must be refreshed from time to   |
        _\|_time_with_the_blood_of_patriots_and_tyrants"_-ThomasJ|/_
         /|\                     -*-1997-*-                     /|\






        _\|/_____________________________\|/_ Ryan Lane Gasper _\|/_
         /|"You will never see me cause    \/------------------\/|\
          | I'm always alone" -Ministry      dalamar@cybercom.net|
          |"The tree of liberty must be refreshed from time to   |
        _\|_time_with_the_blood_of_patriots_and_tyrants"_-ThomasJ|/_
         /|\                     -*-1997-*-                     /|\



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