Commit 70aa773e by BellCodeEditor

auto save

parent 12d4f173
Showing with 15 additions and 0 deletions
......@@ -27,6 +27,20 @@ class Hero(object):
print(info)
print('你干嘛啊~~')
exit()
def dazhao(self, enemy): # 普通攻击
info1 = self.name+"使用大招"
info2 = "造成"+str(self.attack)*99+"点伤害,"
enemy.hp -= self.attack
if enemy.hp > 0:
info3 = enemy.name+"还剩下"+str(enemy.hp)+"血量"
info = info1+info2+info3
print(info)
else:
info3 = enemy.name+"阵亡,游戏结束"
info = info1+info2+info3
print(info)
print('你干嘛啊~~')
exit()
class Player(Hero):
def __init__(self,hero_type,name):
......@@ -53,6 +67,7 @@ while True:
a=input("请选择技能:1攻击/2治疗")
if a=="1":
houyi.combat(yase)
random.randint(1,10)
elif int(a)==2:
houyi.cure()
elif a=="q":
......
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