Commit e880b92e by BellCodeEditor

save project

parent b185dd13
Showing with 39 additions and 6 deletions
a=input("你叫啥名字丫")
print(a+"你真帅")
\ No newline at end of file
def cure(self):
self.hp=self.hp+60
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:",60,",目前的血量为:",self.hp)
print(30*'-')
print(' 真的开始')
while True:
print("-"*30)
choice=input("请选择释放英雄技能(1攻击/2治疗):"
if choice=="q":
print("游戏结束")
break
elif choice=="1":
houyi.combat(yase)
elif choice=="2":
houyi.cure()
else:
print("请重新输入1或者2")
continue
status=random.randint(1,3)
if status==1
yase.cure()
else:
yase.combat(houyi)
def
\ No newline at end of file
......@@ -9,5 +9,9 @@
苏琪 15 11 15 15 30 13 27 11
刘若若 11 11 13 11 20 15 13 29 24
刘阳 11 15 22 11 23 26 22 15 17 52 12
王胜男 27 15 15 26 13 12 15
王娇 12 11 12 12 15 35 23 11
\ No newline at end of file
def cure(self):
blood=random.randint(30,50)
self.hp=self.hp+blood
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗术,血量增加:",blood,",目前的血量为:",self.hp)
\ 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