Explorar el Código

Modified arguments

master
Noëlle hace 4 años
padre
commit
14bec9b0a6
Se han modificado 1 ficheros con 17 adiciones y 4 borrados
  1. 17
    4
      koboldgen.py

+ 17
- 4
koboldgen.py Ver fichero

@@ -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()

Cargando…
Cancelar
Guardar