protected int genProperties(MOB mob, TriadList<String,String,Integer> properties, int showNumber, int showFlag)
	throws IOException
	{
		for(int p=0;p<=properties.size();p++)
		{
			if((p<properties.size())
			&&(properties.get(p).first.equalsIgnoreCase("MOOD")))
				continue;
			if((showFlag>0)&&(showFlag!=showNumber))
			{
				if(p<properties.size()) 
					showNumber++;
				continue;
			}
			if(p==properties.size())
			{
				if((mob.session()!=null)&&(!mob.session().isStopped()))
				{
					if(((showFlag<=-999)&&CMLib.genEd().prompt(mob,false,showNumber,showFlag,L("Add new mob property")))
					||(showNumber==showFlag))
					{
						properties.add("AbilityID","",Integer.valueOf(properties.size()));
						p-=1;
					}
					else
					if(showFlag==-1)
						mob.tell(L("@x1. Add new mob property",""+showNumber));
				}
				continue;
			}
			String propertyID=properties.get(p).first;
			String parms=properties.get(p).second;

			mob.tell(L("@x1. Effect: @x2: @x3",""+showNumber,propertyID,parms));
			if((showFlag==showNumber)||(showFlag<=-999))
			{
				propertyID=CMLib.genEd().prompt(mob,propertyID,showNumber,showFlag,L("Ability ID (NULL to delete)"),true,toStringList(CMClass.abilities()));
				if(propertyID.length()==0)
				{
					properties.remove(p);
					p--;
					if((showFlag==showNumber))
						break;
					showNumber--;
					continue;
				}
				if(CMClass.getAbility(propertyID)==null)
				{
					mob.tell(L("Ability '@x1' does not exist.  Use ? for a list.",propertyID));
					p--;
					showNumber--;
					continue;
				}
				StringBuilder help=CMLib.help().getHelpText(propertyID,mob,true);
				if(help==null)
					help=new StringBuilder("No help on '"+propertyID+"'");
				parms=CMLib.genEd().prompt(mob,parms,showNumber,showFlag,L("Ability Parameters"),help.toString());
				properties.get(p).first =propertyID;
				properties.get(p).second = parms;
			}
			showNumber++;
		}
		return showNumber;
	}