Commit 97f40177 by BellCodeEditor

save project

parent 1e7a0890
Showing with 8 additions and 2 deletions
import random
class Hero: # 英雄类 class Hero: # 英雄类
def __init__(self, name): # 实例属性 def __init__(self, name): # 实例属性
self.name = name self.name = name
...@@ -49,4 +50,10 @@ while True: ...@@ -49,4 +50,10 @@ while True:
elif sb=="2": elif sb=="2":
houyi.cure() houyi.cure()
else: else:
print("请重输") print("请重输")
\ No newline at end of file continue
cnm=random.randint(1,3)
if cnm==1:
yase.combat(houyi)
else:
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