import random
stats = []
attributes = 5
for i in range(attributes):
r = random.randint(60, 80)
stats.append(r)
#Добавление способностей
Fireball = [12, 15, 28, 10, 5]
Lightning = [7, 13, 15, 30, 10]
Silence = [23, 10, 12, 7, 18]
FireWard = [20, 23, 14, 6, 17]
while True:
print('Stats up: ', end='')
for i in range(attributes):
print(stats[i], end=' ')
print('\n\t[1] - Strength\
\n\t[2] - Dexterity\
\n\t[3] - Intelligence\
\n\t[4] - Wisdom\
\n\t[5] - Charisma')
select = int(input('Select: '))
#Проверка ввода
if select<1 or select>5:
print("Invalid Input")
break
select -= 1
stats[select] = stats[select] + random.randint(5, 15)
for i in range(len(stats)):
if i == select:
continue
stats[i] = stats[i] - random.randint(5, 30)
print('Stats up: ', end='')
for i in range(attributes):
print(stats[i], end=' ')
print('\n\t[1] - Fireball\
\n\t[2] - Lighting\
\n\t[3] - Silence\
\n\t[4] - Fire Ward') #Выбор способностей
select = int(input('Select shoot: '))
if select == 1:
for i in range(attributes):
stats[i] -= Fireball[i]
elif select == 2:
for i in range(attributes):
stats[i] -= Lightning[i]
elif select == 3:
for i in range(attributes):
stats[i] -= Silence[i]
elif select == 4:
for i in range(attributes):
stats[i] -= FireWard[i]
#Проверка ввода для выстрела
if select<1 or select>4:
print("Invalid Input")
break
#Проверка хватает ли stats для выстрела, если нехватает то выбор играть еще или нет!
elif select == 0: pass
if len(list(filter(lambda a: a > 0, stats))) < attributes:
if input('Try again >>> ') != 'y':
break
stats = []
for i in range(attributes):
r = random.randint(60, 80)
stats.append(r)
continue
print('\n\n')