Пример #1
0
parser.add_argument("-e",
                    "--treasure",
                    default="./treasuretables",
                    help="File of treasure type tables")
parser.add_argument("-u",
                    "--full",
                    action='store_true',
                    help="Generate full lair/encounter descriptions")
parser.add_argument("-n",
                    "--encounter",
                    action='store_true',
                    help="Generate single encounter per hex rather than lairs")
args = parser.parse_args()

# load the monster file
tables.loadtables(args.monsters)
# load the terrain description
tables.loadtables(args.terrainfile)
# load the treasure files
tables.loadtables(args.treasure)

encTypeSuffix = "Enc" if args.encounter else "Lair"

# and now we generate the lairs in the hexes
for r in range(0, args.rows):
    for c in range(0, args.cols):
        if not args.encounter: print "Hex (" + str(r) + ", " + str(c) + "):"
        numlairs = 1 if args.encounter else dice.roll(lairdice[args.terrain])
        for i in range(0, numlairs):
            monster = tables.evaltable(args.terrain + "Enc")
            print monster
Пример #2
0
#!/usr/bin/python2

import re
import random
import argparse
import tables

parser = argparse.ArgumentParser(description="Generate treasure")
parser.add_argument("-t","--tables",default="./treasuretables",help=\
  "File containing list of treasure tables")
parser.add_argument("-n", "--num",type=int, default=1,help=\
  "Number to generate")
parser.add_argument("typelist",metavar='H',nargs='+',help=\
  "List of hoard types and tables to roll")
args = parser.parse_args()

tables.loadtables(args.tables)
for t in args.typelist:
  for i in range(0,args.num):
    print t + ": " + tables.evaltable(t)
Пример #3
0
                    default="",
                    help="File to draw general profs from")
args = parser.parse_args()

classes = []
spells = []
names = []
profs = []
if len(args.classes) > 0:
    classes = libhenches.parseClasses(args.classes)
    if len(args.spells) > 0:
        spells = libspellbook.parseSpells(args.spells)
if len(args.names) > 0:
    names = libhenches.parseNames(args.names)
if args.treasure != "":
    tables.loadtables(args.treasure)
if args.genprofs != "":
    profs = libhenches.parseProfs(args.genprofs)

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 != '')
Пример #4
0
"Hills":(2,4,1), "Woods":(2,4,1), "Desert":(2,4,1), "Jungle":(2,6,1),\
"Mountain":(2,6,1), "Swamp":(2,6,1)}

parser = argparse.ArgumentParser(description="Stock hexes for ACKS")
parser.add_argument("-r","--rows",type=int,default=1,help="Number of rows of hexes to stock")
parser.add_argument("-c","--cols",type=int,default=1,help="Number of cols of hexes to stock")
parser.add_argument("-t","--terrain", default="Swamp",help="Terrain type to stock for")
parser.add_argument("-f","--terrainfile",default="./enctables",help="Name of terrainfile to stock from")
parser.add_argument("-m","--monsters",default="./monstertables",help="File of monsters to reference")
parser.add_argument("-e","--treasure", default="./treasuretables",help="File of treasure type tables")
parser.add_argument("-u","--full", action='store_true', help="Generate full lair/encounter descriptions")
parser.add_argument("-n","--encounter", action='store_true', help="Generate single encounter per hex rather than lairs")
args = parser.parse_args()

# load the monster file
tables.loadtables(args.monsters)
# load the terrain description
tables.loadtables(args.terrainfile)
# load the treasure files
tables.loadtables(args.treasure)

encTypeSuffix = "Enc" if args.encounter else "Lair"

# and now we generate the lairs in the hexes
for r in range(0,args.rows):
  for c in range(0,args.cols):
    if not args.encounter: print "Hex (" + str(r) + ", " + str(c) + "):"
    numlairs = 1 if args.encounter else dice.roll(lairdice[args.terrain])
    for i in range(0, numlairs):
      monster = tables.evaltable(args.terrain + "Enc")
      print monster
Пример #5
0
#!/usr/bin/python2

import re
import random
import argparse
import tables

parser = argparse.ArgumentParser(description="Generate treasure")
parser.add_argument("-t","--tables",default="./treasuretables",help=\
  "File containing list of treasure tables")
parser.add_argument("-n", "--num",type=int, default=1,help=\
  "Number to generate")
parser.add_argument("typelist",metavar='H',nargs='+',help=\
  "List of hoard types and tables to roll")
args = parser.parse_args()

tables.loadtables(args.tables)
for t in args.typelist:
    for i in range(0, args.num):
        print t + ": " + tables.evaltable(t)
Пример #6
0
parser.add_argument("--names", default="", help="File to draw NPC names from")
parser.add_argument("-g", "--genprofs", default="", help="File to draw general profs from")
args = parser.parse_args()

classes = []
spells = []
names = []
profs = []
if len(args.classes) > 0:
    classes = libhenches.parseClasses(args.classes)
    if len(args.spells) > 0:
        spells = libspellbook.parseSpells(args.spells)
if len(args.names) > 0:
    names = libhenches.parseNames(args.names)
if args.treasure != "":
    tables.loadtables(args.treasure)
if args.genprofs != "":
    profs = libhenches.parseProfs(args.genprofs)

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,