@Override
	public void grantAbilities(MOB mob, boolean isBorrowedRace)
	{
		final PairList<Ability,AbilityMapping> onesToAdd=new PairVector<Ability,AbilityMapping>();
		for(final Enumeration<Ability> a=CMClass.abilities();a.hasMoreElements();)
		{
			final Ability A=a.nextElement();
			final AbilityMapping mapping = CMLib.ableMapper().getQualifyingMapping(ID(), false, A.ID());
			if((mapping != null)
			&&(mapping.qualLevel()>0)
			&&(mapping.qualLevel()<=mob.phyStats().level())
			&&(mapping.autoGain()))
			{
				final String extraMask=mapping.extraMask();
				if((extraMask==null)
				||(extraMask.length()==0)
				||(CMLib.masking().maskCheck(extraMask,mob,true)))
					onesToAdd.add(A,mapping);
			}
		}
		for(int v=0;v<onesToAdd.size();v++)
		{
			final Ability A=onesToAdd.get(v).first;
			final AbilityMapping map=onesToAdd.get(v).second;
			giveMobAbility(mob,A,map.defaultProficiency(),map.defaultParm(),isBorrowedRace);
		}
	}