Nic Suzor wrote: > > Hey, > > i have recently added races to my mud, and i am toying with an idea: > > currently spells are given to pcs based on class. what would be ideal, is > to also have spells given to races. so, a HUMAN MAGE and a OGRE MAGE would > have the same MAGE class spells, but the ogre might have a couple of extra > spells given only to ogres... the way im thinking of doing it would be to > duplicate the whole do_cast function, but that might be a little big... i > am wondering if i can just add another pointer in do_cast to a new array > like the one in class.c that defines spell levels. if i just make a new > array, SPELL_RACE_LEVEL or something like that, is it possible? this would > also be easier as i wouldnt need to add a new command instead of cast etc. > just a thought. > > Nic Suzor I'm not sure if this would be an easier or a better wa y to do this, but it might work. Just add the spell normally, as if it were for all races. Then put something like this: if (GET_RACE(ch) == RACE_HUMAN) { send_to_char(ch, "Only ogres can cast this spell!"); break; } It would work (I think), and it would be relativly problem free. Mathieu Fenniak +-----------------------------------------------------------+ | 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