Commit bcfe98a7 by BellCodeEditor

save project

parent 252c597f
Showing with 9 additions and 3 deletions
...@@ -5,5 +5,11 @@ class Hero: ...@@ -5,5 +5,11 @@ class Hero:
self.name=name self.name=name
self.attack=attack self.attack=attack
yase=Hero("亚瑟",300,200) yase=Hero("亚瑟",300,200)
houyi=Hero("后裔"240190) print("亚瑟的血量",yase.hp)
print("亚瑟的血量",yase.hp)
\ No newline at end of file def upgrabe():
yase.level=yase.level+1
yase.hp=yase.hp+100
yase.attack=yase.attack+100
upgrabe()
upgrabe()
\ 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