Commit 8627074f by BellCodeEditor

save project

parent d8c83a5f
Showing with 17 additions and 0 deletions
import random
class Hero(object): # 英雄类 class Hero(object): # 英雄类
def __init__(self, name): # 实例属性 def __init__(self, name): # 实例属性
self.name = name self.name = name
...@@ -43,3 +45,18 @@ print(' 开始了') ...@@ -43,3 +45,18 @@ print(' 开始了')
while True: while True:
print("-" * 30) print("-" * 30)
choice = input("选择技能(1公鸡/2治疗:") choice = input("选择技能(1公鸡/2治疗:")
if choice == "q":
print("结束")
break
elif choice == "1":
hoyi.choice(yase)
elif choice == "2":
houyi.cure()
elif:
print("重输1或2")
contiune
staus = random.randint(1,3)
if status == 1:
yase.cure()
elif:
yase.combat(houyi)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment