dbx/cnf/
dbx/lib/
dbx/lib/misc/
dbx/lib/text/help/
dbx/lib/world/
dbx/lib/world/qst/
dbx/src/



/* ************************************************************************
*   File: act.offensive.c                               Part of CircleMUD *
*  Usage: player-level commands of an offensive nature                    *
*                                                                         *
*  All rights reserved.  See license.doc for complete information.        *
*                                                                         *
*  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
*  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.               *
************************************************************************ */

#include "conf.h"
#include "sysdep.h"


#include "structs.h"
#include "utils.h"
#include "comm.h"
#include "interpreter.h"
#include "handler.h"
#include "db.h"
#include "spells.h"

/* extern variables */
extern struct room_data *world;
extern struct descriptor_data *descriptor_list;
extern int pk_allowed;
extern sh_int r_death_start_room;

/* extern functions */
void raw_kill(struct char_data * ch, struct char_data * killer);
void check_killer(struct char_data * ch, struct char_data * vict);

/* local functions */
ACMD(do_assist);
ACMD(do_hit);
ACMD(do_kill);
ACMD(do_backstab);
ACMD(do_order);
ACMD(do_flee);
ACMD(do_sweep);
ACMD(do_rescue);
ACMD(do_kick);
ACMD(do_tailwhip);
ACMD(do_knee);
ACMD(do_elbow);
ACMD(do_roundhouse);

ACMD(do_assist)
{
  struct char_data *helpee, *opponent;

  if (FIGHTING(ch)) {
    send_to_char("You're already fighting!  How can you assist someone else?\r\n", ch);
    return;
  }
  one_argument(argument, arg);

  if (!*arg)
    send_to_char("Whom do you wish to assist?\r\n", ch);
  else if (!(helpee = get_char_room_vis(ch, arg)))
    send_to_char(NOPERSON, ch);
  else if (helpee == ch)
    send_to_char("You can't help yourself any more than this!\r\n", ch);
  else {
    /*
     * Hit the same enemy the person you're helping is.
     */
    if (FIGHTING(helpee))
      opponent = FIGHTING(helpee);
    else
      for (opponent = world[ch->in_room].people;
	   opponent && (FIGHTING(opponent) != helpee);
	   opponent = opponent->next_in_room)
		;

    if (!opponent)
      act("But nobody is fighting $M!", FALSE, ch, 0, helpee, TO_CHAR);
    else if (!CAN_SEE(ch, opponent))
      act("You can't see who is fighting $M!", FALSE, ch, 0, helpee, TO_CHAR);
    else if (!pk_allowed && !IS_NPC(opponent))	/* prevent accidental pkill */
      act("Use 'murder' if you really want to attack $N.", FALSE,
	  ch, 0, opponent, TO_CHAR);
    else {
      send_to_char("You join the fight!\r\n", ch);
      act("$N assists you!", 0, helpee, 0, ch, TO_CHAR);
      act("$n assists $N.", FALSE, ch, 0, helpee, TO_NOTVICT);
      hit(ch, opponent, TYPE_UNDEFINED);
    }
  }
}


ACMD(do_hit)
{
  struct char_data *vict;

  one_argument(argument, arg);

  if (!*arg)
    send_to_char("Hit who?\r\n", ch);
  else if (!(vict = get_char_room_vis(ch, arg)))
    send_to_char("They don't seem to be here.\r\n", ch);
  else if (vict == ch) {
    send_to_char("You hit yourself...OUCH!.\r\n", ch);
    act("$n hits $mself, and says OUCH!", FALSE, ch, 0, vict, TO_ROOM);
  } else if (AFF_FLAGGED(ch, AFF_MAJIN) && (ch->master == vict))
    act("$N is just such a good friend, you simply can't hit $M.", FALSE, ch, 0, vict, TO_CHAR);
  else {
    if (!pk_allowed) {
      if (!IS_NPC(vict) && !IS_NPC(ch)) {
	if (subcmd != SCMD_MURDER) {
	  send_to_char("Use 'murder' to hit another player.\r\n", ch);
	  return;
	} else {
	  check_killer(ch, vict);
	}
      }
      if (AFF_FLAGGED(ch, AFF_MAJIN) && !IS_NPC(ch->master) && !IS_NPC(vict))
	return;			/* you can't order a MAJINed pet to attack a
				 * player */
    }
    if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
      hit(ch, vict, TYPE_UNDEFINED);
      WAIT_STATE(ch, PULSE_VIOLENCE + 2);
    } else
      send_to_char("You do the best you can!\r\n", ch);
  }
}



