public Exit findExit(XMLLibrary.XMLpiece piece, Map<String,Object> defined) throws CMException
	{
		final String tagName="EXIT";
		final List<XMLLibrary.XMLpiece> choices = getAllChoices(null,null,null,tagName, piece, defined,true);
		if((choices==null)||(choices.size()==0)) return null;
		final List<Exit> exitChoices = new Vector<Exit>();
		for(int c=0;c<choices.size();c++)
		{
			final XMLLibrary.XMLpiece valPiece = choices.get(c);
			if(valPiece.parms.containsKey("VALIDATE") && !testCondition(CMLib.xml().restoreAngleBrackets(CMLib.xml().getParmValue(valPiece.parms,"VALIDATE")),valPiece, defined))
				continue;
			defineReward(null,null,null,valPiece,null,defined);
			if(CMSecurity.isDebugging(CMSecurity.DbgFlag.MUDPERCOLATOR))
				Log.debugOut("MUDPercolator","Build Exit: "+CMStrings.limit(valPiece.value,80)+"...");
			final Exit E=buildExit(valPiece,defined);
			if(E!=null)
				exitChoices.add(E);
		}
		if(exitChoices.size()==0) return null;
		return exitChoices.get(CMLib.dice().roll(1,exitChoices.size(),-1));
	}