Bearhug?!?

From: Søren P. Skou (serces@MUD.DK)
Date: 10/14/97


Hi all..

First of all, thanks to all of you who helped out on the Object in
object thingie, I finally got it solved. :)

A new thing I pondered over on my way through the Ideas list is a
Bearhug skill. Oki I think to meself, this one is easy! Nearly as Easy
as can get. (Ohhh.. I should learn other things on the way there.. :)
Bearhug is essentially just stopping both PC and opponent for x amount
of rounds. This of course would be adjusted with the WAIT_STATE call. Or
at least that was what I thought. The Code is looking like this right
now :

ACMD(do_bearhug)
{
 struct char_data *victim;

 one_argument(argument, arg);

 if (!*arg && !FIGHTING(ch))
 {
  send_to_char("Bearhug who?\r\n", ch);
  return;
 }

 if(!IS_NPC(ch))
  if(!check_for_skill(ch, SKILL_BEARHUG))
   return;

 one_argument(argument, arg);

 if (!(victim = get_char_room_vis(ch, arg))) {
  if (FIGHTING(ch)) {
   victim = FIGHTING(ch);
  } else {
   send_to_char("Bearhug who?\r\n", ch);
   return;
  }
 }

 if (GET_SKILL(ch, SKILL_BEARHUG) > number(1, 101) || GET_LEVEL(ch) >=
LVL_IMMORT || (IS_NPC(ch))
 {
  if(!IS_NPC(ch))
   improve_skill(ch, SKILL_BEARHUG);
  act("$n grabs $N in a mighty bearhug.", FALSE, ch, 0, victim,
TO_NOTVICT);
  act("$n holds you in a mighty bearhug.", FALSE, ch, 0, victim,
TO_VICT);
  act("You hold $N in a mighty bearhug.", FALSE, ch, 0, victim,
TO_CHAR);
  if (!IS_NPC(ch))
   damage(ch, victim, GET_STR(ch) + GET_LEVEL(ch), TYPE_UNDEFINED,
NO_WEAPON);
  else
   damage(ch, victim, GET_STR(ch) + GET_LEVEL(ch) * 1.5, TYPE_UNDEFINED,
                                                        NO_WEAPON
  WAIT_STATE(victim, PULSE_VIOLENCE * 4);
  WAIT_STATE(ch, PULSE_VIOLENCE * 4);
 }
 else
 {
  act("$n tries to hold $N, but fails miserably", FALSE, ch, 0, victim,
TO_NOTV
  act("$n tries to hold You, but fails miserably", FALSE, ch, 0, victim,
TO_VIC
  act("You try to hold $N, but fail miserably", FALSE, ch, 0, victim,
TO_CHAR);
  WAIT_STATE(ch, PULSE_VIOLENCE * 2);
 }
}



If I put the lines like this
  WAIT_STATE(victim, PULSE_VIOLENCE * 4);
  WAIT_STATE(ch, PULSE_VIOLENCE * 4);
then it's victim getting to wait 4 Rounds of violence, whereas
  WAIT_STATE(ch, PULSE_VIOLENCE * 4);
  WAIT_STATE(victim, PULSE_VIOLENCE * 4);
Will put the Char waiting for 4 rounds. Question is pretty simple, is it
somehting I have done wrong and overlooked it, or is this plain
impossible??


/Serces


     +------------------------------------------------------------+
     | 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/08/00 PST