Re: [BUG][LONG] Mud Crashes after Implementing Haste.

From: Chuck Reed (creed@I-55.COM)
Date: 05/22/98


Okay, say you're in battle.  You have a super sonic sword of suck.  It kills
the opponent in the first hit!  BAM!  Ok, that part of your code executes.
The victim dies, and therefore is extracted.  Ok, next check:

>if IS_AFFECTED (ch, AFF_HASTE)
>  hit(ch, FIGHTING(ch)....etc)

Hmmm, well.  Here's where Mr. Computer doesn't like you.  There's no victim
(no FIGHTING(ch)) so the computer says, "WOA NELLIE!" and stops on you.
Change the above line to

if(FIGHTING(ch) && IS_AFFECTED(ch, AFF_HASTE))
   hit(blah);

Now, let's say we have a second weapon to hit with in haste:

>if IS_AFFECTED (ch, AFF_HASTE)
>  hit2(blah blah...)

OH NO!! Still no victim and computer goes boom.  Change the above to:

if(FIGHTING(ch) && IS_AFFECTED(ch, AFF_HASTE))
   hit2(blah);

Gotta make sure you're victim is there hoss.  This has been answered time
and time again . . .


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