Abbreviate acting strange?

From: The Merciless Lord of everything (serces@mud.dk)
Date: 12/06/98


Hiya all

fiddeling with abbreviation code, plugged the one from the Archives
(Angus' work) in and gee it works right away.

Yet somehow things go haywire and I cannot see why except it's the
Abbreviate code that's acting up.

Heres the situation :
1. A attacks mob.
2. B Assists A
3. A being a warrior bashes the opponent with the command "bash" no
arguments

See under normal circumstances this would give opponent fighting and A
would bash the opponent, but here it actually bashes B instead. Totalt
confusion.

Bash code looks like the following.. anyone with an idea to what the
problem *MIGHT* be, except that the abbreviate code sends an Argument
through anyway?

ACMD(do_bash)
{
  struct char_data *vict = NULL;
  int percent, prob;

  if(!check_for_skill(ch, SKILL_BASH)) return;

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

  one_argument(argument, arg);
  log(argument);

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

  sprintf(buf, "PC: %s is bashing %s", GET_NAME(ch), GET_NAME(vict));
  mudlog(buf, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE);

  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }

  if (!GET_EQ(ch, WEAR_WIELD)) {
    send_to_char("You need to wield a weapon to make it a success.\r\n",
ch);
    return;
  }

  percent = number(1, 101);     /* 101% is a complete failure */
  prob = GET_SKILL(ch, SKILL_BASH);
  if (MOB_FLAGGED(vict, MOB_NOBASH))
    percent = 101;

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_BASH, NO_WEAPON);
    GET_POS(ch) = POS_SITTING;
  } else {
    damage(ch, vict, 1, SKILL_BASH, NO_WEAPON);
    improve_skill(ch, SKILL_BASH);
    GET_POS(vict) = POS_SITTING;
    WAIT_STATE(vict, PULSE_VIOLENCE);
  }
  WAIT_STATE(ch, PULSE_VIOLENCE * 2);
}


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