question on adding skills

From: Stefan Rensing (rensing@uhura.biologie.uni-freiburg.de)
Date: 02/20/95


Ok, forget my question in the mail before, I solved it.
However, I have two other problems with adding new skills.

1. If I add a do_command type skill (retreat in that case) I can
type the command despite it is not learned, it just wont succeed -
is this the supposed behaviour ?

2. I added second attack by adding a skill prob call in fight.c
and it works fine but sometimes the mud crashes :(
I do not know whether or not I have to add a second attack line in
the master command list in interpreter.c (actually I have, it looks
like this:
  { "second attack" , POS_FIGHTING , do_hit , 0 , SCMD_HIT },
and, btw, can someone explain the last two fields of these lines ?)

The added code in fight.c is (in perform_violence):

    if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room)
      stop_fighting(ch);
    else {
      hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
      percent = number(1, 101);                  /* added this */
      prob = GET_SKILL(ch, SKILL_SECOND_ATTACK);
      if (percent < prob) 
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED);  /* until here */

Any help appreciated,

thanks in advance, Stefan.

-- 
Stefan A. Rensing             Institute of Biology II/III - Schaenzlestr. 1
The SysOp Biologist           D-79104 Germany, phone: +49 761 2676 / FAX: 2675
e-mail: rensing@uhura.biologie.uni-freiburg.de  MUD: port 4242 on that <- host
http://www.biologie.uni-freiburg.de/data/people/lije.html IRC:Lije MUD:Aragorn
                                                      "I love you !" "I know."



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