Commit ee17a8a8 by BellCodeEditor

save project

parent b0e0644d
Showing with 21 additions and 2 deletions
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -43,4 +44,23 @@ print("-"*30) ...@@ -43,4 +44,23 @@ print("-"*30)
print(" 战斗开始") print(" 战斗开始")
while True: while True:
print("-"*30) print("-"*30)
input("战斗开始请玩家选择技能(1攻击/2恢复):") com=input("战斗开始请玩家选择技能(1攻击/2恢复):")
\ No newline at end of file if com=="q":
print("结束")
break
elif com=="1":
houyi.combat(yase)
elif com=="2":
houyi.cure()
else:
print("无效字符")
continue
num=rendom.randint(1,3)
if num=="1":
yase.combat(houyi)
elif:
yase.cure()
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