Each skill and spell needs this line added to the success if statement.
ch->success_attack += 1;
MUD.H
Add to the char_data structure
int success_attack;
int damage_amount;
FIGHT.C
in NEW_DAMAGE_MESSAGE
replace the parts that look like this code with this:
if ( dt == TYPE_HIT )
{
snprintf ( buf1, 256, "$n %s $N%c [%d] Times for [%d] Total Damage", vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf2, 256, "You %s $N%c [%d] Times for [%d] Total Damage", vs, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf3, 256, "$n %s you%c [%d] Times for [%d] Total Damage", vp, punct, ch->success_attack, ch->damage_amount );
}
snprintf ( buf1, 256, "$n's poisoned %s %s $N%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf2, 256, "Your poisoned %s %s $N%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf3, 256, "$n's poisoned %s %s you%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf1, 256, "$n's %s %s $N%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf2, 256, "Your %s %s $N%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
snprintf ( buf3, 256, "$n's %s %s you%c [%d] Times for [%d] Total Damage", attack, vp, punct, ch->success_attack, ch->damage_amount );
in DAMAGE
find
if ( ch != victim )
dam_message ( ch, victim, dam, dt );
/*
* Hurt the victim, Inform the victim of his new state.
*/
victim->hit -= dam;
replace with
ch->damage_amount = 0;
dam = dam * ch->success_attack; // removing battle spam Fury.
ch->damage_amount = dam;
if ( dam == 0 )
ch->success_attack = 0;
if ( ch != victim )
dam_message ( ch, victim, dam, dt );
/*
* Hurt the victim, Inform the victim of his new state.
*/
victim->hit -= dam;
MULTI_HIT
Check your function first to see if it has extra code, then replace with this
/*
* Do one group of attacks.
*/
ch_ret multi_hit ( CHAR_DATA * ch, CHAR_DATA * victim, int dt )
{
int schance;
int dual_bonus;
ch_ret retcode;
ch->success_attack = 0;
/* add timer to pkillers */
if ( !IS_NPC ( ch ) && !IS_NPC ( victim ) )
{
if ( xIS_SET ( ch->act, PLR_NICE ) )
return rNONE;
add_timer ( ch, TIMER_RECENTFIGHT, 11, NULL, 0 );
add_timer ( victim, TIMER_RECENTFIGHT, 11, NULL, 0 );
}
/* Check for suppressed or hidden attack */
if ( is_attack_supressed ( ch ) )
return rNONE;
/* Check for NO attack mobile */
if ( IS_NPC ( ch ) && xIS_SET ( ch->act, ACT_NOATTACK ) )
return rNONE;
/* Check for circle or backstab attack
if ( who_fighting ( ch ) != victim || dt == gsn_backstab || dt == gsn_circle )
return rNONE; */
/* NPC predetermined number of attacks -Thoric */
if ( IS_NPC ( ch ) && ch->numattacks > 0 )
{
for ( schance = 0; schance < ch->numattacks; schance++ )
{
ch->success_attack += 1;
}
retcode = one_hit ( ch, victim, dt );
return retcode;
}
/* Check for berserk attack */
schance = IS_NPC ( ch ) ? 100 : ( LEARNED ( ch, gsn_berserk ) * 5 / 2 );
if ( IS_AFFECTED ( ch, AFF_BERSERK ) && number_percent( ) < schance )
{
ch->success_attack += 1;
}
/* Check for dual wield attack */
if ( get_eq_char ( ch, WEAR_DUAL_WIELD ) )
{
dual_bonus = IS_NPC ( ch ) ? ( ch->level / 10 ) : ( LEARNED ( ch, gsn_dual_wield ) / 10 );
schance = IS_NPC ( ch ) ? ch->level : LEARNED ( ch, gsn_dual_wield );
if ( number_percent( ) < schance )
{
learn_from_success ( ch, gsn_dual_wield );
ch->success_attack += 1;
}
else
learn_from_failure ( ch, gsn_dual_wield );
}
else
dual_bonus = 0;
if ( ch->move < 10 )
dual_bonus = -20;
/* Roll for first attack */
schance = IS_NPC ( ch ) ? ( int ) ( ch->level / 2 ) : 0;
if ( number_percent( ) < schance )
ch->success_attack += 1;
/* Roll for second attack */
schance = IS_NPC ( ch ) ? ch->level : ( int ) ( ( LEARNED ( ch, gsn_second_attack ) + dual_bonus ) / 1.5 );
if ( number_percent( ) < schance )
{
learn_from_success ( ch, gsn_second_attack );
ch->success_attack += 1;
}
else
learn_from_failure ( ch, gsn_second_attack );
/* Roll for third attack */
schance = IS_NPC ( ch ) ? ch->level : ( int ) ( ( LEARNED ( ch, gsn_third_attack ) + ( dual_bonus * 1.5 ) ) / 2 );
if ( number_percent( ) < schance )
{
learn_from_success ( ch, gsn_third_attack );
ch->success_attack += 1;
}
else
learn_from_failure ( ch, gsn_third_attack );
/* Roll for forth attack */
schance = IS_NPC ( ch ) ? ch->level : ( int ) ( ( LEARNED ( ch, gsn_fourth_attack ) + ( dual_bonus * 2 ) ) / 3 );
if ( number_percent( ) < schance )
{
learn_from_success ( ch, gsn_fourth_attack );
ch->success_attack += 1;
}
else
learn_from_failure ( ch, gsn_fourth_attack );
/* Roll for fifth attack */
schance = IS_NPC ( ch ) ? ch->level : ( int ) ( ( LEARNED ( ch, gsn_fifth_attack ) + ( dual_bonus * 3 ) ) / 4 );
if ( number_percent( ) < schance )
{
learn_from_success ( ch, gsn_fifth_attack );
ch->success_attack += 1;
}
else
learn_from_failure ( ch, gsn_fifth_attack );
if ( ( retcode = one_hit ( ch, victim, dt ) ) != rNONE )
return retcode;
retcode = rNONE;
if ( retcode == rNONE )
{
int move;
if ( !IS_AFFECTED ( ch, AFF_FLYING ) && !IS_AFFECTED ( ch, AFF_FLOATING ) )
move = encumbrance ( ch, movement_loss[UMIN ( SECT_MAX - 1, ch->in_room->sector_type ) ] );
else
move = encumbrance ( ch, 1 );
if ( ch->move )
ch->move = UMAX ( 0, ch->move - move );
}
return retcode;
}
do we really need 22 ways to strike someone who you are already swinging your sword at five times per second?