I've been looking over the class struct but I can't seem to fully figure out how to let races have skills. Just the same as classes, I want races to have skills too. A little help?
Races having skills
Posted by Zeno on Mon 19 Jul 2004 08:45 PM — 3 posts, 9,199 views.
You can try this:
http://www.auricmud.com/snippets/RaceSkills.c
http://www.auricmud.com/snippets/RaceSkills.c
I have that somewhere, but I don't seem to like it. Its somewhere to start, but... there was a reason I didn't use it. Something to do with it replacing a lot of main functions I think.
[EDIT] Another reason I don't like it, is because it doesn't seem correct.
Yet learn_from_fail has no sklvl.
[EDIT] Another reason I don't like it, is because it doesn't seem correct.
void learn_from_failure
sklvl = skill_table[sn]->skill_level[ch->class];
becomes:
sklvl = skill_level( ch, sn);
Yet learn_from_fail has no sklvl.
void learn_from_failure( CHAR_DATA *ch, int sn )
{
int adept, chance;
if ( IS_NPC(ch) || ch->pcdata->learned[sn] <= 0 )
return;
chance = ch->pcdata->learned[sn] + (5 * skill_table[sn]->difficulty);
if ( chance - number_percent() > 25 )
return;
adept = GET_ADEPT(ch, sn);
if ( ch->pcdata->learned[sn] < (adept-1) )
ch->pcdata->learned[sn] = UMIN( adept, ch->pcdata->learned[sn] + 1 );
}