Commit 35e69e01 by BellCodeEditor

auto save

parent c2430dee
Showing with 0 additions and 6 deletions
print("你有病"*99999999+"你有病")
\ No newline at end of file
......@@ -10,7 +10,6 @@ class Hero(object):
self.hp += 60
if self.hp > self.max_hp :
self.hp = self.max_hp
print(self.name+"使用了治疗术,血量增加了60")
def combat(self, enemy): # 普通攻击
info1 = self.name+"对"+enemy.name+"发起进攻,"
......@@ -25,7 +24,6 @@ class Hero(object):
info = info1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
......@@ -43,10 +41,8 @@ class Player(Hero):
if self.hp > self.max_hp :
self.hp = self.max_hp
print(self.name + "使用了治疗术,血量增加了"blood)
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
while True:
print('-'*30)
a = input("攻击按1,治疗按2:")
......
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