public static boolean makeMicroBreweryRequest(final String parameters) { if (!KoLCharacter.gnomadsAvailable()) { KoLmafia.updateDisplay( "Since you have no access to the Gnomish Gnomad Camp, you may not visit the micromicrobrewery."); return false; } if (KoLConstants.microbreweryItems.isEmpty()) { MicroBreweryRequest.getMenu(); } if (parameters.equals("")) { RequestLogger.printLine("Today's Special: " + MicroBreweryRequest.getDailySpecial()); return false; } String[] splitParameters = AbstractCommand.splitCountAndName(parameters); String countString = splitParameters[0]; String nameString = splitParameters[1]; if (nameString.equalsIgnoreCase("daily special")) { nameString = MicroBreweryRequest.getDailySpecial().getName(); } else if (nameString.startsWith("\u00B6")) { String name = ItemDatabase.getItemName(StringUtilities.parseInt(nameString.substring(1))); if (name != null) { nameString = name; } } nameString = nameString.toLowerCase(); for (int i = 0; i < KoLConstants.microbreweryItems.size(); ++i) { String name = (String) KoLConstants.microbreweryItems.get(i); if (!StringUtilities.substringMatches(name.toLowerCase(), nameString, false)) { continue; } if (KoLmafiaCLI.isExecutingCheckOnlyCommand) { RequestLogger.printLine(name); return true; } int count = countString == null || countString.length() == 0 ? 1 : StringUtilities.parseInt(countString); if (count == 0) { int inebriety = ItemDatabase.getInebriety(name); if (inebriety > 0) { count = (KoLCharacter.getInebrietyLimit() - KoLCharacter.getInebriety()) / inebriety; } } for (int j = 0; j < count; ++j) { RequestThread.postRequest(new MicroBreweryRequest(name)); } return true; } return false; }