Commit c56e8f35 by BellCodeEditor

auto save

parent a00db43e
......@@ -79,18 +79,7 @@ class Hero(object):
info = info1+info2+info3
print(info)
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
self.attack = 50
self.max_hp = self.hp
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
classe = Hero("垭瑟")
print(30 * '-')
print(' 战斗开始')
while True:
......@@ -112,4 +101,15 @@ while True:
if status == 1:
yase.cure()
else:
yase.combat(houyi)
\ No newline at end of file
yase.combat(houyi)s Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
self.attack = 50
self.max_hp = self.hp
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
houyi = Player("射手", "后羿")
ya
\ 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