def genhenches(market=None, pc=False): market = int(request.args.get('market',4)) pc = request.args.get('pc','') if not market or 1 > market or 6 < market: market = 4 useclasses = pcclasses if pc else classes usespells = pcspells if pc else spells ol = [] for level in range(0,5): numhenches = libhenches.rollMarket(marketvals[market-1][level]) ol.append(libhenches.genHenches(numhenches, level, useclasses, market, True, usespells, names, profs, False)) ol = [[s.replace('\n','. ') for s in l] for l in ol] return render_template('hench.html',levels=ol)
if args.filterclass: cl = [t[0] for t in classes] if args.filterclass not in cl: print "Class %s not found in class file (used same case?)" % args.filterclass sys.exit(1) if args.market == 10: if args.filterclass: ol = libhenches.genHenchesFiltered(args.filterclass, args.num, int(args.level), classes, args.market, args.alignment, spells, names, profs, args.treasure != '') else: ol = libhenches.genHenches(args.num, int(args.level), classes, args.market, args.alignment, spells, names, profs, args.treasure != '') outstring = '\n'.join(ol) print outstring else: for month in range(0, args.num): print "Month " + str(month) + ":" for level in range(0, 5): numHenches = libhenches.rollMarket( libhenches.marketClasses[args.market - 1][level]) print "L" + str(level) + "s: " + str(numHenches) if args.filterclass: ol = libhenches.genHenchesFiltered(args.filterclass, numHenches, level, classes, args.market, args.alignment,
if args.filterclass: ol = libhenches.genHenchesFiltered( args.filterclass, args.num, int(args.level), classes, args.market, args.alignment, spells, names, profs, args.treasure != "", ) else: ol = libhenches.genHenches( args.num, int(args.level), classes, args.market, args.alignment, spells, names, profs, args.treasure != "" ) outstring = "\n".join(ol) print outstring else: for month in range(0, args.num): print "Month " + str(month) + ":" for level in range(0, 5): numHenches = libhenches.rollMarket(libhenches.marketClasses[args.market - 1][level]) print "L" + str(level) + "s: " + str(numHenches) if args.filterclass: ol = libhenches.genHenchesFiltered( args.filterclass, numHenches, level,