Ejemplo n.º 1
0
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) 
Ejemplo n.º 2
0
        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,
                                                   spells, names, profs,
                                                   args.treasure != '')
            else:
                ol = libhenches.genHenches(numHenches, level, classes,
                                           args.market, args.alignment, spells,
                                           names, profs, args.treasure != '')
            outstring = '\n'.join(ol)
            print outstring
Ejemplo n.º 3
0
            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,
                    spells,
                    names,
                    profs,
                    args.treasure != "",
                )
            else: