Commit 41a1f311 by BellCodeEditor

save project

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