| Message |
This is what i did to make my styles gain by using and also to make all my skills and spells learn at a much slower rate.
/* Auto increase styles and modify damage based on character's fighting style, code cut from smaugfuss boards. By Remcom*/
switch( ch->style )
{
default:
case STYLE_FIGHTING:
if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_style_standard] > -1 )
learn_from_success( ch, gsn_style_standard );
break;
case STYLE_DEFENSIVE:
if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_style_defensive] > -1 )
learn_from_success( ch, gsn_style_defensive );
dam = ( int )( .85 * dam );
break;
case STYLE_EVASIVE:
if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_style_evasive] > -1 )
learn_from_success( ch, gsn_style_evasive );
dam = ( int )( .8 * dam );
break;
case STYLE_AGGRESSIVE:
if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_style_aggressive] > -1 )
learn_from_success( ch, gsn_style_aggressive );
dam = ( int )( 1.1 * dam );
break;
case STYLE_BERSERK:
if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_style_berserk] > -1 )
learn_from_success( ch, gsn_style_berserk );
dam = ( int )( 1.2 * dam );
break;
}
Then this was added to learn_from_success
/* the following added by tommi Jan 2006, Code cut from AFKmud written by Tarl.
*/
if( skill_table[sn]->type == SKILL_WEAPON )
{
lchance = number_range( 1, 10 );
if( lchance != 5 )
{
return;
}
}
if( skill_table[sn]->type == SKILL_SKILL )
{
lchance = number_range( 1, 5 );
if( lchance != 3 )
{
return;
}
}
if( skill_table[sn]->type == SKILL_SPELL )
{
lchance = number_range( 1, 3 );
if( lchance != 2 )
{
return;
}
This was a simple hackish option that i chose, now since adding this in, i have thought about it a lot more and come up with a better solution to doing this. |
EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
| top |
|