Commit 0349eb68 by BellCodeEditor

auto save

parent db77362a
Showing with 18 additions and 8 deletions
# 英雄角色类
class Hero(object):
def __init__(self, name):
self.level = 1
self.hp = 250
self.attack = 40
self.level = 99999999999999999999999999999999999999
self.hp = 9999999999999999999999999999999999999999
self.attack = 99999999999999999999999999999
self.name = name
def combat(): # 攻击
......@@ -19,9 +19,19 @@ class Hero(object):
info = infu1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__(self,name):
super().__init__(name)
self.level = 1
self.hp = 250
self.attack = 40
self.name = name
Player = Player('hy')
print(Player.level)
print(Player.hp)
#yase = Hero("垭瑟")
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
#houyi = Hero("后羿")
#yase.combat(houyi)
\ 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