Re: bite

From: ShadowLord (dkoepke@california.com)
Date: 04/23/96


Here's something I wrote:

ACMD(do_bite)
{
  struct char_data *vict;
  char arg[MAX_INPUT_LENGTH];
  int damage;

  one_arguemnt(argument, arg);

  if (AFF_FLAGGED(ch, AFF_VAMPIRE) || GET_COND(COND_THIRST) >= 20) {
    send_to_char("You do not thirst for blood.\r\n", ch);
    return;
  } else if (!*arg || !arg) {
    send_to_char("Bite who?\r\n", ch);
    return;
  } else if (!(vict = get_char_room_vis(ch, arg))) {
    send_to_char("You don't see that person here.\r\n", ch);
    return;
  } else if (FIGHTING(vict)) {
    send_to_char("They are moving too much.\r\n", ch);
    return;
  } else if (!IS_NPC(vict) && GET_LEVEL(vict) >= LVL_IMMORT) {
    send_to_char("No, no, no.\r\n", ch);
    return;
  } else if (vict == ch) {
    send_to_char("That's not allowed.\r\n", ch);
    return;
  }

  if (number(1, 101) < GET_SKILL(ch, SKILL_BITE)) {
    act("You fail to bite $M.", FALSE, ch, 0, vict, TO_CHAR);
    act("$n tries to close in and bite you.", FALSE, ch, 0, vict, TO_VICT);
    act("$n tries to close in and bite $N.", FALSE, ch, 0, vict, TO_NOTVICT);
    return;
  }

  act("You close and latch your canine-like teeth onto the jugular of $N.",
      FALSE, ch, 0, vict, TO_CHAR);
  act("$n closes in and bites your jugular...", FALSE, ch, 0, vict, TO_VICT);
  act("$n closes in upon $N and bites $S neck.", FALSE, ch, 0, vict, TO_NOTVICT);

  damage = number(5, 10);  
  GET_HIT(vict) -= damage + (number(1, 3));
  GET_HIT(ch)   += damage;

  update_pos(vict);
  update_pos(ch);
}


I haven't tried the above, but to my knowledge, it should work without
(too many) flaws.  You'll want to change the aFF_FLAGGED calls to your
GET_RACE or whatever macro calls; when I get around to doing vampires I
was planning on making them a flag so instead of Vampire, you'd have
Vampire-Dwarf, Vampire-Elf, etc.



This archive was generated by hypermail 2b30 : 12/18/00 PST