@Override
	public int getAlignPurity(int faction, Faction.Align eq)
	{
		int bottom=Integer.MAX_VALUE;
		int top=Integer.MIN_VALUE;
		final int pct=getPercent(AlignID(),faction);
		final Enumeration<FRange> e = getRanges(AlignID());
		if(e!=null)
		for(;e.hasMoreElements();)
		{
			final Faction.FRange R=e.nextElement();
			if(R.alignEquiv()==eq)
			{
				if(R.low()<bottom)
					bottom=R.low();
				if(R.high()>top)
					top=R.high();
			}
		}
		switch(eq)
		{
			case GOOD:
				return Math.abs(pct - getPercent(AlignID(),top));
			case EVIL:
				return Math.abs(getPercent(AlignID(),bottom) - pct);
			case NEUTRAL:
				return Math.abs(getPercent(AlignID(),(int)Math.round(CMath.div((top+bottom),2))) - pct);
			default:
				return 0;
		}
	}