Commit 7516c659 by BellCodeEditor

save project

parent ca5eacdf
Showing with 5 additions and 2 deletions
class Hero: class Hero:
def__init__(self,name,hp,attack): def __init__(self,name,hp,attack):
self.level=114514 self.level=114514
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack self.attack=attack
yase=Hero("垭瑟",300,20) yase=Hero("垭瑟",300,20)
def upgrade(): def upgrade():
...@@ -13,3 +13,5 @@ def upgrade(): ...@@ -13,3 +13,5 @@ def upgrade():
upgrade() upgrade()
upgrade() upgrade()
print("垭瑟的血量为",yase.hp)
print("垭瑟的攻击力为",yase.attack)
\ 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