Commit 9c570c5b by BellCodeEditor

save project

parent 37871540
Showing with 10 additions and 2 deletions
...@@ -8,4 +8,12 @@ yase=Hero("亚瑟",300,20) ...@@ -8,4 +8,12 @@ yase=Hero("亚瑟",300,20)
houyi=Hero("后羿",230,25) houyi=Hero("后羿",230,25)
print(yase.level) print(yase.level)
print("亚瑟的血量是:",yase.hp) print("亚瑟的血量是:",yase.hp)
print("后羿的血量是:",yase.hp) print("后羿的血量是:",yase.hp)
\ No newline at end of file def upgrade():
yase.level+=1
yase.hp+=50
yase.attack+=4
upgrade()
upgrade()
upgrade()
print("亚瑟的血量是:",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