[Circle] message problem

From: Brian Williams - Nashak (bmw@efn.org)
Date: 08/18/96


I have a feeling there is something wrong with damage() function or 
something.. but here is my problem.. offensive skills don't send their 
messages.. <backstab, headbuitt, bash, kick>... anyways.. could someone 
post the original damage() function? mine is modified for my pkill and I 
don't got a backup of the old one
thanks




   Nashak			Brian Williams		The Realms of Luminari
   nashak@darkstr.com		bmw@efn.org		darkstr.com 6969


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+


From dkarnes@mystech.com Sun, 18 Aug 96 14:52:37 EDT
X-SystemInfo: MyE-Mail: EMail
X-Message-No: 3785 (database)
From: Derek Karnes <dkarnes@mystech.com>
To: circle <circle@cspo.queensu.ca>
Subject: [Circle] [Code] multiple attacks
Date: Sun, 18 Aug 96 19:52:00
Message-ID: <9608181852.AA11674@fc>
X-POP3-Rcpt: lk4150@per
Return-Path: <@QUCDN.QueensU.CA:owner-circle@cspo.queensu.ca>
Received: from QUCDN.QueensU.CA (QUCDN.QueensU.CA [130.15.126.2]) by per.cybercity.dk (8.6.12/8.6.12) with SMTP id UAA08460 for <lk4150@krull.dk>; Sun, 18 Aug 1996 20:58:41 +0200
Received: from cspo.queensu.ca by QUCDN.QueensU.CA (IBM VM SMTP V2R2) with TCP;Sun, 18 Aug 96 15:04:43 EDT
Received: by cspo.queensu.ca (SMI-8.6/SMI-SVR4)id OAA01784; Sun, 18 Aug 1996 14:43:51 -0500
Received: from mystech.com by cspo.queensu.ca (SMI-8.6/SMI-SVR4)
Received: (from mail@localhost) by mystech.com (8.7.4/8.7.3) id OAA16034 for <circle@cspo.queensu.ca>; Sun, 18 Aug 1996 14:45:58 -0400
Received: from unknown(42.3.0.4) by bastion.mystech.com via smap (V1.3)
Received: by fc (4.1/SMI-4.1)
Sender: owner-circle@cspo.queensu.ca
Precedence: bulk

I'm adding multiple attacks in perform_violence; the problem being that
the fight looks a lot like this:

ch hits vict
prompt 1>

vict hits ch
vict hits ch
vict hits ch
prompt 2>

vict hits ch
vict hits ch
vict hits ch
prompt 3>

vict hits ch
vict hits ch
vict hits ch
ch hits vict
ch hits vict
ch hits vict
prompt 4>

after that, it keeps giving the correct messages such as above prompt 4.

I understand the part above prompt 1 (do_hit is called, after which
perform_violence is called the next round, thus only 1 hit message.
I don't understand why the victim gets two free rounds of attacks, and
how I can stop that from happening. Here's a not-so-short version of my
perform_violence code:


void perform_violence(void)
{
  struct char_data *ch;
  int attacks, i = 0;
  extern struct index_data *mob_index;

  for (ch = combat_list; ch; ch = next_combat_list){
      next_combat_list = ch->next_fighting;
      
      i = 0;
      attacks = 3;

      if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room){
	  stop_fighting(ch);
	  continue;
	}
      if (IS_NPC(ch)){
	  if (GET_MOB_WAIT(ch) > 0){
	      GET_MOB_WAIT(ch) -= PULSE_VIOLENCE;
	      continue;
	    }
	  GET_MOB_WAIT(ch) = 0;
	  if (GET_POS(ch) < POS_FIGHTING){
	      GET_POS(ch) = POS_FIGHTING;
	      act("$n scrambles to $s feet!", TRUE, ch, 0, 0, TO_ROOM);
	    }
	}
      if (GET_POS(ch) < POS_FIGHTING){
	  send_to_char("You can't fight while sitting!!\r\n", ch);
	  continue;
	}

      while(i<attacks){
	  if( FIGHTING(ch)&& (ch != FIGHTING(ch)) ){
	      if (AWAKE(ch) && (ch->in_room == FIGHTING(ch)->in_room))
		hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
	      else /* Not in same room victim, fled during an attack*/
		if (FIGHTING(ch))
		  stop_fighting(ch);
	    } 
	  else/*ch fighting themselves - 2.2 bug?*/
	    if (FIGHTING(ch))
	      stop_fighting(ch);
	  i++;
	}

      if (MOB_FLAGGED(ch, MOB_SPEC) &&
	  mob_index[GET_MOB_RNUM(ch)].func != NULL)
	(mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "");
    }
}
 Any ideas? the calls to perfrom violence are stock circle stuff.
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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