December 2021 0 5 Report
Помогите плиз исправить код, сначала нажимаешь цифру, всё нормально, но потом надо нажать букву, а оно повторяется. Но должно отнимать. import random


stats = []
attributes = 5

print("Stats:", end = " ")
for i in range(attributes):
r = random.randint(60, 80)
stats.append(r)
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: '))
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, 15)

print("Stats", end = " ")
for i in range(attributes):
print(stats[i], end = " ")

fireball = [12, 15, 28, 10,5]
lightning = [7, 13, 15, 30, 10]
Silence = [23, 10, 12, 7, 18]
fire_Ward = [20, 23, 14, 6, 17]

while True:

player_slills=input('\n\tКакой силы применить? \
\n\t[f] - fireball\
\n\t[l] - lightning\
\n\t[s] - silence\
\n\t[w] - fire ward\n')

if player_slills=="f":
for i in range(5):
if stats[i] - fireball[i]>=0:
print()
else:
print ("Невозможно применить скилл! Не хватает статов")
if stats[i] - fireball[i]>=0:
for i in range(5):
stats[i] - fireball[i]
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.