Commit dab473f6 by BellCodeEditor

save project

parent 8751f60f
Showing with 16 additions and 1 deletions
import random import randint
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -42,8 +43,22 @@ houyi.combat(yase)
yase.combat(houyi)
houyi.cure()
yase.cure()
while True:
print('*'*40)
print(" 战斗开始 ")
while True:
print('*'*40)
sas=input("1攻击/2治疗 请选择技能")
compter_choice=randint(1,2)
if sas=='1':
houyi.combat(yase)
elif sas=='2':
houyi.cure(yase)
else:
print("输入错误")
continue
if compter_choice==1:
yase.combat(houyi)
elif compter_choice==2:
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