More questions.. (geez:P)

From: Burkhard Knopf (Burkhard.Knopf@informatik.tu-clausthal.de)
Date: 04/21/96


>>>>> "corey" == corey hoitsma <choitsma@netcom.com> writes:

 corey> [...]
 corey> 	How would I create a beserk/hitall skill for warriors
 corey> and thieves?  I thought about using the 'earthquake' spell as
 corey> an example but I'm afraid that wouldn't work to well.. last
 corey> time I did that I messed everything up:P

I found something like that in VieMUD3.0 (changed slightly to put it
into CircleMUD):
(slay is meant to attack all non-charmed mobs and any other person
 who's currently fighting you - you have to be fighting when using it.)

ACMD(do_slay)
{
  struct char_data *i;
  int percent;

  if (GET_CLASS(ch) != CLASS_WARRIOR) {
    send_to_char("You'd better leave all the martial arts to fighters.\n\r",ch);
    return;
  }

  if (!FIGHTING(ch)) {
    send_to_char("You have to fight for a slay.\n\r",ch);
    return;
  }

  if(GET_HIT(ch)<6) {
    send_to_char("You are too exhausted for that !!!\n\r",ch);
    return;
  }

  if(!GET_EQ(ch, WEAR_WIELD)) {
    send_to_char("You need a weapon for that!!!\n\r",ch);
    return;
  }

/* here it works */

  GET_HIT(ch)-=5;
  send_to_char("You rotate your weapon over your head, slaying all the bad things in here !\n\r",ch);
  act("Wow !!!! $n rotates $s weapon over $s head.",FALSE,ch,0,0,TO_ROOM);

  for(i=world[ch->in_room].people;i;i=i->next_in_room) {

    if((IS_NPC(i) && !i->master) || FIGHTING(i) == ch) {
      percent = ((10 - (real_ac(i)/10)) << 1) + number(1,101); 

      if (percent > GET_SKILL(ch,SKILL_SLAY)) {
	act("$n misses $N with the slay.",FALSE,ch,0,i,TO_ROOM);
	act("$n misses you with the slay.",FALSE,ch,0,i,TO_VICT);
      } else {
	act("$N suffers from your slay.",FALSE,ch,0,i,TO_CHAR);
	act("$N suffers from the slay.",FALSE,ch,0,i,TO_ROOM);
	act("You suffer from $n's slay.",FALSE,ch,0,i,TO_VICT);
	GET_HIT(i) -= MIN((GET_LEVEL(ch)>>1) + 2
			  + (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 2)), 25);
	update_pos(i);
	if(!FIGHTING(i) && GET_POS(i)>POS_STUNNED) {		  
	  set_fighting(i,ch);
	}
      }
    }
  }
  WAIT_STATE(ch, PULSE_VIOLENCE*2);
}


-- 
Burkhard Knopf                           and when they say 'take of his body'
   e-mail:                               I think I'll take from mine instead
burkhard.knopf@informatik.tu-clausthal.de               "Icicle" - Tori Amos



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