src/fight.c
/*
 * Do one group of attacks.
 */
Do one group of attacks.
Do one group of attacks .
void multi_hit( CHAR_DATA *ch, CHAR_DATA *victim, int dt )
{
    int     chance;
    if (ch->desc == NULL)
	ch->wait = UMAX(0,ch->wait - PULSE_VIOLENCE);
    if (ch->desc == NULL)
	ch->daze = UMAX(0,ch->daze - PULSE_VIOLENCE); 
    if (ch->position < POS_RESTING)
	return;
    if (IS_NPC(ch))
    {
	mob_hit(ch,victim,dt);
	return;
    }
    one_hit( ch, victim, dt );
    if (ch->fighting != victim)
	return;
    if (IS_AFFECTED(ch,AFF_HASTE))
	one_hit(ch,victim,dt);
    if ( ch->fighting != victim || dt == gsn_backstab )
	return;
    chance = get_skill(ch,gsn_second_attack)/2;
    if (IS_AFFECTED(ch,AFF_SLOW))
	chance /= 2;
    if ( number_percent( ) < chance )
    {
	one_hit( ch, victim, dt );
	check_improve(ch,gsn_second_attack,TRUE,5);
	if ( ch->fighting != victim )
	    return;
    }
    chance = get_skill(ch,gsn_third_attack)/4;
    if (IS_AFFECTED(ch,AFF_SLOW))
	chance = 0;;
    if ( number_percent( ) < chance )
    {
	one_hit( ch, victim, dt );
	check_improve(ch,gsn_third_attack,TRUE,6);
	if ( ch->fighting != victim )
	    return;
    }
    return;
}
void multi_hit ( CHAR_DATA * ch , CHAR_DATA * victim , int dt ) { int chance ; if ( ch -> desc == NULL ) ch -> wait = UMAX ( 0 , ch -> wait - PULSE_VIOLENCE ) ; if ( ch -> desc == NULL ) ch -> daze = UMAX ( 0 , ch -> daze - PULSE_VIOLENCE ) ; if ( ch -> position < POS_RESTING ) return ; if ( IS_NPC ( ch ) ) { mob_hit ( ch , victim , dt ) ; return ; } one_hit ( ch , victim , dt ) ; if ( ch -> fighting != victim ) return ; if ( IS_AFFECTED ( ch , AFF_HASTE ) ) one_hit ( ch , victim , dt ) ; if ( ch -> fighting != victim || dt == gsn_backstab ) return ; chance = get_skill ( ch , gsn_second_attack ) / 2 ; if ( IS_AFFECTED ( ch , AFF_SLOW ) ) chance /= 2 ; if ( number_percent ( ) < chance ) { one_hit ( ch , victim , dt ) ; check_improve ( ch , gsn_second_attack , TRUE , 5 ) ; if ( ch -> fighting != victim ) return ; } chance = get_skill ( ch , gsn_third_attack ) / 4 ; if ( IS_AFFECTED ( ch , AFF_SLOW ) ) chance = 0 ; ; if ( number_percent ( ) < chance ) { one_hit ( ch , victim , dt ) ; check_improve ( ch , gsn_third_attack , TRUE , 6 ) ; if ( ch -> fighting != victim ) return ; } return ; }
Do one group of attacks.
Do one group of attacks .
/* decrement the wait */ /* no attacks for stunnies -- just a check */