Re: skill/spell list

From: Giao H Phan (
Date: 05/24/95

the easiest way i no, and i think this might have bin mentioned if it 
aint by the time u get this, is to sort the entire list, and let yer list 
function take an arg of what list yer searching, and appropriately 
display only the skills or spells that match that criteria:

for every spell and/or skill in list
  if it's a spell and the arg is 'show me spells'
    show the sucker
  if it's a skill and the arg is 'show me skills'
    show the sucker

there are other, perhaps more elegant solutions as well...
i would probably add some bits to represent various types of spells and 
skills (ie: war/thi/cle/mag) and also use the ones already there:
(mag_room, mag_object, etc.) and do the same code with more versatility:

for every spell and/or skill in list
  IS_SET(spellinfo_long, BIT_passed_in_arg)
    show the sucker

this way i can do a     show_dem_skills(ch, MAG_THIEF_SKILL | MAG_COMBAT)
an it'll show me a sorted list of all thief skills that are used in combat.
you can easily add more bits to the spellinfo long, it's only got like 
10 i think. remember yu will of course have to add them to the spello 
calls. thats a bitch, but i'm thinking of moving the spello calls to a 
data file anyway... i hate editing them by hand, and using bison/etc. 
will not work for _every_ circle pimplementor. perhaps someone wants 
to work on this - just think, yer world imps can handle all the spell 
info, load it into the mud at any time, etc. sounds good to me...
anyone no wtf i am talkin about? :)


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