Commit c619e270 by BellCodeEditor

save project

parent 6bb99247
Showing with 13 additions and 1 deletions
import random
# 英雄角色类 # 英雄角色类
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
...@@ -39,6 +40,16 @@ while True: ...@@ -39,6 +40,16 @@ while True:
break break
elif ce == "1": elif ce == "1":
p1.combat(p2) p1.combat(p2)
elif : elif ce == "2":
p1.cure()
else:
print("please again input (1combot/2cure)")
continue
k=random.randint(1,3)
if k =="1":
p2.combat(p1)
elif k=="2" or k=="3":
p2.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