Commit b6559214 by BellCodeEditor

save project

parent 36b9b394
Showing with 7 additions and 3 deletions
...@@ -6,7 +6,11 @@ class Hero: ...@@ -6,7 +6,11 @@ class Hero:
self.attack=attack self.attack=attack
yase=Hero("亚瑟",3000,999) yase=Hero("亚瑟",3000,999)
houyi=Hero("后羿",300,2) houyi=Hero("后羿",300,2)
print("后羿血量为:",houyi.hp) print(yase.hp)
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+300
upgrade()
print(yase.hp)
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