Commit b88f9052 by BellCodeEditor

save project

parent 7b239d2c
Showing with 11 additions and 3 deletions
......@@ -17,15 +17,22 @@ class Hero:
info = info1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__(self,name):
super().__init__(name)
self.hp= 900
self.attack= 50
player = Player("亚瑟")
print(player.hp)
# def upgrade(self):
# self.level=self.level+1
# self.hp=self.hp+50
# self.attack=self.attack+4
yase = Hero("亚瑟")
houyi = Hero("后羿")
yase.combat(houyi)
# yase = Hero("亚瑟")
# houyi = Hero("后羿")
# yase.combat(houyi)
# print("垭瑟的初始血量值为:",yase.hp)
# yase.upgrade()
# print("升级1次后,垭瑟的血量值为:",yase.hp)
\ 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