Multiple Attacks

From: Andrey Fidrya (andrey@ALEX-UA.COM)
Date: 03/20/98


> -> NOTICE THE CHANGE
>             if (FIGHTING(ch) && GET_POS(FIGHTING(ch)) > POS_DEAD)
> >               hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
> >            else
> >               send_to_char("The damn thing's dead already!\r\n", ch);
> You need to have checks to see if the character is still fighting or not.

If you have check for FIGHTING(ch), you can safely remove the
GET_POS(FIGHTING(ch))>POS_DEAD check because if someone has multiple attacks
and kills his victim with first attack, FIGHTING(ch) will be NULL after hit()
call so "if" check will be false anyways.

Another idea: replace the
"send_to_char("The damn thing's dead already!\r\n", ch);"
with:
"break;"
So we don't spam player with useless messages and just break the loop.

  Andrey (andrey@alex-ua.com)
    aka Zmey//RMUD


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