doza :
кто хочет?
import random
player_hp = 100
gold = 0
potions = 3
monsters = [
("Скелет", 25),
("Зомби", 35),
("Паук", 20),
("Орк", 40),
("Дракон", 60)
]
print("=== ДОБРО ПОЖАЛОВАТЬ В ПОДЗЕМЕЛЬЕ ===")
while player_hp > 0:
print("\n----------------------------")
print("HP:", player_hp)
print("Золото:", gold)
print("Зелья:", potions)
print("\n1 - Исследовать")
print("2 - Выпить зелье")
print("3 - Выйти")
choice = input("Выбор: ")
if choice == "1":
monster = random.choice(monsters)
monster_name = monster[0]
monster_hp = monster[1]
print("\nНа тебя напал", monster_name)
while monster_hp > 0 and player_hp > 0:
print("\nТвой HP:", player_hp)
print(monster_name, "HP:", monster_hp)
print("1 - Атаковать")
print("2 - Убежать")
fight = input("> ")
if fight == "1":
damage = random.randint(10, 20)
monster_hp -= damage
print("Ты нанёс", damage, "урона!")
if monster_hp 0:
heal = random.randint(20, 35)
player_hp += heal
if player_hp > 100:
player_hp = 100
potions -= 1
print("Ты восстановил", heal, "HP")
else:
print("Зелий нет!")
elif choice == "3":
print("Игра окончена.")
break
else:
print("Неверный выбор!")
if pl
2026-07-17 10:55:12