On Mon, 14 Oct 1996, Nicholas S. Wourms wrote: > Hi, I'm what you would probably consider a newbie coder :). > > My problem is this: I have implemented a paladin class on my mud. The > class works great, and is cool and everything...except for one small > problem. Whenever I try to use Warrior skills that I have assigned to > the class (such as kick), I get the message "You'd better leave all the > martial arts to fighters...". I have isolated this problem in do_kick in > act.offensive.c, I just need to know how to add CLASS_PALADIN to the "if > GET_CLASS(ch) != CLASS_WARRIOR" statement, so that Paladins will be able > to use warrior skils. C'mon all ya coders out there, show me yer stuff! :P change: if (GET_CLASS(ch) != CLASS_WARRIOR) to: if ((GET_CLASS(ch) != CLASS_WARRIOR) && (GET_CLASS(ch) !=CLASS_PALADIN)) Or to save typing add something like: #define IS_FIGHTER(ch) (!IS_NPC(ch) && \ ((GET_CLASS(ch) == CLASS_RANGER) || \ (GET_CLASS(ch) == CLASS_PALADIN) || \ (GET_CLASS(ch) == CLASS_RAIDER))) To utils.h Then that code up top becomes a simple: if (!IS_FIGHTER(ch)) Note the ranger/paladin/raider is from my code as those are my 3 fighter types, that follow many of the same rules like being able to kick. ******************************************************************* * Ron Hensley ron@dmv.com * * Systems Administrator http://www.dmv.com/~ron * * PGP Key at WWW Page * * DelMarVa OnLine 749-7898 Ext. 403 * ******************************************************************* +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST