Re: Skill problem

From: Johan Dustler (epkjodu@thepk2.ericsson.se)
Date: 03/15/96


> From: BODE@juncol.juniata.edu
> Date: Thu, 14 Mar 1996 10:27:22 -0500 (EST)
> Subject: Skill problem
> 
>    Question regarding skills:  can you have a skill which doesn't require a
> command to do?  If so, how does one access it in the game?  What I am trying to
> do is give warriors a second attack skill to practice.  The skill will be auto-
> matically used whenever they get in a fight.  I have already added the line
> 	#define SKILL_SECOND_ATTACK      <number>
> in the header file, and I have also added the line
> 	skillo(SKILL_SECOND_ATTACK);
> in spell_parser.c and assigned it to warriors in class.c.  It still will not
> show up on the list of skills and I cannot set it with the skillset command. 
> What am I doing wrong?
> 
>  ------------------------------------------------------------------------------
> (    Wyatt J. Bode    |   Macintosh Specialist/Manager   |   Juniata College   )
> (                                                                              )
> (      bode@juncol.juniata.edu          http://www.juniata.edu/~wbode          )
>  ------------------------------------------------------------------------------
>

In perform_violence() (fight.c)

if GET_SKILL(ch, SKILL_SECOND_ATTACK) != 0 {
	prob = GET_SKILL(ch, SKILL_SECOND_ATTACK);
	percent = number(1, 101);

	if (percent > prob)
		hit (ch, FIGHTING(ch), TYPE_UNDEFINED);
}

To get the skill to show up on the prac list you have to add it to the
list of skillnames in spell_parser.c.
In spell_parser.c make a search for track. Then change the first
!UNUSED! to "second attack" instead.

-Johan



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