Commit 57faab64 by BellCodeEditor

save project

parent beb166ed
Showing with 10 additions and 2 deletions
......@@ -28,7 +28,7 @@ class Hero(object):
print('你干嘛啊~~')
exit()
class Player(Hero):
用了治疗,血class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
......@@ -44,7 +44,7 @@ class Player(Hero):
self.hp+=c
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:",str(c),",目前的血量为:",self.hp)
print(self.name+"使量增加:",str(c),",目前的血量为:",self.hp)
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
......
class Playear(hero):
def__init__(fdgyf xjbdgbcyg)
super()._init_name
self.hp=200
self.attack=50
self.max_hp=hero_type
houyi=Playear()
yase=hero
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