-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathspellbook.py
More file actions
executable file
·18 lines (15 loc) · 879 Bytes
/
spellbook.py
File metadata and controls
executable file
·18 lines (15 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python
import libspellbook
import argparse
parser = argparse.ArgumentParser(description="Generate spellbooks for ACKS wizards")
parser.add_argument("-n","--num",type=int,default=1,help="Number of spellbooks to generate")
parser.add_argument("-l","--level",type=int,default=1,help="Level of mage to generate for")
parser.add_argument("-s","--spells",default="./spells",help="File to draw spells from")
parser.add_argument("-i","--intel", type=int,default=1,help="Intelligence bonus of mage")
parser.add_argument("-e","--excess",action="store_true",help="Allow mages to know spells\
beyond the limits of their repertoire, as PC mages are wont to do")
args = parser.parse_args()
spells = libspellbook.parseSpells(args.spells)
for i in range(0,args.num):
known = libspellbook.genSpells(spells, args.level, args.intel, args.excess)
libspellbook.printSpells(known)