Commit d27c975d by BellCodeEditor

save project

parent 749a50bf
Showing with 16 additions and 2 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -42,4 +43,17 @@ print("-"*30)
print("纷争开始了")
while True:
print("-"*30)
input("请选择攻击方式(1攻击)(2治疗)")
\ No newline at end of file
choice=input("请选择攻击方式(1攻击)(2治疗)")
if choice=='1':
houyi.combat(yase)
elif choice=='2':
houyi.cure()
elif choice=="q":
exit()
else:
print("请选择攻击方式(1攻击)(2治疗)")
bbb=random.randint(1,3)
if bbb==1:
yase.cure()
else:
yase.combat(houyi)
\ 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