Commit 56455644 by BellCodeEditor

save project

parent f874b56a
Showing with 8 additions and 2 deletions
...@@ -13,6 +13,11 @@ class Hero(object): ...@@ -13,6 +13,11 @@ class Hero(object):
info3=enemy.name+"还剩下"+str(enemy.hp)+"血量。" info3=enemy.name+"还剩下"+str(enemy.hp)+"血量。"
info=info1+info2+info3 info=info1+info2+info3
print(info) print(info)
yase = Hero("垭瑟") class Player(Hero):
houyi= Hero("后羿") def __init__(self,name):
super().__init__(name)
self.hp = 9999999999
self.attack = 9999999999
yase=Player("垭瑟")
houyi=Player("后羿")
yase.combat(houyi) 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