[BUG] stock mob spec procs

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


I think there is a small bug in stock Circle mobile spec procs, for example in
magic_user:
Look at this piece of code:

  /* if I didn't pick any of those, then just slam the guy I'm fighting */
  if (vict == NULL)
    vict = FIGHTING(ch);

This code is followed by spellcasting command.

But there is no check for victim and caster being in same room and
spellcasting functions also does not check this. So, situations like this one
are possible:

Mob hits you very hard.
goto Someone
You goto to someone.
[new room description]
You scream out in pain as Mob grabs you with burning hands!

The possible fix is:
    if (vict == NULL && world[ch->in_room] ==
        world[FIGHTING(ch)->in_room])
      vict = FIGHTING(ch);
    else
      return FALSE;

If there is a check for this and I missed it please let me know.

  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