Commit 293ff0e1 by BellCodeEditor

save project

parent 733ea139
Showing with 9 additions and 1 deletions
......@@ -4,7 +4,15 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+275
yase.attack=yase.attack+50
yase=Hero("亚瑟",5000,350)
houyi=Hero("后羿",4500,400)
upgrade()
print("亚瑟的血量:",yase.hp)
houyi=Hero("后羿",4500,400)
print("后羿的血量:",houyi.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