Commit 13335531 by BellCodeEditor

auto save

parent beb166ed
Showing with 2 additions and 4 deletions
......@@ -7,7 +7,7 @@ class Hero(object):
self.attack = 40
self.max_hp = self.hp
def cure(self): # 治疗
def cure(self):
self.hp+=55
if self.hp>self.max_hp:
self.hp=self.max_hp
......@@ -25,13 +25,11 @@ class Hero(object):
info3 = enemy.name+"阵亡,游戏结束"
info = info1+info2+info3
print(info)
print('你干嘛啊~~')
exit()
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
self.hp = 300
self.attack = 50
self.max_hp = self.hp
self.hero_type = hero_type
......
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