Browse Source

Modified arguments

master
Noëlle 4 years ago
parent
commit
14bec9b0a6
1 changed files with 17 additions and 4 deletions
  1. 17
    4
      koboldgen.py

+ 17
- 4
koboldgen.py View File



if __name__ == "__main__": if __name__ == "__main__":
args = sys.argv[1:] args = sys.argv[1:]
if "--campaign" in args:
if "--campaign" in args or "-c" in args:
cs = [] cs = []
for _ in range(6): for _ in range(6):
c = Character() c = Character()
k.print() k.print()


else: else:
c = Character()
c.generate()
c.print()
if len(args) == 0:
c = Character()
c.generate()
c.print()
else:
try:
num = int(args[0])
for _ in range(num):
c = Character()
c.generate()
c.print()
except:
print(f"Invalid arguments: {', '.join(args)}")
c = Character()
c.generate()
c.print()

Loading…
Cancel
Save