Re: Abbreviate acting strange?

From: Daniel Koepke (dkoepke@california.com)
Date: 12/06/98


The Merciless Lord of everything wrote:

>   if (!*argument) { /* No Argument */
>    if (FIGHTING(ch)) {
>     vict = FIGHTING(ch);
>    } else {
>     send_to_char("Bash who?\r\n", ch);
>    }
>   }
>
>   one_argument(argument, arg);

If argument is NULL, then one_argument() returns without changing
arg.  arg is global, so it retains the last value stored in it,
so if we did, "assist A;bash," arg still contains "A".  A quick
solution is,

  if (!*argument) { /* No Argument */
    .
    .
    .
  } else {
    one_argument(argument, arg);

    if (!(vict = get_char_room_vis(ch, arg))) {
      send_to_char("Bash who?\r\n", ch);
      return;
    }
  }

I don't particularly like the idea of combining these checks into,

  if (!(vict = get_char_room_vis(ch, arg))) {
    if (FIGHTING(ch) && IN_ROOM(ch) == IN_ROOM(FIGHTING(ch))) {
      vict = FIGHTING(ch);
    } else {
      send_to_char("Bash who?\r\n", ch);
      return;
    }
  }

for the sole reason that if you make a typo, you automatically bash
the person you're fighting, even if you didn't want to.  That
behavior could easily result in players dying in certain situations.
For instance, Bob and Chuck are fighting Al.  FIGHTING(Al) == Bob,
but Chuck is doing the majority of damage.  Since Chuck is pretty
close to dying (which is why Bob, who's weaker, is tanking), Al's
only hope of victory is to ward off Chuck.  Al types, "bash Chick,"
making a typo, he bashes Bob automatically, and promptly gets
killed by Chuck.

I would classify that as a bug.

-dak


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