src/fight.c
/*
 * See if an attack justifies a KILLER flag.
 */
See if an attack justifies a KILLER flag.
See if an attack justifies a KILLER flag .
void check_killer( CHAR_DATA *ch, CHAR_DATA *victim )
{
    char buf[MAX_STRING_LENGTH];
    while ( IS_AFFECTED(victim, AFF_CHARM) && victim->master != NULL )
	victim = victim->master;
    if ( IS_NPC(victim)
    ||   IS_SET(victim->act, PLR_KILLER)
    ||   IS_SET(victim->act, PLR_THIEF))
	return;
    if ( IS_SET(ch->affected_by, AFF_CHARM) )
    {
	if ( ch->master == NULL )
	{
	    char buf[MAX_STRING_LENGTH];
	    sprintf( buf, "Check_killer: %s bad AFF_CHARM",
		IS_NPC(ch) ? ch->short_descr : ch->name );
	    bug( buf, 0 );
	    affect_strip( ch, gsn_charm_person );
	    REMOVE_BIT( ch->affected_by, AFF_CHARM );
	    return;
	}
	stop_follower( ch );
	return;
    }
    if ( IS_NPC(ch)
    ||   ch == victim
    ||   ch->level >= LEVEL_IMMORTAL
    ||   !is_clan(ch)
    ||   IS_SET(ch->act, PLR_KILLER) 
    ||	 ch->fighting  == victim)
	return;
    send_to_char( "*** You are now a KILLER!! ***\n\r", ch );
    SET_BIT(ch->act, PLR_KILLER);
    sprintf(buf,"$N is attempting to murder %s",victim->name);
    wiznet(buf,ch,NULL,WIZ_FLAGS,0,0);
    save_char_obj( ch );
    return;
}
void check_killer ( CHAR_DATA * ch , CHAR_DATA * victim ) { char buf [ MAX_STRING_LENGTH ] ; while ( IS_AFFECTED ( victim , AFF_CHARM ) && victim -> master != NULL ) victim = victim -> master ; if ( IS_NPC ( victim ) || IS_SET ( victim -> act , PLR_KILLER ) || IS_SET ( victim -> act , PLR_THIEF ) ) return ; if ( IS_SET ( ch -> affected_by , AFF_CHARM ) ) { if ( ch -> master == NULL ) { char buf [ MAX_STRING_LENGTH ] ; sprintf ( buf , " " , IS_NPC ( ch ) ? ch -> short_descr : ch -> name ) ; bug ( buf , 0 ) ; affect_strip ( ch , gsn_charm_person ) ; REMOVE_BIT ( ch -> affected_by , AFF_CHARM ) ; return ; } stop_follower ( ch ) ; return ; } if ( IS_NPC ( ch ) || ch == victim || ch -> level >= LEVEL_IMMORTAL || ! is_clan ( ch ) || IS_SET ( ch -> act , PLR_KILLER ) || ch -> fighting == victim ) return ; send_to_char ( " \n \r " , ch ) ; SET_BIT ( ch -> act , PLR_KILLER ) ; sprintf ( buf , " " , victim -> name ) ; wiznet ( buf , ch , NULL , WIZ_FLAGS , 0 , 0 ) ; save_char_obj ( ch ) ; return ; }
See if an attack justifies a KILLER flag.
See if an attack justifies a KILLER flag .
/*
     * Follow charm thread to responsible character.
     * Attacking someone's charmed char is hostile!
     */ /*
     * NPC's are fair game.
     * So are killers and thieves.
     */ /*
     * Charm-o-rama.
     */ /*
	send_to_char( "*** You are now a KILLER!! ***\n\r", ch->master );
  	SET_BIT(ch->master->act, PLR_KILLER);
*/ /*
     * NPC's are cool of course (as long as not charmed).
     * Hitting yourself is cool too (bleeding).
     * So is being immortal (Alander's idea).
     * And current killers stay as they are.
     */