Commit d6c10129 by BellCodeEditor

save project

parent ecf0cd47
Showing with 4 additions and 4 deletions
......@@ -7,9 +7,9 @@ class Hero:
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+50
self.name=self.name+4
houyi=Hero("HOYI,240,23")
self.attack=self.attack+4
houyi=Hero("后羿",240,23)
houyi.upgrade()
print("等级",houyi.level)
print("血量",houyi.hp)
print("攻击力",houyi.name)
\ No newline at end of file
print("攻击力",houyi.attack)
\ 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