ACMD(do_kill)
{
  struct char_data *vict;

  if ((GET_LEVEL(ch) < LVL_IMPL) || IS_NPC(ch)) {
    do_hit(ch, argument, cmd, subcmd);
    return;
  }
  one_argument(argument, arg);

  if (!*arg) {
    send_to_char("Kill who?\r\n", ch);
  } else {
    if (!(vict = get_char_room_vis(ch, arg)))
      send_to_char("They aren't here.\r\n", ch);
    else if (ch == vict)
      send_to_char("Your mother would be so sad.. :(\r\n", ch);
    else {
      act("You chop $M to pieces!  Ah!  The blood!", FALSE, ch, 0, vict, TO_CHAR);
      act("$N chops you to pieces!", FALSE, vict, 0, ch, TO_CHAR);
      act("$n brutally slays $N!", FALSE, ch, 0, vict, TO_NOTVICT);
      raw_kill(vict, ch);
    }
  }
}



ACMD(do_backstab)
{
  struct char_data *vict;
  int percent, prob;

  one_argument(argument, buf);

  if (!(vict = get_char_room_vis(ch, buf))) {
    send_to_char("Backstab who?\r\n", ch);
    return;
  }
  if (vict == ch) {
    send_to_char("How can you SWIFTNESS up on yourself?\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;
  }
  if (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) != TYPE_PIERCE - TYPE_HIT) {
    send_to_char("Only piercing weapons can be used for backstabbing.\r\n", ch);
    return;
  }
  if (FIGHTING(vict)) {
    send_to_char("You can't backstab a fighting person -- they're too alert!\r\n", ch);
    return;
  }

  if (MOB_FLAGGED(vict, MOB_AWARE)) {
    act("You notice $N lunging at you!", FALSE, vict, 0, ch, TO_CHAR);
    act("$e notices you lunging at $m!", FALSE, vict, 0, ch, TO_VICT);
    act("$n notices $N lunging at $m!", FALSE, vict, 0, ch, TO_NOTVICT);
    hit(vict, ch, TYPE_UNDEFINED);
    return;
  }

  percent = number(1, 101);	/* 101% is a complete failure */
  prob = GET_SKILL(ch, SKILL_BACKSTAB);

  if (AWAKE(vict) && (percent > prob))
    damage(ch, vict, 0, SKILL_BACKSTAB);
  else
    hit(ch, vict, SKILL_BACKSTAB);
}



ACMD(do_order)
{
  char name[MAX_INPUT_LENGTH], message[MAX_INPUT_LENGTH];
  bool found = FALSE;
  int org_room;
  struct char_data *vict;
  struct follow_type *k;

  half_chop(argument, name, message);

  if (!*name || !*message)
    send_to_char("Order who to do what?\r\n", ch);
  else if (!(vict = get_char_room_vis(ch, name)) && !is_abbrev(name, "followers"))
    send_to_char("That person isn't here.\r\n", ch);
  else if (ch == vict)
    send_to_char("You obviously suffer from skitzofrenia.\r\n", ch);

  else {
    if (AFF_FLAGGED(ch, AFF_MAJIN)) {
      send_to_char("Your superior would not aprove of you giving orders.\r\n", ch);
      return;
    }
    if (vict) {
      sprintf(buf, "$N orders you to '%s'", message);
      act(buf, FALSE, vict, 0, ch, TO_CHAR);
      act("$n gives $N an order.", FALSE, ch, 0, vict, TO_ROOM);

      if ((vict->master != ch) || !AFF_FLAGGED(vict, AFF_MAJIN))
	act("$n has an indifferent look.", FALSE, vict, 0, 0, TO_ROOM);
      else {
	send_to_char(OK, ch);
	command_interpreter(vict, message);
      }
    } else {			/* This is order "followers" */
      sprintf(buf, "$n issues the order '%s'.", message);
      act(buf, FALSE, ch, 0, vict, TO_ROOM);

      org_room = ch->in_room;

      for (k = ch->followers; k; k = k->next) {
	if (org_room == k->follower->in_room)
	  if (AFF_FLAGGED(k->follower, AFF_MAJIN)) {
	    found = TRUE;
	    command_interpreter(k->follower, message);
	  }
      }
      if (found)
	send_to_char(OK, ch);
      else
	send_to_char("Nobody here is a loyal subject of yours!\r\n", ch);
    }
  }
}



