Commit 41a1f311 by BellCodeEditor

save project

parent c6fbfbce
Showing with 19 additions and 2 deletions
import random
import time
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -46,9 +48,17 @@ while True:
if jr=="1":
houyi.combat(yase)
print("-"*30)
print("对方输出中...")
time.sleep(2)
print("-"*30)
ys=random.randint(1,2)
elif jr=="2":
houyi.cure()
print("-"*30)
print("对方输出中...")
time.sleep(2)
print("-"*30)
ys=random.randint(1,2)
elif jr=="退出":
print("-"*30)
cx = input("确定退出吗?([Enter]退出\\输入其他继续)")
......@@ -58,4 +68,11 @@ while True:
exit()
else:
print("游戏继续")
print("-"*30)
\ No newline at end of file
print("-"*30)
else:
print("请重新输入")
continue
if ys==1:
yase.combat(houyi)
else:
yase.cure()
\ No newline at end of file
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