|
|
@@ -142,14 +142,15 @@ class Campaign: |
|
|
|
if __name__ == "__main__": |
|
|
|
parser = argparse.ArgumentParser() |
|
|
|
group = parser.add_mutually_exclusive_group() |
|
|
|
group.add_argument("-k", "--kobolds", help="print this many kobolds", type=int, default=1) |
|
|
|
group.add_argument("-n", "--names", help="print this many kobolds without stat blocks", type=int) |
|
|
|
group.add_argument("-s", "--ship", help="print only the ship name and description", action="store_true") |
|
|
|
group.add_argument("-c", "--campaign", help="print a full campaign block with 6 kobolds", action="store_true") |
|
|
|
group.add_argument("-c", "--campaign", help="print a full campaign block with N kobolds (default 6)", nargs="?", const=6, type=int, metavar="N") |
|
|
|
group.add_argument("-k", "--kobolds", help="print N kobolds", type=int, nargs="?", const=1, default=1, metavar="N") |
|
|
|
group.add_argument("-n", "--names", help="print N kobolds without stat blocks", nargs="?", const=1, type=int, metavar="N") |
|
|
|
group.add_argument("-p", "--params", help="print only the parameters of a campaign", action="store_true") |
|
|
|
group.add_argument("-s", "--ship", help="print only the ship name and description", action="store_true") |
|
|
|
args = parser.parse_args() |
|
|
|
# print(args) |
|
|
|
if args.campaign: |
|
|
|
cmp = Campaign() |
|
|
|
cmp = Campaign(args.campaign) |
|
|
|
cmp.print_params() |
|
|
|
cmp.print_chars() |
|
|
|
elif args.params: |
|
|
@@ -164,7 +165,7 @@ if __name__ == "__main__": |
|
|
|
c.generate() |
|
|
|
c.print_name() |
|
|
|
else: |
|
|
|
for _ in range(args.num): |
|
|
|
for _ in range(args.kobolds): |
|
|
|
c = Character() |
|
|
|
c.generate() |
|
|
|
c.print() |