ACMD(do_flee)
{
  int i, attempt, loss;
  struct char_data *was_fighting;
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("What are ya gunna do hop on one leg!?\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("What are ya gunna do hop on one leg!?\r\n", ch);
     return;
     }
  if (GET_POS(ch) < POS_FIGHTING) {
    send_to_char("You are in pretty bad shape, unable to flee!\r\n", ch);
    return;
  }

  if (IS_AFFECTED(ch, AFF_MFROZEN)) {
    send_to_char("You would flee, but you can't move.\r\n", ch);
    return;
  }

  for (i = 0; i < 6; i++) {
    attempt = number(0, NUM_OF_DIRS - 1);	/* Select a random direction */
    if (CAN_GO(ch, attempt) &&
	!ROOM_FLAGGED(EXIT(ch, attempt)->to_room, ROOM_DEATH)) {
      act("$n panics, and attempts to flee!", TRUE, ch, 0, 0, TO_ROOM);
      was_fighting = FIGHTING(ch);
      if (do_simple_move(ch, attempt, TRUE)) {
	send_to_char("You flee head over heels.\r\n", ch);
	if (was_fighting && !IS_NPC(ch)) {
	  loss = GET_MAX_HIT(was_fighting) - GET_HIT(was_fighting);
	  loss *= GET_LEVEL(was_fighting);
	  gain_exp(ch, -loss);
	}
      } else {
	act("$n tries to flee, but can't!", TRUE, ch, 0, 0, TO_ROOM);
      }
      return;
    }
  }
  send_to_char("PANIC!  You couldn't escape!\r\n", ch);
}


ACMD(do_sweep)
{
  struct char_data *vict;
  int percent, prob;

  one_argument(argument, arg);
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
     }
  if (!GET_SKILL(ch, SKILL_SWEEP)) {
    send_to_char("You have no idea how.\r\n", ch);
    return;
  }
  if (ROOM_FLAGGED(IN_ROOM(ch), ROOM_PEACEFUL)) {
    send_to_char("This room just has such a peaceful, easy feeling...\r\n", ch);
    return;
  }
  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("Sweep who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  percent = number(1, 101);	/* 101% is a complete failure */
  prob = GET_SKILL(ch, SKILL_SWEEP);

  if (MOB_FLAGGED(vict, MOB_NOSWEEP))
    percent = 101;

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_SWEEP);
    GET_POS(ch) = POS_SITTING;
  } else {
    if (damage(ch, vict, 1, SKILL_SWEEP) > 0) {	/* -1 = dead, 0 = miss */
      GET_POS(vict) = POS_SITTING;
      WAIT_STATE(vict, PULSE_VIOLENCE);
    }
  }
  WAIT_STATE(ch, PULSE_VIOLENCE * 2);
}


