class TargetTypeHitPrereqCondition extends BaseHitPrereqCondition
{
	var m_targetType : CName;

	public override function SetData( recordID : TweakDBID )
	{
		m_targetType = TweakDBInterface.GetCName( recordID + T".targetType", '' );
		super.SetData( recordID );
	}

	public override function Evaluate( hitEvent : gameHitEvent ) : Bool
	{
		var result : Bool;
		switch( m_targetType )
		{
			case 'Player':
				result = ( ( PlayerPuppet )( hitEvent.target ) );
			break;
			case 'Puppet':
				result = ( ( ScriptedPuppet )( hitEvent.target ) );
			break;
			case 'Vehicle':
				result = ( ( VehicleObject )( hitEvent.target ) );
			break;
			default:
				return false;
		}
		if( result )
		{
			result = CheckOnlyOncePerShot( hitEvent );
		}
		return ( ( m_invert ) ? ( !( result ) ) : ( result ) );
	}

}

