-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdndClassCreator.py
43 lines (39 loc) · 1.25 KB
/
dndClassCreator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 18 19:06:47 2017
@author: Mackenzie
"""
# DND 5E Character Creator
print "Welcome to Mack's DND 5E Character Creator and Manager"
validmenu = 0
while validmenu == 0:
print "Enter C to create a new character or R to review an old character or Q to Quit"
option = input("Enter Choice: ")
if option == "C":
validmenu = 1
elif option == "R":
validmenu = 2
elif option == "Q"
print "goodbye"
#Enter Quit Command Here
else:
print "Answer Not Valid, Try Again"
if validmenu = 1:
data = charCreate()
newstatslist = [data(1),data(2),data(3),data(4),data(5),data(6)]
newdclass = data(7)
newdrace = data(8)
newname = data(9)
newchar = Character(newname,newstatslist,newdclass,newdrace)
if validmenu = 2:
#Load Character Creation File
class Character:
"Common base class for all characters"
def __init__(self, name, statslist, dclass, drace):
self.dclass = dclass
self.drace = drace
self.statslist = statslist
self.name = name
def displayCharacterRecord:
print "Name : ", self.name, ", Race: ", self.drace, ", Class: ", self.dclass
print "\n Strength: ", self.statslist(1)