ACMD(do_rescue)
{
  struct char_data *vict, *tmp_ch;
  int percent, prob;

  one_argument(argument, arg);
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
     }
  if (!(vict = get_char_room_vis(ch, arg))) {
    send_to_char("Whom do you want to rescue?\r\n", ch);
    return;
  }
  if (vict == ch) {
    send_to_char("What about fleeing instead?\r\n", ch);
    return;
  }
  if (FIGHTING(ch) == vict) {
    send_to_char("How can you rescue someone you are trying to kill?\r\n", ch);
    return;
  }
  for (tmp_ch = world[ch->in_room].people; tmp_ch &&
       (FIGHTING(tmp_ch) != vict); tmp_ch = tmp_ch->next_in_room);

  if (!tmp_ch) {
    act("But nobody is fighting $M!", FALSE, ch, 0, vict, TO_CHAR);
    return;
  }
  if (!GET_SKILL(ch, SKILL_RESCUE))
    send_to_char("But you have no idea how!\r\n", ch);
  else {
    percent = number(1, 101);	/* 101% is a complete failure */
    prob = GET_SKILL(ch, SKILL_RESCUE);

    if (percent > prob) {
      send_to_char("You fail the rescue!\r\n", ch);
      return;
    }
    send_to_char("Banzai!  To the rescue...\r\n", ch);
    act("You are rescued by $N, you are confused!", FALSE, vict, 0, ch, TO_CHAR);
    act("$n heroically rescues $N!", FALSE, ch, 0, vict, TO_NOTVICT);

    if (FIGHTING(vict) == tmp_ch)
      stop_fighting(vict);
    if (FIGHTING(tmp_ch))
      stop_fighting(tmp_ch);
    if (FIGHTING(ch))
      stop_fighting(ch);

    set_fighting(ch, tmp_ch);
    set_fighting(tmp_ch, ch);

    WAIT_STATE(vict, 2 * PULSE_VIOLENCE);
  }

}



ACMD(do_kick)
{
  struct char_data *vict;
  char arg1[MAX_INPUT_LENGTH];
  char arg2[MAX_INPUT_LENGTH];
  int MOVE = 0, HIT = 0;
  two_arguments(argument, arg1, arg2);
/*------------------------------No Limbs---------------------------*/  
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
/*---------------------------Aiming Shots--------------------------*/
/* Kick to the Head */
  if (!(vict = get_char_room_vis(ch, arg1)) && !str_cmp(arg,"head") && GET_STR(ch)*2+GET_MANA(ch)/4*GET_LEVEL(ch)+GET_DAMROLL(ch) > GET_STR(vict)*2+GET_MANA(vict)/4*GET_LEVEL(vict)+GET_DAMROLL(vict)) {

  act("&15You swiftly swing a strong kick, hitting &11$N&15 in the head!&00", FALSE, ch, 0, vict, TO_CHAR);
  act("&12$n&15 smashes &11$N&15 in the head with a powerful kick!", TRUE, ch, 0, vict, TO_NOTVICT);
  act("&12$n&15 moves with great speed, smashing you in the head with a kick!&00", FALSE, ch, 0, vict, TO_VICT);  
  HIT = number(GET_LEVEL(ch)*10, GET_LEVEL(ch)*10);
  MOVE = number(5, 10);
  GET_HIT(vict) = GET_HIT(vict) - HIT;
  GET_MOVE(ch) = GET_MOVE(ch) - MOVE;
  }
  
  if (GET_HIT(vict) <=0) {
  act("&15You kill &11$N&15 with the blow!&00", FALSE, ch, 0, vict, TO_CHAR);
  act("&12$n&15 kills &11$N with with blow!&00.", TRUE, ch, 0, vict, TO_NOTVICT);
  act("&12$n&15's kick kills you!&00", FALSE, ch, 0, vict, TO_VICT);
  char_from_room(vict);
  char_to_room(vict, r_death_start_room);
  GET_HIT(vict) = GET_MAX_HIT(vict)*0.1;
  GET_MANA(vict) = GET_MAX_MANA(vict)*0.1;
  GET_MOVE(vict) = GET_MAX_MOVE(vict)*0.1;
  GET_POS(vict) = POS_STANDING;
  look_at_room(vict, 0);
  }
/*-----------------------------------------------------------------*/
  if (!(vict = get_char_room_vis(ch, arg1))) {
    if (FIGHTING(ch) && IN_ROOM(ch) == IN_ROOM(FIGHTING(ch))) {
      vict = FIGHTING(ch);
    } else {
      send_to_char("Kick who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
}


ACMD(do_tailwhip)
{
  struct char_data *vict;
  int percent, prob;

  if (!PLR_FLAGGED(ch, PLR_TAIL)) {
     send_to_char("You don't have a tail!\r\n", ch);
     return;
     }
  if (!GET_SKILL(ch, SKILL_TAILWHIP)) {
    send_to_char("You don't know how!\r\n", ch);
    return;
  }
  one_argument(argument, arg);

  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("Tailwhip who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  percent = ((10 - (GET_AC(vict) / 10)) * 2) + number(1, 101);	/* 101% is a complete
								 * failure */
  prob = GET_SKILL(ch, SKILL_TAILWHIP);

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_TAILWHIP);
  } else
    damage(ch, vict, GET_LEVEL(ch) * GET_LBS(ch) / 30, SKILL_TAILWHIP);
  WAIT_STATE(ch, PULSE_VIOLENCE * 2);
}

ACMD(do_knee)
{
  struct char_data *vict;
  int percent, prob;
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
     }
  if (!GET_SKILL(ch, SKILL_KNEE)) {
    send_to_char("You don't know how to do that!\r\n", ch);
    return;
  }
  one_argument(argument, arg);

  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("Knee who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  percent = ((10 - (GET_AC(vict) / 10)) * 2) + number(1, 101);	/* 101% is a complete
								 * failure */
  prob = GET_SKILL(ch, SKILL_KNEE);

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_KNEE);
  } else
    damage(ch, vict, GET_LEVEL(ch) * GET_LBS(ch) / 40, SKILL_KNEE);
  WAIT_STATE(ch, PULSE_VIOLENCE * 1);
}

