Commit 32c9307f by BellCodeEditor

save project

parent 6fe6428a
Showing with 9 additions and 3 deletions
......@@ -7,8 +7,13 @@ class Hero:
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+100
self.attack=self.attack+20
yase=Hero("亚瑟",600,20)
houyi=Hero("后羿",600,40)
houyi=Hero("后羿",600,40)
yase.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