Blackjacking and MOB awareness

From: Jason Pullara (Circle@si.rr.com)
Date: 09/16/00


Hi all,

First of all I would like to say that Ive got a blackjack maneuver that
knocks somone out without hurting them (so they can be looted, ect..)

However, lets say that two or more MOB's in a room

When somone/thing gets blackjacked the other MOB's just kinda stand there
looking dumb (hey, if you saw somone get knocked unconscious, youd be
suspicous too, eh?)

Any help with this MOB awareness would be appriciated

Anywhere here's the do_blackjack stuff


#define IS_CARRYING_BLUNT(ch) ((GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) !=
TYPE_BLUDGEON - TYPE_HIT) && (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) !=
TYPE_CRUSH - TYPE_HIT) && (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) !=
TYPE_POUND - TYPE_HIT))

ACMD(do_blackjack)
{
  struct char_data *vict;
  int percent, prob;
  if (IS_NPC(ch) || !GET_SKILL(ch, SKILL_BLACKJACK)) {
    send_to_char("You have no idea how to do that.\r\n", ch);
    return;
  }
  one_argument(argument, buf);
  if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) {
    send_to_char("Blackjack who?\r\n", ch);
    return;
  }
  if (vict == ch) {
    send_to_char("How can you sneak up on yourself?\r\n", ch);
    return;
  }
  if (!GET_EQ(ch, WEAR_WIELD)) {
    send_to_char("You need to wield a blunt weapon to make it a
success.\r\n", ch);
    return;
  }
  if (IS_CARRYING_BLUNT(ch) && GET_LEVEL(ch) < LVL_GOD) {
    send_to_char("You need a blunt weapon to do this....\r\n", ch);
    return;
  }
  if (FIGHTING(vict)) {
    send_to_char("You can't blackjack a fighting person -- they're too
alert!\r\n", ch);
    return;
  }
  if (MOB_FLAGGED(vict, MOB_AWARE) && AWAKE(vict)) {
    act("You notice $N try to blackjack you!", FALSE, vict, 0, ch, TO_CHAR);
    act("$e notices yoy try to blackjack $m!", FALSE, vict, 0, ch, TO_VICT);
    act("$n notices $N try to blackjack $m!", FALSE, vict, 0, ch,
TO_NOTVICT);
    hit(vict, ch, TYPE_UNDEFINED);
    return;
  }
  if (GET_POS(vict) <= POS_SLEEPING) {
     send_to_char("You cant knock somone out who is already
unconscious!\r\n", ch);
     return;
  }
  if (!AFF_FLAGGED(ch, AFF_SNEAK)) {
    send_to_char("You must be sneaking around to blackjack!\r\n", ch);
    return;
  }
  if (GET_POS(vict) >= POS_RESTING) {
    percent = number(1, 101);
    prob = GET_SKILL(ch, SKILL_BLACKJACK);
    if (AWAKE(vict) && (percent > prob))
      damage(ch, vict, 0, SKILL_BLACKJACK);
    else {
      vict->char_specials.position = POS_STUNNED;
      sprintf(buf, "$n falls unconscious",vict);
      act(buf, FALSE, vict, 0, ch, TO_ROOM);
      send_to_char("You fall to the floor, unconscious, seeing nothing but
black...\r\n", vict);
      if (GET_LEVEL(ch) < LVL_IMMORT)
        improve_skill(ch, SKILL_BLACKJACK);
    }
  }
}


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT