Can anyone please help add the weapons name in the damage output and replace the damage type? Please help me because i m learning coding smaug.
if( skill->miss_char && skill->miss_char[0] != '\0' )
{
act( AT_HIT, skill->miss_char, ch, NULL, victim, TO_CHAR );
found = TRUE;
}
if( skill->miss_vict && skill->miss_vict[0] != '\0' )
{
act( AT_HITME, skill->miss_vict, ch, NULL, victim, TO_VICT );
found = TRUE;
}
if( skill->miss_room && skill->miss_room[0] != '\0' )
{
if( str_cmp( skill->miss_room, "supress" ) )
act( AT_ACTION, skill->miss_room, ch, NULL, victim, TO_NOTVICT );
found = TRUE;
}
if( found ) /* miss message already sent */
{
if( was_in_room )
{
char_from_room( ch );
char_to_room( ch, was_in_room );
}
return;
}
}
else
{
if( skill->hit_char && skill->hit_char[0] != '\0' )
act( AT_HIT, skill->hit_char, ch, NULL, victim, TO_CHAR );
if( skill->hit_vict && skill->hit_vict[0] != '\0' )
act( AT_HITME, skill->hit_vict, ch, NULL, victim, TO_VICT );
if( skill->hit_room && skill->hit_room[0] != '\0' )
act( AT_ACTION, skill->hit_room, ch, NULL, victim, TO_NOTVICT );
}
}
else if( dt >= TYPE_HIT && dt < TYPE_HIT + sizeof( attack_table ) / sizeof( attack_table[0] ) )
{
if( obj )
attack = obj->short_descr;
else
attack = attack_table[dt - TYPE_HIT];
}
else
{
bug( "Dam_message: bad dt %d from %s in %d.", dt, ch->name, ch->in_room->vnum );
attack = attack_table[0];
}
snprintf( buf1, 256, "$n's [%s] %s $N for [%d] dmg.", attack, vp, dam);
snprintf( buf2, 256, "Your [%s] %s $N for [%d] dmg.", attack, vp, dam);
snprintf( buf3, 256, "$n's [%s] %s you for [%d] dmg.", attack, vp, dam);
}
|