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

@@ -102,7 +102,7 @@ class Character:

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

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