Re: New Class

From: Mark McArthey (mcarthey@mfa.com)
Date: 07/18/96


Hi all, 

This got me thinking.  Would it be possible to associate the fighter
class with the knight class?  What is mean is this:  Since the knight 
will (for example) have all of the skills of a standard fighter, plus
maybe some extras - would there be a way to do away with all of the
checks (GET_CLASS(ch) != CLASS_KNIGHT) and avoid having to put them
throughout the code?  
I am thinking ahead to something that I would like to implement 
eventually.  I am going to put in dual class, but I don't want to 
have a fighter/thief and a fighter/mage running around.  I would like
a burgler and a warlock.  In the code, I would like the characters
to assume skills of (obviously) a fighter and thief/mage, but it would 
be messy to add a check like above for every new class(name) added.  

Any ideas?

Thanks much!

 Mark McArthey          `  _ ,  '   
 mcarthey@execpc.com   -  (o)o)  -  
-----------------------ooO'(_)--Ooo-

On Thu, 18 Jul 1996, Carlos Rodriguez wrote:

> On Thu, 18 Jul 1996, Sergey Katsev wrote:
> 
> > I added a new class (Knight) successfully, but now, when it tries to use 
> > any of the warrior skills (like kick), the mud won't let it (please leave 
> > the martial arts to the fighters).  Does anyone know what I have to edit 
> > to fix this?  Thanks you.
> > Phantom
> 
> 
>   In act.offensive.c, in the function do_kick, you'll find this around 
> line 380:
> 
>     if (GET_CLASS(ch) != CLASS_WARRIOR) {
>        send_to_char("Leave the martial arts to the fighters.")
>        return 0;
>     }
> 
>   Just change it to something like:
>     
>     if ((GET_CLASS(ch) != CLASS_WARRIOR) && (GET_CLASS(ch) != CLASS_KNIGHT)) {
>        send_to_char("Leave the martial arts to the fighters and knights.")
>        return 0;
>     }
> 
> 
>   Do the same change to the similar lines that are in do_rescue and in
> do_bash and you're ready to go!
> 
> 
> ------------------------------------------------------------------------------
>   Visita Agharti!!!                 |             	    Carlos Rodriguez
>     http://wwww.chs.itesm.mx:8080/  |		crodrigu@campus.chs.itesm.mx
>     crodrigu/Agharti/		    |		webadmin@campus.chs.itesm.mx
> 				    |  http://www.chs.itesm.mx:8080/crodrigu/
> ------------------------------------------------------------------------------
>  
> 
> 



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