ACMD(do_elbow)
{
  struct char_data *vict;
  int percent, prob;
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
     }
  if (!GET_SKILL(ch, SKILL_ELBOW)) {
    send_to_char("You don't know how to do that!\r\n", ch);
    return;
  }
  one_argument(argument, arg);

  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("Elbow who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  percent = ((10 - (GET_AC(vict) / 10)) * 2) + number(1, 101);	/* 101% is a complete
								 * failure */
  prob = GET_SKILL(ch, SKILL_ELBOW);

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_ELBOW);
  } else
    damage(ch, vict, GET_LEVEL(ch) * GET_UBS(ch) / 40, SKILL_ELBOW);
  WAIT_STATE(ch, PULSE_VIOLENCE * 1);
}

ACMD(do_roundhouse)
{
  struct char_data *vict;
  int percent, prob;
  if (!PLR_FLAGGED(ch, PLR_LLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You have no legs!\r\n", ch);
     return;
}
  if (!PLR_FLAGGED(ch, PLR_RLEG) && PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
}
  if (PLR_FLAGGED(ch, PLR_RLEG) && !PLR_FLAGGED(ch, PLR_LLEG)) {
     send_to_char("You only have one leg!\r\n", ch);
     return;
     }
  if (!GET_SKILL(ch, SKILL_ROUNDHOUSE)) {
    send_to_char("You don't know how to do that!\r\n", ch);
    return;
  }
  one_argument(argument, arg);

  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("Roundhouse who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  percent = ((10 - (GET_AC(vict) / 10)) * 2) + number(1, 101);	/* 101% is a complete
								 * failure */
  prob = GET_SKILL(ch, SKILL_ROUNDHOUSE);

  if (percent > prob) {
    damage(ch, vict, 0, SKILL_ROUNDHOUSE);
  } else
    damage(ch, vict, GET_LEVEL(ch) * GET_LBS(ch) / 10, SKILL_ROUNDHOUSE);
  WAIT_STATE(ch, PULSE_VIOLENCE * 4);
}