Multi-Attack Code

From: Entreri (entreri@netcom.com)
Date: 09/20/95


Hello Fellow Coders,
	I saw the posts about multi-attacks on the list and I thought
I would upload my own code for multi-attacks.  It is very simple, and
a little different than the other code posted here.

 
[Snip off most of code]
    if (GET_POS(ch) < POS_FIGHTING) {
      send_to_char("You would fight better standing.\r\n", ch);
      continue;
    }
 
    hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
    if (MOB_FLAGGED(ch, MOB_SPEC) && mob_index[GET_MOB_RNUM(ch)].func != 
NULL)
      (mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, "");
[My code begins here]
   /* Warrior's 2nd Attack at level 10 */
   if((GET_CLASS(ch) == CLASS_WARRIOR && (GET_POS(ch)) == POS_FIGHTING))
   if(GET_LEVEL(ch) > 9)
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
   /* Warrior's 3rd Attack at level 15 */
   if((GET_CLASS(ch) == CLASS_WARRIOR && (GET_POS(ch)) == POS_FIGHTING))
   if(GET_LEVEL(ch) > 14)
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
   /* Warrior's 4th Attack at level 20 */
   if((GET_CLASS(ch) == CLASS_WARRIOR && (GET_POS(ch)) == POS_FIGHTING))
   if(GET_LEVEL(ch) > 19)
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
   /* Warrior's 5th Attack at level 25 */
   if((GET_CLASS(ch) == CLASS_WARRIOR && (GET_POS(ch)) == POS_FIGHTING))
   if(GET_LEVEL(ch) > 24)
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
[My code ends here]
   }
}
[file ends here]

Warriors will get attacks at 10 15 20 and 25

change the class name to make more attacks for more clases



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