Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions Game.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,21 @@ def __init__(self):
def newhero(self):
self.conn.execute('SELECT * FROM levelnotes WHERE level = 1;')
rows = self.conn.fetchall()
marqueeprint('[CHOOSE CLASS]')
centerprint('[w]arrior [m]age [h]unter')
ourclass = input()
if ourclass == 'w' or ourclass == '':
ourclass = 'warrior'
elif ourclass == 'm':
ourclass = 'mage'
elif ourclass == 'h':
ourclass = 'hunter'
else:
centerprint('Please enter a valid selection')
while True:
marqueeprint('[CHOOSE CLASS]')
centerprint('[w]arrior [m]age [h]unter')
ourclass = input()
if ourclass == 'w' or ourclass == '':
ourclass = 'warrior'
break
elif ourclass == 'm':
ourclass = 'mage'
break
elif ourclass == 'h':
ourclass = 'hunter'
break
else:
centerprint('Please enter a valid selection')
marqueeprint('[CHOOSE DIFFICULTY]')
centerprint('[1]easy [2]med [3]hard')
diff = input()
Expand Down Expand Up @@ -729,3 +733,4 @@ def printmarqueehero(self, sometext):
print(lr_justify(str('lvl: ' + str(self.ourhero.level)), '', self.textwidth))
print(lr_justify(str('HP: ' + str(self.ourhero.hp) + '/' + str(self.ourhero.maxhp)), '', self.textwidth))
print(lr_justify(str('XP: ' + str(self.ourhero.xp) + '/' + str(self.ourhero.nextlevel)), '', self.textwidth))